Hosting Terraria servers on bare metal

A Terraria world needs little: one core and a gigabyte or two of memory. That makes a single dedicated machine a home for a whole network of worlds, vanilla, plugin and modded side by side.

Which Terraria server should I run?

That depends on the community, and all three options run on Linux. The official server comes as a zip from the game's website and includes a Linux binary. TShock wraps the official server with permissions, regions, anti-cheat checks and a plugin system. tModLoader runs content mods and has its own dedicated server, which is also installable with SteamCMD as app 1281930.

ServerBest forClients need
Official serverSmall vanilla groupsThe game only
TShockPublic servers, admins, regionsThe game only
tModLoaderContent mods such as new bossestModLoader with matching mods

How do I start the official server?

Unzip the release, mark the Linux binary as executable and hand it a configuration file. The binary lives in the Linux folder of the download.

unzip terraria-server-1449.zip -d /opt/terraria
chmod +x /opt/terraria/1449/Linux/TerrariaServer.bin.x86_64
runuser -u terra -- /opt/terraria/1449/Linux/TerrariaServer.bin.x86_64 -config /home/terra/world1.txt

Replace 1449 with the version you downloaded. Running inside tmux or screen, or as a systemd service with standard input attached, keeps the console available for commands such as save, kick and exit.

What belongs in serverconfig.txt?

Plain key=value lines that answer the questions the server would otherwise ask at start.

Which port does Terraria use?

TCP 7777, unlike most game servers, which use UDP. Each further world takes its own TCP port, so worlds two to ten might use 7778 to 7786. Open exactly the ports you assign and nothing more.

for p in $(seq 7777 7786); do ufw allow proto tcp to any port $p comment terraria; done

How many worlds fit on one machine?

Dozens. A large vanilla world with a dozen players uses around 1 to 1.5 GB of memory and most of one core during busy events. tModLoader worlds with large content packs can need 3 to 6 GB each. The arithmetic for ESSENTIAL-3, with 12 cores and 32 GB DDR4, works out like this:

World typeMemory eachWorlds that fit comfortably
Vanilla or TShock1 to 1.5 GBAbout 20, limited by cores during events
tModLoader, light mods2 to 3 GBAbout 10
tModLoader, large packs4 to 6 GBAbout 5

At $61.20 a month that is a very low cost per world. For the strongest single-core speed, ESSENTIAL-S reaches 5.5 GHz with 64 GB DDR5.

How do I set up TShock?

Download the release built for your operating system, extract it, and start the server once to create the tshock folder with its config.json and database. The first start prints a one-time setup code; enter /setup with that code in game to claim superadmin rights, then create your own account with /user add. Groups and permissions live in the database, so back it up with the world files. Plugins go into ServerPlugins.

What should I back up?

The .wld files and the rolling .bak copy next to each, plus the TShock or tModLoader folders. Worlds are small, often under 50 MB, so hourly copies to another machine cost almost nothing. A journey of two hundred hours can be ruined by one bad wiring experiment; hourly archives make that a five minute fix.

rsync -a --delete /home/terra/.local/share/Terraria/Worlds/ backup@vault.example.net:terraria/$(date +%H)/

Is the network side a concern?

Traffic is tiny, a few kilobits per player, so even a busy network of worlds barely touches the port. What matters is steady latency and filtering of floods aimed at the game ports, both included on every model. Our Firewall for game servers guide covers firewall rules for game hosts.

Machines for Terraria networks

Lowest monthly price of each model across its data centres; the model page shows the price in every location.

ModelProcessorCoresMemoryDrivesPortPer month
ESSENTIAL-GAME-1AMD Ryzen 5 5600X632 GB2x 512 GB SSD NVMe1 Gbps unmetered$43.20
ESSENTIAL-3AMD Ryzen 9 5900X1232 GB2x 512 GB SSD NVMe1 Gbps unmetered$61.20
ESSENTIAL-SAMD Ryzen 7 9700X864 GB2x 512 GB SSD NVMe1 Gbps unmetered$46.20
ESSENTIAL-GAME-2AMD Ryzen 7 5800X864 GB2x 960 GB SSD NVMe1 Gbps unmetered$60.00
ESSENTIAL-MAMD Ryzen 9 9900X1264 GB2x 512 GB SSD NVMe1 Gbps unmetered$70.80

One Ryzen machine can host a whole network of vanilla, TShock and modded worlds.

See all servers and prices

Related pages

Game server hosting

Ryzen X3D and Ryzen 5000 machines for Minecraft, Rust, CS2 and FiveM worlds that need steady tick rates.

Read more

Minecraft Java server

Run a Minecraft Java server or a whole network: Java 21, Paper, a Velocity proxy, JVM flags, pre-generated worlds and the right machine.

Read more

Firewall for game servers

Open exactly the UDP and TCP ports a game needs, protect query ports from reflection abuse and keep lag low under load.

Read more

Essential servers

Affordable bare metal for websites, development and first production apps.

from $38.40 a monthRead more

Questions and answers

Does the official Terraria server run on Linux?

Yes. The server download from the game website includes TerrariaServer.bin.x86_64 in its Linux folder.

Which port does a Terraria server use?

TCP 7777 by default. Each extra world on the same machine needs its own TCP port, such as 7778, 7779 and so on.

How much memory does a Terraria world need?

A vanilla or TShock world uses about 1 to 1.5 GB. Modded tModLoader worlds with large content packs can use 3 to 6 GB.

What is the difference between TShock and tModLoader?

TShock adds admin tools, permissions and plugins while players keep the normal game. tModLoader adds new content, so players must run tModLoader with the same mods.

How many players can join a Terraria server?

The maxplayers setting defaults to eight and accepts up to 255; most communities run 16 to 32 per world.