How to Setup a Terraria Server (In Ubuntu 24.04)

https://terraria.fandom.com/wiki/Server#serverconfig

Set up the script that starts the server

This is the setup script I made:

#!/usr/bin/bash

TRAR_SERVER=/root/server/Linux/TerrariaServer.bin.x86_64
echo "Making Terraria server executable..."
chmod +x $TRAR_SERVER

echo "Starting Terraria server at $TRAR_SERVER..."
echo "Using config: " $(cat /root/server_config.txt)
$TRAR_SERVER -config /root/server_config.txt -ip 0.0.0.0 # 0.0.0.0 is all interfaces

This is the server config:

world=/root/.local/share/Terraria/Worlds/The_Chamberverse.wld
autocreate=3
seed=dontdigup
worldname=The_Chamberverse
difficulty=2
maxplayers=8
port=7777
password=sugoma
motd=Objective: Find Dad
worldpath=/root/.local/share/Terraria/Worlds
banlist=banlist.txt # Banlist is in /root
secure=1 # Enable Anti-Cheat
language=en-US # Set to English
upnp=0 # Disable UPNP

Using screen, I used the command cd /root && screen -dmS terraria ./start_server.sh to start a screen session named terraria and start the server. I also added the following line to my crontab so it runs on reboot:

@reboot cd /root && screen -dmS terraria ./start_server.sh

More information on screen can be found in this guide

Helpful Tips

To prevent items from getting quick stacked in inventory, hold alt and left click on them to add them to favorites


Back to Table of Contents