sethserver.com
A blocky grass-topped server rack in a cave lit by torches, with a small iron door and a padlock on its front panel.

Minecraft RCON Password Generator and Server Security

By Seth Black • Updated: October 28, 2026

generating...

Characters

server.properties

Docker (itzg/minecraft-server)

mcrcon over an SSH tunnel

Regenerate, copy the server.properties lines into your server's config, restart the server, and keep the password in your password manager. Everything is generated in your browser with crypto.getRandomValues. Nothing gets sent to me. The Docker and mcrcon snippets quote the password for a POSIX shell (bash, zsh, sh), so symbols in the third mode don't get eaten.

Before you paste anything, though, let me save you a common afternoon of confusion.

Minecraft has no server password. RCON isn't one.

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, and I'll cover both:

  1. Control who can play: whitelist plus online mode.
  2. Protect the admin console: a strong RCON password, and RCON kept off the public internet.

How to actually "password protect" a Minecraft server

The whitelist is the lock. These are the server.properties settings that matter, with their meaning from the Minecraft Wiki:

PropertyWhat it does
white-list=trueOnly players on the whitelist (and ops) can join.
enforce-whitelist=trueWhen the whitelist changes, online players who are no longer on it get kicked.
online-mode=truePlayers 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

Those are the exact subcommands a 26.3 server lists for help whitelist. 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.

Check the default, don't assume it. Java Edition 26.3 changed white-list to default to true, and a fresh server.properties generated by the 26.3 server jar had white-list=true. Older versions defaulted to false. And in my test, the itzg/minecraft-server image on 26.3 wrote white-list=false when I didn't set its WHITELIST variable. Open the file and look.

Offline mode and auth plugins

With online-mode=false, the server doesn't verify accounts at all. Anyone can connect with any username, including yours, including an op's. A whitelist of names does nothing, because names are just claims. Some people run offline mode on purpose (LAN parties, proxies that do authentication in front of the backend servers, or players without accounts), and on Spigot and Paper servers there are login plugins that make each player register a password with a command after joining. Those plugins are a patch on a hole the server opened, and they're only as good as the plugin and its password storage. If you don't have a specific reason for offline mode, leave online-mode=true.

What RCON is and why its port must stay private

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. There's also broadcast-rcon-to-ops (default true), which sends RCON command output to online ops. Set it to false if a backup script's chatter annoys them.

The important part, straight from the Minecraft Wiki's RCON page: RCON is not encrypted, and exposing the port to the internet is dangerous. The protocol is the Source RCON design Valve made for its game servers. The client connects over TCP and sends a login packet whose payload is the password, as plain text. Every command after that is plain text too. Anyone on the network path can read the password, and anyone who can reach the port can try passwords.

A long random password handles the guessing. Nothing a password can do handles the plain text. So:

Keep RCON off the internet

Use RCON through an SSH tunnel

If RCON only listens where the internet can't reach it, you reach it the same way you reach the server's shell. From your own computer:

# Forward local port 25575 to RCON on the server's loopback
ssh -N -L 25575:127.0.0.1:25575 you@your-server

# In another terminal, talk to it as if it were local
mcrcon -H 127.0.0.1 -P 25575 -p 'YOUR_GENERATED_PASSWORD' list

Now the password rides inside SSH's encryption. mcrcon also reads MCRCON_HOST, MCRCON_PORT and MCRCON_PASS from the environment, which keeps the password out of your shell history if you load it from a file. Run mcrcon -t for an interactive terminal.

From Python, the mcrcon package works fine. This is what I used to test against a real server:

from mcrcon import MCRcon

with MCRcon("127.0.0.1", "YOUR_GENERATED_PASSWORD", port=25575) as rcon:
    print(rcon.command("list"))

A wrong password raises MCRconException: Login failed.

RCON with the itzg/minecraft-server Docker image

The popular itzg/minecraft-server image handles RCON a little differently from a bare server:

In a Compose file, a literal $ in a value must be written $$, or Compose treats it as a variable and swaps in something else, usually nothing. I checked: RCON_PASSWORD: "ab$$cd$xy" came out as ab$cd. One more reason the default alphabet here is letters and numbers.

Which characters survive server.properties

server.properties is read as a Java properties file (the wiki names Properties.load as the format). I didn't want to guess what that does to a password, so I wrote passwords into server.properties by hand on a 26.3 server, started it, and tried logging in over RCON:

