By the end of this guide you'll have a Project Zomboid dedicated server running on a Linux box, tuned for the number of friends you actually play with, locked behind an admin password, and ready for co-op survival in Knox County. This is for anyone who wants a server that stays online between sessions instead of running off one person's game client. You don't need to be a Linux wizard, but you should be comfortable copying commands into a terminal.
What you need before you start
Project Zomboid is a Java game, and the dedicated server is too. So the heaviest thing it asks for is memory. A small group of three to four players runs comfortably in about 3 GB of RAM. Once you push past eight players, or you start loading a stack of Workshop mods, you'll want 5 GB to 8 GB free for the server alone. The simple rule we use: start with 3 GB, then add roughly 500 MB for every additional player you expect, and a bit more on top for mods.
You'll also want a couple of CPU cores and around 5 GB of disk to begin with, though the Saves folder grows over time as the map fills in. This guide assumes a fresh Ubuntu or Debian server, but the steps map cleanly onto most Linux distributions. If you'd rather skip the server admin part entirely, a panel host like Bytte.cloud gives you a Project Zomboid instance with the ports and Java already handled, but everything below works on any plain VPS too.
Step 1: Install SteamCMD
SteamCMD is Valve's command line tool for downloading dedicated servers. First, create a dedicated user so the server isn't running as root, then install the dependencies. On Debian or Ubuntu you'll need to enable the multiverse repo and accept the Steam license.
sudo adduser pzserver
sudo apt update
sudo apt install -y software-properties-common
sudo add-apt-repository multiverse
sudo dpkg --add-architecture i386
sudo apt update
sudo apt install -y steamcmd
If your distro doesn't package SteamCMD, you can grab it manually instead. Switch to the new user and pull the tarball into its home folder.
sudo su - pzserver
mkdir -p ~/steamcmd && cd ~/steamcmd
curl -sqL "https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz" | tar zxvf -
Step 2: Download the Project Zomboid server
The dedicated server has its own Steam app id, which is 380870. You log in anonymously because the server files are free to download. Run SteamCMD and point it at an install directory.
./steamcmd.sh +force_install_dir ~/pzserver +login anonymous +app_update 380870 validate +quit
This pulls down a few GB. When it finishes you'll see a line like this:
Success! App '380870' fully installed.
To update the server later, you run the exact same command again. SteamCMD only downloads what changed, so updates after a game patch are usually quick.
Step 3: First launch and the admin password
The first time you start the server, it creates all the config files and asks you to set an admin password right in the terminal. Move into the install folder and run the start script.
cd ~/pzserver./start-server.sh
You'll be prompted twice to type an admin password. Pick something strong. This is the account that can teleport, spawn items, and ban players, so it matters.
Enter new administrator password:
Confirm the password:
Give it a minute. The first boot generates the world and the configuration, then prints a line telling you the server is ready.
*** SERVER STARTED ***
Once you see that, stop the server cleanly so you can edit the config. In the server console, type quit and press Enter. Never just kill the process or close the window mid save, because that's how worlds get corrupted.
Step 4: Find and understand the config files
Project Zomboid stores its config in a hidden Zomboid folder inside the user's home directory, not next to the game files. By default the server name is servertest, so the files are named after it.
cd ~/Zomboid/Server
ls -la
You'll see something like this:
servertest.ini
servertest_SandboxVars.lua
servertest_spawnregions.lua
Two files do the heavy lifting. The .ini file controls the server itself: name, passwords, player limit, ports, and the mod list. The _SandboxVars.lua file controls the gameplay rules: zombie population, loot rarity, day length, how fast you get hungry. We'll touch both.
Step 5: Edit the main server config
Open the ini file in a text editor.
nano ~/Zomboid/Server/servertest.ini
Here are the settings worth changing right away. You don't need to retype the whole file, just find these keys and adjust the values.
# A password players type to join. Leave blank for an open server.
Password=changeme
# Max players. Each slot costs memory, so be honest about your group size.
MaxPlayers=8
# A public description shown in the server browser.
PublicName=Bytte Survivors
# Set to true if you want it listed in the in game public browser.
Public=false
# The default ports. Leave these unless you know you need to change them.
DefaultPort=16261
UDPPort=16262
# Pause the world when nobody is online, which saves CPU.
PauseEmpty=true
# Stop people from spawning right on top of each other.
SpawnPoint=0,0,0
Save with Ctrl+O, Enter, then exit with Ctrl+X. A quick note on the password fields: Password is the join password for players, and it's completely separate from the admin password you set in Step 3. Mixing those two up is one of the most common mistakes we see.
Step 6: Set the server memory
By default the server gives Java a modest memory ceiling, and that's the number one cause of crashes once you add players or mods. You set this in the start script with the Java flag -Xmx, which is the maximum heap size. Open the start script.
nano ~/pzserver/start-server.sh
Find the line that launches Java. It has a value like -Xmx2048m. Change it to match what your machine can spare. For an 8 player server with a few mods, 5 GB is a sensible target.
"$PZ_DIR"/jre64/bin/java -Djava.awt.headless=true -Dzomboid.steam=1 \
-XX:+UseZGC -Xms2g -Xmx5g \
-Dzomboid.znetlog=1 \
-Djava.library.path="$PZ_DIR"/linux64:"$PZ_DIR" \
-cp "$PZ_DIR"/java zombie.network.GameServer "$@"
The important part is -Xmx5g, which caps the server at 5 GB. The -Xms2g sets the starting heap. Don't set -Xmx higher than the RAM you actually have free, or Linux will start killing the process when memory runs out. Leave at least 1 GB for the operating system.
Step 7: Open the firewall ports
Project Zomboid uses two ports, and both run over UDP, not TCP. The default port is 16261 and there's a second one at 16262. If you're running a firewall like UFW, open both.
sudo ufw allow 16261/udp
sudo ufw allow 16262/udp
sudo ufw reload
If your server is behind a home router instead of a VPS, you'll need to forward those same two UDP ports to your machine's local IP in the router admin page. A frequent gotcha here is forwarding them as TCP. Project Zomboid is UDP only, so a TCP forward does nothing and players just see a connection timeout.
Step 8: Add Workshop mods (optional)
Mods are added by editing two lines in the same ini file from Step 5. Every Steam Workshop mod has two numbers: a Workshop ID (the long number in the page URL) and one or more Mod IDs (listed on the mod's Workshop page under the description). Both go into the config, separated by semicolons.
nano ~/Zomboid/Server/servertest.ini
# The numbers from the URL, used to download the files.
WorkshopItems=2169435993;2392709985
# The internal mod ids, used to actually load the mods.
Mods=Hydrocraft;BetterSortCC
Order can matter when one mod depends on another, so list dependencies before the mods that need them. After saving, restart the server and watch the console. SteamCMD downloads the Workshop files on boot, so the first start after adding mods takes longer than usual. Every player connecting will be prompted to download the same mods automatically, so they don't have to do anything manual.
Step 9: Adjust the sandbox settings
The gameplay feel lives in the SandboxVars file. This is where you decide whether you're playing a relaxed survival run or a brutal one. Open it up.
nano ~/Zomboid/Server/servertest_SandboxVars.lua
A few values people change most often:
SandboxVars = {
Zombies = 3, -- 1 is insane, 4 is normal, 6 is none
DayLength = 3, -- 3 is one hour real time per in game day
StartMonth = 7,
WaterShutoffDay = 14, -- days until the taps run dry
ElecShutModifier = 14, -- days until the power dies
LootRespawn = 1, -- 1 means none, so loot is finite
XpMultiplier = 1.0,
}
The comments above each line tell you the gist. The Zombies setting is counterintuitive: a lower number means more zombies, not fewer. Edit, save, and restart for changes to take hold.
Step 10: Run it in the background
You don't want the server to die the moment you close your SSH session. The simplest fix is a terminal multiplexer like screen, which keeps the process alive and lets you reattach later to use the console.
sudo apt install -y screen
screen -S pzserver
cd ~/pzserver./start-server.sh
Press Ctrl+A then D to detach and leave it running. To come back to the console later and type admin commands, reattach with this:
screen -r pzserver
From inside the console you can type commands like save to force a save, players to list who's online, or quit to shut down cleanly. For a more permanent setup you'd write a systemd service, but screen is plenty to get friends playing tonight.
Step 11: Back up your saves
The entire world state lives in one folder, and backing it up is just copying that folder somewhere safe. Always do this with the server stopped, or you risk copying a half written file.
cd ~/Zomboid
tar -czf ~/pz-backup-$(date +%F).tar.gz Saves/
That produces a dated archive like pz-backup-2026-06-27.tar.gz. Keep a few of these around. To restore one, stop the server, delete or rename the current Saves folder, and extract the archive back in its place. We'd suggest running this on a nightly schedule with cron once your group is settled in.
Troubleshooting
Here are the problems that come up most, and how to clear them.
Players see a mod mismatch and can't join
This almost always means the WorkshopItems and Mods lists don't agree, or you added a Workshop ID but forgot the matching Mod ID. Open the ini and confirm every mod has both numbers. After a mod updates on the Workshop, the server downloads the new version on restart, but players who joined before may need to restart their own game to pull the update too.
The server crashes or won't start with an out of memory error
Look for a line mentioning OutOfMemoryError or a process that gets "Killed" with no explanation. Either way you've hit the RAM ceiling. Lower the player count, trim your mod list, or raise -Xmx in the start script if the machine has spare memory. Check what's free with free -h first, and never set the heap above your actual available RAM.
Friends can connect locally but nobody can join from outside
This is nearly always a port problem. Confirm both 16261 and 16262 are open and forwarded as UDP. Test from another network, not your own. You can check the ports are listening with the command below.
sudo ss -ulpn | grep 1626
If nothing shows up, the server isn't actually running or didn't bind the ports. If the ports are listening but outside players still time out, the block is at your firewall or router.
Changes to the config seem to do nothing
You probably edited while the server was running, or edited the wrong file. The server only reads the config at startup, so a full restart is required. Double check you edited the file matching your server name, since a custom server name changes the file names too.
The world won't load after a crash
If a save got corrupted from a hard shutdown, restore the most recent backup from Step 11. This is exactly why backing up before each session pays off. Going forward, always shut down with the quit command so the world saves properly.
Wrapping up
You've now got a Project Zomboid server that survives between play sessions, sized to your group, password protected, and backed up. The two files to remember are the ini for server settings and the SandboxVars.lua for gameplay, both restart on save. Start conservative on memory and player count, watch how it runs for a night or two, then tune from there. When you're ready to add mods or invite more people, you already know exactly which lines to touch.



