Most of the guides on how to run a Terraria dedicated server on Ubuntu describe it running through TShock. However, there is an easier solution if you purchased the game on Steam.
I began playing Terraria with my wife recently and we soon felt the need to start a local dedicated server to play independently (not the 'Host and Play' mode).
There are many guides on how to start one with TShock:
Ok, I followed one of the guides and managed to launch my previously saved world through TShock aaand... Alas, there were several bugs including door malfunction that rendered the game unplayable.
This guide works at least for copies purchased on Steam. By the way, if you are in Southeast Asia (Indonesia, Malaysia, Philippines, Singapore, Thailand, Viet Nam), I could send you a gift copy of Terraria - just contact me :)
I've almost decided to fallback to 'Host and Play' but accidentally looked at what's in ~/.steam/steam/SteamApps/common/Terraria. There were some interesting files:
Terraria Terraria.bin.x86 Terraria.bin.x86_64 Terraria.exe TerrariaServer TerrariaServer.bin.x86 TerrariaServer.bin.x86_64 TerrariaServer.exe
Whats that TerrariaServer? Lets try:
Voila! You have a nice running Terraria server withouth any bugs!
To sum up, here is how you launch a dedicated Terraria server on Ubuntu:
$ cd ~/.steam/steam/SteamApps/common/Terraria $ ./TerrariaServer