{"id":531,"date":"2013-01-06T23:18:46","date_gmt":"2013-01-06T23:18:46","guid":{"rendered":"http:\/\/www.nooblet.org\/blog\/?p=531"},"modified":"2013-10-21T09:12:20","modified_gmt":"2013-10-21T09:12:20","slug":"installing-tshock-terraria-server-on-debian-wheezy","status":"publish","type":"post","link":"https:\/\/www.nooblet.org\/blog\/2013\/installing-tshock-terraria-server-on-debian-wheezy\/","title":{"rendered":"Installing TShock Terraria Server on Debian Wheezy"},"content":{"rendered":"<p>The following is how I installed TShock Terraria Server on a clean Debian Wheezy machine. The same method has been tested working on Ubuntu 12.04 LTS (Precise).<\/p>\n<p>One important difference to other howtos is it <strong>does not install mono-complete<\/strong> and the plethora of dependencies that requires (including x11-common). This only installs the required libraries to run, nothing more.<\/p>\n<p>Run these commands individually, this is not to be copy pasted into your shell in full.<\/p>\n<p><strong>Update:<\/strong> A few users are complaining of missing packages, however I have re-run the instructions in a fresh Wheezy guest and found no issues (see transcript of installation <a href=\"https:\/\/www.nooblet.org\/files\/terraria-wheezy-install.txt\">here<\/a>).<\/p>\n<p><strong>Update2:<\/strong> I have successfully tested the following instructions using Ubuntu 12.04 LTS Precise (transcript <a href=\"https:\/\/www.nooblet.org\/files\/terraria-precise-install.txt\">here<\/a>)<\/p>\n<p><strong>Update3:<\/strong> Tested working with TShock 4.2<\/p>\n<p><strong>Make sure you are using Debian 7 Wheezy or Ubuntu 12.04 LTS Precise.<\/strong><\/p>\n<pre class=\"lang:shell decode:true \" >\r\n# Need root\r\nsudo su -\r\n\r\n# Install dependancies\r\napt-get update && apt-get install unzip screen \\\r\n   mono-runtime libmono-system-core4.0-cil libmono-sqlite4.0-cil libmysql-cil-dev \\\r\n   libmono-system-runtime-serialization4.0-cil libmono-web4.0-cil libmono-system-xml-linq4.0-cil\r\n\r\n# Add terraria group and user\r\nsudo groupadd --gid 70001 terraria\r\nsudo useradd --gid 70001 -d \/home\/terraria -m --uid 70001 -s \/bin\/bash terraria\r\n\r\n# Change user to terraria\r\nsu terraria\r\n# Make and change to bin folder\r\nmkdir ~\/bin\r\ncd ~\/bin\r\n\r\n# Download and extract TShock Terraria Server\r\nwget http:\/\/cloud.github.com\/downloads\/TShock\/TShock\/TShock-4.0.zip\r\nunzip TShock-4.0.zip\r\n\r\n# Fix case-insensitive folder\r\nln -s serverplugins ServerPlugins\r\n\r\n# Run Terraria for first time, create world\r\n# (note down auth code for admin access, and exit-nosave)\r\nmono TerrariaServer.exe -ip 0.0.0.0 -port 7777 -maxplayers 8\r\n# Change server password\r\nTERRARIAPASSWORD=\"password\";\r\nsed -i \"s\/(\"ServerPassword\": \")[^\"]*(\",)$\/1${TERRARIAPASSWORD}2\/\" tshock\/config.json\r\n\r\n# Terraria is now installed, keep reading to setup startup init script\r\n\r\n# Go back to root\r\nexit\r\n\r\n# Download init script to \/etc\/init.d\/\r\nwget -O \/etc\/init.d\/terraria-server http:\/\/www.nooblet.org\/blog\/download\/terraria-init.sh\r\n# Fix permissions\r\nchmod +x \/etc\/init.d\/terraria-server\r\n# Insert to startup\r\ninsserv -v \/etc\/init.d\/terraria-server\r\n\r\n# At this point you may want to edit the init script if you are using a\r\n# different world-file or server-port\r\n# Also by default, the script does not save on exit, see variable: EXIT_COMMAND\r\n\r\n# Start the server\r\ninvoke-rc.d terraria-server start\r\n\r\n# Check its running in screen (press Ctrl-a then d to exit)\r\ninvoke-rc.d terraria-server connect<\/pre>\n<h1>Debian init-script<\/h1>\n<p>The following init-script can:<\/p>\n<ul>\n<li>Connect to the screen console with .\/terraria-server connect<\/li>\n<li>Exits the server cleanly by issuing the &#8220;exit&#8221; or &#8220;exit-nosave&#8221; command to the server console<\/li>\n<li>Fits perfectly if installation was made by the above howto<\/li>\n<\/ul>\n<p><b>Download<\/b><br \/>\n<div class=\"wp-downloadmanager\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"wp-downloadmanager-sprite\" aria-hidden=\"true\" focusable=\"false\"><symbol id=\"wp-downloadmanager-icon-file\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.4\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M6 2.5h7l5 5v14H6z\" \/><path d=\"M13 2.5v5h5\" \/><\/symbol><symbol id=\"wp-downloadmanager-icon-archive\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.4\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M6 2.5h7l5 5v14H6z\" \/><path d=\"M13 2.5v5h5\" \/><path d=\"M11 3h2v2h-2zM11 6h2v2h-2zM11 9h2v2h-2zM10.5 13h3v3.5h-3z\" \/><\/symbol><symbol id=\"wp-downloadmanager-icon-audio\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.4\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M6 2.5h7l5 5v14H6z\" \/><path d=\"M13 2.5v5h5\" \/><path d=\"M10 18.5v-5l5-1.5v5\" \/><circle cx=\"9\" cy=\"18.5\" r=\"1.4\" \/><circle cx=\"14\" cy=\"17\" r=\"1.4\" \/><\/symbol><symbol id=\"wp-downloadmanager-icon-code\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.4\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M6 2.5h7l5 5v14H6z\" \/><path d=\"M13 2.5v5h5\" \/><path d=\"M10.5 12.5 8 15.5l2.5 3M13.5 12.5 16 15.5l-2.5 3\" \/><\/symbol><symbol id=\"wp-downloadmanager-icon-document\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.4\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M6 2.5h7l5 5v14H6z\" \/><path d=\"M13 2.5v5h5\" \/><path d=\"M9 12.5h6M9 15.5h6M9 18.5h4\" \/><\/symbol><symbol id=\"wp-downloadmanager-icon-image\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.4\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M6 2.5h7l5 5v14H6z\" \/><path d=\"M13 2.5v5h5\" \/><circle cx=\"10\" cy=\"13.5\" r=\"1.1\" \/><path d=\"M8 19.5l3-3 2 2 3-3.5 2 4.5z\" \/><\/symbol><symbol id=\"wp-downloadmanager-icon-presentation\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.4\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M6 2.5h7l5 5v14H6z\" \/><path d=\"M13 2.5v5h5\" \/><path d=\"M9 19.5v-3M12 19.5v-5.5M15 19.5v-8\" \/><\/symbol><symbol id=\"wp-downloadmanager-icon-spreadsheet\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.4\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M6 2.5h7l5 5v14H6z\" \/><path d=\"M13 2.5v5h5\" \/><path d=\"M8 12.5h8v7H8zM8 16h8M11.5 12.5v7\" \/><\/symbol><symbol id=\"wp-downloadmanager-icon-video\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.4\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M6 2.5h7l5 5v14H6z\" \/><path d=\"M13 2.5v5h5\" \/><path d=\"M10.5 13.5l5 3-5 3z\" \/><\/symbol><symbol id=\"wp-downloadmanager-icon-application\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.4\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M6 2.5h7l5 5v14H6z\" \/><path d=\"M13 2.5v5h5\" \/><circle cx=\"12\" cy=\"16.5\" r=\"2\" \/><path d=\"M12 12.5V14M12 19v1.5M8.5 16.5H10M14 16.5h1.5\" \/><\/symbol><\/svg><svg class=\"wp-downloadmanager-icon\" aria-hidden=\"true\" focusable=\"false\"><use href=\"#wp-downloadmanager-icon-file\" \/><\/svg>&nbsp;&nbsp;<strong><a href=\"https:\/\/www.nooblet.org\/blog\/download\/terraria-init.sh\">terraria-init.sh<\/a><\/strong> (2.6 KiB, 5,409 hits)<br><\/div><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The following is how I installed TShock Terraria Server on a clean Debian Wheezy machine. The same method has been tested working on Ubuntu 12.04 LTS (Precise). One important difference to other howtos is it does not install mono-complete and the plethora of dependencies that requires (including x11-common). This only installs the required libraries to [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":640,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,5],"tags":[233,145,157,160],"class_list":["post-531","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-games","category-linux","tag-linux","tag-server","tag-terraria","tag-tshock"],"_links":{"self":[{"href":"https:\/\/www.nooblet.org\/blog\/wp-json\/wp\/v2\/posts\/531","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.nooblet.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.nooblet.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.nooblet.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.nooblet.org\/blog\/wp-json\/wp\/v2\/comments?post=531"}],"version-history":[{"count":8,"href":"https:\/\/www.nooblet.org\/blog\/wp-json\/wp\/v2\/posts\/531\/revisions"}],"predecessor-version":[{"id":960,"href":"https:\/\/www.nooblet.org\/blog\/wp-json\/wp\/v2\/posts\/531\/revisions\/960"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.nooblet.org\/blog\/wp-json\/wp\/v2\/media\/640"}],"wp:attachment":[{"href":"https:\/\/www.nooblet.org\/blog\/wp-json\/wp\/v2\/media?parent=531"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.nooblet.org\/blog\/wp-json\/wp\/v2\/categories?post=531"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.nooblet.org\/blog\/wp-json\/wp\/v2\/tags?post=531"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}