This repository contains scripts, configuration files, and documentation to help you set up a Project Zomboid server on an Ubuntu 23.04 64-bit VPS hosted with Hostinger and on a server on an Ubuntu 22.04 64-bit VPS hosted with Hostzone. This is a personal project designed to create a private server for playing with friends.
The Hostzone VPS was essentially double the price, but the ping was much better.
Any suggestion on how to check other host services pings
- Prerequisites
- Installation
- Configuration
- Running the Server
- Installing Mods
- License
- Acknowledgements
Before you begin, ensure you have met the following requirements:
- A VPS running Ubuntu (tested in 22.04 and 23.04 64-bit)
- sudo privileges on the VPS
- Basic knowledge of terminal and Linux commands
- Project Zomboid game purchased on a platform like Steam
-
Update and upgrade your system:
sudo apt-get update && sudo apt-get upgrade -ysudo ufw enableIMPORTANT: If you're connecting via SSH, you need to allow the port you are using; otherwise, you won't be able to connect via SSH as you are currently doing:
sudo ufw allow 22In my case, my port to SSH is 22
Then allow the ports used by the game Server:
sudo ufw allow 16261sudo ufw allow 16262sudo ufw reloadThen i recommend to check if the ports are really open:
sudo ufw statusLook if all the ports you have opened are listed.
-
Add a new user named "steam" (or whatever name you want):
sudo adduser steamusermod -aG sudo steamGive user permissions:
sudo chown steam:steam /home/steam/ -Rsudo chmod -R 755 /home/steam/ -
Change to the "steam" user's home directory:
cd /home/steam -
Enable the multiverse repository:
sudo add-apt-repository multiverse -
Enable the i386 architecture:
sudo dpkg --add-architecture i386 -
Update your package list:
sudo apt update -
Install SteamCMD:
sudo apt install steamcmd -
Switch to the "steam" user:
su - steam -
Change to the home directory of the "steam" user:
cd steamcmd -
Create a directory for your Project Zomboid server installation:
force_install_dir /home/steam/pzsteam -
Log in to SteamCMD anonymously:
login anonymous -
Update and validate the Project Zomboid server files:
app_update 380870 validate -
Exit SteamCMD:
exit
-
Change the Xmx parameter, to specify the correct amount of gb RAM you would like to be dedicated to Zomboid:
cd /home/steam/pzsteamThen change the file called
ProjectZomboid64.jsonin the Xmx parameters, to specify the correct RAM dedicated to server.sudo nano ProjectZomboid64.json -
Once you have configured the settings as you like, you need to create a server, in your local machine to make the configurations you want, and then navigate to the following folder on your Windows machine if you already have a server:
C:\Users\yourusername\Zomboid\Server -
In that folder, copy the following files:
- yourservername.ini
- yourservername_spawnregions.lua
- yourservername_SandboxVars.lua
-
In the PZ server directory on your Linux server paste these files:
/home/steam/Zomboid/Server
These steps should help you install and configure your Project Zomboid server. Make sure to replace "yourservername" and "yourusername" with the appropriate values for your setup.
-
Start a
screensession:screen -S zomboid -
Navigate to the server files directory and run the server:
cd /home/steam/pzsteam./start-server.sh -servername yourservername -
To detach from the screen session (and keep the server running in the background), press
Ctrl + A, thenD. -
To attach it again:
screen -r zomboid
-
Download the mods you wish to install to your local computer. (https://steamcommunity.com/app/108600/discussions/0/3428846977656275044/)
-
Use
scpor any other file transfer method to upload the mods to your VPS:scp /path/mods pzserver@your_vps_ip:/home/pzserver/Zomboid/mods/(Replace
/path/to/mods,pzserver,your_vps_ipwith the appropriate paths, username, and IP address.)Or use another method to paste the mods folder in the server, as Filezilla.
-
Once uploaded, add the mods to your
ServerSettings.inifile under theModssection.
This project is open-source and available under the MIT License. See the LICENSE file for more information.
If you have any questions, suggestions, or issues, please open an issue in the repository.

