
Deploy Terraria Dedicated Server
Terraria dedicated server with a persistent world, join from Steam or GOG
Terraria Server
Just deployed
/opt/terraria/config
Deploy and Host Terraria Dedicated Server on Railway
Run your own Terraria dedicated server on Railway and play with friends from the Join via IP menu on Steam or GOG. The world is created on the first start and kept on a volume, so it survives restarts and redeploys, and you choose the world name, size, difficulty and join password from the service Variables.
About Hosting Terraria Dedicated Server
The template runs the open source passivelemon/terraria-docker:terraria-latest image (https://github.com/PassiveLemon/terraria-docker) as one Railway service. The Terraria server listens on port 7777, and Railway's TCP proxy gives it a public address that players connect to. A volume is mounted at /opt/terraria/config for the world and all server files, so nothing is lost on restarts and redeploys, and the server gets time to save before Railway stops it.
Common Use Cases
- A Terraria world that stays online for friends in different time zones
- Continuing one shared world without anyone keeping their PC on
- A password protected server for a small group
Dependencies for Terraria Dedicated Server Hosting
- No other services: one container plus a volume
- Terraria on PC, using the multiplayer or join by IP menu
- A Railway plan with enough memory: 2 GB or more is recommended
Implementation Details
After the deploy finishes, open the service, go to Settings, Networking and copy the TCP proxy address, for example something.proxy.rlwy.net:12345. In Terraria, add a server with that address and port and join. The first start downloads the server and creates the world, which takes a minute or two; follow it in the deploy logs.
Upload an existing world by copying the .wld file into /opt/terraria/config/Worlds and setting WORLDNAME to its name without the extension.
Why Deploy Terraria Dedicated Server on Railway?
Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.
By deploying Terraria Dedicated Server on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.
Template Content
Terraria Server
passivelemon/terraria-docker:terraria-latest