Buying and running a Linux Project Zomboid server

From PZwiki
This article may be outdated.
Editors are encouraged to update this article with new information.
This article may be in need of improvement.
Editors are encouraged to add any missing information to the article, while verifying that the article's current content is correct.

Note: A more up to date guide can be found here:


Hey there, so I’m writing this guide as an attempt to help people who might be setting up their servers on a Linux server (such as a VPS) yet are relatively new to the entire game of server hosting. I’m going to be pretty in depth in this tutorial, however I will gloss over a couple of sensitive subjects. I’ll point you in the right direction for everything.

Buying a server

So first off if you don’t own a VPS, you’re going to want to buy one. You technically have two choices, a VPS or a proper dedicated server. However… eh… You won’t be buying the dedicated server. Trust me. Unless you have an insanely popular server, not only is it expensive it’s a bit overkill all considering.

There are plenty of places to get a VPS but there’s not a lot of places that allow game servers. This is the most important thing you must check before purchasing a VPS. While I know people usually don’t care about Terms & Conditions, you MUST read them. You can usually just CTRL + F “Game” or “Game Server” and you will swiftly find out whether they allow a game server or not. Rule of thumb for me usually is, the cheaper server providers usually don’t allow game servers since they draw too much resources. Don’t be fooled by pricepoint though, just because they are expensive doesn’t mean they allow game servers either. Your best bet will usually be buying from a provider that is specifically catered to gaming. I bought from NFOServers and I’m pretty happy with it so far, everybody has their preferences and different experiences, so just make sure to do the research.

Regarding system settings, bandwidth wise I got about 3TB to work with and from the projections I might break 1TB by the end of the month, but I really doubt it. From indications around the forums my guess is the bottleneck would come down to RAM as that seems to be dictating how many players are able to get in. So take that into account. As for CPU I’m not entirely sure right now as to what is best and what isn’t.

When ordering the server you’re going to want to make sure that there are linux OS’es available to install. This guide is geared towards those running a Debian (Wheezy) but the differences to this and Ubuntu should be minimal.

Base server setup

For the most part the provider should configure the OS and passwords and what not. So that shouldn't be a problem. You’re provider will most likely provide a very random looking password for a user called “root”

Now something we should of probably covered earlier. You’re going to want to download a program called PuTTY (Just download PuTTY, nothing else.)

This is the program we will use to access the terminal side of the server. This is basically the main way in which you will interact with the server. You can sometimes get an equivalent in the server providers control panel, however I believe it’s best to use this. Another handy little thing you might want to think about getting is WinSCP

This allows you to access the file side of your server which will be handy later on when we start mucking around with databases and server options. it’s an easy way to navigate the folders without using the terminal program.

Anyway, open up PuTTY and in “Host Name (or IP address)” put the server IP that should of been provided by the server provider. Leave the port as it is. Leave the connection type as what it’s set at (should be SSH) then click open. You can save the session if you don’t want to input this info all the time. Just name it in saved sessions and click save.

When you first connect it you’ll see “login as:” type “root” and hit enter. Next it will ask for the password, so provide the one that was provided for the server (not your control panel password) when typing it will look like you’re not entering anything, but I guarantee that you are typing something. You can paste the password as well by copying the password and just right clicking in PuTTY (CTRL + V isn’t set as paste, it’s right click by default. Have fun with that.) so now you should be in.

Now there are a couple things you're going to want to do if it’s your first VPS. Certain security features you might want to think about installing and what not. You can google “First VPS setup Debian” or something along that lines if you’re really interested. Strictly speaking you can skip this part, but it’s your call.

First thing you will want to type is these three: apt-get install default-jdk

apt-get install screen

apt-get install lib32gcc The first is basically installing Java while the second one I will explain in due course, the third is a package requirement for steam to run on a linux machine.

Now we need to grab the Steam CMD so we can download the actual Project Zomboid software. It’s recommended that you run SteamCMD on a seperate user.

You should add a new user by doing: adduser steam Once that’s sorted we need to switch over to the new user. It should be noted anytime I refer to “steam” in the file directory context, then it means the user folder. If you decide to name the user something else the directories change also. Something to keep note of. “Steam” is not the same as “steam” in the directory context as well. su - steam this will switch the user from root, to steam.

Now we need to actually get the SteamCMD. To do this we run this command: wget It should eventually download and once it does we need to actually get the contents out of the folder. To do this we run tar -xvzf steamcmd_linux.tar.gz Now we got to run SteamCMD

To do this we can do: cd /home/steam/steamcmd then ./ +login steamusername steampassword +force_install_dir directory/you/want/to/install/to* +app_update 108600 -beta onlinetest validate +exit For login you will get a steam guard e-mail as should be expected, unfortunately you need the game in order to get the server software, so trying to log in as anonymous for SteamCMD will not work.

  • I can’t remember where I installed it to and whether I created the Steam folder or if SteamCMD did it itself. I personally installed it in /home/steam/ I think, but I honestly can’t quite remember.

