Project Zomboid

How to Host a Project Zomboid Dedicated Server on Windows

Set up a free Project Zomboid Build 42 dedicated server on a Windows PC: SteamCMD app 380870, StartServer64.bat and its memory setting, servertest.ini, UDP ports 16261 and 16262, admins, mods, backups, and why it is PC only.

· 13 min read

A rack network switch with a bundle of blue ethernet cables plugged in

Project Zomboid multiplayer is much better on a dedicated server: a free program that keeps the world running on a PC (or a rented machine) so your group can drop in and out without the host being online. It runs on Windows and Linux, and players on Windows, macOS and Linux can join it. The game has no console version, so there is no console crossplay to plan around.

This guide uses the PZwiki dedicated server page and its server settings page, the community wiki for the game. Both were last updated for Build 42.20.0 while the current stable build is 42.22.2, and the wiki says so on the page. We have not run a Project Zomboid server on our own setup, so if anything here disagrees with the files on your disk or with the wiki’s newest text, trust those.

Self-host or rent?

Host it yourself if you have a Windows PC that can stay on while people play. The server is free, there is no monthly fee, and you control the settings and the mods. You choose how much memory the server uses (more on that below), so a small group can run it on a modest PC.

Rent a server if no PC can stay on, your upload is weak, you are behind CGNAT, or you do not want to open ports. A modded world with many players also wants more RAM than some home PCs can spare.

The server cost calculator compares electricity at home with a host’s price; its RAM presets are for ARK and Palworld, so treat them as a rough guide here. See also self-hosting vs paid hosting and the games hub for how Project Zomboid compares with the other servers on this site.

1Install with SteamCMD (app 380870)Anonymous login; do not start it from Steam2Lower -Xmx in StartServer64.batIt ships asking for 16 GB; match your PC3First start: set the admin passwordThen type quit and edit servertest.ini4Set PublicName, Password, MaxPlayersSettings live in the Zomboid\Server folder5Open UDP 16261 and UDP 16262Both are needed; friends join your public IP and 16261No console version exists: Windows, macOS and Linux players only.
The setup in five steps. Project Zomboid has no console version, so only desktop players join.

Install the server

Download Valve’s SteamCMD, extract it to C:\steamcmd, and run:

C:\steamcmd\steamcmd.exe +force_install_dir C:\PZServer +login anonymous +app_update 380870 validate +quit

380870 is the Steam app ID of the Project Zomboid Dedicated Server tool, and it downloads anonymously. Run the same command again after every game update; the server and the players must be on the same build. You can also install it from the Steam client’s Library with the Tools filter ticked. If you do, the wiki says not to launch it from Steam: use the batch file below, and verify the files if you launched it by mistake.

Set the memory, then start it

In the server folder you will find three start files. The wiki says to run StartServer64.bat for a normal 64-bit server. Before you run it, open it in Notepad. The shipped file asks Java for 16 GB of memory, and the wiki says the server will fail to start with memory errors if your PC cannot give it that. Change both -Xms and -Xmx to a value your PC can spare:

... -Xms6g -Xmx6g ...

The wiki’s own examples use 6 GB and 4 GB. That is the Java memory the server may use, not a recommendation for your world: more mods and more players want more, and Windows and any game on the same PC need their share. The wiki also says -Xms/-Xmx here is the equivalent of the in-game Host menu’s “Server Memory” option.

Now run StartServer64.bat. A console window opens. On the first start it asks you to choose an admin password for the admin account it creates. Write it down. When the console reports that the server is running, it is up. If your players use the non-Steam (GOG) copy of the game, the wiki says to start the server with StartServer64_nosteam.bat instead and have them play the non-Steam client.

Your settings files

The server writes its settings the first time it runs, in your Windows user folder (not the install folder):

  • %USERPROFILE%\Zomboid\Server\servertest.ini for server settings
  • %USERPROFILE%\Zomboid\Server\servertest_SandboxVars.lua for world and gameplay rules
  • %USERPROFILE%\Zomboid\Saves\Multiplayer\servertest for the world save

servertest is just the default server name. To change it, add -servername yourname to the start line, and every file name follows it. Edit these files with the server stopped (type quit in its console), then start it again.

The settings to set first, from the wiki’s list:

Setting What it does
PublicName The name shown in the in-game browser
Password The password players must know to join
MaxPlayers Player slots: default 32, maximum 100. The wiki warns that more than 32 can cause poor map streaming and desync
Public Whether the server shows in the in-game server browser
Open true lets new players create their own account on first join. false means an admin must create each username and password
PVP, PauseEmpty Whether players can hurt each other, and whether game time stops when nobody is online
DefaultPort, UDPPort The two UDP ports (see below)
RCONPort, RCONPassword Remote console, for admin tools only

