API Key Configuration
Obtain and configure your API key for the modl plugin.
Getting Your API Key
- Log in to your modl panel at
yourserver.modl.gg. - Navigate to Settings.
- Locate the API Key section.
- Copy the generated API key to your clipboard.
Adding the Key to Your Plugin
- Open the modl plugin configuration file on your server, located at
plugins/modl/config.yml. - Set the
api-keyfield to the value you copied from the panel:
api-key: "your-api-key-here"- Save the file and restart your server for the changes to take effect.
Key Security Best Practices
Your API key grants full access to your server's modl integration. Follow these guidelines to keep it secure:
- Do not share your API key with anyone who does not need direct access to your server configuration.
- Do not commit your API key to version control or post it in public channels.
- Rotate your key immediately if you believe it has been compromised. You can generate a new key from the panel settings page, which will invalidate the old one.
- Restrict file access to
config.ymlso that only server administrators can read it.
Verifying the Connection
After configuring the API key and restarting your server:
- Run the
/modlcommand in-game or from the server console. - The plugin should report a successful connection to the modl platform.
- Check the server logs for confirmation that the plugin has authenticated with the API.
If the connection fails, double-check that:
- The API key is copied correctly with no extra spaces or characters.
- Your server has outbound network access to
api.modl.gg. - The key has not been rotated or revoked in the panel.