Server management¶
Managing the server over RCON with
mcrcon (AUR: mcrcon).
All commands on this site are written without the leading / because
that's how the server console and RCON expect them.
RCON setup (server.properties)¶
Restart the server after changing these.
RCON is plaintext
The RCON protocol sends the password and every command unencrypted.
Only use it on localhost or a trusted LAN — never expose
rcon.port to the internet. For remote admin, tunnel over SSH:
mcrcon usage¶
Interactive terminal session (the usual way in):
mcrcon also reads its connection from the environment, so with
MCRCON_HOST / MCRCON_PORT / MCRCON_PASS set it's just:
# fish — put the password somewhere private, not in config.fish committed to dotfiles
set -gx MCRCON_HOST localhost
set -gx MCRCON_PORT 25575
set -gx MCRCON_PASS (cat ~/.config/mcrcon/pass)
mcrcon -t # interactive: type commands, Ctrl-D or "Q" to quit
One-shot commands (scriptable — each argument is a command):
nmcrcon for interactive sessions
nmcrcon (AUR:
nmcrcon-git) is a nicer interactive console: arrow keys, Ctrl-R
history search, persistent history, a masked password prompt, and —
unlike the unmaintained mcrcon 0.7.2 — it handles responses larger
than one packet (mcrcon's classic "Invalid packet size" crash on
long help or data get output). It reads the same MCRCON_*
environment variables. Keep mcrcon for scripts, though:
nmcrcon has no one-shot command mode yet, no silent mode, and
always exits 0. mc-tui does exactly this split — [console] opens
nmcrcon when installed, while run-command stays on mcrcon.
mc-tui — the cheatsheet as a TUI¶
bin/mc-tui
(fish + fzf, run it with mise run tui) wraps every command on this site
in an interactive picker:
- Browse by category — the same commands as the Commands pages, plus the full god-gear set.
- Placeholders are filled interactively —
<player>offers your saved player names and selectors,<item>searches ~200 useful items (gear, food, potions, enchanted books, redstone, …),<enchantment>,<effect>,<entity>,<structure>and<biome>get their own pickers, anything else is a quick prompt. Optional slots (like<count?>) can be skipped with enter. - Searchable in English and português (pt-BR) — the item, enchantment,
effect, entity and biome pickers carry the official Brazilian Portuguese
names from the game's language file, so typing
picareta,fogueiraorremendofinds the right id. - Copy or run — the finished command goes to the clipboard
(
wl-copy/xclip) and/or straight to the server over RCON viamcrcon. [settings]stores host / port / password in~/.config/mc-tui/rcon.conf(chmod 600— remember, RCON is plaintext).[players]keeps a name list for<player>slots —ctrl-ffetches whoever is online right now (vialistover RCON),ctrl-aadds names manually.[console]drops into an interactive session —nmcrconwhen installed (better line editing + history), elsemcrcon -t.[servers]lists the worlds on a Crafty Controller and starts / stops / restarts / backs them up — see below.[map]opens the world on chunkbase — it reads the seed over RCON and opens the seed map centered on spawn, on coordinates you type, or on a live player's position (fetched withdata get entity <player> Pos). The version tag (e.g.java_26_1) is theplatformfield in[settings]. Headless/over SSH it copies the URL instead of launching a browser.[map]→ FOLLOW (ormc-tui follow <player>) is a live map: it opens chunkbase in a dedicated Chromium window and re-centers it on the player every few seconds, so you can watch them move in real time. Chunkbase only reads the view from the URL, so each update reloads the tab over the DevTools protocol — driven byscripts/follow-map.py(needschromium+uv; the script's Python deps are fetched on first run). Run it with no player (mise run follow) and it lists who's online, lets you pick, then asks the refresh interval (default from[settings]). The interval and starting zoom live in[settings](10 s and 2) — lower the interval for snappier tracking at the cost of more reload flicker, or pass it per-run withmc-tui follow <player> <seconds>. Zoom with the scroll wheel and it sticks (the loop reads your current zoom back each tick). Close the window or press Ctrl+C to stop.
Subcommands reuse the saved settings outside the picker:
| Command | Use |
|---|---|
mise run console (mc-tui console) |
interactive RCON console |
mc-tui run save-all flush |
one-shot command, for scripts and backups |
mise run servers (mc-tui servers) |
Crafty servers with their state, edition, port and players |
mise run start <name> (mc-tui start\|stop\|restart\|backup <name>) |
control a Crafty server by name prefix; start stops the other world first and waits until it's up |
mc-tui status [--raw] |
cached RCON reachability check — the TUI shows it in the menu headers and disables sending while the server is down. --raw prints up/down/unconfigured for scripts |
mc-tui map [player] |
open the world on chunkbase (centered on a player, if given) |
mise run follow [player] [secs] (mc-tui follow) |
live map — Chromium window that re-centers on the player every N s. No player → pick from who's online and choose the interval; interval + zoom default to [settings] |
mise run session (mc-tui session) |
tmux session craftops — TUI in one window, console in the other, copy with Ctrl+Y and paste across |
mise run session zellij |
same, but in zellij (two tabs); no argument defaults to tmux |
The command and item tables are plain pipe-delimited text in
data/*.psv — one row
per line, shared by both apps and the web builder. Inspect them
with mc-tui __dump catalog (or items, enchantments, effects, …)
and add your own rows in ~/.config/mc-tui/catalog.local and
items.local using the same category|template|description format.
No terminal?
The Command builder is the same picker as a web page — same catalog, same bilingual item search, copy-paste into the game chat. Works on phones; share it with whoever plays on the server.
Crafty — start and stop the worlds¶
If the worlds run on Crafty Controller
(Java and Bedrock, one panel), mc-tui can drive it through Crafty's REST
API: [servers] in the main menu, or the servers / start / stop /
restart / backup subcommands. It runs one world at a time — starting
one offers to stop whichever other world is up, then waits until the new one
is really up (Java: answers the server-list ping, i.e. the world is loaded;
Bedrock: running).
Give mc-tui its own Crafty user and API key, never the admin password:
- Crafty → Roles → new role
mc-tuiwith, on each Minecraft server, Commands, Terminal, Logs and Backup — nothing else. - Crafty → Users → new user (e.g.
mc_tui— lowercase, digits and_only) in that role. - That user → API Keys → create a key with the same four server permissions and no Crafty permissions, then copy its token.
- mc-tui →
[settings]→crafty url(e.g.https://crafty.example.lan) andcrafty api key. Saved to~/.config/mc-tui/crafty.conf(chmod 600);test craftylists the servers.
The menu headers then show the running world next to the RCON status
(e.g. crafty: akane ● 1/8), and when RCON is down because the Java world is
stopped, mc-tui says so instead of a generic offline.
Java world — commands still go over RCON (real replies). In a server's
menu, use for RCON points [settings] at Crafty's host; the RCON port and
password stay as you set them (they live in that server's
server.properties).
Bedrock world — Bedrock has no RCON. While a Bedrock world is the one
running, mc-tui sends commands through Crafty's server console and shows
the console lines that follow as the reply. The main menu switches to a small
Bedrock catalog (teleport, give/clear, god gear, effects, enchant, xp,
gamemode, difficulty, time/weather, gamerules, chat, allowlist) in Bedrock
syntax, and
[console] becomes a simple line-by-line console. [map] and the live follow
map work too: positions come from Bedrock's querytarget, and chunkbase opens
with the Bedrock seed and platform set in [settings] (bedrock seed,
bedrock platform). Building (rail builder) stays Java-only. Add your own
Bedrock rows in ~/.config/mc-tui/catalog-bedrock.local.
Bedrock god gear
Bedrock's give can't hand out pre-enchanted items, so each god gear row
is a chain of commands (joined with &&, sent one by one): replaceitem
… slot.weapon.mainhand 0 keep <item> puts the item in your hand — only if
the hand is empty, so nothing you hold is ever replaced — then one
enchant per enchantment (survival-legal levels; no sweeping_edge, which
is Java-only). Armor and the elytra are enchanted in the hand: equip them
after. Copying a chained row gives one command per line.
Bedrock transport: RakNet, join from LAN Games
BDS 1.26.5x defaults to transport=nethernet, but NetherNet joins fail on
this LAN with error code Boat (Mojang bug
BDS-23108) — it works only right after
the phone restarts, and every server restart breaks it again. Cherry
World runs transport=raknet instead: the startup warning that
"NetherNet is the only supported transport type" is wrong for these
builds. Join from LAN Games; a manually added server entry (Servers
tab) never reaches the server from the phone. If a stale NetherNet entry
lingers in the list after switching, restart the phone once.
Backup flow¶
Autosave must be paused while copying the world, or region files can be caught mid-write:
mcrcon save-off "save-all flush"
tar -C /path/to/server -czf "backup-$(date -I).tar.gz" world
mcrcon save-on "say Backup done"
save-all flushblocks until the world is fully written to disk.- If the backup script dies between
save-offandsave-on, autosave stays off — make the scripttrap-safe or check withsave-onafter any failed run. - Test restores occasionally; a backup that's never been restored is a hope, not a backup.
Day-to-day favorites¶
| Command | Use |
|---|---|
list |
who's online |
say <msg> |
warn before restarts |
whitelist add <player> |
onboard a friend |
stop |
graceful shutdown (saves first) |
See Commands → Server maintenance for the full table, and the rest of the Commands section for everything else.