Running Terraria on a DO droplet
Code from Debugging my Terraria Server's Startup.
terraria.nchlswhttkr.com:7777
for my server (if up).
This runs in a detached screen, managed by systemd.
You can download the server itself off the official Terraria website, place the contents of the Linux
directory on a local terraria
user in your droplet, with the accompanying server.config
and terraria.service
.
Set up as a user unit (~/.config/systemd/user/terraria.service
) to run the server, which can be taken up/down with systemctl --user start/stop terraria
.
To make sure this unit is not stopped when the owning user logs out, run sudo loginctl enable-linger <username>
to allow the service to linger. Otherwise, the server will be stopped when you log out of your SSH session.
Runs off port 7777
(make sure its excepted from your firewall).
Attach to the screen (screen -r terraria
) if you want to run admin commands.
Useful Links
Thanks for this! It was a big help for me getting started with a Terraria server as a systemd service. One question, I'm having trouble deciphering the start.sh file. Nothing is listening on port 7000. What's the purpose of that? And have you considered adding the Restart property to the terraria.service?