How to make an instance of 7 Days To Die Dedicated Server on your GNU/Linux
This is current for version Alpha 12.5 and is both first-try-friendly as well as appropriate-for-those-who-had-Alpha-10/11-working-but-could-not-get-Alpha-12-up!
Through this MOTD, I’ll comment on the proceeding step, then number the actual lines you should feed to your terminal. So let’s get situated and grab steamcmd the tool you’ll be using to download & update dedicated server builds. Assume a bash shell or adjust for what you’re using else, then:
-
0010. $ cd ~ && mkdir steamcmd && cd steamcmd
Above is simply a standard directory creation in your /home/$USER/ directory. Let’s follow with obtaining and extracting the steamcmd binaries.
-
0020. $ wget http://media.steampowered.com/installer/steamcmd_linux.tar.gz
-
0030. $ tar zxvf steamcmd_linux.tar.gz
Now SteamCMD will be present in your current directory. Let’s go ahead and run the thing! Then we’ll install the A12 Dedicated Server.
-
0040. $ ./steamcmd.sh
-
0050. Steam> login <username> <password>
-
0060. Steam> force_install_dir ~/7dtd.ded.a12
-
0070. Steam> app_update 294420
-
0080. Steam> quit
We need some mono libraries locally. If you know what you’re doing, use aptitude & grab all the obvious ones that don’t overlap. Else, this should do:
-
0090. $ sudo apt-get install mono-runtime libmono-2.0-dev
At this point we can edit the configuration files for 7DTD Dedicated Server. These are mostly self-explanatory once you get into them. Leave Telnet set to ON but change the pássword to anything other than the default.
-
0100. $ cd ~/7dtd.ded.a12 && nano serverconfig.xml
-
0110. $ nano serveradmin.xml
Then edit the executable shell script that will launch the server.
-
0120. $ nano startserver.sh
Edit the line that is not commented to include -configfile=serverconfig.xml between ./7DaysToDie.x86 and -logfile…
Once you are finished editing the config files, do the following in order to allow for unity5’s gdb-related threading:
-
0130. $ echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope
Although #0130 may not survive a reboot of the system, it will be fine for now, and I will add an appendix featuring scripts that automate a lot of this.
-
0140. $ sudo apt-get install nohup
So the lovely nohup is a beautiful binary meant to run a command immune to hangups that will output somewhere other than a TTY/terminal. By default this usually means ./nohup.out so let’s go ahead and finally launch the server!
-
0150. $ sudo nohup ./startserver.sh &
This should spit out a Process ID in brackets along with a confirmation that nohup is routing textual output to a filestream rather than to a TTY. Simply hit Return to leave it in the background and get back to the shell.
-
0160. $ telnet localhost 8081
Your crappy, limited little server backend. Try working with this for more than a few minutes as a SysOp if you don’t yet think all software should be open-source.
Simply see to it that the ServerPort, 26900 by default, is open for TCP; Open (1+ port) 26901 and (1+ (1+ port)) 26902 for UDP.
On most systems, it should be as easy as that. Of course substitute yum for apt-get on RedHat or CentOS machines. In the case you’re not 100% sure you understand why this series of commands works, you would be wise to read into them.
An Appendix will be added soonly. Please do leave feedback if you use these steps – or have used similar &or different steps – to succeed &or fail at setting up an instance of the 7 Days To Die Dedicated Server on GNU/Linux.