Minecraft anticheat guide

Protecting Discord Webhook URLs and Server Secrets

Keep Discord webhook URLs, API tokens, and database passwords out of public configs, restrict file access, and rotate values that were exposed.

Answer: treat a webhook URL as a password

Anyone who has a Discord webhook URL can post messages into that channel. Keep webhook URLs, API tokens, and database passwords out of public repositories, screenshots, and support tickets. Store them in a file that only the server user can read, or in environment variables, and rotate any value that was pasted somewhere public.

Know which values are secrets

Many anticheat and ban-plugin configs hold values that look harmless. Treat all of the following as secrets, even when a plugin marks a field as optional.

Values to classify as secrets
ValueWho can misuse itHandling rule
Discord webhook URLAnyone who has the URL can post to the channelRestrict file access. Rotate after any exposure
Database host, user, and passwordAnyone with the credentials can read or change stored recordsUse a dedicated account with the minimum grants
API tokens and license keysCan act as your server or your account with the vendorKeep out of configs in shared repositories
Hosting panel keysCan control files, power state, and consoleScope each key and revoke unused ones
Player IP addresses in alert logsPersonal data under your privacy policyLimit log access and set a retention period

Restrict file access on the server

Configs with secrets should be readable only by the account that runs the server. Set that permission on the file itself, and confirm that backups inherit it. Keep the config out of version control, or commit only a template with placeholder values.

Restrict a config file to the server user and confirm git ignores it (placeholders in angle brackets)
# Run as root or the server owner, replacing the placeholders
chown <server-user>:<server-user> /srv/mc/plugins/<PluginName>/config.yml
chmod 600 /srv/mc/plugins/<PluginName>/config.yml

# Confirm the file is ignored by git before committing
git check-ignore -v plugins/<PluginName>/config.yml

Keep secrets out of logs and tickets

Logs spread further than configs. A stack trace, a startup line, or a copied error can reveal a webhook URL or a password. Before you ask for help, redact the value and replace it with a placeholder. Hosting panels often keep a copy of each session's console output, so check its retention period and who can read it.

Rotate a webhook after exposure

Rotation replaces the old URL, so the exposed value stops working. Do this promptly after any leak, including a leak to a former staff member or a screenshot posted in a public channel.

Account for backups and copies

Backups, server snapshots, and forks copy every file, including configs that hold secrets. Add them to your rotation checklist. After a rotation, delete any snapshot that still contains the old value once you no longer need it.

A server template shared with a new team member is another copy. Strip the real values from it before sharing, and confirm the new member receives the secrets through your secret store, not through the template.

Use environment variables where the plugin supports them

Some server setups keep secrets in environment variables, which avoids storing them in a config file on disk. Check whether your anticheat reads the value from the environment before you change anything. If it does not, keep the file restriction described above.

What we have not verified

We have not checked every anticheat's config keys for webhook or secret fields, and this article does not name them. Confirm the field names in your plugin's current documentation before you edit a config. We have also not measured how quickly Discord applies a webhook deletion across clients.

FAQ

Is a webhook URL less sensitive than a bot token?

It is narrower but still a secret. A webhook can post into one channel rather than act across the server, yet anyone with the URL can post spam or fake alerts there. Treat it as a credential.

Can I hide the webhook with a placeholder in the config I share?

Yes. Share a template with placeholder values and keep the real file local. Check that the template does not include a comment or example that still contains a working value.

Do I have to rotate after a staff member leaves?

Rotate if that person could read the file or a log containing the value. If they only saw alerts in the channel, a rotation is optional, but many teams rotate on every departure anyway.

What if a webhook was posted in a public support thread?

Delete the post if you can, then rotate the webhook. Deleting the message alone is not enough, because the URL may have been copied or indexed before you removed it.

Related sources and official pages

Browse all anticheat guides