Sia's Server

sia-server

Server notes

Everything Sia needs to run the Minecraft server and forgets between sessions: the mc helper, how to restart, where things live, backups, plugins, the map, the website and the network. No passwords live here.

Current as of 1 Nov 2026. Paper 26.3, Ubuntu 24.04, the box is called sia-server.

Connect

From the Mac, one word:

ssh home

That alias lives in ~/.ssh/config on the Mac and goes over Tailscale to sia-server.tail2a513d.ts.net on port 22, as user sia. Tailscale SSH runs in check mode: about every 12 hours the first connection prints a login.tailscale.com link and waits. Open the link, approve, and the connection goes through. If that gets old, change the SSH rule's action from check to accept in the Tailscale admin console under Access Controls.

At home without Tailscale: ssh sia@192.168.86.22. There is no public SSH any more; the router forward that used to carry it was deleted on 17 Oct 2026 after five days of about 2,900 refused logins. Password logins are off everywhere; it is keys only.

sudo always asks for the account password. Nothing is passwordless, so anything that needs root (restarting the service, firewall rules, system packages) is typed by a human.

Files in Finder: Cmd+K then smb://100.80.229.125/storage (Tailscale must be up).

The mc helper

Two layers. On the server, ~/minecraft/mc is a small Python script that sends one console command to the running Paper server over RCON on localhost and prints the reply; it reads the RCON settings out of server.properties itself. On the Mac, a zsh function called mc in ~/.zshrc (with a comment block above it, around line 138) wraps that over ssh home and adds a few verbs that talk to systemd instead of the game.

CommandWhat it does
mc listWho is online. Also the thing to check before any restart.
mc <anything>Any console command: mc say hi, mc time set day, mc weather clear, mc op Name, mc whitelist add Name, mc whitelist remove Name, mc gamemode creative Name, mc tp Name 0 80 0, mc datapack list.
mc tps / mc msptTicks per second (want 20) and milliseconds per tick (want well under 50).
mc statusThe systemd state line plus who is online.
mc logsTails the live server log. Ctrl+C to leave.
mc restartThe proper restart: sudo systemctl restart minecraft, waits 30 s, then lists players. Asks for the sudo password. Kicks everyone; the world saves on the way down.
mc startStarts the service after a deliberate stop.
mc newseed <seed|random>Seed hunting only. Runs tools/new-seed.sh on the server with sudo: refuses if anyone is online, stops, deletes the world with no backup, writes the seed, puts the stack-size datapack in the new world folder, clears DeathChest's saved list, starts, purges the map tiles, prints the seed. About forty seconds. Added 29 Oct 2026.
mc bluemapMap render progress. See the BlueMap section for the rest.
mc backuper backup localTake a world backup right now.
mcPrints the usage line.

Plugins add their own commands and they all go through the same door: mc treefeller reload, mc chunky progress, mc backuper reload. If it works in the server console, it works after mc.

Restart, stop, start

Check mc list first. A restart kicks whoever is on and takes about 40 seconds end to end.

mc restart                              # from the Mac (asks for sudo)
ssh home sudo systemctl restart minecraft   # the same thing, spelled out

Stopping on purpose is sudo systemctl stop minecraft, not mc stop. The service is set to restart on failure, and a console stop counts as a failure, so mc stop brings the server back 15 seconds later. Handy for a quick restart without sudo, wrong for taking it down.

After a crash or a power cut nothing needs doing: the unit starts on boot and restarts itself after a crash or an out-of-memory kill (it runs with OOMScoreAdjust=-900, so the kernel kills something else first).

Restart when nobody is on

For a change that needs a restart while a friend is playing, leave a watcher running on the server. It polls mc list, waits until the server has been empty for a full minute, then stops it and lets systemd bring it back:

while true; do
  if ~/minecraft/mc list | grep -q "There are 0 of"; then
    sleep 60
    ~/minecraft/mc list | grep -q "There are 0 of" && { ~/minecraft/mc stop; break; }
  fi
  sleep 30
done

What needs a restart, what just reloads

  • Restart: server.properties, bukkit.yml (the mob caps live here), spigot.yml, config/paper-*.yml, start.sh (heap), a new plugin jar, a new datapack zip in world/datapacks/.
  • Reload in place: mc bluemap reload, mc backuper reload, mc treefeller reload, mc whitelist reload after editing whitelist.json by hand.

Where things live

On the server, everything Minecraft is under ~/minecraft/:

