Меню Рубрики

7 days to die linux server

7 days to die linux server

This guide is for 10.4 b9. Update to alpha19 release.

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.

If you want to install Windows-server, there is a video guide by [SAO] BigC90210.

You can skip this step.

This requires you have root access.

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.

As you can’t daemonize the server with command line switches, you most likely want to install screen.

Remove install package:

Note: if you don’t have wget installed, you can install it:

You can download the dedicated server anonymously without logging in. Otherwise use your account credentials on login and authenticate yourself with Steam Guard.

SteamCMD shell appears after a while and you can type commands in SteamCMD prompt. Note that SteamCMD prompt always begins with Steam>.

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.

Experimental and old server builds:

You can see available server builds from Steam:
Go to Library > Tools > 7days > Properties > Beta

Note that’s “alpha13.8” without spaces!

Revert to current build from old:

Server was installed in “7daysded” directory. It contains startup script and config files.

On new versions startup script works as it should so you don’t have to edit it.

Setup the server anyway you want. There is explanation text after each of the options in serverconfig.xml.

Here are the most important options:

  • ServerName — name of your server
  • ServerPort — do you want default game port and if you’re inside LAN, please think about how you’re going to route the port out. Usually this means you have to edit NAT settings on your WAN/xDSL/router box.
  • ServerVisibility — do you want private server for friends or public internet server. Option 0 means private server which is not published on the game server lists.

  • 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
  • EACEnabled — anti-cheat, if you get bad lag and weird behaviour, you might want to turn this off, especially on private servers.

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 “RWG” for randomized map. Note that RWG generation takes lots of time when you start the server up but on next startup it should load up fairly fast.
  • GameName — you can name your save game here. Do not use : in the name or windows players can’t connect.
  • WorldGenSeed — for RWG, random seed for changing the map layout
  • WorldGenSize — for RWG, map size options. Note that larger numbers like 8192 will increase the generation time.
  • DayNightLength — length of the game day in real time (minutes).
  • LootRespawnDays — game days before loot respawns.

This is “PvP setting”.

  • PlayerKillingMode — 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 — documentation claims that telnet is only bound to local interface if the password is empty.

Section 6.1: Map generation times

Important: if server “does not start” and you have RWG selected, just wait. That will take LOOONG time on slower computers. For testing, it’s best to try on smaller map size, Navezgane or use pregenerated maps.


How to setup a 7 Days to Die server under Linux

Setting up a 7 Days to Die server under Linux isn’t as difficulty as you may think. The Steam developer Valve is providing a tool which makes it easier, even for people who aren’t that familiar with the Linux command line. This article is covering how you setup your own 7 Days to Die server under a Ubuntu or Debian installation.

About 7 Days to Die

7 Days to Die is a zombie apocalypse survival crafting game which has been initially released in December 2013. The game is still in a „Early Access“ stage. 7 Days to Die is similar to Minecraft in the way it is played, but provides better graphics and a different scenario. There are also some quests included like treasure hunting. In the latest version (as of written in June 2018) the developer The Fun Pimps also integrated vehicles into the game. Like in Minecraft, the real fun with 7 Days to Die starts when you start playing with friends. Surviving, building and creating in a random generated world can bring you hours of fun and a long lasting motivation to go on in the things you wanna achieve.

Install requirements

On a freshly Debian or Ubuntu installation, we need to install some requirements in the first place. With the following command we will update the package repositories and install the necessary requirements:

Adding 32-Bit libraries

The Steam command line tool is only available as a 32-Bit program. As of today most of the systems are 64-Bit based. Ubuntu for e.g. isn’t even supporting 32-Bit anymore. If you’re running an 32-Bit system, you can skip this part. To find out if you have a 32-Bit system installed, just issue the following command on your system:

If the output of this command is i386 or i586, you have a 32-Bit system. If it’s x86_64 you’re using a 64-Bit system. In this case you have to issue the following two commands as well:

This installs the lib32gcc1 file which is a 32-Bit library. This library is needed by the Steam command line tool. If this library isn’t installed, the following commands will fail.

Download and extract Steam

As next, we acquire the Steam command line tool for Linux machines in order to download the server files via the Steam network. Before that we create a separate folder (which is called steamcmd) were we are going to download the Steam command line tool to:

The wget command is now downloading the Steam Linux command line tool. After the download is finished, we can extract this tool (it is compressed right now) like this:

