Running a 7 Days to Die server on CentOS 7
A brief guide on setting up a dedicated 7D2D server, complete with a dynamic browser map of the world.
- Working CentOS install
- Steam account with 7 Days 2 Die
Setup the account:
The first few steps need to be done with an account that has sudo privelidges on the server. Info on this can be found in the EC2 Series guide.
Using Virtualmin, create a new virtual server. This guide will assume the following:
- user is called
- home directory is
- domain is
- quota is 10GB
- user is called
Install the required libraries from yum:
sudo yum install -y glibc.i686 libstdc++.i686 screen
Open the necessary firewall ports for Steam, the game server, and the webmap with the following commands:
sudo firewall-cmd --zone=public --add-port=26900/tcp --permanent
sudo firewall-cmd --zone=public --add-port=26900/udp --permanent
sudo firewall-cmd --zone=public --add-port=8082/tcp --permanent
sudo firewall-cmd --zone=public --add-port=8080/tcp --permanent
sudo firewall-cmd --reload
- Increase the open file limits for the 7d2d user.
sudo vi /etc/security/limits.conf
Append the following to the bottom of the file:
7d2d hard nofile 100000 7d2d soft nofile 100000
You must restart your session for the changes to take effect.
Switch to the new account
Now we've got the account setup we can install the actual game.
Switch to the new account and navigate to it's home directory with:
Make a directory to install Steam
Move into the directory
Get and extract SteamCMD
tar xvf steamcmd_linux.tar.gz
When Steam has loaded we need to login. If you use Steam Authenticator (as you should) get your 2FA code ready and do the following:
*enter 2fa code*
app_update 294420 validate
This can take a while. If you forgot to increase the user quote when creating the account you may receive an error about reaching the block limit. When it has finished, exit SteamCMD by typing:
When it's finished installing we'll create a script to launch the game and bind it to a screen session. Use your favourite method (vi, FTP, etc) to create the file:
Insert the following into the file:
#!/bin/sh screen -S 7d2d steam/7d2d/7DaysToDieServer.x86_64 -logfile output_log.txt -quit -batchmode -nographics -dedicated -configfile=serverconfig.xml
Make it executable:
chmod +x launch.sh
/home/7d2d/steam/7d2d/serverconfig.xmlfile with your server settings. Some notes on the settings to change:
Property Values Note ServerIsPublic true/false ServerPassword (optional) ServerMaxPlayerCount Adjust according to server resources and playerbase. ServerWebsiteURL Put your website URL here if you have one ServerDescription A description of your server goes here GameWorld Navezgame, Random Gen Must be one or the other. To make a random world choose "Random Gen" and set the GameName property to something unique. GameName Control the random seed when using "Random Gen" GameWorld type.