7 Days to Die Wiki
Pen icon Dieser Artikel muss aufgeräumt oder ergänzt werden.
Dieser Artikel beinhaltet veraltete Informationen und sollte mit nützlichen Informationen gefüllt werden.
Hilf bitte dabei, den Artikel zu verbessern. Die Diskussionsseite enthält eventuell nützliche Informationen.

Markiert am 18.10.2016.

Pen icon Dieser Artikel muss aufgeräumt oder ergänzt werden.
Dieser Artikel ist noch nicht übersetzt. Du kannst das 7 Days to Die Wiki unterstützen, indem du ihn übersetzt.
Bitte nicht mehr die Vorlage:Übersetzen benutzen, sondern die Vorlage:Cleanup mit dem Parameter Translate.
Hilf bitte dabei, den Artikel zu verbessern. Die Diskussionsseite enthält eventuell nützliche Informationen.

This tutorial will guide you through the steps required to setup a dedicated 7DTD server on Linux. The tutorial is currently targeted to the Alpha 7.9 release which seems to work as fine on Linux as it does on Windows.

Part of this tutorial are:

  • Setup of 7DTD as dedicated server
  • Startup/stop scripts, also for automatic start on system boot
  • Memory usage monitoring / limit exceeding notification by mail or XMPP/Jabber (optional)
  • Automatic save backups (optional)

The steps and used software in this tutorial apply to a Debian Squeeze (6) or Debian Wheezy (7) installation. For systems not based on Debian you have to adapt the init-script as the used start-stop-daemon tool seems to be part of Debian's dpkg package.

Dieses Tutorial führt Sie durch die erforderlichen Schritte zur Einrichtung eines dedizierten 7DTD-Servers unter Linux. Das Tutorial zielt derzeit auf die Alpha 7.9-Version ab, die unter Linux so gut funktioniert wie unter Windows.

Teil dieses Tutorials sind:

-Einrichtung von 7DTD als dedizierter Server

-Start- / Stop-Skripte, auch für automatischen Start beim Systemstart

-Speicherverbrauchsüberwachung / Limit überschritten Benachrichtigung per Mail oder XMPP / Jabber (optional)

-Automatische Sicherungssicherung (optional)

Die Schritte und die verwendete Software in diesem Tutorial gelten für eine Debian Squeeze (6) oder Debian Wheezy (7) Installation. Für Systeme, die nicht auf Debian basieren, müssen Sie das init-script anpassen, da das verwendete start-stop-daemon-Tool Teil des Debian-dpkg-Pakets ist.

Erforderliche Software[ | ]

  • Wine 32 Bit (solange es keinen "nativen" Linux-Build gibt) (getestet: 1.0.1, 1.4.1)
  • Xvfb (wahrscheinlich auch nur solange es keinen nativen Build gibt)
  • Mono-Laufzeit
  • Bildschirm
  • Libxml2-utils (parse serverconfig.xml)
  • Bash (für Scripts)
  • Rsync (für Sicherungen)
  • Sendemail, sendxmpp (für Speichergrenzbenachrichtigungen, beide optional)
  • Dies sollte der Trick auf Debian Weezy Basis installieren: (Ich bin nicht ganz sicher, über die libmono2.0-cil)
apt-get install libxml2-utils screen libmono2.0-cil xvfb xmlstarlet

Installation auf 64-Bit-Host[ | ]

Um SteamCMD auf einem 64-Bit-Host ausführen zu können, muss lib32gcc1 installiert sein. Um 32-Bit-Wine auf 64-Bit-Wheezy zu installieren, gehen Sie wie folgt vor:

dpkg --add-architecture i386
apt-get update
apt-get install wine:i386

