tModLoader (Terraria Mods)
Install and configure a tModLoader dedicated server for modded Terraria multiplayer on Linux
tModLoader is the official Terraria modding platform, maintained by the Terraria developers. It lets you run a dedicated server with mods from the Steam Workshop or manually installed .tmod files.
Requirements
- Ubuntu 22.04 / Debian 12 (64-bit)
- 2 GB RAM (4 GB recommended with heavy mods)
- 5 GB disk space (more with mods)
- Port
7777TCP
Create a dedicated user
sudo useradd -m -s /bin/bash terraria
sudo su - terraria
mkdir -p /home/terraria/server
cd /home/terraria/serverInstall tModLoader
Download the latest release from GitHub:
# Check latest version at https://github.com/tModLoader/tModLoader/releases
TML_VERSION="v2024.09"
wget "https://github.com/tModLoader/tModLoader/releases/download/${TML_VERSION}/tModLoader.zip"
unzip tModLoader.zip -d /home/terraria/server/
chmod +x /home/terraria/server/tModLoaderServer
rm tModLoader.zipInstall .NET runtime (required)
exit
sudo apt install dotnet-runtime-8.0 -y
sudo su - terrariaCreate a server config file
nano /home/terraria/server/serverconfig.txtworld=/home/terraria/.local/share/Terraria/tModLoader/Worlds/MyWorld.wld
worldname=MyWorld
autocreate=3
seed=
difficulty=0
maxplayers=8
port=7777
password=
motd=Welcome to the server!
worldpath=/home/terraria/.local/share/Terraria/tModLoader/Worlds/
npcstream=60
priority=1World size (autocreate):
1= Small2= Medium3= Large
Difficulty (difficulty):
0= Classic1= Expert2= Master3= Journey
Start the server (first run)
/home/terraria/server/tModLoaderServer -config /home/terraria/server/serverconfig.txtOn first run it will create the world. This takes a few minutes. Once running, press Ctrl+C to stop it.
Run as systemd service
exit
sudo nano /etc/systemd/system/tmodloader.service[Unit]
Description=tModLoader Terraria Server
After=network.target
[Service]
Type=simple
User=terraria
WorkingDirectory=/home/terraria/server
ExecStart=/home/terraria/server/tModLoaderServer -config /home/terraria/server/serverconfig.txt
Restart=on-failure
RestartSec=10s
[Install]
WantedBy=multi-user.targetsudo systemctl daemon-reload
sudo systemctl enable tmodloader
sudo systemctl start tmodloader
sudo systemctl status tmodloaderFirewall
sudo ufw allow 7777/tcpInstall mods
Method 1: Steam Workshop (via SteamCMD)
# Install SteamCMD
sudo apt install steamcmd -y
# Download a mod (get Workshop ID from the mod page URL)
steamcmd +login anonymous +workshop_download_item 1281930 MOD_ID +quit
# 1281930 is Terraria's Steam App IDCopy the downloaded mod to the tModLoader mods folder:
mkdir -p /home/terraria/.local/share/Terraria/tModLoader/Mods/
cp ~/.steam/steam/steamapps/workshop/content/1281930/MOD_ID/*.tmod \
/home/terraria/.local/share/Terraria/tModLoader/Mods/Method 2: Manual .tmod files
Download .tmod files from Mod Browser or the mod's GitHub, then:
cp mymod.tmod /home/terraria/.local/share/Terraria/tModLoader/Mods/Enable mods
Create or edit the enabled mods list:
nano /home/terraria/.local/share/Terraria/tModLoader/Mods/enabled.json[
"CalamityMod",
"ThoriumMod",
"ImprovedTorches"
]The names must match the .tmod filenames (without extension). Restart the server to load mods.
Popular mods
| Mod | Description |
|---|---|
| Calamity Mod | Massive content expansion with 1800+ items |
| Thorium Mod | Large content mod with 3 new classes |
| Magic Storage | Centralized storage system |
| Boss Checklist | Tracks boss progression |
| Fargo's Mutant Mod | NPC upgrades and quality of life |
| Improved Torches | Better torch mechanics |
Server commands (in console)
| Command | Description |
|---|---|
help | List all commands |
players | List connected players |
kick <player> | Kick a player |
ban <player> | Ban a player |
say <message> | Broadcast message |
save | Save the world |
exit | Shut down the server |
exit-nosave | Shut down without saving |
Update tModLoader
sudo systemctl stop tmodloader
# Download new version
sudo -u terraria bash -c '
TML_VERSION="v2024.09"
cd /home/terraria/server
wget "https://github.com/tModLoader/tModLoader/releases/download/${TML_VERSION}/tModLoader.zip"
unzip -o tModLoader.zip
rm tModLoader.zip
chmod +x tModLoaderServer
'
sudo systemctl start tmodloaderWhen updating tModLoader, all mods must also be updated to be compatible with the new version. Check mod compatibility before updating a live server.
Logs
journalctl -u tmodloader -f