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!
Thanks! This helped. :D