~/minecraft/
  mc                   the RCON console script
  minecraft.service    the systemd unit (installed copy in /etc/systemd/system/)
  README.md            the long-form notes; this page is the short version
  server/              the live Paper server
    paper.jar, start.sh, server.properties, bukkit.yml, spigot.yml, config/
    whitelist.json, ops.json
    world/             the overworld; Nether and End are inside it since 26.2:
      dimensions/minecraft/the_nether/{region,poi,entities}
      dimensions/minecraft/the_end/{region,poi,entities}
      datapacks/       bigger-stack-size-v2.5.1.0.zip
    plugins/           the jars and each plugin's folder (Backuper/Backups, BlueMap/, TreeFeller/)
    bluemap/web/       rendered map tiles and the map web app
    logs/latest.log    today's log; older days are gzipped beside it
  tools/               update-plugins.sh, apply-updates.sh, updates.tsv, perf/mcperf.py
  archive/             retired worlds and the 2025 time capsules

Retired worlds also sit on the Storage drive in /mnt/storage/Minecraft/worlds/, one dated folder each with the last backup zip from that day. The rest of the box follows the house rules in ~/README.md: apps other people made in ~/services/, things Sia built in ~/sites/ (the Minecraft site is ~/sites/mc), cron scripts in ~/scripts/, finished jobs in ~/archive/.

Is it healthy

In order, when something feels off:

CheckGood looks like
mc status"active (running)" and a player list. If RCON does not answer but systemd says running, the server is still booting or stuck; mc logs tells which.
mc tps20.0 across all three windows. 19.x with players is fine.
mc msptAverage under 50 ms. Short spikes into the hundreds right after a restart or a backup are normal.
mc logsNo repeating stack traces. Strangers bouncing off the whitelist ("lost connection: Disconnected") is normal noise on a public port.
ssh home df -h /Plenty free. Backups, map tiles and the world all live on the boot SSD (181 GB).
ssh home free -hThe Java heap is 12 GB of the 32 GB; swap should stay near zero.
ssh home docker psEvery container "Up": nginx-proxy-manager, mc-site, pihole, portainer, jellyfin, portfolio, the dashboard and the smaller sites.

The private dashboard at https://sia-server.tail2a513d.ts.net (Tailscale only) shows vitals and the logbook of changes. For a lag investigation, python3 ~/minecraft/tools/perf/mcperf.py records TPS, MSPT and memory every 15 seconds for 15 minutes into a .tsv next to it.

Knobs and current values

SettingWhere, and the value now
Difficultyserver.properties difficulty=hard. Survival, not hardcore, PvP on.
View and simulation distanceview-distance=32, simulation-distance=12. Sia likes the long view; do not lower it to fix lag before trying everything else.
Players and whitelistmax-players=5, white-list=true. Add people with mc whitelist add Name; the website picks the change up within five minutes.
Java heapstart.sh: -Xms12G -Xmx12G with the Aikar G1 flags. Restart to apply.
Hostile mob capbukkit.yml spawn-limits.monsters. Vanilla is 70; it ran at 700 for a night, 500 from 16 Oct, 110 from 18 Oct, and 180 as of 1 Nov. The running server uses whatever the file said at its last start, so after an edit, restart.
Mob activation rangespigot.yml entity-activation-range: villagers and monsters 32. Villagers keep ticking when inactive (tick-inactive-villagers) so farms work at a distance.
Iron golemsconfig/paper-world-defaults.yml: golems cannot spawn in mid-air, per-player mob spawns on.
MOTD and server iconmotd= in server.properties (restart). A 64x64 server-icon.png in server/ would show in the client list; there is none yet.

Backups

The Backuper plugin zips the world into server/plugins/Backuper/Backups/ once a day at 4:30 AM Eastern (the cron in its config is 0 30 8 * * ?, server clock is UTC) and keeps the newest 7 (maxBackupsNumber in plugins/Backuper/config.yml, raised from 1 on 18 Oct). One zip of the current world is about 1.2 GB, so a week of them is under 10 GB.

  • Take one now: mc backuper backup local. Watch mc mspt spike while it zips.
  • Config change: edit the yml, then restart the server. mc backuper reload answers "Unknown or incomplete command" over RCON (checked 18 Oct), so a restart is the reliable way.
  • Off-box copy: rsync -a ~/minecraft/server/plugins/Backuper/Backups/ /mnt/storage/Minecraft/backups/ now and then. The zips otherwise live on the same SSD as the world, so they protect against mistakes, not against the disk dying.

Restore a world

  1. mc list, warn anyone on, then sudo systemctl stop minecraft.
  2. mv server/world server/world-broken-$(date +%F) so nothing is lost.
  3. Unzip the backup into a scratch folder first and look inside; move the world folder it contains into server/.
  4. sudo systemctl start minecraft, then mc logs until "Done".
  5. Delete the broken copy only after a day of play confirms the restore.

