Skip to content

Instantly share code, notes, and snippets.

@tyliec
Last active August 11, 2020 13:52
Show Gist options
  • Save tyliec/c3162c45b481e731fbc14d9296e1d117 to your computer and use it in GitHub Desktop.
Save tyliec/c3162c45b481e731fbc14d9296e1d117 to your computer and use it in GitHub Desktop.
Terraria Server Setup Guide

This is a Terraria Server Setup Guide for Digital Ocean

This guide might not do everything the right way, but it works.

No bullshit. Straight up what I did to get it working. (Ubuntu 16.04 64bit)

ssh into your droplet

Update your shit

sudo apt-get update
sudo apt-get upgrade

Install screen so you can exit out of the droplet and still have the server run

sudo apt-get install screen

Exit out of your droplet

exit

Get the latest Terraria Server from terraria.org (Bottom at Dedicated Server)

scp that shit up to your droplet

scp fileyoudownloadedfromabove.zip yourusername@yourdropletIP:/home

ssh back into your droplet

move that file if you want I guess to wherever you want

cd to wherever you moved it

Need to unzip it so install unzip

sudo apt-get install unzip

Then unzip the file

unzip fileyoudownloadedfromabove.zip
rm fileyoudownloadedfromabove.zip

cd into the file that gets unzipped

cd into Linux (If you aren't running Linux lookup another guide)

Initialize a new screen for this server

To get back into this, just do screen -r terraria

to exit the screen do (ctrl+a)+d

screen -S terraria

Now we can run the scripts

Try running the startup script first

sudo ./TerrariaServer

If this works great, your done

Your server should be running on port 7777 by default, and it should all work fine

If you ran into problems here are some things you can do

If your server is "Killed" on startup, it's probably because you don't have enough memory. https://www.digitalocean.com/community/tutorials/how-to-add-swap-space-on-ubuntu-16-04

Make sure your firewall isn't blocking the port (7777 by default) for UFW the command is

sudo ufw allow PORTNUMBER (7777 by default)

If you can't even run ./TerrariaServer, here are some steps so you can do

sudo chmod +x TerrariaServer
./TerrariaServer

If you get the error that another script can't be run, make that file executable to

sudo chmod +x filethatcan'tberun
./TerrariaServer

If it tells you that file can't be found, its most likely because its 32bit and your on 64bit

sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386
./TerrariaServer

Good Luck!

@nosnaj
Copy link

nosnaj commented Mar 31, 2018

Thanks! This helped. :D

@JacobKoll
Copy link

JacobKoll commented Feb 3, 2019

What if even after all this. When I do a ./TerrariaServer the terminal just goes to the next line as if nothing happens and there are no errors?
Running Ubuntu Server

~/TerrariaServers/1353/Linux$ sudo mono --debug --trace=N:nothing TerrariaServer.exe

[0x7f8e88b1d780:] EXCEPTION handling: System.Exception: Magic number is wrong: 542

[0x7f8e88b1d780:] EXCEPTION handling: System.TypeInitializationException: The type initializer for 'System.ConsoleDriver' threw an exception.

[0x7f8e88b1d780:] EXCEPTION handling: System.TypeInitializationException: The type initializer for 'System.Console' threw an exception.

[0x7f8e88b1d780:] EXCEPTION handling: System.TypeInitializationException: The type initializer for 'System.Console' threw an exception.

[0x7f8e88b1d780:] EXCEPTION handling: System.TypeInitializationException: The type initializer for 'System.Console' threw an exception.

Apparently this is a bug with Mono that still exists and the fix is to set your TERM variable to xterm so.

"export TERM=xterm"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment