How to setup a Dedicated Server for Terraria
Publisher: Psychz Networks, March 11,2021Terraria is an action-adventure sandbox game developed by Re-Logic. The game was first released for Microsoft Windows in 2011 and has since been ported to several other platforms. The game features exploration, crafting, building, painting, and combat with various creatures in a procedurally generated 2D world.
The following article will see how to set up Minecraft Bedrock on a Ubuntu 18 (Bionic) dedicated server.
- System Requirement
- Checking Ports
- Update Ubuntu
- Download Terraria
- Extract Terraria
- Running Terraria
- Help Commands
System Requirement
Ubuntu 18 - Bionic (64 bit)
CPU: Minimum 2 Cores 1800 Mhz
Ram: 4 GB
Storage: 10 GB
Checking Port Connection
The server runs on TCP port 7777 by default. If you are behind NAT, the port used must be port-forwarded for other players to join. Non-NAT connections (e.g., business or data center user) typically do not need port forwarding but may need to allow the port through a firewall.
Update Ubuntu 18 for latest libraries
If you are using a freshly installed copy of Ubuntu 18, your server may not have some libraries required to run the Terraria server. First, we will install the tools we need to run the server. These are likely preinstalled on your distribution.
# sudo apt update && sudo apt install -y wget tmux unzip
Download Terraria
You can download the latest version of Terraria from their website. Currently, their latest version is Version 1.4.1.2
To download the zipped file,
# wget https://terraria.org/system/dedicated_servers/archives/000/000/042/original/terraria-server-1412.zip
Output
Resolving terraria.org (terraria.org)... 104.21.12.106, 172.67.194.28, 2606:4700:3033::6815:c6a, ...
Connecting to terraria.org (terraria.org)|104.21.12.106|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 41871820 (40M) [application/zip]
Saving to: 'terraria-server-1412.zip'
terraria-server-1412.zip
100%[================================================================================================================>] 39.93M
50.4MB/s in 0.8s
2021-03-11 02:35:11 (50.4 MB/s) - ‘terraria-server-1412.zip’ saved [41871820/41871820]
Extract Terraria
We will now unzip the downloaded folder.
Output
.
.
.
.
inflating: 1412/Mac/Terraria Server.app/Contents/Resources/WindowsBase.dll
creating: 1412/Windows/
inflating: 1412/Windows/changelog.txt
inflating: 1412/Windows/ReLogic.Native.dll
inflating: 1412/Windows/serverconfig.txt
inflating: 1412/Windows/start-server.bat
inflating: 1412/Windows/TerrariaServer.exe
When you unzip the downloaded folder, all the files are extracted into a folder named '1412', which stands for version 1.4.1.2
Use the ls command to see all the files and folders.
# ls
Output
Switch to this folder. You will find a folder named 'Linux'. This folder holds all the necessary files to run the game server on your Ubuntu 18 dedicated server.
# cd /1412/Linux
Use the ls command to list all the files and folders under this directory.
# /1412/Linux# ls
Output
System.Windows.Forms.dll.config
TerrariaServer
FNA.dll monoconfig mscorlib.dll System.Data.dll System.Runtime.Serialization.dll System.Xml.dll TerrariaServer.bin.x86_64
FNA.dll.config monomachineconfig open-folder System.dll System.Security.dll System.Xml.Linq.dll TerrariaServer.exe
lib Mono.Posix.dll System.Configuration.dll System.Drawing.dll System.Windows.Forms.dll Terraria.png WindowsBase.dll
Add executable permissions to the server binary: sudo chmod +x TerrariaServer.bin.x86_64
Note: Since we are using a 64-bit version of Ubuntu 18, we will be using an executable file named 'TerrariaServer.bin.x86_64'.
Run Terraria Game
To run the server
# ./TerrariaServer.bin.x86_64
This will initiate the launch and will take a few minutes to load the game. Once the game is loaded, it will ask you a set of questions about the game server's configuration. Following are some of the questions that you might need to answer.
Output
1 My_world_1
n New World
d <number> Delete World
Choose World: 1
Max players (press enter for 16):
Server port (press enter for 7777):
Automatically forward port? (y/n): y
Server password (press enter for none):
Terraria Server v1.4.1.2
Listening on port 7777
Type' help' for a list of commands.
: Server started
Congratulations!! You have successfully installed and launched Terraria on your Linux server. You can invite your friends or other online players by sharing your public IP address so they can look up your server online and join the game. A Terraria server can be joined by selecting the Multiplayer option on the main menu, selecting a character, and entering the server's IP and port.
A list of servers you have recently played will be saved under "Join via IP" in Multiplayer.
Help Commands
Following are some of the important commands you must know to operate the game. You can find them by typing 'help' command after the game server is online.
We hope you have found this guide helpful and could successfully deploy Terraria on your Ubuntu server. Please click on the up-vote button to show your appreciation.