Minecraft RCON: how to enable it and keep it safe

RCON runs server console commands over the network. Enable it in server.properties, set a password, and keep the port off the internet. Here is how.

Omne Team4 min read

Quick answer RCON (remote console) is a TCP protocol that lets an administrator run server commands remotely [1]. To enable it, set enable-rcon=true and a non-blank rcon.password in server.properties, then restart. The default port is 25575 [1][2]. RCON is not encrypted, and the Minecraft Wiki calls it dangerous to expose RCON ports to the internet [1], so keep the port firewalled and connect only from the same machine or a network you trust.

What RCON is

The Minecraft Wiki describes RCON as a “TCP/IP-based protocol that allows server administrators to remotely execute commands” [1]. In server.properties terms, enabling it “allows access to the server console over a network” [2]. Client tools such as mcrcon [3] speak this protocol to send commands to a running server.

Enable it in server.properties

These are the four RCON settings, with the defaults listed on the Wiki [2]:

Setting Default What it does [2]
enable-rcon false Turns RCON on.
rcon.port 25575 The TCP port RCON listens on.
rcon.password blank The RCON password. If it is blank and RCON is enabled, RCON will not start as a safeguard.
broadcast-rcon-to-ops true Sends RCON command output to all online operators.

A minimal setup. The Wiki’s RCON page shows these same four keys [1]; the values here are mine, except the port default [2]:

enable-rcon=true
rcon.password=<choose-a-long-random-password>
rcon.port=25575
broadcast-rcon-to-ops=true

Replace the placeholder password with your own. Restart the server after editing; this post did not check whether the server re-reads the file without a restart. Set broadcast-rcon-to-ops=false if you do not want online operators to see the output of commands sent over RCON [2]; the Wiki’s example config uses false [1], but it does not present that as a recommendation. For the rest of the file, see server.properties explained.

Why exposure matters

Two Minecraft Wiki pages say the same thing in different words:

  • “It is dangerous to expose RCON ports to the internet. RCON is not encrypted and can be a subject to man-in-the-middle attacks.” [1]
  • “It’s not recommended to connect to rcon via untrusted networks, like the internet, as it is not encrypted. All data sent between the client and the server (including the rcon password) can be intercepted. Ideally, only connect to rcon from localhost.” [2]

So the risk is twofold: anyone who can reach the port can try to guess the password, and anyone who can watch the traffic can read the password. RCON grants console access, so a leaked password means someone else can run commands as the console. The Wiki quotes above are the sourced part; the guessing risk is a general consequence, not something the Wiki page spells out.

Reducing the risk

  1. Do not forward or open rcon.port. If you host at home, do not add a port-forward for it. The player port is the only one players need.
  2. Firewall it. Block the RCON port from the public internet in your host firewall or provider panel, and allow it only from addresses you control. This post gives no firewall commands because they depend on your OS and firewall tool, and none were checked here.
  3. Prefer localhost. The Wiki’s own recommendation is to connect only from localhost [2]. If you need to run commands from another machine, reaching the server over a private or trusted network is closer to that advice than sending RCON across the internet. Whether tunnelling RCON (for example over SSH or a VPN) is sufficient is not covered by the Wiki pages read for this post, so it is not verified here.
  4. Use a long, random, unique password. This is general advice, not from the Wiki. The password is sent unencrypted [2], so it should not be one you use anywhere else.
  5. Leave it off if you do not use it. enable-rcon defaults to false [2].

Client example

The mcrcon project’s README gives this usage form and example [3]:

mcrcon [OPTIONS] [COMMANDS]

mcrcon -H my.minecraft.server -p password -w 5 "say Server is restarting!" save-all stop

Per the README, -H is the server address (default localhost), -P the port (default 25575), -p the RCON password, and -w waits a set time (1 to 600 seconds) between commands [3]. The README also says the password can be set with the MCRCON_PASS environment variable, which command-line options override [3]. The example above is the README’s and puts the password on the command line. Author’s advice, not from the README: a password typed on the command line can end up in shell history and process listings, so the environment variable may be preferable; this post did not verify either behavior. The Wiki’s RCON page also lists a Python client, barneygale/MCRcon, which this post did not read [1].

What this doesn’t cover

  • Bedrock Edition, which the sources here do not address.
  • Whether specific server software (Paper, Spigot, Forge) changes RCON behavior. Not checked.
  • Rate limiting or lockout after failed password attempts. The pages read do not say either way.
  • Host panels that manage RCON for you, or ones that block the port already. Check your host’s docs.
  • Exact firewall commands for your OS.

Questions people ask

Is RCON encrypted?

No. The Minecraft Wiki says RCON is not encrypted, so everything sent between client and server, including the password, can be intercepted [2]. Its advice is to connect only from localhost where possible [2].

Why won't RCON start even though enable-rcon is true?

The Wiki says that if rcon.password is blank and RCON is enabled, it will not start as a safeguard [2]. Set a non-blank password and restart the server.

Sources

  1. RCON (Minecraft Wiki)
  2. server.properties (Minecraft Wiki)
  3. mcrcon README (Tiiffi/mcrcon on GitHub)