Self-hosting a Project Zomboid Dedicated Server on Linux (2024)

In this tutorial, we will show you how to self-host a Project Zomboid dedicated server on a Linux-based system such as Ubuntu.

Self-hosting a Project Zomboid Dedicated Server on Linux (1)

Project Zomboid is a hardcore isometric, open-world, Zombie survival game. In this game, you must navigate and survive in a world ravaged by zombies. Being a hardcore game, even the slightest mistake can set you back.

One of Project Zomboid’s key features is its ability to host your own server and play with your friends. Self-hosting allows you to have up to 100 players in one world, but of course, you will need a machine that can actually handle that.

Another advantage of hosting your own dedicated server for this game is that it is typically significantly cheaper than the many rental servers around.

Even if you are relatively new to Linux, getting a server up and running for Project Zomboid should be a fairly simple process.

If you haven’t yet chosen an operating system, we highly recommend Ubuntu Server. It is the operating system we use when testing this tutorial. These steps, however, should work for any Debian-based operating system.

Installing a Project Zomboid Server on Linux

In the following sections, we will walk you through the entire process of setting up a dedicated server for Project Zomboid on Linux.

Prior to setting up a server, you should ensure that you have a static IP address and also at least have a firewall enabled. A firewall is a basic yet effective way to help keep intruders out of your system.

Preparing Linux for the Project Zomboid Server

1. We need to prepare your Linux system before we can get the Project Zomboid Server up and running.

If you are running a Debian system like Ubuntu, the following two commands can ensure you have an updated base to work from.

sudo apt updatesudo apt upgrade -y

2. Your next step is to install the “software-properties-common” and “screen” packages. This package allows you to easily add repositories on systems using the “apt” package manager.

Install this required package by running the following command.

sudo apt install software-properties-common screen

Installing the SteamCMD Command Line Tool

3. To install the dedicated server for Project Zomboid, we will use the SteamCMD tool. This tool allows you to download games and servers directly from Steam.

Before we can install SteamCMD, you must add the “i386” architecture to your package list. We must do this because SteamCMD is a 32-bit only tool.

sudo dpkg --add-architecture i386

4. Now, since SteamCMD is a closed-source software, many Linux distributions will not have it available by default.

To fix this on an Ubuntu system, you will want to add the multiverse repository using the following command.

sudo add-apt-repository multiverse

Alternatively, if you are using a different Debian system to run your Project Zomboid server, you can use the following command.

sudo apt-add-repository non-free

5. Now, we need to update the package list cache so that the package manager knows it can install SteamCMD.

You can update the package list cache by running the command below.

sudo apt update

6. Finally, we can install SteamCMD by typing in the following command.

sudo apt install steamcmd

Preparing a User to Run a Project Zomboid Server on Linux

7. We will create a user to separate your Project Zomboid server from your Linux system.

Use the following command to create a user named “zomboid“. The “-m” option will also create a home directory for this user.

sudo useradd -m zomboid

8. Once the user has been created, we will want to use the sudo command to swap to that user. Using sudo allows us to swap to a user even if it doesn’t have a password set.

Run the command below to change over to the “zomboid” user we created in the previous step.

sudo -u zomboid -s

9. After swapping to the user you will want to change to its home directory using the following command. We will use this directory to store the Project Zomboid Server on your Linux system.

cd ~

Downloading the Project Zomboid Dedicated Server on Linux

10. We are finally at the point where we can use the SteamCMD tool to download the latest version of the Project Zomboid server to our Linux system.

To download this server, use the following command within the terminal. The key part here is where we specify the app ID of “380870“. This ID is the one belonging to the Zomboid dedicated server.

/usr/games/steamcmd +@sSteamCmdForcePlatformType linux +force_install_dir /home/zomboid/zomboidserver +login anonymous +app_update 380870 +quit

Testing your Server

11. Before we can write a service to run the Project Zomboid dedicated server on Linux, we must run it at least once. The first time you start this server, you will be prompted to give it a password.

Change to the directory where the server is stored using the command below.

cd /home/zomboid/zomboidserver

12. All you need to do to start up the Project Zomboid server is use the command below.

./start-server.sh

13. The following messages will appear within the terminal after a minute or two.

These indicate that an admin user doesn’t exist, and we have not passed a password into the command line.

User 'admin' not found, creating itCommand line admin password: null

You will be prompted to enter a new password for the Zomboid server admin user. Type in something secure, as someone could use it to control your server.

Enter new administrator password:Confirm the password:

14. Once the server has finished setting up, you can safely shut it down by typing in the following command.

Avoid pressing CTRL + C as that will shut it down without giving the server a chance to properly terminate.

quit

Downloading an RCON Client

15. Next, you will want to change to the “zomboid” users home directory using the following command.

We will store the “rcon” client within this folder.

cd /home/zomboid/

16. One downside of the Zomboid Dedicated Server on Linux is that it doesn’t cleanly handle termination signals. We must send a save and quit command before stopping the server.

To achieve this, we must download an Rcon client that supports Project Zomboid.

wget https://github.com/gorcon/rcon-cli/releases/download/v0.10.3/rcon-0.10.3-amd64_linux.tar.gz -O rcon.tar.gz

17. Once the archive has been downloaded, we will use the tar command to extract its contents.

tar -xvf rcon.tar.gz

18. Your next step is to copy the “rcon” tool out of the archive that we extracted. We will extract this binary to the Zomboid user’s home directory.