This is where WinSCP comes in handy, as now what we want to do is navigate to the project zomboid folder which should be something like /Steam/SteamApps/common/ProjectZomboid. Check this folder, does it have Does it have the projectzomboid folder? Does it have only these two things? Then sigh. You don’t have all the files.

When you download the program you need to have the projectzomboid folder, file and a file. If you are missing the server file then you are missing one of the most important things. You’ll have to keep running the steamCMD command. Just keep running those until the file appear. If using WinSCP you might have to reconnect every time you download as WinSCP doesn’t always refresh properly for some reason.

If running it a few times doesn't work, then you need to run, then each command preceeded by plus, so - <cdoe>login steamusername steampassword then force_install_dir directory/you/want/to/install/to* etc

We now need to make a Zomboid folder in the user home folder we’ll be running the server from. In this case for me it’s steam (but depending how you did it, it’ll vary.) So now we’ll do: cd /home/steam Then mkdir Zomboid Then cd /home/steam/Zomboid Then mkdir db Now reconnect WinSCP and go download this empty db file:

Whether or not you will whitelist the server it’s best to put the file in. You’ll now need to edit the and set your RAM values. This is dependant on how much RAM your server has, I personally didn’t set them to use my complete server capacity, I did about half but the choice is up to you. (Kirrus: Don't set more than 80% of your VM's capacity.) Use WinSCP and double click on the file and it should open it up in an editor, find these two lines:

  -Xms1024m \
  -Xmx1024m \

And edit the values to your choosing. Save and close the file and it will prompt you for the root password of WinSCP so put it in and it will be updated.

Now something I specifically left for last, since I screwed it up. I guarantee you though this step is unmissable. We need one more thing and all you have to do is wget bash This is only required for those who are running a Debian OS, Ubuntu (I am told) should be fine.

Nearly home!

We’re almost there. So here’s what we got to do now. cd /home/steam/Steam/SteamApps/common/ProjectZomboid then ./ It will start the server. You celebrating yet? Don’t. We’re not quite done yet, do CTRL + C and it’ll shut down the server program. We can’t use the usual things like exit (yet - it’s on the todo list) so for now CTRL + C will close the server. So now we got to boot up WinSCP and navigate to the Zomboid folder we created. As long as everything went smoothly you should have a lot more files now. Go into the server folder and you should see a serverOptions.ini

It will contain: PVP=true PauseEmpty=true GlobalChat=true Open=true Most should be self explanatory but if not, here we go.

PVP - Allow or don’t allow players to hurt/kill each other.

PauseEmpty - I’m not certain but I believe it basically suspends the server when there are no players around.

GlobalChat - Whether or not to allow the players to speak to all the players through the /all chat command.

Open - Whether it to be whitelisted or not. If you want the server to be whitelisted I would love to help, but at this point in time I have been unable to get whitelisting to work on the server.

Right. Do what you wish save, password then exit.

Now here’s where that Screen we talked about in the beginning comes in handy. You see if you start the server without it and just do what we did above but didn’t close the server you would find that in order to keep the PZ server running, you would need to keep the PuTTY terminal running. Which would mean you would need to keep your computer running, which would kind of defeat the purpose of having the VPS.

When back home type: screen You will be taken to a wall of text, just hit enter until the text goes away and your left with a blank screen except for your user thing.

Now what you do here is cd /home/steam/Steam/SteamApps/common/ProjectZomboid Then ./ The server should start up and eventually be greeted with:

"*** SERVER STARTED ****". At the bottom.

You can now close PuTTY and play on your server.

If you ever need to get back to that screen, when you log back into root type: screen -dr and it should take you back to server screen. Don’t initiate multiple versions of the screen, otherwise you’re going to have a bit of a problem down the line.

Thanks for reading, that’s the bulk of the tutorial so now here’s some FAQ and handy tips.

Server screen controls:

CTRL + C - Closes the server.


Q: "I get a missing file/folder error when I boot the server."

A: "Usually means you didn't put the “Zomboid” folder in the right place. Remember to create a “db” folder and put in the “world.db” file in there.

Q: "There appears to be some error regarding RakNet. What’s that about?"

A: It’s probably to do with kirrus’s script as linked above. Probably means you didn’t install it correctly.

Q: "I got a long confusing password, I think I'll change it..."

A: NO! Don't. Chances are the password given is incredibly secure, if you change it you could make the server more vulnerable. Personally I suggest just leaving it as default, at the very least your root password should remain unchanged.

Q: How do I upgrade the server when a patch is released

A: Shut down the gameserver (Ctrl-C), and then run the steam command.

A video version of the guide will follow later.

Thanks to Kirrus for double checking the info and giving pointers.

Editors Note: This guide was created by TIS forum user Connall and was copied over with his permission.