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 run, nothing more.
Run these commands individually, this is not to be copy pasted into your shell in full.
Update: 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 here).
Update2: I have successfully tested the following instructions using Ubuntu 12.04 LTS Precise (transcript here)
Update3: Tested working with TShock 4.2
Make sure you are using Debian 7 Wheezy or Ubuntu 12.04 LTS Precise.
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
# Need root sudo su - # Install dependancies apt-get update && apt-get install unzip screen \ mono-runtime libmono-system-core4.0-cil libmono-sqlite4.0-cil libmysql-cil-dev \ libmono-system-runtime-serialization4.0-cil libmono-web4.0-cil libmono-system-xml-linq4.0-cil # Add terraria group and user sudo groupadd --gid 70001 terraria sudo useradd --gid 70001 -d /home/terraria -m --uid 70001 -s /bin/bash terraria # Change user to terraria su terraria # Make and change to bin folder mkdir ~/bin cd ~/bin # Download and extract TShock Terraria Server wget http://cloud.github.com/downloads/TShock/TShock/TShock-4.0.zip unzip TShock-4.0.zip # Fix case-insensitive folder ln -s serverplugins ServerPlugins # Run Terraria for first time, create world # (note down auth code for admin access, and exit-nosave) mono TerrariaServer.exe -ip 0.0.0.0 -port 7777 -maxplayers 8 # Change server password TERRARIAPASSWORD="password"; sed -i "s/("ServerPassword": ")[^"]*(",)$/1${TERRARIAPASSWORD}2/" tshock/config.json # Terraria is now installed, keep reading to setup startup init script # Go back to root exit # Download init script to /etc/init.d/ wget -O /etc/init.d/terraria-server http://www.nooblet.org/blog/download/terraria-init.sh # Fix permissions chmod +x /etc/init.d/terraria-server # Insert to startup insserv -v /etc/init.d/terraria-server # At this point you may want to edit the init script if you are using a # different world-file or server-port # Also by default, the script does not save on exit, see variable: EXIT_COMMAND # Start the server invoke-rc.d terraria-server start # Check its running in screen (press Ctrl-a then d to exit) invoke-rc.d terraria-server connect |
Debian init-script
The following init-script can:
- Connect to the screen console with ./terraria-server connect
- Exits the server cleanly by issuing the “exit” or “exit-nosave” command to the server console
- Fits perfectly if installation was made by the above howto
Download
terraria-init.sh (2.6 KiB, 5,281 hits)
