
Host a Terraria - tMod Loader Dedicated Server
tModLoader is a modding framework for Terraria that lets you easily install and play with community-created mods. Host a modded Terraria server with full mod support, custom worlds, and all Terraria gameplay features.
Hardware Requirements
Here's what you need to run a Terraria - tMod Loader dedicated server.
Economy
Small world, few mods, 1-4 players
Standard
Medium world with mods, 4-8 players
Pro
Large world, heavy mods, 8-16 players
Start hosting from your own computer
Run a Terraria - tMod Loader server on your desktop, laptop, VPS, or dedicated machine — GameCP automates Docker setup, resource allocation, and Terraria - tMod Loader configuration instantly. Automatic port forwarding means your friends can connect without touching your router. Start local, scale to a VPS when you're ready.
Setup in 4 Steps
Skip the manual installation, port forwarding, and configuration. Install on your own computer and start hosting instantly.
The Manual Way vs. GameCP
Manual Setup
- ✗Configure 1+ firewall ports and router settings
- ✗Write systemd service files
- ✗SSH into server to edit configs
- ✗Requires a VPS or dedicated server
- ✗30-60 minutes if experienced
With GameCP
- Automatic port forwarding — no router config
- Host from your own PC, VPS, or dedicated server
- Docker container with auto-restart
- Visual config editor in browser
- Under 5 minutes total
Under the Hood
The full manual process to host a Terraria - tMod Loader dedicated server on a VPS. Or install GameCP on your own computer and skip all of this.
Configure & Prepare
Set your server settings, then install Docker, and pull the Terraria - tMod Loader container image.
# Update system and install Docker sudo apt update && sudo apt install -y docker.io sudo systemctl enable --now docker # Create game server directory sudo mkdir -p /opt/gameserver # Server configuration export MAX_PLAYERS="8" export SERVER_MOTD="Welcome to tModLoader!" export WORLD_NAME="world" export WORLD_SIZE="1" export DIFFICULTY="0" export NPCSTREAM="60" export TMODLOADER_VERSION="latest" export LANGUAGE="1" # Pull the container image docker pull ghcr.io/ptero-eggs/yolks:dotnet_8
Run the Installation Script
Terraria - tMod Loader uses a custom install script to download and configure the server files.
#!/bin/bash
# tModLoader Installation Script
#
# Server Files: /opt/gameserver
apt update
apt install -y file curl jq unzip
## get release info and download links
LATEST_JSON=$(curl --silent "https://api.github.com/repos/tmodloader/tmodloader/releases" | jq -c '.[]' | head -1)
RELEASES=$(curl --silent "https://api.github.com/repos/tmodloader/tmodloader/releases" | jq '.[]')
if [ -z "$TMODLOADER_VERSION" ] || [ "$TMODLOADER_VERSION" == "latest" ]; then
echo -e "Defaulting to latest release"
DOWNLOAD_LINK=$(echo $LATEST_JSON | jq .assets | jq -r .[].browser_download_url | grep -i tmodloader.zip)
else
VERSION_CHECK=$(echo $RELEASES | jq -r --arg VERSION "$TMODLOADER_VERSION" '. | select(.tag_name==$VERSION) | .tag_name')
if [ "$TMODLOADER_VERSION" == "$VERSION_CHECK" ]; then
DOWNLOAD_LINK=$(echo $RELEASES | jq -r --arg VERSION "$TMODLOADER_VERSION" '. | select(.tag_name==$VERSION) | .assets[].browser_download_url' | grep -i tmodloader.zip)
else
echo -e "Version not found, defaulting to latest release"
DOWNLOAD_LINK=$(echo $LATEST_JSON | jq .assets | jq -r .[].browser_download_url | grep -i tmodloader.zip)
fi
fi
mkdir -p /opt/gameserver
cd /opt/gameserver || exit 5
## download release
echo -e "Downloading: ${DOWNLOAD_LINK}"
curl -sSL ${DOWNLOAD_LINK} -o ${DOWNLOAD_LINK##*/}
FILETYPE=$(file -F ',' ${DOWNLOAD_LINK##*/} | cut -d',' -f2 | cut -d' ' -f2)
if [ "$FILETYPE" == "gzip" ]; then
tar xzvf ${DOWNLOAD_LINK##*/}
elif [ "$FILETYPE" == "Zip" ]; then
unzip -o ${DOWNLOAD_LINK##*/}
else
echo -e "Unknown filetype. Exiting"
exit 2
fi
# Create startup wrapper script
echo 'dotnet tModLoader.dll -server "$@"' > tModLoaderServer
chmod +x tModLoaderServer
echo -e "Cleaning up extra files."
rm -rf ${DOWNLOAD_LINK##*/}
rm -rf DedicatedServerUtils LaunchUtils PlatformVariantLibs tModPorter RecentGitHubCommits.txt *.bat *.sh 2>/dev/null
# Set up config with difficulty setting (command-line param doesn't work for difficulty)
mv /opt/gameserver/serverconfig.txt /opt/gameserver/config.txt 2>/dev/null
if [ -f /opt/gameserver/config.txt ]; then
sed 's/#difficulty/difficulty/' /opt/gameserver/config.txt > /opt/gameserver/serverconfig.txt
rm /opt/gameserver/config.txt
fi
# Create mod directories
mkdir -p /opt/gameserver/saves/Worlds
mkdir -p /opt/gameserver/mods
echo "-----------------------------------------"
echo "tModLoader installation completed."
echo "Place .tmod files in the mods/ directory."
echo "Use install.txt for Workshop mod IDs."
echo "Use enabled.json to enable/disable mods."
echo "-----------------------------------------"Open Firewall Ports
Terraria - tMod Loader requires 1 port to be open for game traffic and queries.
sudo ufw allow 7777/tcp
Launch the Server
Start the Terraria - tMod Loader server using the configuration from Step 1.
docker run -d \ --name tmodloader-server \ -p 7777:7777/tcp \ -e MAX_PLAYERS="8" \ -e SERVER_MOTD="Welcome to tModLoader!" \ -e WORLD_NAME="world" \ -e WORLD_SIZE="1" \ -e DIFFICULTY="0" \ -e NPCSTREAM="60" \ -e TMODLOADER_VERSION="latest" \ -e LANGUAGE="1" \ -v /opt/gameserver:/opt/gameserver \ -w /opt/gameserver \ ghcr.io/ptero-eggs/yolks:dotnet_8 \ ./tModLoaderServer -ip 0.0.0.0 -port 7777 -maxplayers 8 -password "" -motd "Welcome to tModLoader!" -lang 1 -world ~/saves/Worlds/world.wld -worldname world -autocreate 1 -config serverconfig.txt -savedirectory ~/ -tmlsavedirectory ~/saves -modpath ~/mods
Or skip all of this
GameCP automates every step above: Docker, port forwarding, startup, and config. Install on your own PC and deploy a Terraria - tMod Loader server in under 5 minutes.
Deploy with GameCPMore Hosting Guides
Explore step-by-step setup guides for other popular games supported by GameCP.
Ready to Host Your Terraria - tMod Loader Server?
Install GameCP on your own computer and start hosting in minutes. Automatic port forwarding, zero config — your friends connect instantly.
No credit card required · Free tier available · Install local, scale later