Terraria isn’t just a pixelated game — it’s a full-fledged adventure world where you can dig, build, fight bosses, and explore vast, randomly generated lands. It’s especially fun in co-op mode, and to enjoy it with friends without lag or limitations, the best option is to run your own server. In this guide, we’ll walk you through setting up a private Terraria server on Linux (specifically Ubuntu 24.04).
For stable performance, even a basic VPS configuration will be enough. But if you expect many players or a heavily populated world, it’s a good idea to have some extra resources.
1. Create a folder for the server and go into it:
mkdir terraria && cd terraria
2. Download the Terraria server files:
Go to the official Terraria website and download the “PC Dedicated Server” version. Or use the direct download link (current version: 1.4.4.9):
curl -O https://terraria.org/api/download/pc-dedicated-server/terraria-server-1449.zip
3. Unzip the archive:
unzip terraria-server-1449.zip
4. Navigate to the Linux server directory:
cd 1449/Linux/
5. Make the server executable:
sudo chmod +x TerrariaServer.bin.x86_64
To keep the server running after closing the terminal, it’s handy to use tmux.
6. Install tmux if it’s not already installed:
sudo apt install tmux
7. Start a tmux session:
tmux
8. Run the server:
./TerrariaServer.bin.x86_64
The server will prompt you to create or select a world:
— Press n to create a new one.
— Choose the world size: 1 — small, 2 — medium, 3 — large.
— Select difficulty: 1 — classic, 2 — expert, 3 — master, 4 — journey.
— Choose the evil biome: 1 — random, 2 — Corruption, 3 — Crimson.
— Enter a name for the world (e.g., betutorial).
— Press Enter again for random seed.
The world will begin generating — wait until it completes.
Once the world is generated:
— Select the world (its number will be shown).
— Set the maximum number of players (default is 16).
— Set the server port (default is 7777).
— Enable port forwarding (type y).
— Set a password or press Enter to skip.
If everything is correct, you’ll see a message like:
Server started — Listening on port 7777
You can control the server from the terminal. For example, to change the password:
password newpass
To stop the server safely:
exit
The tmux session keeps the server running even after you log out. To detach from the session, press Ctrl+b, then d.
To reconnect later:
tmux attach
Your world files are stored in:
~/.local/share/Terraria/Worlds/
In the game itself:
1. Go to Multiplayer → Join via IP.
2. Enter your server’s IP address.
3. Enter the port (usually 7777).
4. Enter the password if one is set.
That’s it! You’re in your own world. Set up a base, invite your friends, and head out on your adventure!
If you want the server to start automatically on system boot, you can add it to crontab with tmux or create a systemd service — but that’s a topic for another guide.
Have fun and happy digging!