Minecraft Server RCON Setup and the Commands You Actually Use
Published 2026-07-26 · SameOS Tools
You do not need to sit at the console to type server commands. Minecraft servers ship with RCON (remote console - a standard channel that lets another program send console commands over the network), so saving before a backup or broadcasting a late-night notice can be scripted. Our own modded server runs its automatic backups through it. Here is the three-line setup and the commands that actually stick.
Enabling RCON - three lines in server.properties
In server.properties set enable-rcon=true, put a password in rcon.password, confirm rcon.port (default 25575), and restart. One caveat: the password sits in the file as plain text and the protocol is unencrypted - never forward port 25575 on your router. Use it from the same machine or your home network only; ours stays behind the firewall too.
The sending side - mcrcon
One small tool covers the sending side: mcrcon (on Ubuntu it installs via apt). It fires single commands from the terminal or chains several, which is exactly what a backup script needs.
# Install (Ubuntu)
sudo apt install mcrcon
# Send one command
mcrcon -H 127.0.0.1 -P 25575 -p password "list"
# The classic pre-backup trio: announce, pause saving, flush to disk
# (remember save-on after the backup finishes)
mcrcon -H 127.0.0.1 -P 25575 -p password \
"say Automatic backup in 1 minute" "save-off" "save-all"
The commands you actually use
There are hundreds of commands, but daily operation comes down to these. In the console and RCON you type them without the leading /.
| Situation | Command | What it does |
|---|---|---|
| Players | list |
Who is online right now |
whitelist add namewhitelist on |
Invite-only access (essential for new servers) | |
kick nameban namepardon name |
Kick, ban, unban | |
op namedeop name |
Grant / revoke operator rights | |
| Save & stop | save-all |
Save the world right now |
save-offsave-on |
Pause/resume saving during backups (prevents corrupt files) | |
stop |
Save and shut down cleanly (never kill the process) | |
| World | gamerule keepInventory true |
Keep items on death (friendly-server favourite) |
difficulty peaceful~hard |
Change difficulty | |
time set dayweather clear |
Instant time & weather | |
| Notices & moves | say message |
Broadcast to everyone |
tp name target |
Teleport a player | |
give name item count |
Hand out items |
Killing the process instead of using stop discards everything since the last save - and if you run under Docker, the no-downtime backup from Part 2 pairs directly with the save-off/save-all combo above. Memory and player-count tuning lives in the optimization article.