Desert Forge IT — Arizona IT · Field-tested tools & guidesFree consult →

How to Self-Host a tModLoader (Modded Terraria) Server

Intermediate 35 min — Run a modded Terraria server with tModLoader and mods like Calamity.

Prerequisites

  • Linux server (Debian 12 or Ubuntu 22.04)
  • At least 2GB RAM
  • Basic command-line knowledge
  • tModLoader version must match your clients

Install tModLoader Server

Download the tModLoader server from GitHub:

mkdir -p /opt/tmodloader && cd /opt/tmodloader
wget https://github.com/tModLoader/tModLoader/releases/latest/download/tModLoader.zip
unzip tModLoader.zip
chmod +x start-tModLoaderServer.sh

Alternatively, install via SteamCMD:

steamcmd +login anonymous +app_update 1281930 +quit

Install Mods

Mods go in the Mods directory:

mkdir -p ~/.local/share/Terraria/tModLoader/Mods

Download .tmod files from the Steam Workshop or from the mod browser, then copy them:

cp Calamity.tmod ~/.local/share/Terraria/tModLoader/Mods/
cp MagicStorage.tmod ~/.local/share/Terraria/tModLoader/Mods/

Create an enabled.json to specify which mods to load:

echo '["CalamityMod", "MagicStorage"]' > ~/.local/share/Terraria/tModLoader/Mods/enabled.json

Configure the Server

cat > /opt/tmodloader/serverconfig.txt << 'EOF'
world=/opt/tmodloader/worlds/modded.wld
worldname=modded
autocreate=3
port=7777
maxplayers=8
difficulty=0
EOF

For Calamity, use a Large world (autocreate=3) so biomes generate properly.

Create systemd Service

[Unit]
Description=tModLoader Server
After=network.target

[Service]
Type=simple
User=root
WorkingDirectory=/opt/tmodloader
ExecStart=/opt/tmodloader/start-tModLoaderServer.sh -config /opt/tmodloader/serverconfig.txt
Restart=on-failure
RestartSec=10

[Install]
WantedBy=multi-user.target

Save to /etc/systemd/system/tmodloader.service, then:

systemctl daemon-reload
systemctl enable --now tmodloader

Client Mod Matching

All clients MUST have the exact same mods and versions as the server. tModLoader handles this during connection — it will prompt clients to download missing mods. If versions don't match, the client will be rejected.

Troubleshooting

  • Mod version mismatch: Update tModLoader and all mods on both server and clients
  • World won't generate: Check that mods are actually enabled in enabled.json
  • Crash on startup: Check logs in ~/.local/share/Terraria/tModLoader/Logs/
  • Low memory: tModLoader with Calamity needs 2GB+ RAM minimum
Play with friends?

Desert Forge hosting starts at $2/week — instant setup, DDoS protection, free tier available.

Get a server

← Back to Knowledge Base

DF: Game Hosting

Skip the setup. Game servers from $2/week with instant deployment.

Get a server