Skip to content

Running a Terraria Server on Linux

In this quick tutorial, I’ll run you through how to quickly setup a dedicated Terraria server on Linux.

In this setup, I’m using Ubuntu Server 14.04 64-bit. I have tried it on CentOS without success (mono libs aren’t up-to-date), so I can’t guarantee it’d work on other platforms. Your server will also need at least 2GB of RAM. Any less and the server will fail to start.

First, we’ll need to install some prerequisites.

$ sudo apt-get install screen wget mono-complete

We’ll need wget to download the server files, screen to ensure the server doesn’t stop when we disconnect/logoff, and mono because Terraria is written in .NET.

Now that we have all that, let’s grab the server files. My example URL is current as of this posting, but you can grab in URL of the current version here.

$ wget
$ tar xzf terraria-server-linux-1308.tar.gz
$ mv terraria-server* terraria
$ cd terraria

What we’ve done here is download the server files, unarchived them, renamed the folder to ‘terraria’, then moved into that folder.

At this point, we’ll want to start our screen session. Screen will allow the server to keep running in the background, so we can logoff the server without having to stop the Terraria server.

$ screen -S terrariads

Now, we’re inside the screen. To leave it, press Ctrl+A then Ctrl+D. To get back into the server console, enter screen -r terrariads and you’ll be right back in.

Once inside the screen session, we can start the server with the following:

$ mono –server –gc=sgen -O=all TerrariaServer.exe

The --server option reduces the header size and let’s Mono know that we won’t be using a GUI. --gc=sgen helps reduce memory fragmentation. -O=all turns on all optimizations.

That’s it. You now have a running Terraria server on Linux!

Published inGaming