Game servers

Setting up a Terraria server

The official server on Windows or Linux with a config file (so you do not answer questions on every start), port 7777 TCP, and the alternatives with mods and plugins.

1 min readUpdated on 7 October 2026Terraria

Terraria is very light: 2 GB of RAM is plenty for a group of friends, except for huge worlds or lots of mods.

1. Download it

On terraria.org, at the very bottom, there is a PC Dedicated Server link. The .zip has one folder per system: use Windows or Linux.

On Linux:

apt install -y unzip
mkdir ~/terraria && cd ~/terraria
wget -O terraria.zip "DEDICATED_SERVER_LINK"
unzip terraria.zip
cd */Linux
chmod +x TerrariaServer.bin.x86_64

2. A config file

Without one, the server asks you questions every time it starts. Create serverconfig.txt next to the executable:

worldpath=./worlds
world=./worlds/MyWorld.wld
autocreate=2
worldname=MyWorld
difficulty=0
maxplayers=8
port=7777
password=
motd=Welcome
secure=1
SettingValues
autocreateCreates the world if missing: 1 small, 2 medium, 3 large
difficulty0 classic, 1 expert, 2 master, 3 journey
secure1 enables cheat protection

Create the worlds folder first. If you already have a world from your own game, upload it there (.wld) and put its name in world.

3. Start it

# Windows (from the Windows folder)
TerrariaServer.exe -config serverconfig.txt

# Linux (from the Linux folder)
./TerrariaServer.bin.x86_64 -config serverconfig.txt

The console has save, kick, ban and exit (saves and closes).

4. Port

Terraria uses 7777 on TCP:

# Windows (PowerShell as administrator)
New-NetFirewallRule -DisplayName "Terraria TCP 7777" -Direction Inbound -Protocol TCP -LocalPort 7777 -Action Allow -Profile Any

# Linux
ufw allow 7777/tcp

To join: Multiplayer → Join via IP, with your VPS's IP and port 7777.

Mods or plugins?

  • tModLoader: to play with mods. It has its own dedicated server, and players need tModLoader too.
  • TShock: a server with plugins and permissions (ranks, region protection, anti-cheat). Players join with the normal game.

Related articles

Back to the help centre

Can’t find what you need?

Open a ticket from your panel and we will answer in under 5 minutes.