Skip to content
Game servers

Project Zomboid server settings: PvP, zombies, loot and safehouses in Build 42

Published on 20 October 2026

A Project Zomboid server is configured with two files: the .ini file (servertest.ini by default) for the server, such as PvP, password, players and safehouses, and SandboxVars.lua for the world: zombies, loot, water, power and experience. PvP is on by default, but each player chooses whether to join in; players cannot claim a safehouse, and loot respawn and sprinters are off. Edit the files with the server stopped; server options can also change live via the console. Checked for Build 42.21, as of 20 October 2026.

Project Zomboid server at CakeHosting at a glance
WhatAnswer
PriceFrom €4.95 a month on Standard, Premium from €8.95, including VAT, cancel monthly
RAM4 to 32 GB, in 10 sizes
Players32 at a time by default (MaxPlayers, excluding admins); since version 42.20.3 a server can take up to 254 players
Our adviceSmall group on a fresh world: CupCake 4 GB (€4.95). Bigger group or a world that has been running for weeks: Cake 6 GB (€6.95) or BIGCake 8 GB (€8.95). Lots of players with a long mod list: SuperCake 12 GB (€12.95)
PortYour server gets its own address with a port, shown in the game panel. Self-hosting: UDP 16261 and 16262
LocationStandard in Europe (Netherlands, Germany or France), Canada or Singapore, Premium in Europe (Netherlands or France) or the United States (San Jose, California); you choose when you order
Backups2 backups in the game panel (you can order more)
ManagementPterodactyl game panel, settings in the Startup tab; your game settings in the .cache/Server folder

Where are your server's settings stored?

On first start, the server creates four files with default values in Zomboid/Server, named after your server:

  • servertest.ini: the server itself, such as PvP, access, players, safehouses and mods (WorkshopItems= and Mods=).
  • servertest_SandboxVars.lua: the rules of the world (sandbox).
  • The two spawn files: where players start.

Which settings matter most?

Main Project Zomboid server settings and defaults (PZwiki, Build 42)
SettingDefaultWhat it does
In the .ini file
PVPtruePlayers can kill each other
SafetySystemtrueEach player chooses their own PvP mode
OpentrueAnyone can create an account
PasswordemptyPassword to connect
PublicfalseListed in the in-game server browser under PublicName
MaxPlayers32Players at a time, admins not counted
PauseEmptytrueTime stops when nobody is online
SaveWorldEveryMinutes0Save the loaded map every X minutes; 0 is off
SleepAllowed, SleepNeededfalseSleeping allowed, sleeping needed
PlayerSafehousefalsePlayers may claim a safehouse
In SandboxVars.lua
Zombies, PopulationMultiplier4, 0.65Number of zombies (Normal)
Speed, SprinterPercentage4, 0Speed (Random), no sprinters
Transmission, Mortality1, 5Infection through blood and saliva, death after 2 to 3 days
FoodLootNew, WeaponLootNew etc.0.8, 0.6Loot per category, from 0 to 4
HoursForLootRespawn0Loot returns after X hours; 0 is never
WaterShut, ElecShut2, 2Water off within 0 to 30 days, power within 14 to 30; 9 is never
Global1.0Experience for all skills; 2.0 is double

How do you turn PvP on or off?

PvP is on by default (PVP=true), but with the safety system (SafetySystem=true) each player decides whether to be in PvP mode (the skull on the left). With SafetySystem=false anyone can hit anyone at any time; PVP=false turns PvP off.

How do safehouses and loot respawn work?

Players cannot claim a safehouse by default: set PlayerSafehouse=true. A safehouse is not locked by default: SafehouseAllowTrepass=false keeps others out unless invited, and SafehouseAllowLoot=false stops them taking anything. Players who stay away from their safehouse for 144 real-world hours are removed automatically (SafeHouseRemovalTime).

Loot respawn is off. Set HoursForLootRespawn in SandboxVars.lua to a number of hours: after that, looted containers in towns and trailer parks refill, except by default containers with 5 or more items (MaxItemsForLootRespawn), buildings players have barricaded or built in, and safehouses.

How do you make zombies faster or deadlier?

