How to Create a Terraria Server on DigitalOcean (Step by Step)

In this blog, I will use Terraria Version 1.4.4.9 as an example for the Terraria Server.
Why Create Your Own Terraria Server?
You may ask: Terraria already has Multiplayer, right? One person can be the Host, and that is enough. Why create your own server and pay for the Cloud?
Here is my problem. When we play with many people, we often have different free time. Sometimes I am free in the daytime, but my friend is free at night. Some days I don’t want to play, but my friend does. Right now, everything depends on the Host. If the Host is busy, we can’t play. If the Host doesn’t want to play, we can’t play.
Wouldn’t it be nicer to have a Server that is always on? Then we can join and play any time we want. So I decided to create my own Server!
Sign Up for DigitalOcean
The first step is simple. We need to sign up for DigitalOcean.
Click this link: https://www.digitalocean.com/
(If you already have an account, skip this step.)
Start Creating a Droplet
After you log in, you will see first-project. DigitalOcean creates this Project for you, so you can start right away.
I will use first-project here. But if you want a separate Project, click the New Project button.

To create a Terraria Server on the Cloud, we need a VM. DigitalOcean calls a VM a Droplet.
Droplets are Linux-based virtual machines (VMs) that run on top of virtualized hardware. Each Droplet you create is a new server you can use, either standalone or as part of a larger, cloud-based infrastructure.
Click the Droplets menu. Then click Create Droplet.

Choose a Region and Datacenter
Next, choose a Region. This is the place where your Server will live. Then choose a Datacenter.
I use the Singapore Region because it is the closest to Thailand, so the Ping is lower. Singapore has only one Datacenter, so I have no other choice. I just use the one they give me.

Choose an OS and OS Version
Then choose the OS and OS Version you want.
I use Ubuntu Version 24.04 (LTS) x64.

Choose the Droplet Size
Next, choose the Size. This is the Spec of your machine.
I recommend 2 CPUs and 4 GB of Ram. (I tried 1 CPU and 2 GB of Ram once. It could not create a large World.)
I use Basic > Regular > 2 CPUs Ram 4 GB. The price is in the picture: $24/month. (At the time I write this blog, that is about 773.46 baht/month.)

Add Storage and Backup (Optional)
This part is up to you. If you worry about space, you can add more Storage. But it costs extra.
You can also turn on Backup for your data. It costs extra too. I don’t take either one.

Choose a Login Method
Next, choose how to Login and control this Droplet.
If you want to be a bit safer, use an SSH Key.
If you want it easy, use a Password.
I will use a Password. It is easy.

Turn On Metrics Monitoring
Next are the things DigitalOcean recommends.
I take only Add improved metrics monitoring and alerting, because it is Free. (With this, we can Monitor the Droplet. We can see how much CPU, Ram, and Storage we use, and more.)

Name Your Droplet and Choose a Project
We are almost done creating the Droplet. Just a little more!
Give it a name, so you remember what this Droplet is. If you have many Projects, you can also choose which Project it goes in. Then click Create Droplet.
In this blog, I name it terraria-server and I use first-project.

Wait a moment while it creates the Droplet.

The Droplet is ready.

Start the Terraria Server
Okay, now we will start the Terraria Server.
Click the Droplet name to open its details page.

Now click the Console button to control this Droplet.

You will see a Terminal like this.

1. Update the Software Package List
First, update the Software Package list with this command.
sudo apt update

2. Install Unzip
Okay, let’s install Unzip first. The Terraria Server file we will download is a .zip file.
sudo apt install unzip

3. Install Screen
Now we will install another Software called Screen. It lets us create a Session in the system and keep it running in the background. After we Start the Terraria Server, we need to leave it running in the background. With Screen, closing the Terminal will not Stop our Terraria Server.
sudo apt install screen

4. Config the Firewall
Next, we will Config the Firewall a little. This lets us connect to the Terraria Server on Port 7777. Use this command.
sudo ufw allow 7777

5. Create a Directory for Our Files
Now let’s stop and create a Directory. This keeps our files neat.
mkdir app
cd app

