Intermediate 30 min — Run a persistent TShock Terraria server in a lightweight container.
From the Proxmox shell (or SSH into your host), create a new container. Adjust the storage and ID as needed:
pct create 200 local:vztmpl/debian-12-standard_12.2-1_amd64.tar.zst \
--hostname terraria \
--cores 1 \
--memory 1024 \
--swap 512 \
--rootfs local-lvm:8 \
--net0 name=eth0,bridge=vmbr0,ip=dhcp \
--unprivileged 1 \
--start 1
This creates a container with 1 CPU core, 1GB RAM, and 8GB disk. Terraria servers are single-threaded, so 1 core is fine. For large worlds or many players, bump memory to 2GB.
Enter the container and install the required packages:
pct enter 200
apt update && apt upgrade -y
apt install -y unzip wget screen libicu72
libicu72 is required by TShock's .NET runtime. screen is optional but useful for attaching to the server console.
TShock is the most popular Terraria server wrapper. It adds permissions, anti-cheat, and server management commands. Download the latest release:
mkdir -p /opt/terraria && cd /opt/terraria
# Check https://github.com/Pryaxis/TShock/releases for latest version
wget https://github.com/Pryaxis/TShock/releases/download/v5.2.0/TShock-5.2-for-Terraria-1.4.4.9-linux-x64-Release.zip
unzip TShock-*.zip
rm TShock-*.zip
chmod +x TShock.Server
Verify it runs:
./TShock.Server -h
Create a server config file:
cat > /opt/terraria/serverconfig.txt << 'EOF'
world=/opt/terraria/worlds/world1.wld
worldname=world1
autocreate=2
worldpath=/opt/terraria/worlds
port=7777
maxplayers=8
password=
difficulty=0
motd=Welcome to the server! Hosted with TShock.
language=en-US
npcstream=15
secure=1
EOF
mkdir -p /opt/terraria/worlds
Key settings:
autocreate=2 — creates a Medium world if the world file doesn't exist (1=Small, 2=Medium, 3=Large)difficulty=0 — 0=Classic, 1=Expert, 2=Master, 3=Journeypassword — leave blank for no password, or set one for private serversmaxplayers — Terraria supports up to 255, but 8-16 is typical for LXCCreate a systemd unit so the server starts on boot and restarts on crash:
cat > /etc/systemd/system/terraria.service << 'EOF'
[Unit]
Description=TShock Terraria Server
After=network.target
[Service]
Type=simple
User=root
WorkingDirectory=/opt/terraria
ExecStart=/opt/terraria/TShock.Server -config /opt/terraria/serverconfig.txt -logpath /opt/terraria/logs
Restart=on-failure
RestartSec=10
[Install]
WantedBy=multi-user.target
EOF
mkdir -p /opt/terraria/logs
systemctl daemon-reload
systemctl enable terraria
systemctl start terraria
systemctl status terraria
Check the logs:
journalctl -u terraria -f
On first start, TShock will generate the world (this takes 30-60 seconds). You'll see Server started when it's ready. Open Terraria, go to Multiplayer > Join via IP, and enter your server's IP address with port 7777.
If you're using Proxmox's built-in firewall or ufw, allow port 7777:
# On the Proxmox host (if using host firewall)
iptables -A INPUT -p tcp --dport 7777 -j ACCEPT
# Or if using ufw inside the container
ufw allow 7777/tcp
If your server is behind a NAT router, forward port 7777 TCP to the container's IP address.
Your world files live in /opt/terraria/worlds/. Back these up regularly. A simple cron job:
crontab -e
# Add this line to back up every 6 hours:
0 */6 * * * tar czf /opt/terraria/backups/world-$(date +\%Y\%m\%d-\%H\%M).tar.gz /opt/terraria/worlds/
Desert Forge Backup handles world file backups automatically with AES-256 encryption and zero egress fees.
Set up Backupping 8.8.8.8), and confirm the server is listening (ss -tlnp | grep 7777)..bak extensions. Rename one to restore.pct set 200 --memory 2048).apt install libicu72 (Bookworm) or libicu67 (Bullseye).TShock.Server is executable: chmod +x /opt/terraria/TShock.Server.Desert Forge Game Hosting gives you a Terraria server with one click — from $2/week, no Linux required.
Get a server