A word on the old worlds: the pre-26.2 1.21.5 world and the first 26.2 world (the friend's "Perma Server 2") are kept in ~/minecraft/archive/ and on the Storage drive. They are never to be deleted casually.

Plugins

Eighteen jars in server/plugins/ as of 1 Nov 2026. The website only shows a plugin when a jar name starts with that plugin's jar prefix in public/plugins.js, so renaming a jar can hide or reveal its row on the homepage.

JarWhat and how to poke it
AutoSortSorts chests. No config to speak of.
BackuperDaily world zips. mc backuper backup local, mc backuper reload.
BetterMendingMending repairs the held item from XP.
bluemapThe live map. Own section below.
chest (DeathChest)Your stuff goes in a chest when you die.
ChunkyChunk pre-generator. mc chunky radius 10000, start, progress, pause.
ClumpsMerges XP orbs so farms do not lag.
CustomAnvilRemoves the "Too Expensive!" cap; you still pay the true level cost. Config in plugins/CustomAnvil/config.yml (remove_repair_limit and replace_too_expensive are on), first-start copy beside it, mc ca reload applies edits, mc ca diagnostic checks it. Set limit_repair_cost: true to cap every job at 39 levels instead.
ImageFrameImages on maps in item frames.
MCKotlinPaperA library other plugins need. Keep it.
minMaxTradesVillager trade limits.
ScytheRight-click harvest and replant.
SleeperOne player sleeping skips the night.
toolstatsBlocks broken and mobs killed on tool lore.
TreeFellerWhole trees fall. Config in plugins/TreeFeller/config.yml, pristine copy beside it, mc treefeller reload. Two connected placed logs fall too; /treefeller off while building.
veinminer (two jars)Vein mining on tools with the Veinmine enchantment.
voicechatSimple Voice Chat, UDP 24454. Needs the client mod.

Updating a plugin

  1. Find a build on Modrinth that lists the current Minecraft version and note its sha512 from the API (https://api.modrinth.com/v2/project/<slug>/version).
  2. Download into ~/minecraft/tools/update-staging/, check the hash with sha512sum.
  3. Add a line to tools/updates.tsv (old jar, new jar, URL, hash), stop the server, run tools/apply-updates.sh (moves old jars to a dated plugins-old-*/, drops the new ones in), start.
  4. New config keys are not added automatically; diff the plugin's fresh default against the live yml.

Paper itself goes through the same tsv: a paper.jar row makes apply-updates.sh keep the old build in the dated folder and drop the new one in. Plugin jars stay put across a Minecraft minor; only plugins that ship per-version jars (AutoSort) or that depend on new blocks (TreeFeller for Poplar) need a new file, and the stack-size datapack in world/datapacks/ needs its matching zip. Take a fresh mc backuper backup local and copy the world to the Storage drive first: the world format conversion cannot be undone. The 26.2 to 26.3 move on 19 Oct 2026 went this way with Sleeper, ToolStats, MinMaxTrades and Clumps untagged for 26.3 and all four fine.

BlueMap

BlueMap 5.29 renders the world into tiles and serves a small web app on port 8100, bound to 172.18.0.1 (the Docker network's gateway) so only the host and containers can reach it. The mc-site container proxies it to mc.siaahmadi.com/map/, and the homepage shows a still picture of the map and embeds the live one when a visitor presses Load the live map.

Command or fileUse
mc bluemapRender progress per map and whether the two render threads are busy.
mc bluemap reloadAfter any config edit.
mc bluemap stop / startPause or resume rendering, say during a big build party if MSPT climbs.
plugins/BlueMap/core.confrender-thread-count: 2. Drop to 1 if the game suffers.
plugins/BlueMap/webserver.confThe bind address and port above. Do not open it to 0.0.0.0.
plugins/BlueMap/plugin.confLive player markers on, spectators hidden.
plugins/BlueMap/maps/world.confThe "Places" marker set, empty since the 29 Oct 2026 world swap. Add a marker here, then mc bluemap reload. The old world's markers are kept with its archive on the Storage drive.
server/bluemap/web/The tiles. du -sh it now and then; the first full render came to about 4 GB.

The map ids are world, world_the_nether and world_the_end. A link can carry the camera: /map/#world:0:64:0:300:0:0:0:1:flat is spawn from above. The full format and the JSON endpoints (players online with positions, markers) are written up for scripts in llms.txt.

The host firewall (ufw) blocks Docker's bridge from reaching host ports by default. The rule that makes the proxy work allows 172.18.0.0/16 to tcp 8100 on the br-a50e71c1450e interface. If the map ever returns a gateway timeout after a rebuild, that rule is the first suspect.

The website

Source on the Mac in ~/Coding Projects/mc-site (private GitHub repo). On the server it is ~/sites/mc, served by the mc-site nginx container behind Nginx Proxy Manager, which handles TLS for mc.siaahmadi.com.

Deploy

cd ~/Coding\ Projects/mc-site
bash tests/run.sh && bash tests/test_publisher.sh
python3 render_site.py --check
rsync -av --delete --delay-updates --exclude screenshots/ --exclude tests/ --exclude tools/ --exclude docs/ --exclude .git/ \
  --exclude .superpowers/ --exclude __pycache__/ --exclude .DS_Store \
  --exclude /public/server.json --exclude /public/index.html ./ home:sites/mc/
ssh home 'cd sites/mc && docker compose up -d && docker compose restart; python3 publish-site-info.py'
  • public/index.html is rendered by render_site.py from public/config.js, which holds the homepage's words, public/plugins.js, the plugin list, and public/server.json. Do not edit it by hand; the next render replaces it.
  • publish-site-info.py runs on the server every five minutes from cron, writes public/server.json (whitelist, settings, jar names, MOTD) and then calls the renderer. So edit config.js or plugins.js, sync, and the change shows up within five minutes, or at once if the publisher is run, as the last line above does. Never rsync server.json from the Mac; the exclude above protects it.
  • The look lives in tools/site/src. After changing it run python3 tools/site/build.py, which rebuilds public/style.css, public/app.js, public/sw.js and site/, and writes the critical CSS hash into nginx.conf. Art comes from tools/site/make-assets.py.
  • Whitelisted player skins are baked in by make-assets. A new player shows as Steve until the skin is added to tools/site/kit/gui/skins and skins.json and both scripts are run.
  • Versioned files (?v=<hash>) are cached for a year, so there is no manual ?v= bumping any more. The scripts write each file's real hash.
  • A service worker, public/sw.js, serves repeat visits. /map/ and server.json bypass it.
  • This page and /trades/ share public/game.css, built from tools/site/src/game.css. After changing that file or public/notes/notes.css run python3 tools/build-game-css.py, which writes the new hashes into this page and rebuilds the trades page. After changing the trades page's own CSS or scripts run python3 tools/build-trades-page.py.
  • The content security policy in nginx.conf allows no inline scripts and no style attributes anywhere on the site, and one inline stylesheet: the homepage's critical CSS, by the hash tools/site/build.py writes. New pages link a stylesheet, like this one does.
  • Pages: /, /notes/ (this), /trades/, /map/ (proxied), /llms.txt (for agents), /server.json.
  • /trades/ is generated from the game's client jar, pictures included, by tools/build-trades-data.py, tools/build-trades-art.py and tools/build-trades-page.py. Rebuild it after a game version change; the README has the commands. Never hand-edit its index.html.

Network

mc.siaahmadi.com is a Cloudflare DNS record (grey cloud, no proxying) pointing at sia-server.duckdns.org, which a cron job in ~/scripts/duckdns/ keeps aimed at the home connection every five minutes. Players join at mc.siaahmadi.com on the default port; from inside the house the router hairpins it, so the same address works.

Router forwardFor
25565 TCP/UDPThe game. Open to the internet; the whitelist does the gatekeeping, so strangers appear in the log and bounce.
80, 443 TCPNginx Proxy Manager, which fronts the websites.
24454 UDPSimple Voice Chat.
(removed) 2222 → 22Public SSH, deleted 17 Oct 2026. Admin is Tailscale only now.

The forwards are managed in the Google Home app under the Wi-Fi settings, "Port management". The Pi-hole, Portainer, Jellyfin and dashboard web UIs are never forwarded; they are reached on the LAN or over Tailscale.

Future option: have friends join over Tailscale too (share the server node with them, they connect to the Tailscale address), then delete the 25565 and 24454 forwards and the server disappears from internet scanners entirely.

Record keeping

  • ~/homelab/collect.sh on the server snapshots the configs (compose files, Minecraft settings and plugin configs, the unit, crontab, fstab, the READMEs) into the private home-server repo, redacting secrets, and pushes. Cron runs it Monday mornings; run it by hand after any config change.
  • The dashboard logbook (source on the Mac in ~/Coding Projects/home-server, deployed with its deploy.sh) gets a dated entry for every change worth remembering: restarts, world swaps, plugin installs, firewall changes.
  • ~/minecraft/README.md on the server is the long-form Minecraft reference; ~/README.md the box as a whole and its house rules. Update them when something moves.
  • This page is the short version. When it drifts from the READMEs, the READMEs win; fix the page.