6. Download and Extract the Terraria Server
Next, we will Download Terraria Server Version 1.4.4.9 to our machine with this command.
(I got the Download link from the Terraria Wiki: https://terraria.wiki.gg/wiki/Server#Downloads)
wget https://terraria.org/api/download/pc-dedicated-server/terraria-server-1449.zip
Then extract the file with this command.
unzip terraria-server-1449.zip

The files are extracted.

7. Go Into the Terraria Server Directory
List the Directory. You will see a folder named after the Version number, 1449. Go into that folder.
ls -l
cd 1449

List the Directory again. You will see folders for each OS it supports. We use Linux, so go into the Linux folder.
ls -l
cd Linux

8. Give Permission to the Terraria Server File
The Terraria Server file we will run is TerrariaServer.bin.x86_64. But right now we don’t have permission to run it. We need to give it permission first. Use this command.
chmod +x TerrariaServer.bin.x86_64

9. Open a Screen Session
Next, we will open a Screen Session, because we are ready to run the Terraria Server.
Type this command, then press Enter.
screen
It will look like this.

Press Space Bar or Enter. You will go back to the normal Terminal screen.
10. Start the Terraria Server
Okay, the moment we waited for is here. Time to Start the Terraria Server!
Type this command and press Enter.
./TerrariaServer.bin.x86_64
First, it asks if we want to create a new World or use an existing one. We don’t have any World yet, so we will create a new one. Type n and press Enter.

Choose the World Size
Then choose the size of the World: Small, Medium, or Large. Type the number 1, 2, or 3 and press Enter.
I choose Large.
The World size also changes how much Ram the Server uses. The bigger the World, the more Ram it uses.

Choose the World Difficulty
Then choose the difficulty: Classic, Expert, Master, or Journey. Type the number 1, 2, 3, or 4 and press Enter.
I choose Master.

Choose the Evil Biome
Next, choose the Evil Biome: Random, Corrupt, or Crimson. Type the number 1, 2, or 3 and press Enter.
I choose Random.

Name the World
Then type the name of your World and press Enter.
I name mine MyFirstWorld.

Enter the World Seed
Then type the Seed for your World. (If you don’t want one, leave it empty and it will pick one for you.) Press Enter.
I don’t type anything. I leave it empty.

Wait for the World to Be Created
Now wait a while for it to create the World.

The World is ready.
The World file is saved at
~/.local/share/Terraria/Worlds/
It goes back to the World selection screen again.
This time, choose the World we just created. Type 1 and press Enter.

Set the Maximum Players
Then type the maximum number of players you want. (If you leave it empty, it uses the Default, which is 16 players.) Press Enter.
The maximum number of players also changes how much Ram the Server uses. The more players, the more Ram it uses.
I leave it empty.

Set the Port
Next, set the Port to use. (If you leave it empty, it uses the Default, which is 7777.) Press Enter.
I leave it empty.

Set UPnP Port Forwarding
This step asks if you want it to Forward the Port automatically.
If you use a Router that supports UPnP, it will Forward the Port for you automatically.
I don’t use a Router, because we use a Cloud Server. So I type n and press Enter.

Set a Password to Join the Server
Next, type a Password for joining the Server. (If you leave it empty, there is no Password. But please set one. It is safer.) Press Enter.
I use Th1s_Secret as the Password.

Wait for the Terraria Server to Start
Then wait a while for the Terraria Server to Start.

The Terraria Server is up and running.

How to Join the Terraria Server
Now let’s try to Join our Terraria Server.
Open the Terraria game and click Multiplayer.

Then click Join via IP.

Choose the character you want to play.

Type the IP address of our Droplet and click Accept. (If you want your friends to play too, just send them this IP address.)

The question is: where do we get the IP address of our Droplet?
Actually, we already saw this number twice.
-
The first time is here. Click Copy.

-
The second time is here. Click Copy.
(It is the same value as the first one. Copy from whichever place you like.)
The Port is 7777 by default, so you don’t need to change anything. Then click Accept.

If everything is right, it will ask for a Password. Type the Password you set when you Started the Server, then click Accept.

Sometimes you may get stuck on the Found Server screen like this.

Don’t worry. Click Cancel and try to Join again.
We are in. Yay!

Using Screen to Manage Sessions
Wait, before we end this blog, there is one more thing we must cover. We want the Terraria Server to run all the time. So let’s learn a little about how to use Screen to manage Sessions.
Before we Started the Terraria Server, we created a Screen Session with the screen command, remember? Now let’s leave the Session. (We don’t close it. The system keeps running in the background.) Press Ctrl + A + D. You will see something like this.

Now let’s List the Screen Sessions to see which ones are open.
Use screen -list. You will see that we have 1 Session running in the background.

Remember the number in the picture above. We need it when we want to go back to that Session. Use the command screen -r <Session number>. For example:
screen -r 3601
After you press Enter, you will see that we are back at the Terraria Server screen, just like before.

Terraria Server Commands
Just one more little thing! While the Terraria Server is running, we can type Terraria Commands. For example, we can kick a player out of the Server, send a message to the people in the Server, see who is in the Server, or even shut down the Server.
If you want to know which Commands you can use, type help and press Enter. It will show the list of Commands.
(If you type it and get Invalid Command, press Enter once first. A : will show up, and then you can type Commands.)
help

Summary
The method in this blog is not only for DigitalOcean.
You can use it with a VM on other Cloud providers too. Only the price and the way to create the VM are different. The steps to start the Terraria Server in the Terminal are the same on every VM.
I hope this blog helps everyone who wants to create a Terraria Server. At least it helps me. If I forget how to do it, I can come back and read my own blog.
Last, thank you to the Terraria Wiki for their docs.
https://terraria.wiki.gg/wiki/Server
Part of the steps in this blog come from that page.