Generate a secure RCON password for your Minecraft server along with ready to paste server.properties lines, a Docker (itzg/minecraft-server) command and an mcrcon command that runs over an SSH tunnel. Everything is generated in your browser.
People search "Minecraft server password" expecting a box where players type a password to join. Vanilla Java Edition doesn't have that. The RCON password is not it either. RCON is a remote admin console: a TCP port that accepts server commands (/op, /stop, /whitelist, all of it) from anyone who knows the password. It lets you run commands without attaching to the server's terminal, and backup scripts use it to pause saving. It does nothing to stop players from joining.
So there are two separate jobs here:
The whitelist is the lock. These are the server.properties settings that matter:
| Property | What it does |
|---|---|
white-list=true | Only players on the whitelist (and ops) can join. |
enforce-whitelist=true | When the whitelist changes, online players who are no longer on it get kicked. |
online-mode=true | Players must be verified against Minecraft's account servers. This is what makes names on the whitelist mean anything. |
Then add your players from the server console or in game as an op:
/whitelist on
/whitelist add SomePlayer
/whitelist remove SomePlayer
/whitelist list
/whitelist reload
/op YourName
Ops can always join while the whitelist is on, even if they aren't listed, so be stingy with /op. Ops can also run every command RCON can.
The server.properties side is three lines:
enable-rcon=true
rcon.port=25575
rcon.password=YOUR_GENERATED_PASSWORD
Defaults: enable-rcon is false, rcon.port is 25575, and rcon.password is blank. If RCON is enabled with a blank password, it won't start.
A long random password handles the guessing. Nothing a password can do handles the plain text. So:
sudo ufw allow 25565/tcp and sudo ufw deny 25575/tcp.-p 127.0.0.1:25575:25575. Docker-published ports skip ufw rules.server.properties is read as a Java properties file. A backslash starts an escape sequence, and leading spaces are dropped. Colons, equals signs, hash and exclamation marks work but Minecraft rewrites them with a backslash in front. That is why this generator defaults to A-Z, a-z and 0-9.
| Written in the file | Password that worked | Lesson |
|---|---|---|
ab\cd | abcd | A backslash escapes the next character and disappears. |
x\ty | x, a tab, y | \t becomes a real tab. |
end\\ | end\ | Write \\ for one backslash. |
ab:c=d#e!f | ab:c=d#e!f | Works, and the server rewrote the line as ab\:c\=d\#e\!f. |
The file isn't the only parser in the chain. The password also passes through your shell, maybe a Compose file, maybe a .env file, maybe a backup script. Each has its own rules for $, quotes, backslashes and !. If you pick the all-symbols mode, the generator escapes \ : = # ! in the properties line.
docker exec mc rcon-cli list just works.online-mode=true requires Xbox Live authentication.Change the RCON password when someone with access leaves, when it has ever been typed into a chat or a screenshot, or when you find the port was exposed.