World rules such as zombie population, loot and day length are in servertest_SandboxVars.lua.

Ports, firewall and how friends join

The wiki lists the ports a Project Zomboid server needs:

  • UDP 16261 (DefaultPort)
  • UDP 16262 (UDPPort, the direct connection port)

Both are UDP, and the wiki says the 16261 port “will need to be open on your router and firewall.” Older guides mention extra Steam ports (8766 and 8767) and a range that grows with the player count; the current wiki lists only the two above, so start there. Do not forward the RCON port (default TCP 27015) to the internet. The server also has a UPnP setting that tries to open router ports for you, but do not rely on it; forward the ports yourself.

Allow both in Windows Firewall, in PowerShell as administrator:

New-NetFirewallRule -DisplayName "Project Zomboid UDP 16261" -Direction Inbound -Protocol UDP -LocalPort 16261 -Action Allow
New-NetFirewallRule -DisplayName "Project Zomboid UDP 16262" -Direction Inbound -Protocol UDP -LocalPort 16262 -Action Allow

Then forward the same two UDP ports on your router to the server PC’s reserved LAN address. Port Forwarding for Game Servers walks through the router rule, how to detect CGNAT and how to test a UDP port properly. If you host behind a port-forwarding VPN with a port cap, this game uses two ports.

Joining: in the game, click Join, open the Favorites tab, add your public IPv4 address, port 16261, and an account name and password, then save and join. The wiki notes that if you run the server for a LAN or VPN group, they should use the local or VPN address instead. If you host and play on the same PC, try your public IP first and add the local IP in the Local IP field if that fails.

Admins, mods and backups

Admin: log in with the admin account the server created on first start and the password you chose. Admin commands run from the server console, or in game with a leading slash. /help lists them. After you change servertest.ini while the server is running, the wiki says the reloadoptions admin command applies it; stopping and starting is the safer habit.

Mods: the wiki’s method is to put the mod’s Workshop item IDs in WorkshopItems= (separated by semicolons) and the mod names in Mods=, both in servertest.ini. The wiki says Workshop mods added to the server download automatically on connecting clients. A new world with a lot of mods takes more RAM, so raise -Xmx before blaming the network.

Backups: stop the server and copy the Zomboid folder (at least Saves\Multiplayer and the Server folder) to another drive. The wiki’s troubleshooting notes that moving between Build 41 and Build 42 on one machine can break a server, and it says to back up your .ini, .lua and save files first. The backup and restore guide shows the stop, copy and restore routine for other games, and the same idea works here.

Crossplay: who can join?

Project Zomboid is available on Windows, macOS and Linux only. The Indie Stone’s January 2024 post says there are no plans for consoles or mobile, and Steam lists the game as cross-platform multiplayer across those three desktop systems. So:

  • PC, Mac and Linux players can join the same server. Make sure everyone is on the same game build.
  • PS5, Xbox and Switch players: there is no console version, so there is nothing to join with.
  • Steam and non-Steam (GOG) players need a server that matches their client, as noted above.

Common problems

The server fails to start with a memory error. You left -Xmx at the shipped 16 GB. Lower both -Xms and -Xmx.

Friends cannot see or join the server. Check the saved server in their Favorites tab uses your actual public IPv4 address and port 16261, and that UDP 16261 and 16262 are forwarded and allowed. If your router’s WAN address is not your public IP, you are probably behind CGNAT; read how to host behind CGNAT.

My settings change did not apply. Stop the server and start it again, or save the file and run the reloadoptions admin command.

A character is stuck in the void after joining. The wiki says this can happen with a profile used for an earlier in-game Host session; create a new profile by changing the account name in the Add Server panel and join again.

FAQ

Is the Project Zomboid dedicated server free? Yes. It is a free Steam tool (app 380870) that downloads anonymously with SteamCMD.

Which ports does a Project Zomboid server need? UDP 16261 and UDP 16262 by default.

How many players can join? The default cap is 32 and the wiki lists a maximum of 100, with a warning about desync above 32.

Can console players join? No. The game has no console version.

How much RAM does it need? The Project Zomboid wiki gives no minimum; it explains that you set the memory in StartServer64.bat and uses 4 GB and 6 GB in its examples. More mods and players need more.


DIY Game Hosting is an unofficial fan site. It is not affiliated with The Indie Stone, Valve or GOG. Game names and trademarks belong to their owners. Also hosting ARK or Palworld? Our free Windows server managers handle those.