mv ./rcon-0.10.3-amd64_linux/rcon ./

19. Since we no longer need the directory that was extracted from the archive file, we can delete the directory using the rm command.

rm -r -f ./rcon-0.10.3-amd64_linux/

20. Now ensure that we have execute privileges on the “rcon” binary by using the chmod command.

chmod +x ./rcon

Enabling RCON for the Project Zomboid Linux Server

21. To be able to use RCON to control the Project Zomboid server on Linux, we will need to edit the “servertest.ini” configuration file.

You can edit this file by running the following command within the terminal.

nano ~/Zomboid/Server/servertest.ini

22. Within this file, you will find an option labeled “RCONPassword“. To make it easier to find this line, you can use the search functionality of nano by pressing CTRL + W.

RCONPassword=

Next to this option, specify a secure password that you will use to interact with your Zomboid server.

RCONPassword=<SECUREPASSWORDHERE>

23. After making changes to this file, save and quit by pressing CTRL + X, Y, and then ENTER.

Creating a Systemd Service to Run Your Zomboid Server

24. Now that we know the Project Zomboid dedicated server is working on our Linux system, we can move on to creating a service.

A service will allow your server to automatically start whenever your system restarts or if something causes the server to crash.

To write this service, you will want to return to your previous user using the exit command.

exit

25. Once you are running as your normal user, you can begin writing the Zomboid Server service using the command below.

We use the nano text editor as it is quite easy to use, especially compared to others such as vi.

sudo nano /etc/systemd/system/zomboidserver.service

26. Within this file, type in the following lines.

There are a couple of extra things we do here. First, we have the service set to update the server automatically every time the service starts. Finally, when the serve is stopped, we use the rcon tool we installed earlier to send save and quit commands.

While filling out this file, you will be required to replace “[PASSWORD]” with the RCON password you set earlier within this guide.

Please note that if you want to be able to play on your Project Zomboid with players who don’t use the Steam version, you must add the “-nosteam” option after “/home/zomboid/zomboidserver/start-server.sh“.

[Unit]Description=Project Zomboid Dedicated ServerWants=network-online.targetAfter=network-online.target[Service]Environment=SteamAppId=380870Environment=LD_LIBRARY_PATH=/home/zomboid/zomboidserver/linux64:$LD_LIBRARY_PATHType=simpleRestart=on-failureRestartSec=10KillSignal=SIGINTUser=zomboidGroup=zomboidWorkingDirectory=/home/zomboid/zomboidserverExecStartPre=/usr/games/steamcmd +login anonymous +force_install_dir /home/zomboid/zomboidserver +app_update 380870 +exitExecStart=/bin/sh -c "/usr/bin/screen -DmS zomboidserver /home/zomboid/zomboidserver/start-server.sh"ExecStop=/home/zomboid/rcon -a 127.0.0.1:27015 -p [PASSWORD] saveExecStop=/home/zomboid/rcon -a 127.0.0.1:27015 -p [PASSWORD] quitExecStop=/bin/sh -c "/usr/bin/screen -S zomboidserver -X quit"[Install]WantedBy=multi-user.target

27. After filling out this file, save and quit by pressing CTRL + X, Y, and then ENTER.

Starting the Project Zomboid Dedicated Server on Linux

28. With the service written, we can get Linux to automatically start our Project Zomboid dedicated server by typing in the command below.

When your system restarts or crashes, it will automatically start up your game server when it comes back online

sudo systemctl enable zomboidserver

29. Of course, if you want to play on your server immediately, you can use the following command to start the service immediately.

sudo systemctl start zomboidserver

30. At this point, you should now be able to connect to your Project Zomboid server using the IP address of your machine.

Make sure that you have allowed ports 16261 and 16261 through your firewall. If you are using Ubuntu, you can do this using the following command.

sudo ufw allow 16261/udpsudo ufw allow 16262/udp

Additionally, if you are hosting this from your home network, you must forward these two ports to your machine. Alternatively, you can use a service like Tailscale to work around this.

You can customize your server by connecting through the game client and using “admin” followed by the password you set as your connection details.

Conclusion

Hopefully, at this stage, you will have successfully set up and run a Project Zomboid dedicated server on your Linux device.

Due to the way the Zomboid server operates on Linux, it requires some work to function properly.

Please leave a comment below if you have any issues with running this server on your device.

If you found this tutorial to be helpful, we highly recommend checking out our many other game server tutorials.

Recommended

How to Run Plex within a Docker Container

How to Watch Plex on the Steam Deck

Raspberry Pi Minecraft Server

Arduino Distance Sensor using the HC-SR04

Raspberry Pi Time-Lapse in Four Easy Steps

A Simple Arduino Battery Tester

Self-hosting a Project Zomboid Dedicated Server on Linux (2024)
Top Articles
Latest Posts
Article information

Author: Terrell Hackett

Last Updated:

Views: 5543

Rating: 4.1 / 5 (72 voted)

Reviews: 95% of readers found this page helpful

Author information

Name: Terrell Hackett

Birthday: 1992-03-17

Address: Suite 453 459 Gibson Squares, East Adriane, AK 71925-5692

Phone: +21811810803470

Job: Chief Representative

Hobby: Board games, Rock climbing, Ghost hunting, Origami, Kabaddi, Mushroom hunting, Gaming

Introduction: My name is Terrell Hackett, I am a gleaming, brainy, courageous, helpful, healthy, cooperative, graceful person who loves writing and wants to share my knowledge and understanding with you.