Updating the Steam tool

You can now start updating the Steam tool. Execute the following command to start the update:

This process will take some time. In the meanwhile, you will see a lot of output on the console like this:

When the process is finished you will see a output which looks like this:

The last line Steam> tells you that the Steam command line tool is actually opened and Steam waits for you to enter a command.

Login into Steam

When using the Steam command line tool, you have to login just like with the graphical desktop version. Enter the command login followed by your Steam username to login. Steam will then ask you for your password and Two Factor Authentication (if enabled). When you enter your password there will be no input shown. But this is normal, just like in almost every Linux / UNIX software:

Download and install the 7 Days to Die server files

Now that you’re logged in, you can finally start downloading and installing your 7 Days to Die server. With the first of the following two commands we enforce Steam to install the 7 Days to Die server files into the directory 7dtd_server. The second one is starting the actual installation process of the server files. The number 294420 is the ID for the 7 Days to Die server files:

Alternatively, if you want to use the latest BETA of the dedicated server, us the following two commands instead:

This will download the latest BETA experimental branch the developers are providing to the public audience.
You can see again an output which will show you the actual progress:

The app_update commands can take even longer than the Steam update process. It basically depends on your internet connection speed. After this command was successful, you will get yet again another message about it:

You can now quit the Steam command line tools by simply entering quit. Congratulations, you successfully downloaded and installed a 7 Days to Die server under Linux.

Configuring your server

You have a lot of options to configure your 7 Days to Die server to your wishes. The file to do so is the serverconfig.xml which is in the same directory as your 7 Days to Die server files. So change into the 7 Day to Die server directory:

Within this directory, there is already an example serverconfig.xml. While this file should work already, you should take at least some tweaks. To edit this file you can use the editor nano:

With CTRL+W you can search for a string. With CTRL+O you can save the file. And with CTRL+X you close the editor. The following parameters are a suggestion how you should modify your serverconfig.xml.
[table /]
You can always come back and change the parameters to your desire. However, you always have to restart the server after each change. For a full list of all possible values, check out this list.

Starting the server

Puh, lot of stuff right? But now the time has come to start your server. In order to have your server running constantly, you have to use screen. screen is a tool which runs programs even while you logged out. But first, ensure that you’re still in the 7dtd_server directory and enter the following commands:

Your server will now start. This can take up to 5 minutes. You get no output when the server is ready. If you want to know more about what is hapenning, take a look at the output.log file within your 7dtd_server directory. To close the screen session (and therefore let the server run in the background), press CTRL+A followed by the D key for detaching. You can now close your remote session to your server without shutting down your 7 Days to Die server itself. If you want to attach to the screen session again, simply enter this command:

You can now start 7 Days to Die on your desktop / gaming machine, click on Connect To Server and enter either die IP address / name of your server (FQDN) and click on the connect symbol or search for your server name in the upper left (if you set your server to public at the step before):
Connection field in 7 Days to Die
If you can’t connect at this point, you may have to check your firewall or the firewall on your server (if you use one). On default, the 7 Days to Die server listens on port 26900. This port has to be accessible from the internet.

Stopping the server

To stop your server, simply resume your screen session like this:

And press CTRL+C afterwards. It can take a few seconds up to a minute before the server shuts down.

How to become an admin?

In order to become an admin, you have to tell your server your Steam ID. Otherwise the server can’t decide which player really should get admin rights. To get your Steam ID, simply open Steam, click on your profile and copy the long number within the URL:
Steam ID
On your server, change into the following directory and create a file called serveradmin.xml. Open it afterwards with an text editor (we use nano again in this case):

Enter at least the following lines:

Don’t forget to change the value 12345YourSteamID to your Steam ID! Press CTRL+O to save and CTRL+X to close the file. Afterwards, stop and start the 7 Days to Die server and that’s it. You could even create moderators and give each of them specific rights. However, this would definitely burst this article. If you want to know more about the possible rights management on a 7 Days to Die server, check out this link.

Last words …

As you can see, with a little bit of work you can setup your own 7 Days to Die server on a cheap Linux VPS for example. Of course you could also go with a hosted one and don’t bother about all the setup stuff, but this is way more costly. And if you’re interested in working with Linux machines, this is a good way to learn a little bit about how to maintain and setup server software under Linux in general. If you have any comments, wishes or notes, please let me know down below in the comments.