Terraria<\/strong>\u00a0is a\u00a0MMORPG<\/strong>\u00a0based on mining, building, and fighting. Some people say its a 2D version of Minecraft, but that wouldn’t do justice to Terraria’s offerings – not by a long shot.<\/p>\n In this guide, I’ll show you step by step how to make a\u00a0Terraria server<\/strong>\u00a0with TShock on Linux. You could even setup multiple Terraria servers.<\/p>\n Some basic Linux knowledge is recommended. At the very least, you should understand how to use SSH.<\/p>\n By the end of the tutorial, you will be able to invite friends over to join your epic quests.<\/p>\n This tutorial is based on Ubuntu 14.10, but more recent Ubuntu or Debian flavors will work. For other Linux versions, the package names may differ but most of the steps and configuration will be the same.<\/p>\n We will start off with a new Ubuntu 14.10 server on Aklwebhost.<\/p>\n Terraria uses quite a bit of memory, especially for large worlds. For instance, a\u00a0Aklwebhost\u00a0server with 1024MB RAM will only support a small world with a few players.<\/p>\n A clean Ubuntu-based image on\u00a0Aklwebhost\u00a0starts with access to basic services. Only NTP and SSH ports are opened. If you want to host other services, then you might want to secure your incoming traffic and move your SSH port to something other than the default port.<\/p>\n This guide doesn’t cover all the changes needed to secure your server – there are other guides on\u00a0Aklwebhost\u00a0Docs for that. Remember, Terraria uses\u00a0TCP port 7777<\/strong>\u00a0by default.<\/p>\n We’ll create a basic user to run the Terraria server, since we don’t want to run the server as root. After that, we’ll install the necessary packages.<\/p>\n Log in to your server as root and create a new user for your Terraria server. You may receive some error messages about missing locales. Ignore those for now.<\/p>\n The system will ask for a new UNIX password. Enter a fairly secure random password and remember it (or jot it down).<\/p>\n Now, the system will ask for some user details. You can just press\u00a0Enter<\/strong>\u00a0to leave these empty.<\/p>\n When the system asks you to confirm the information (“Is the information correct?”), press\u00a0Y<\/strong>\u00a0followed by\u00a0Enter<\/strong>.<\/p>\n Terraria is a game based on the Microsoft “.NET” framework. The Linux implementation of “.NET” is called “mono”. We’ll install only the necessary packages to get the game running and some support packages.<\/p>\n Your system is now ready to run Terraria.<\/p>\n At this point, you need to be logged into your server as user “terraria”.<\/p>\n Download and unzip a release of TShock. You can check the official TShock website for newer releases. The Terraria server download is included with TShock.<\/p>\n The first time you start TShock, you must join your server to make yourself the administrator. Start the server.<\/p>\n The gameserver will start and show you the server version. After that, it will ask you what world you would like to start. Since this is a new server, there are no previous worlds. We’ll create a new one.<\/p>\n The larger the world, the more memory you’ll need. Remember, a basic\u00a0Aklwebhost\u00a0server with 1024MB RAM will only support a small world.<\/p>\n The server will now start generating your new world. When it has finished, you’ll be back in the main selection menu.<\/p>\n Your world will be loaded and TShock will show you an authorization code.<\/p>\n TShock Notice: To become SuperAdmin, join the game and type \/auth 2044111<\/p>\n This token will display until disabled by verification. (\/auth-verify)<\/p><\/blockquote>\n Write this code down and start Terraria.<\/p>\n Tip: Use windowed mode in Terraria so that you can switch between your SSH session and the game.<\/p><\/blockquote>\n Congratulations, you’ve just entered your new world. Now it’s time to authenticate as the administrator.<\/p>\n The server will confirm your authentication code and display a message.<\/p>\n Note: If the text went away too fast, press\u00a0Enter<\/strong>\u00a0to show it again.<\/p><\/blockquote>\n The server wants us to create a new admin user so that we can gain admin permissions the next time we join our server.<\/p>\n Now that the configuration is done. We’ll shutdown the server and have it save everything.<\/p>\n First, disconnect your Terraria client from the server.<\/p>\n Now, shutdown the server. This is accomplished in your SSH session by typing “off” in the server console, then pressing\u00a0Enter<\/strong>.<\/p>\n The initial configuration is now complete.<\/p>\n We want the server to keep running, even when we disconnect our SSH session. So we’ll use a\u00a0 As the “terraria” user, start screen:<\/p>\n Press\u00a0Enter<\/strong>\u00a0to close the credits screen. Now, start the TShock server again.<\/p>\n Load your world.<\/p>\n You are now in the server console, for a list of commands, type “help”, then press\u00a0Enter<\/strong>. You can enter Terraria server commands in this console.<\/p>\n To close your SSH session and keep the server running, use the following key sequence:<\/p>\n You won’t get any feedback until you press the\u00a0D<\/strong>\u00a0key.<\/p>\n After this, your screen will be cleared and you will see output similar to the following.<\/p>\n [detached from 1298.pts-2.aklwebhost]<\/p><\/blockquote>\n You can now safely close your SSH session and the server will keep running in the background.<\/p>\n When you reconnect to your server, you can type the following to enter the server console again:<\/p>\n There are lots of options and things to change with the TShock server. Please read the documentation for more details. Enjoy!<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","format":"standard","manualknowledgebasecat":[105,242,247],"manual_kb_tag":[225],"_links":{"self":[{"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/manual_kb\/2341"}],"collection":[{"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/manual_kb"}],"about":[{"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/types\/manual_kb"}],"author":[{"embeddable":true,"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/comments?post=2341"}],"version-history":[{"count":2,"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/manual_kb\/2341\/revisions"}],"predecessor-version":[{"id":2343,"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/manual_kb\/2341\/revisions\/2343"}],"wp:attachment":[{"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/media?parent=2341"}],"wp:term":[{"taxonomy":"manualknowledgebasecat","embeddable":true,"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/manualknowledgebasecat?post=2341"},{"taxonomy":"manual_kb_tag","embeddable":true,"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/manual_kb_tag?post=2341"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}Prerequisites<\/strong><\/h3>\n
Security<\/strong><\/h3>\n
Basic Setup<\/strong><\/h3>\n
Creating A User<\/strong><\/h3>\n
adduser terraria\r\n<\/code><\/pre>\n
Installing Packages<\/strong><\/h3>\n
apt-get -y install wget unzip screen \\\r\n libmono-corlib4.0-cil libmono-sqlite4.0-cil libmono-system-core4.0-cil libmono-system-net4.0-cil \\\r\n libmono-system-runtime4.0-cil mono-runtime mono-runtime-sgen libmono-corlib4.0-cil \\\r\n libmono-sqlite4.0-cil libmono-system-core4.0-cil libmono-system-net4.0-cil \\\r\n libmono-system-runtime4.0-cil mono-runtime mono-runtime-sgen libmono-data-tds4.0-cil \\\r\n libmysql6.4-cil libmono-system-runtime-serialization4.0-cil \\\r\n libmono-system-runtime-serialization-formatters-soap4.0-cil libmono-system-data-linq4.0-cil \\\r\n libmono-system-xml-linq4.0-cil libmono-system-xml-serialization4.0-cil libmono-system-xml4.0-cil\r\n<\/code><\/pre>\n
Installing TShock<\/strong><\/h3>\n
su terraria\r\n<\/code><\/pre>\n
wget -O tshock.zip 'https:\/\/github.com\/NyxStudios\/TShock\/releases\/download\/v4.2.9\/tshock_4.2.9.zip'\r\nunzip tshock.zip -d ~\/tshock\r\n<\/code><\/pre>\n
Starting TShock For The First Ttime<\/strong><\/h3>\n
cd ~\/tshock\r\nmono TerrariaServer.exe\r\n<\/code><\/pre>\n
\n
\n
\n
Multiplayer -> Join<\/code>.<\/li>\n
\n
\/auth XXXXXXX<\/code>\u00a0replacing\u00a0
XXXXXXX<\/code>\u00a0with the authentication code displayed when your server was started.<\/li>\n<\/ul>\n
You are now superadmin, please do the following to finish your install:\r\n\/user add <username> <password> superadmin\r\nCreates: <username> with the password <password> as part of the superadmin\r\ngroup.\r\nPlease use \/login <username> <password> to login from now on.\r\nIf you understand, please \/login <username <password> now, and type\r\n\/auth-verify\r\n<\/code><\/pre>\n
\n
\/user add <username> <password> superadmin<\/code>\u00a0replacing\u00a0
<username><\/code>\u00a0and\u00a0
<password><\/code>\u00a0with your own username and a new password.<\/li>\n
\/login username password<\/code>.<\/li>\n
\/auth-verify<\/code>.<\/li>\n<\/ul>\n
\n
Running Your Server<\/strong><\/h3>\n
screen<\/code>\u00a0session to do so.<\/p>\n
screen\r\n<\/code><\/pre>\n
cd ~\/tshock\r\nmono TerrariaServer.exe\r\n<\/code><\/pre>\n
\n
\n
screen -r\r\n<\/code><\/pre>\n
Closing Notes<\/strong><\/h3>\n