World copies
@backup makes a point-in-time copy of the world. Never let a file backup read the live
data.mdb.
This handbook is the checklist for running a game on the supported single-machine Compose stack. The
exact commands and settings are in the Deployment Reference, and what each kind
of update does to players’ connections is in Connections During Updates.
Run every command from the deploy/ folder, with the same Compose file that created the stack.
Choose how the web side reaches the internet:
docker-compose.prod.yml includes Caddy. Open web ports 80 and 443 and the telnet port you intend
to use; keep the game server, NATS, metrics and connection-server web ports private.docker-compose.cloudflare.yml uses a Cloudflare Tunnel for the web side and hides the web
origin. Telnet still needs its own, deliberate public route, a DNS-only record that shows the
machine’s address.Create .env from .env.example, set unique secrets, restrict who can read the file, and keep it out
of source control and anything you share for troubleshooting. Set up restic only if you turn backups
on, then start the stack.
Right after the claim:
wss://your-domain/ws./ws reaches the connection server and the health and readiness checks are green..env values.@storage as a wizard and write down the map limit, live data, disk allocated, what a backup
needs at its peak, free space, and any leftover worlds.#1 for emergencies. God passes every lock and
permission check, so a mistake made as God has nothing to stop it. Create a character on your
account, then, connected as #1, type @set *<name>=WIZARD. The portal’s first-players
checklist, at /admin/onboarding, goes through this and the rest of opening your game.World copies
@backup makes a point-in-time copy of the world. Never let a file backup read the live
data.mdb.
Wiki files
Uploaded files live outside the world and must be included separately in restic snapshots.
NATS data
NATS’s stored data lets browsers recover after a restart. It is not a backup of the world.
Plugins and settings
Keep plugin files and deployment settings. Keep .env values in a separate secrets store.
These are not interchangeable:
| What | Where it lives | How to protect it |
|---|---|---|
| The world | sharpmush-server’s app-data volume | Use @backup to make a point-in-time copy. Never let restic or another tool read the live data.mdb. |
| Wiki files | app-data volume, outside the world | Include them directly in restic snapshots. A world copy does not contain uploads. |
| NATS data | The nats-data volume | Keep it so browser sessions can recover across restarts, and back it up if that matters to you. Losing it never means losing the world. |
| Key ring | app-data volume, lightning.dataprotection-keys beside the world | Back it up (the restic container does), apart from the world copies where you can. Without it the world’s secrets must be set again. |
| Installed plugins | app-data volume, lightning.plugins beside the world | Included in restic snapshots. Restore the whole folder with the world. |
| Deployment settings | The deploy/ folder and .env | Keep them in version control or snapshots, with .env values in a separate secrets store. |
| The restic repository | Off-machine storage | Protect its password separately, watch the nightly results, and test restores. It holds safe world copies and the other files you chose, not a live snapshot of the running database. |
Keeping backups is not the same as knowing they work. Check the nightly results and @backup/list,
and also run a restore drill on a schedule.
lock.mdb as data.The restore commands are in the Deployment Reference.
@storage..previous, .precompact, .staging-* and unfinished backup folders. Remove them only
after whatever replaced them is checked (see Earlier worlds).Keep the image tags and automatic updates the deployment already uses. Before a deliberate upgrade: read the release notes and Connections During Updates, check there is disk room, make and check a fresh world copy, and write down the current image digests and Compose settings. Then pull the images, replace only the services you meant to, and repeat the readiness, logs, metrics, storage, login, command, portal and integration checks.
Replacing the game server or the renderer keeps players connected. Replacing the connection server closes every connection: logged-in browsers can recover within their recovery window, and telnet players reconnect. Losing the machine, its disk or NATS’s data has wider effects. Schedule accordingly.
Rolling back a deployment means going back to the previous image and Compose settings, when the data still works with them. Restoring data means stopping changes and replacing the stored world from a checked recovery point. Neither replaces the other. Don’t start an older version against a world a newer version has already upgraded, unless that downgrade is stated to be supported.
| Symptom | Check first | Protect first |
|---|---|---|
MDB_MAP_FULL, low disk, or a fast-growing world | @storage, free disk, leftover worlds, what a backup needs | Stop unnecessary changes, and never delete the only recovery copy. Raise the map limit before trying again. |
| NATS down, or browser recovery failing | NATS health and logs, its volume, retention and message size limits | Keep its volume. Expect coordination between the parts of the game, and recovery, to suffer. |
| Output delayed, but players still connected | Renderer health and the permissions on its socket | Keep the connection server running and replace only the renderer. |
| Every telnet and browser connection drops | The connection server’s history, the machine and network, the proxy and recent deployments | Stop recreating it over and over; find out whether browsers can recover or players must log in again. |
| Portal login or setup fails | Server readiness, the proxy’s host and HTTPS headers, sessions, site locks, bans | Keep /setup protected, and don’t turn off login protections to diagnose. |
| Suspected break-in | Account and audit records, exposed secrets, sessions, images and machine access | Cut off public access if needed, keep the logs, replace secrets, sign out sessions, and restore only from data you trust. |
When collecting information to share, include times, image digests, service state, relevant health and
metrics readings, and short log excerpts. Remove passwords, restic credentials, cookies, tokens,
connection strings and the contents of .env.
The boot-time MCP and LSP plugins are independently optional and disabled by default. Their authentication and rate limiting belong to the host. See Remote MCP and LSP Analysis for setup, editor usage, isolation and resource limits. Local validation and remaining real-network checks are documented there.