Run with Docker
SharpMUSH runs as a small set of containers: the game server (which also serves the web portal and holds the embedded LMDB world), the connection server (telnet and the browser WebSocket), the rendering worker, and NATS for messaging. Docker Compose brings the whole thing up together.
The stack is deliberately modest. It runs comfortably on a €4–6/month VPS, or free on Oracle Cloud’s Always Free ARM tier. Kubernetes is not needed at this scale.
Deploy a game
Section titled “Deploy a game”The maintained deployment lives in the deploy/ folder of the SharpMUSH repository, and the
Deployment Reference covers every file and setting in it. It uses LMDB
embedded — one directory on disk, with no separate database server to run or back up separately.
Pick your entry point based on how you terminate TLS:
| File | Use it when |
|---|---|
docker-compose.prod.yml | The box faces the internet directly. Caddy gets you automatic HTTPS. |
docker-compose.cloudflare.yml | You would rather open no inbound web ports. A Cloudflare Tunnel dials out instead, hiding the origin IP. |
-
Get the files onto the host.
Terminal window git clone https://github.com/SharpMUSH/SharpMUSH.gitcd SharpMUSH/deploycp .env.example .env -
Edit
.envand set your domain.Terminal window SHARPMUSH_DOMAIN=mush.example.comOff-machine (restic) backups are opt-in — leave that section commented out for now. The server still makes a local copy of the world every six hours. If you chose the Cloudflare variant, also set
CLOUDFLARE_TUNNEL_TOKENhere. -
Bring the stack up.
Terminal window docker compose -f docker-compose.prod.yml up -d --buildThe portal comes up on
https://<your-domain>, and telnet on port 4201. -
Claim the admin account.
Visit
https://<your-domain>/setup. The first visitor after a fresh install claims the pre-generated administrator account, linked to God (#1). Do this immediately after deploying — the setup route is open until someone completes it.
After the first start
Section titled “After the first start”The Deployment Reference has the details for each of these:
- The browser terminal. In the portal, set the terminal’s Server URI to
wss://<your-domain>/ws. See The browser terminal address. - Ports. Which ports to open, and which stay private: Ports. Port
4201is plaintext telnet; telnet over TLS on4203is optional. Behind a Cloudflare Tunnel, telnet needs its own DNS-only record: Part B: the telnet side. - Updates. The Caddy stack is updated by hand; the Cloudflare stack updates the game server and renderer itself. See Updating.
- Starting on boot. The supplied
sharpmush.serviceunit: Starting on boot. - Backups. Turning on nightly encrypted off-machine backups, and restoring them: Backups.
Running the development stack
Section titled “Running the development stack”The Compose files at the repository root are a different thing. docker-compose.yml builds the
images from your checkout and docker-compose-hub.yml pulls the latest build of main; both run the
stack on your own machine (portal at http://localhost:8080, telnet on 4201) to check a change, with
no proxy, no backups and no automatic updates. They are covered in
Develop SharpMUSH.