In SandboxVars.lua, under ZombieLore and ZombieConfig:

  • Sprinters: with Speed = 1 all zombies are sprinters; for just some, keep Speed = 4 (Random) and set SprinterPercentage to, say, 6 (Low) or 33 (Normal).
  • Numbers: change Zombies (1 Insane to 6 None) and PopulationMultiplier together: Low 0.15, Normal 0.65, High 1.2, Very High 1.6, Insane 2.5.
  • Infection: with Transmission = 1 a bite always infects, a laceration in 25 and a scratch in 7 percent of cases; with Mortality = 7 you get sick but do not die.

What is different in Build 42?

Build 42 has been stable since 29 July 2026; the latest version is 42.21 (28 September 2026).

  • You set loot per category (0 to 4), and a day lasts 90 minutes by default (DayLength = 4).
  • Seed= in the .ini file decides things like where basements are; a new seed only works once you remove map_worldgen.bin from your world's folder.
  • Old names may not work: DisableSafehouseWhenPlayerConnected is now DisableSafehouseWhenOwnerConnected, and AutoCreateUserInWhiteList is gone.

How do you change the settings?

  1. Make a backup and stop your server.
  2. Open the file in the file manager or over SFTP.
  3. Change the value and save. In SandboxVars.lua, keep the comma at the end of each line.
  4. Start your server: it reads both files again.

Server options in the .ini file can also change live: in the console, type for example changeoption PVP "false", then reloadoptions (in game, as an admin, with a slash in front). showoptions lists all values. reloadoptions only reloads the .ini file; SandboxVars.lua is read only on a restart.

What mistakes do people often make?

  • Expecting more loot in searched houses. Loot is created when a container first loads, so a higher value mostly shows where nobody has been yet (unless loot respawn is on).
  • Changing the Server Name in Startup. A new name means a different .ini file and a new world.

How it works on a CakeHosting Project Zomboid server

Your server runs Build 42 by default and starts with -cachedir=/home/container/.cache and the Server Name from Startup as -servername. Your files are therefore in the .cache/Server folder, named after your server: for example MyServer.ini and MyServer_SandboxVars.lua.

  • Startup: Server Name (letters and numbers only), Admin Username and Admin Password. A password for players goes in Password= in the .ini file.
  • Updates: Steam Auto Update is off by default; turn it on if your server should update on every start.
  • Schedules: schedule a nightly restart, first sending servermsg "Restart in 5 minutes" and save.

Your own rules? On your own Project Zomboid server you choose PvP, zombies and loot, and your world is kept. See the Project Zomboid servers, from €4.95 a month.

Frequently asked questions

How do I turn on PvP on a Project Zomboid server?

PvP is already on by default: PVP=true in the .ini file. With SafetySystem=true, though, each player chooses whether to enter PvP mode. Set SafetySystem=false if everyone should always be able to hit each other, or PVP=false for a server without PvP. To change it live, type changeoption PVP "false" in the console, followed by reloadoptions.

Where is servertest.ini on my hosted server?

At CakeHosting it is in the .cache/Server folder, because your server starts with -cachedir=/home/container/.cache. The file is named after the Server Name in the Startup tab, for example MyServer.ini, with MyServer_SandboxVars.lua next to it. You open them in the file manager of the game panel or over SFTP.

How do I enable safehouses in Project Zomboid multiplayer?

Set PlayerSafehouse=true in the .ini file and restart your server; by default players cannot claim a safehouse. If you want others to stay out unless invited and take nothing, also set SafehouseAllowTrepass=false and SafehouseAllowLoot=false.

How do I turn on loot respawn on a Project Zomboid server?

Set HoursForLootRespawn in SandboxVars.lua to the number of hours after which loot may come back; by default it is 0 and loot never respawns. After that, containers in towns and trailer parks refill if they have been looted at least once. By default this does not happen with 5 or more items in a container, in buildings players have barricaded or built in, or in safehouses.

Can I change sandbox settings when my world is already running?

Yes. Stop your server, edit SandboxVars.lua and start it again: the server reads the file when it starts. Not everything applies retroactively. Loot is created when a container loads for the first time, so more or less loot mostly shows in places nobody has visited yet. Make a backup first.

More questions? See all frequently asked questions

Related articles