How to Set Up RCON on Your Minecraft Server
Enable RCON (Remote Console) on your Minecraft Java server for remote command access from external tools, scripts, and integrations.
RCON (Remote Console) is Minecraft's built-in protocol for sending console commands to your server from outside the game. It's how external tools, Discord bots, web dashboards, and automation scripts run commands without logging in as a player.
Do you actually need RCON? The XGamingServer Panel Console already gives you full command access from a browser. RCON is only worth setting up if you're integrating with external tools (Discord bots, monitoring dashboards, custom scripts).
When to Use RCON
| Use case | RCON needed? |
|---|---|
| Run commands from the panel | ❌ Use Console instead |
| Run commands from in-game | ❌ Use OP + chat |
| Discord bot that runs Minecraft commands | ✅ Yes |
| Monitoring dashboard / web panel | ✅ Yes |
| Custom backup or restart scripts | ✅ Yes |
| Tebex / Stripe purchase delivery | ✅ Yes (or HTTP plugin) |
mcrcon from terminal for quick commands | ✅ Yes |
Enable RCON
Stop the server
In the panel, open Console and stop your server.
Edit server.properties
Click Files in the sidebar and open server.properties. Set:
enable-rcon=true
rcon.password=your-strong-random-password
rcon.port=25575
broadcast-rcon-to-ops=false| Setting | Recommended | Notes |
|---|---|---|
enable-rcon | true | Enables the RCON listener |
rcon.password | 20+ random characters | Must not be weak — anyone with this password runs commands as console |
rcon.port | 25575 | Standard RCON port — change if conflicts |
broadcast-rcon-to-ops | false | Hide RCON commands from OP players |
Critical: RCON authentication is plaintext. The password is sent over the wire on every connect. Never use a real password — generate a random string with a password manager.
Add the RCON port to Network
In the panel, click Network in the sidebar. Click Create Allocation and add port 25575 (or your custom port).
Note the public IP and port — that's what your RCON client will connect to.
Start the server
Start from Console. RCON activates on the new port.
Test the connection
From your local machine, install mcrcon and run:
mcrcon -H your-server-ip -P 25575 -p your-password "list"You should see the player list. If you see "connection refused", check the Network allocation.
RCON Clients
| Client | Platform | Best for |
|---|---|---|
| mcrcon | Windows / Mac / Linux | Quick CLI commands and scripts |
| rcon-cli | Cross-platform | Docker-friendly |
| KingsRCON | Windows GUI | Visual interface |
| mctools.org | Web | Quick test from a browser |
| Source RCON Protocol libraries | Any language | Building custom integrations |
For Discord bots, use a library:
- JavaScript / TypeScript:
rcon-clientfrom npm - Python:
mcrconoraiomcrcon - Go:
gorcon/rcon
Security Best Practices
- Generate a long random password — 20+ characters, no dictionary words
- Never reuse the password elsewhere
- Restrict the RCON port to known IPs if possible (use firewall rules at the network level)
- Don't enable RCON on a publicly-advertised port unless you trust your firewall
- Rotate the password if you ever share or accidentally commit it
- Set
broadcast-rcon-to-ops=falseso OP players can't see what RCON is doing - Audit who has the password — every team member with access can run any command
Remember: RCON commands run as console. That means full permissions, no OP check, no rate limit. A leaked password is equivalent to giving someone server root.
Common Commands via RCON
Most server commands work the same as in Console:
mcrcon -H ip -P 25575 -p pw "say Server restarting in 5 minutes"
mcrcon -H ip -P 25575 -p pw "save-all flush"
mcrcon -H ip -P 25575 -p pw "stop"
mcrcon -H ip -P 25575 -p pw "give Steve diamond 64"
mcrcon -H ip -P 25575 -p pw "list"Settings Reference
| Setting | Default | Description |
|---|---|---|
enable-rcon | false | Master switch for RCON |
rcon.password | empty | Authentication password |
rcon.port | 25575 | TCP port to listen on |
broadcast-rcon-to-ops | true | Whether OPs see RCON command output in chat |
Common Issues
| Problem | Fix |
|---|---|
| Connection refused | RCON port not allocated in Network, or enable-rcon=false |
| Authentication failed | Wrong password — check rcon.password for typos |
| Connection times out | Wrong IP, or firewall blocking the port |
Empty password error | RCON refuses empty passwords — set one |
| Commands run but return no output | Some commands have no output — check the actual server state |
| Port conflict | Change rcon.port to a different value, update Network allocation |
| RCON works locally but not remotely | Network allocation not added, or external firewall blocks it |
Common Mistakes
| Mistake | Fix |
|---|---|
| Using a weak / reused password | Generate a long random one — RCON is full server access |
| Forgetting to add the port allocation | RCON listens on the port but isn't reachable without Network entry |
| Sharing the password in support tickets | Reset it after sharing |
| Enabling RCON when Console works fine | Adds attack surface for no benefit — only enable if you need it |
| Not restarting after editing server.properties | RCON loads at startup |
Related Guides
How is this guide?