Written in the filePassword that workedLesson
ab\cdabcdA backslash escapes the next character and disappears.
x\tyx, a tab, y\t becomes a real tab.
end\\end\Write \\ for one backslash.
leadleadLeading spaces are dropped.
trail plus 2 spacestrail plus 2 spacesTrailing spaces are kept, invisibly.
ab:c=d#e!fab:c=d#e!fWorks, and the server rewrote the line as ab\:c\=d\#e\!f.
pa$$&"'<>%^*()[]{}|;,.?/~`@the sameFine in the file. Your shell is another story.

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 !. A 32 character password from 62 letters and numbers is about 190 bits, which is absurdly more than a guessing attack will ever get through. Symbols add nothing you need and a lot you might debug. If you pick the all-symbols mode anyway, the generator escapes \ : = # ! in the properties line, and I checked that escaping against the real server.

Generating an RCON password yourself

Any of these give you a letters and numbers (or near enough) password from the operating system's secure random source:

# OpenSSL: 16 random bytes as 32 hex characters
openssl rand -hex 16

# Python: 32 characters from A-Z a-z 0-9
python3 -c "import secrets,string; a=string.ascii_letters+string.digits; print(''.join(secrets.choice(a) for _ in range(32)))"

# Linux/macOS shell
LC_ALL=C tr -dc 'A-Za-z0-9' < /dev/urandom | head -c 32; echo

# Node.js
node -e "const c=require('crypto');const a='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';console.log(Array.from({length:32},()=>a[c.randomInt(a.length)]).join(''))"

Newer servers also have the Minecraft Server Management Protocol (management-server-enabled, off by default), a separate remote management API that uses TLS by default. Its management-server-secret must be exactly 40 letters and numbers, so this generator at length 40 in the first mode makes a valid one.

Bedrock Edition is different

Rotation and common mistakes

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. Edit rcon.password, restart the server, then update every script that uses it. With itzg, change RCON_PASSWORD and recreate the container.

RCON is also a nice example of least privilege gone missing: one password gives the holder every command the server has. I wrote more about that way of thinking in the principle of least privilege in the AI age.

Minecraft Server Password and RCON FAQ

How do I put a password on my Minecraft server?

Vanilla Minecraft Java Edition has no join password. You control who gets in with the whitelist: set white-list=true and online-mode=true in server.properties, then run /whitelist add for each player. Turn on enforce-whitelist if you want players removed from the list to be kicked right away. The RCON password is something else: it protects the remote admin console, not the game.

What is the default RCON port and password in Minecraft?

The default rcon.port is 25575 and enable-rcon is false. rcon.password is blank by default, and if RCON is enabled with a blank password it will not start. You have to set enable-rcon=true and a password yourself.

Is Minecraft RCON encrypted?

No. RCON sends the password and every command in plain text over TCP. Anyone who can watch the traffic can read the password. Never expose the RCON port to the internet: bind it to localhost, firewall it, or reach it through an SSH tunnel.

Which characters are safe in rcon.password?

Letters and numbers are always safe. server.properties is read as a Java properties file, so 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. Shell and Docker Compose add their own trouble with dollar signs and quotes. That is why this generator defaults to A-Z, a-z and 0-9 at 32 characters.

Is the whitelist on by default?

It depends on the version. Minecraft Java Edition 26.3 changed the white-list default to true, and a fresh 26.3 server.properties I generated had white-list=true. Older versions defaulted to false, and in my test the itzg/minecraft-server Docker image wrote white-list=false when no WHITELIST variable was set. Check your server.properties instead of trusting the default.

Does Bedrock Edition have RCON?

No. The Bedrock Dedicated Server has no RCON setting in server.properties. Access control uses allow-list=true with an allowlist.json file, managed with the allowlist command, and online-mode=true requires Xbox Live authentication.

Related tools: Steam password generator, Roblox password generator, Discord password generator, memorable password generator, Redis password generator, and the API key generator.

-Sethers

Newsletter

One email, once a week.

Notes on databases, systems, and the occasional strong opinion about Python. No spam, unsubscribe anytime.

More to read

All tools →

My Password Generators Had 53 Bits of Entropy

Sep 21, 2026

API Key Generator with Prefix, Checksum and SHA-256

Sep 17, 2026

Bcrypt Generator: Hash and Verify Passwords in Your Browser

Sep 17, 2026