Wenn der Server als 64-Bit-App laufen soll, wird Debian Sid ein höheres Betriebssystem mit Wine 1.7.17 oder höher benötigt (https://bugs.winehq.org/show_bug.cgi?id=30518).

Linux Server with Debian Sid

Installation layout[ | ]

Paths can be changed but this guide will assume that you use the paths as following:

home for the user running the server
path of serverconfig.xml used by the scripts, see Install the game
root of the 7dtd server installation
resulting in this path to the main exe
root of SteamCMD
For the management scripts
For global script configuration
Init script to start/stop the server

Useraccount dedicated to running 7dtd[ | ]

As running the game as root is not really the best thing we will create a new user just for the server.

useradd -d /home/sdtd -m -r -s /bin/bash -U sdtd

This will create a user and group named sdtd (last parameter) with home directory /home/sdtd. Both can be changed but you will also have to adapt the other steps later on.

For wine on Debian 7.5 you'll also need to chown the home of sdtd to sdtd:

chown sdtd /home/sdtd

Install the management script files[ | ]

Get the script files:

wget http://illy.bz/fi/7dtd/management_scripts.tar.gz

Extract the files to /:

tar -xvzf management_scripts.tar.gz -C /

(alternatively you can extract to some temporary path and move files to their respective target folders manually)

Open the file /etc/7dtd.conf in the editor of your choice and edit the values. Edit at least the following variables:

export STEAM_USER=
export STEAM_PASS=

All other values can be kept at their default if you did stick to the paths and names given in this tutorial. Note that memory limit notifications are disabled by default!

Make sure the msvcr100.dll from the management scripts package is one directory level above SDTD_ROOT (if you followed this tutorial this will be the default). This file is required by the Steam library used in 7DtD.

Make the server start at system boot:

update-rc.d 7dtd.sh defaults

Install the game[ | ]

Note: It seems like the 64 bit version of the game does not run nicely on Wine, thus the updater script automatically uses the 32 bit engine.

Run 7dtd-update.sh. This will download and install SteamCMD to the path given in the 7dtd.conf and afterwards download 7DtD itself. You can later on always run this command again to update the 7DtD files if there is an update on Steam.

Copy the serverconfig.xml from the 7dtd directory to one level above it, so in this tutorial it would go to /home/sdtd/serverconfig.xml. Edit the file to match your needs. This way you can edit your serverconfig in the parent folder and Steam updates won't overwrite your changes. You should check back after updates to 7dtd whether there are new options in the original serverconfig.xml that you should add to your copy in /home/sdtd/serverconfig.xml.

Add cron-jobs for savegame backups and memory limit notifications[ | ]

If you want the system to automatically backup the Worlds folder add the following line to /etc/crontab:

0 *     * * *   root    /usr/local/bin/7dtd-backup.sh

First two columns specify on which minute (0) and which hour (* = every hour) the backup will be run. Next three specify day, month and day of week (you probably want to keep * here).
Warning: As of Alpha 1 the game seems to only save the current state if the last player disconnects. So make sure that all players disconnect every now and then.

If you want to get notifications on the memory limit add this line:

*/5 *   * * *   root    /usr/local/bin/7dtd-check_mem.sh

Setting the minute to */5 means the script is run every 5 minutes.
Make sure you set the appropriate values in /etc/7dtd.conf!

Start the server[ | ]


If everything went fine you should now be able to check console output of 7dtd:

screen -r sdtd/sdtd

This will open the virtual terminal that was attached to the game. Do not press Ctrl+C to disconnect from that screen! Doing so will stop the whole engine! The parameter specifies username of the user running 7dtd / screen session name (you should only need to change the first sdtd if you changed the name of the user running the engine). Normal output should look something like this:

Mono path[0] = 'Z:/home/sdtd/7dtd/7DaysToDie_Data/Managed'
Mono path[1] = 'Z:/home/sdtd/7dtd/7DaysToDie_Data/Mono'
Mono config path = 'Z:/home/sdtd/7dtd/7DaysToDie_Data/Mono/etc'

To disconnect from that screen session press Ctrl+A, Ctrl+D (simply keep Ctrl pressed). To stop the server run


Feedback etc[ | ]

For feedback, comments, suggestions, discussion whatever please use the forum thread.