Table of Contents
A MUD needs to be online 24/7. Players log in at weird hours. The server has to just be there, quietly running, handling connections from whoever shows up. I didn’t want to babysit it. I wanted to set it up once and forget about it.
Here’s how I got Space MUD running on AWS for roughly $10/month — and what I’d do differently next time.
The Setup
The game runs on Evennia, a Python MUD framework that gives you a telnet server and a web client out of the box. It uses Django under the hood, stores everything in SQLite by default, and daemonizes itself so it keeps running after you close your SSH session. For a small MUD, it’s the right tool.
The hosting is dead simple: one EC2 instance running Ubuntu, two open ports, a systemd service to restart on crash. That’s it.
The Instance
I went with a t3.micro — 1 vCPU, 1 GB RAM. It’s free-tier eligible for the first year, and after that it runs about $8.50/month. Add $1.60 for 20 GB of EBS storage. First 100 GB of data transfer is free, which is more than enough for text.
For a MUD, this is overkill. Text games use almost no CPU or bandwidth. Even with a dozen simultaneous connections, memory usage sits well under 500 MB. I could probably get away with a t3.nano, but the extra headroom is worth a couple bucks.
Getting It Running
The server runs Ubuntu 24.04 LTS. Setup was:
sudo apt update && sudo apt upgrade -y
sudo apt install -y python3 python3-pip python3-venv git
python3 -m venv ~/mudenv
source ~/mudenv/bin/activate
pip install evennia
Then I uploaded the game files with SCP and ran the Evennia setup:
cd ~/spacemud
evennia migrate
evennia start
Evennia asks you to create a superuser on first start. After that, I loaded the world data (rooms, NPCs, items) from JSON files using a batch script.
Making It Accessible
By default, Evennia only listens on localhost. You have to tell it to accept connections from anywhere. In server/conf/settings.py:
TELNET_INTERFACES = ["0.0.0.0"]
WEBSERVER_INTERFACES = ["0.0.0.0"]
WEBSOCKET_CLIENT_INTERFACE = "0.0.0.0"
Then in the EC2 security group, I opened two ports:
| Port | Protocol | Purpose |
|---|---|---|
| 4000 | TCP | Telnet connections |
| 4001 | TCP | Web client |
That’s the minimum. SSH stays locked to my IP.
Staying Alive with systemd
Evennia daemonizes itself, so it survives SSH disconnects. But if the EC2 instance reboots — which happens during maintenance windows — the game doesn’t come back on its own. I wrote a systemd service:
[Unit]
Description=Space MUD Evennia Server
After=network.target
[Service]
Type=forking
User=ubuntu
WorkingDirectory=/home/ubuntu/spacemud
Environment="PATH=/home/ubuntu/mudenv/bin:/usr/bin"
ExecStart=/home/ubuntu/mudenv/bin/evennia start
ExecStop=/home/ubuntu/mudenv/bin/evennia stop
Restart=on-failure
RestartSec=10
[Install]
WantedBy=multi-user.target
Then:
sudo systemctl daemon-reload
sudo systemctl enable spacemud
sudo systemctl start spacemud
Now the game starts on boot and restarts if Evennia crashes. I’ve had zero unplanned downtime since setting this up.
Elastic IP and DNS
EC2 instances get a new public IP every time they stop and start. That breaks everything — bookmarks, DNS records, telnet muscle memory. The fix is an Elastic IP, which is a static IP that stays the same. It’s free as long as the instance is running.
I pointed a DNS A record at the Elastic IP: play.imadestuff.com. Now the game is reachable at a stable address regardless of what happens to the underlying instance.
The Cost Breakdown
| Resource | Monthly Cost |
|---|---|
| t3.micro EC2 | ~$8.50 |
| 20 GB EBS storage | ~$1.60 |
| Elastic IP | Free (while running) |
| Data transfer | Free (under 100 GB) |
| Total | ~$10/month |
During the free tier year, it’s effectively $0.
What I’d Do Differently
Use swap from the start. I hit an out-of-memory situation once during a large world reload. Adding 1 GB of swap fixed it permanently:
sudo fallocate -l 1G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab
Should’ve done that on day one.
Automate the deployment. Right now I SCP files up and restart manually. A proper setup would be a Git pull on the server triggered by a push hook. I’ll get to it eventually.
Consider Lightsail. For a fixed-cost server that you don’t need to scale, AWS Lightsail might be simpler. It bundles compute, storage, and a static IP into a flat monthly price. I went with raw EC2 because I already knew the workflow, but Lightsail would’ve saved me some security group fiddling.
The Result
The game’s been running at play.imadestuff.com:4001 for a while now. It’s a text-based multiplayer game about robots on a broken space station — you can play it in your browser or connect via telnet on port 4000. The server handles it fine. I check on it occasionally, mostly out of curiosity rather than necessity.
Ten bucks a month for a server that just works. For a hobby project, that’s the sweet spot.