How to setup a dedicated server for 7 days to die
Publisher: Psychz Networks, February 23,20217 Days to Die is one of the most popular zombie apocalypse survival games released in 2013. This game is similar to Minecraft in how it is played, but the graphics are much better. Surviving, building, and creating in a randomly generated world can bring you hours of fun and a long-lasting motivation to go on in the things you want to achieve.
The following article will learn how to set up 7 Days to Die on Ubuntu 18 server. It is a lot easier even for the ones who aren't familiar with the Linux command line because of the tool provided by Steam Developer.
- Install requirements and update repositories
- Adding 32-Bit libraries
- Download and extract Steam
- Updating the Steam tool
- Login into Steam
- Download and install 7 Days to Die server files
- Starting the server
- Stopping the server
Requirement
CPU: 2 Cores
RAM: 4 Gb of RAM
Storage: 15 Gb SSD (SSD for better read/write performance)
OS: Ubuntu 18 with root login
Install requirements and update repositories
If you have recently performed a fresh Ubuntu installation, you will have to update repositories and install a few requirements.
# sudo apt-get update
# sudo apt-get install screen wget
Adding 32-Bit libraries
This step is crucial as you will have to install 32- libraries to support the program if your OS is built on 64-bit architecture. The Steam command-line tool is only available as a 32-Bit program. As of today, most of the systems are 64-Bit based.
If you're running a 32-Bit system, you can skip this part. To find out if you have a 32-Bit or a 64-bit system installed, use the following command.
# arch
Output
If this command's output is i386 or i586, you have a 32-Bit system, and you can skip this step. If it is x86_64, you are using a 64-Bit system. In this case, you have to issue the following two commands as well:
# sudo dpkg --add-architecture i386
# sudo apt-get update
# sudo apt-get install lib32gcc1
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
Let us now install the Steam command-line tool. You can download the file from their network. First, create a folder named steamcmd where you can download and extract related files.
# mkdir steamcmd
# cd steamcmd
With the help of wget command, you can download the file from the location given above. Once the download is complete, you can extract the files in the same folder.
# tar -xvzf steamcmd_linux.tar.gz
Updating the Steam tool
You can now start updating the Steam tool. Execute the following command to start the update:
# ./steamcmd.sh
This process will take some time. When the process completes, you will see the following prompt.
-- type 'quit' to exit --
Loading Steam API...OK.
Steam>
Note: 'Steam>' prompt indicated that you are now at the Steam command line and Steam waits for you to enter a command.
Login into Steam
You can now login to your steam account using your username and password. If you do not have an account on Steam, you can log in using 'anonymous', allowing you to log in without a password. If you have an account on Steam, you will be asked for your password and Two Factor Authentication (if enabled).
Steam> login anonymous
Output
Connecting anonymously to Steam Public...Logged in OK
Waiting for user info...OK
Download and install 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:
Steam> force_install_dir 7dtd_server
Steam> app_update 294420
Output
Update state (0x61) downloading, progress: 0.21 (7340032 / 3459239207)
Update state (0x61) downloading, progress: 1.02 (35228112 / 3459239207)
Update state (0x61) downloading, progress: 2.75 (95064875 / 3459239207)
[...]
The app_update command will take about 3-5 minutes to execute. Once this is complete, you will get the following output.
You can now quit the Steam command line tools by simply entering 'quit'.
Starting the server
You need to run the screen command first because it allows you to run the programs even while you have logged out.
# screen -S 7dtd
# ./7DaysToDieServer.x86_64 -logfile output.log -configfile=$HOME/steamcmd/7dtd/serverconfig.xml -dedicated
This should start your server. Since you do not get any output when the server is ready, you can look at output.log files within the 7dtd_server folder. To close the session without stopping the server, press 'ctrl + a' and then 'd'
If you want to attach to the screen session again, enter this command:
# screen -r 7dtd
You can now start 7 Days to Die on your desktop/gaming machine. Click on Connect To Server and enter the IP address/name of your server and click on the connect symbol or search for your server name in the upper left (if you set your server to the public at the step before).
Stopping the server
To stop your server, you first need to reconnect to the screen. To do so, use the following command.
# screen -r 7dtd
Once you are re-attached to the screen, you can press CTRL+C. This can initiate the game server shut down.
I hope you have found this guide helpful and can successfully deploy 7 Days to Die on your Ubuntu server. Please click on the up-vote button if you like the article.