This item has been removed from the community because it violates Steam Community & Content Guidelines. It is only visible to you. If you believe your item has been removed by mistake, please contact Steam Support.
This item is incompatible with 7 Days to Die. Please see the instructions page for reasons why this item might not work within 7 Days to Die.
Current visibility: Hidden
This item will only be visible to you, admins, and anyone marked as a creator.
Current visibility: Friends-only
This item will only be visible in searches to you, your friends, and admins.
63 ratings
Installing Linux dedicated server for 7 days to die
By Max Noskill
Step-by-step guide: installing 7 days to die dedicated server on Linux.
Guide is for Ubuntu systems as that's what Valve is supporting. However, it's extremely easy to install this on RedHat systems too.
I assume that you're at least somewhat familiar with unix commands. If you don't understand what commands will do, look them up on search engine and do some learning before proceeding. If you're completely new to linux systems, you should remember that files are case-sensitive.
Also I assume that you run SSHd on your server. It's installed as "openssh-server" on Ubuntu.
Important note:
If you want to install Windows-server, there is video guide by [SAO] BigC90210.
Step 1: Log in to your server with SSH
ssh -l youraccount yourserver
Step 2: Choose account for 7days dedicated server
Option 1: install on your own user account
You can skip this step.
Option 2: create new dedicated server account (recommended)
This requires you have root access.
# get root permissions
sudo su
(type your password)
# add a new user account
useradd --comment "7days to die Server" -m 7days
# change shell to bash
chsh -s /bin/bash 7days
# change the password
passwd 7days
(type 7days account password here)
Test your new account by logging in from the remote computer.
You need to edit server config files. Easiest way to do this is to use text editor on the server. You can also edit them locally on your computer and transfer them to server with SFTP.
If you haven't used any command line editor before, let's install text editor nano (if it already isn't installed).
Otherwise just use whatever editor suits you.
apt-get install nano
As you can't daemonize the server with command line switches, you most likely want to install screen.
apt-get install screen
There is also byobu which offers more functionality, but screen is no-brainer.
Note: if you don't have wget installed, you can install it:
apt-get install wget
Problems running steamcmd? You might need to install lib32gcc1:
apt-get install lib32gcc1
Step 4: Download dedicated server with SteamCMD
You can download the dedicated server anonymously without logging in with your Steam credentials. If you use your account, logout from Steam before logging in from your server.
# Start SteamCMD
./steamcmd.sh
SteamCMD shell appears after a while and you can type commands in SteamCMD prompt. Note that SteamCMD prompt always begins with Steam>.
login anonymous
(OR login with your Steam account name (not playername))
(IF USING your account: enter your Steam password when asked)
force_install_dir ./7daysded
app_update 294420
quit
You can use this same procedure to UPDATE THE SERVER. Updating might overwrite your config files! You might want to backup and/or rename them later when everything works.
Note: You can insert all SteamCMD-commands in the text file and run it with crond whenever you want to update your server.
Step 5: Edit the startup script startserver.sh
Server was installed in "7daysded" directory. It contains startup script and config files.
There is no -configfile switch on the startup script, so we'll add it.
cd 7daysded
nano startserver.sh
Add config file switch on the server startup line, it should look like this:
Of course if you save your config file to some other place, change the path accordingly.
Step 6: Edit serverconfig.xml file
Setup the server anyway you want. There is explanation text after each of the options in serverconfig.xml.
Here's the most important options:
ServerPort -- do you want default game port and if you're inside LAN, think about how you're going to route the port out.
ServerIsPublic -- do you want private server for friends or public internet server
ServerName -- name of your server
ServerPassword -- if you run private server, you might want to set a password
ServerMaxPlayerCount -- your server might not support lots of players without lagging. It's best to test which value is suitable for you.
ServerDescription -- type brief description of your server here
Game world is the map you'll see in the game. Navezgane is the default map.
GameWorld -- Navezgane is the default map, or you might want to try "Random Gen" for randomized map.
GameName -- you can name your save game here. Do not use : in the name or windows players can't connect.
This is "PvP setting".
FriendlyFire -- are players able to damage each others. This is important if you have public server and do not want player to kill each others.
You'll need some way to shut your server down and possibly manipulate it. Here is how to enable the telnet interface.
TelnetEnabled -- if your server is directly connected on the internet, consider blocking direct connects to this port
TelnetPort -- you can change the default port (e.g. 12345)
TelnetPassword -- password, you should change this
Step 7: Start the server
As server does not start automatically as background process, you may want to start the server inside screen or use nohup.
You can always kill the server by telnetting in and do "shutdown". After that you need restart the server manually unless you write the loop which does restarting automatically.
Option 7.1: Quickly testing the server (you can press Ctrl-C to end it)
./startserver.sh
Note that when you close the connection to the server, it will die. Press Ctrl-C to kill the server.
Option 7.2: nohup
nohup will leave process in the background after you log out and it will output all information into nohup.out text file. Easy to use and no fuss.
nohup ./startserver.sh &
Option 7.3: Screen
screen is left to run on the server after you log out. If you're new to screen, you may want to read how you can instruct screen with keypresses by reading the manual (man screen).
screen commands are given by pressing Ctrl+a and then followed by command key. You can "detach" the screen by pressing Ctrl+a and then pressing d-key. Sounds harder than it is.
screen
cd 7daysded
./startserver.sh
(press Ctrl+a and then d)
To get back to your session, resume the screen:
screen -r
Note that you can easily kill the server by resuming screen session and pressing Ctrl-C.
Step 8: Observe output_log.txt
After you have started the server, there is output_log.txt in the data-directory:
Note: you will see same information if you'll access your server via telnet.
Step 9: Killing the server
You may want to shutdown the server.
Step 9.1: Use telnet
If you set up telnet, you can log in with it and use "shutdown". See tips-section about safe use of telnet over internet.
Step 9.2: You can't use telnet
You can kill the server process if you want to take server down right now. Note that server does autosave every minute, but it will lose the latest game information if you kill it.
ps wuax | grep 7Days
(observe which is the server process id, e.g. 22222)
kill 22222
Server is stuck/crashed/in zombie state and does not want to die gracefully:
kill -9 22222
Step 10: Information about save game directory
After you have started your server, a new directory is created.
Server saves games into awkwardly named 7 Days to Die and there under directory Saves. Inside the Saves is one directory per server World and your save game directory which contains game information.
It looks like this (tree -d):
7 Days To Die/
└── Saves
├── Navezgane
│ └── oldgamesave
│ ├── Player
│ └── Region
└── Random Gen
└── yoursavegamehere
├── Player
└── Region
If you have problems with spaces, you can always use TAB-key to autocomplete the name. Space characters should be shielded with \ or you should type quote marks around the directory name.
Example: this is how you change to your randomly generated world save directory for your game:
cd 7\ Days\ To\ Die/Saves/Random\ Gen/yoursavegamehere
If you change GameName in your serverconfig.xml, a new save game is created.
Game information is also saved on the player's computer.
Step 11: Editing serveradmin.xml
There is serveradmin.xml file on the server installation directory. It identifies admins by their long Steam ID-numbers.
Steam does it's best to hide them from you, but if you get your profile page open with normal web-browser or use "copy this page url" from your profile page you'll find out what's yours. There are examples on serveradmin.xml file what those numbers look like (17 numbers at least).
There is also several steam-ID finders on the internet if you just can't find it.
Step 12: Backup
By now you're familiar with server files and scripts. You should do a backup of most important ones. Even just copying them to backup-directory saves lots of work if something happens. Here's simple backup example. To be safe, you should copy them from the server and store on your computer.
How to use telnet when you're logged on the server (on any user account)
telnet localhost portnumber
(e.g. telnet localhost 12345)
How to use telnet when you're in same LAN as server
telnet yourserver 12345
Use telnet over the Internet with SSH-tunnel
If you have to use telnet over Internet, you probably want to do it in secure way. Also you should block connections the telnet port if your server is directly connected to the Internet. SSH-tunneling works too in that case. Following example tunnels server telnet port 12345 to your local port 2222.
Tunnel stays open as long you keep your local computer on. See man 1 ssh for explanation about command line switches.
Note: sshd running on the server should be configured properly to allow forwarding.
You may want to check if you already have tunnel with netstat:
netstat -tupan
Kill SSH process off if you want to destroy the tunnel.
Appendix B: Error 267 for Windows-player
Windows-players can't join
Windows-player informs you that following message is shown on the game client console:
IOexception win32 IO returned 267 Path: c:\whatever
Error code 267 is simply: The directory name is invalid
Check your serverconfig.xml. If you used character : in the GameName, Windows-players can't join as it's illegal character for file- and pathnames. Game saves are also on the player's computer.
Use quotes around account name and password if they contain spaces.
See that you have already authenticated your server with SteamGuard!
Test your script and check that update does not overwrite your config files (move them around and change paths!)
Add the script in the cron (I'll assume you don't want vi-editor;-)
env EDITOR=nano crontab -e
You should see crontab for 7days account, add following line:
0 5 * * * /home/7days/myserverupdate.sh &
Now your server updates at 05 every morning. Adding server.pid to text file and sending kill to server with that pid would be nice addition, but if you have players in the server, that's too nasty.
Have fun, gg.
Notes
If you want to add something constructive to this guide, please write to the comment section.
I'm not going to help you with basic shell command usage, you will find lots of guides and information on the internet. Please use the search engine.
Also unix command line tools will give you plenty of help with man commandname (q to quit help page) or just type the command and write switch --help after it.
Big thank you to following people for contributing: Red_Nalf, StockholmSyndrome, Zerock
Using config file: serverconfig.xml
./startserver.sh: 32: ./startserver.sh: ./7DaysToDie.x86: not found
Anybody know why?
https://gameservermanagers.com/lgsm/sdtdserver/
Cannot wait for your next guide :) I'm wondering it's because my distro of Ubuntu is 14. Or 15. I think. Anyways thank you!