Project Zomboid Admin Commands and Server Settings (B42)

Published on

Become admin on a Project Zomboid Build 42 server, use the admin commands that work in 42.21, set the .ini and SandboxVars.lua and fix settings that won't save.

Spiffo, the raccoon mascot of Project Zomboid, with a backpack in the rain while zombies crowd in behind him

You run a Project Zomboid server and need admin rights, the commands that still work on Build 42, and settings that stay put after you save them. This guide covers all three for 42.21, the stable version since 28 September 2026. Commands and defaults come from the PZwiki pages on admin commands, server settings and the dedicated server, last revised for 42.20, and later changes from The Indie Stone's patch notes and forum. Version 42.22 has been in testing on the new Pre-Release branch since 27 October.

Quick answer: Project Zomboid admin commands work in the server console without a slash and in the game chat with one. To become admin, join your server once and type setaccesslevel "YourName" "admin" in the server console; whoever starts a world with the Host button is admin already. Server rules are in Zomboid/Server/servertest.ini and gameplay settings in servertest_SandboxVars.lua, or in files named after your -servername. When server settings won't save, check the profile name, edit the .lua file with the server stopped, run only one server process, and switch off main menu mods before you create settings under Host.

How to Become Admin on a Project Zomboid Server

Promote your own account. Join once so the server creates your account (with Open=true, the default, that happens at the first login), then type this in the server console with the username you log in with:

setaccesslevel "YourName" "admin"

Use the default admin account. A new dedicated server creates a default admin account on its first start and asks for its password in the console. With the startup parameters -adminusername and -adminpassword you pick the name and password yourself and skip the prompt. Both only act when that account is created:

bash start-server.sh -adminusername YourName -adminpassword 'a-long-password'

On Windows, add them to the java line in StartServer64.bat after zombie.network.GameServer, where the wiki puts -servername. Then connect through Join and Favorites with the server's IP address, port 16261, and that name and password.

Host from the main menu. The 42.21 patch notes made sure "the default role for host connection is set to admin", so whoever hosts is admin.

Roles in Build 42

setaccesslevel takes one of the six levels the wiki lists: user, priority, observer, gm, moderator and admin. Build 42 adds custom roles with their own capabilities, and the system is still settling: 42.14.0 fixed role capabilities lost on a restart, 42.16.0 stopped moderators from granting themselves the admin role, and 42.21 made setaccesslevel and grantadmin work for players who are not on the whitelist. Give admin only to people you would trust with your save.

Project Zomboid Admin Commands for Build 42

In the server console, type the commands as shown; in game, put a slash in front, as in /players. /help lists every command and /help kickuser explains one. Item names are case-sensitive: Base.Axe works, base.axe does not. Syntax and examples follow the wiki's command list, revised for 42.20.2.

Players and moderation

CommandWhat it does
playersLists everyone online
kickuser "Name" -r "reason"Kicks a player; the reason is optional
banuser "Name" -ip -r "reason"Bans a player; -ip bans the IP address as well
unbanuser "Name"Lifts a ban
banid SteamID, unbanid SteamIDBans or unbans a SteamID
adduser "Name" "Password"Creates an account on a server with Open=false
setpassword "Name" "NewPassword"Sets a new password for an account

Server, saving and settings

CommandWhat it does
servermsg "Restart in 5 minutes"Sends a message to everyone
saveSaves the world
quitSaves and stops the server
showoptionsLists the server options and their current values
changeoption PublicName "My Server"Changes one server option
reloadoptionsReloads the .ini and sends it to the players
checkModsNeedUpdateChecks for Workshop updates and writes the answer to the log

Teleports, items and events

CommandWhat it does
teleport "Name"Takes you to a player
teleportplayer "Name1" "Name2"Moves one player to another
teleportto 10000,11000,0Takes you to x,y,z coordinates
additem "Name" Base.Axe 5Gives items; without a name they go to you
addvehicle "Base.VanAmbulance" "Name"Spawns a vehicle at a player
addxp "Name" Woodwork=2Adds XP to a skill
invisible "Name" -true, noclip "Name" -trueHides a player from zombies, or lets them walk through walls
createhorde 150 "Name"Spawns a horde near a player
startrain 50, stoprain, startstorm 2Controls the weather; the storm length is in game hours

Remote tools use RCON with RCONPort (27015 by default) and a strong RCONPassword from the .ini.

Where the Server Settings Live

A dedicated server keeps its settings in the Zomboid/Server folder of the user that runs it: %USERPROFILE%\Zomboid\Server on Windows, ~/Zomboid/Server on Linux.

FileWhat it holds
servertest.iniServer rules: name, password, slots, PvP, mods, backups
servertest_SandboxVars.luaGameplay: zombies, loot, time, XP
servertest_spawnregions.lua, servertest_spawnpoints.luaWhere new characters start
Zomboid/Saves/Multiplayer/servertestThe world itself

servertest is the default name; with -servername MyServer the server reads MyServer.ini and the matching .lua files and keeps its own save folder. Edit the files in a text editor or in game under Host and Manage Settings. The .ini can be saved while the server runs and applied with reloadoptions; otherwise the server uses the files at its next start.

Server .ini Settings That Matter

Defaults from the wiki:

SettingDefaultWhat it does
PublicNameMy PZ ServerName in the server browser
PublicfalseLists the server in the in-game browser; Steam's browser shows Steam servers anyway
PasswordemptyPassword to join; ignored when you play through Host
OpentrueNew players get an account at first login; with false you create accounts with adduser
MaxPlayers32Player slots, admins not counted
PVP, SafetySystemtrue, truePvP is allowed, but each player switches their own PvP mode on and off
PauseEmptytrueGame time stops while nobody is online
SaveWorldEveryMinutes0Saves loaded map areas every set number of real minutes; at 0 an area is usually saved when players leave it
BackupsCount, BackupsOnStart, BackupsOnVersionChange5, true, trueBackups at every start and version change, five kept
SpawnPoint0,0,0Sends every new player to one x,y,z spot; ignored at 0,0,0
DoLuaChecksumtrueKicks players whose game files differ from the server's

The wiki caps MaxPlayers at 100 and warns about desync above 32, though the 42.20.3 hotfix added "support for up to 254 players and administrator access when servers are full". DoLuaChecksum can flag false positives on Linux servers, says the wiki; our "File doesn't exist on the client" guide covers that. Spawn coordinates are in our Build 42 map guide.

Mods go on the WorkshopItems=, Mods= and Map= lines. Guides disagree on the Build 42 format of Mods=, so let the game write it, as our mods guide shows. On our Project Zomboid hosting you add Workshop IDs and Mod IDs in the panel and restart; the mods download automatically.

SandboxVars.lua Settings That Matter

Values from the wiki's Build 42 file, which uses numbers where the game menu shows names:

SettingValuesWhat it changes
Zombies1 Insane, 2 Very High, 3 High, 4 Normal, 5 Low, 6 NonePopulation preset; it also sets PopulationMultiplier
ZombieConfig.PopulationMultiplier0.00 to 4.00: Insane 2.5, Very High 1.6, High 1.2, Normal 0.65, Low 0.15The population itself
PopulationStartMultiplier, PopulationPeakMultiplier, PopulationPeakDay1.0, 1.5, 28Population at the start and at its peak, and the day of the peak
ZombieRespawn, ZombieConfig.RespawnHours4 (None), 0Respawn is off by default; RespawnHours at 0 disables it
ZombieLore.Speed1 Sprinters, 2 Fast Shamblers, 3 Shamblers, 4 RandomWith Random, SprinterPercentage (0 to 100) sets the share of sprinters
FoodLootNew, WeaponLootNew and the other ...LootNew lines0.00 to 4.00Loot per category; food is 0.80 by default, weapons 0.60
HoursForLootRespawn0Above 0, containers in towns refill after that many hours, if they were looted once
MultiplierConfig.Global1.0XP rate for every skill while GlobalToggle is true
DayLength4One in-game day lasts 1 hour 30 minutes
WaterShut, ElecShut2, 2Water stops after 0 to 30 days, power after 14 to 30; 9 disables the shutoff

Sprinters on multiplayer servers are new: 42.17.0 fixed "being unable to set Zombie speed in MP", and The Indie Stone called the sprinter option for servers "a prototype" when it arrived. On a Space-Node Project Zomboid server you can also set them in the panel, from zombie population and speed to loot rarity and XP multipliers.

Map Reset: A New World With the Same Settings

  1. Warn everyone with servermsg, then stop the server with quit.
  2. Copy Zomboid/Saves to a safe place.
  3. Delete or rename the world folder, Zomboid/Saves/Multiplayer/servertest (or your server's name). Leave Zomboid/Server as it is.
  4. Start the server. With no world data, it generates a new world and uses the settings files it finds.

Players' own map of the old world is stored on their PC under the server's IP address and port; the wiki suggests a new port to start it fresh. The -Dsoftreset parameter does not work as of 42.21.0, says the wiki. A Build 41 world can't move to Build 42 at all (B42 checklist); our Build 42 update guide covers the legacy41 branch.

Server Settings Won't Save or the Server Won't Start

Settings that will not save or apply

  • The server loads a different profile. It reads the files named after its -servername, so edits to servertest.ini do nothing on a server started as MyServer.
  • You edited the .lua file while the server ran. The wiki documents a live reload only for the .ini; the .lua files count from the next start. Stop the server with quit, edit, then start it again.
  • The setting does nothing in your mode. The wiki marks Password and MaxAccountsPerUser as ignored when you play through Host, and SleepNeeded as ignored while SleepAllowed=false.
  • Your .ini comes from an older build. 42.18.0 renamed DisableSafehouseWhenPlayerConnected to DisableSafehouseWhenOwnerConnected and removed AutoCreateUserInWhiteList. Compare old lines with the file your 42.21 server writes.
  • The population is not what you set. Zombies sets PopulationMultiplier, so keep both at the same level. In a Build 42 forum thread, an admin traced odd values to a mismatched pair and found that world generation settings such as the starting population only applied to a new world.
  • Create New Settings jumps back to the list. In a 42.20 bug report, "Reloading LUA" appears and the game returns to the list. The MP QA team could not reproduce it and named installed mods as a possible cause; two players tied it to mods enabled in the main menu, and one fixed it by switching those off first.
  • Progress is gone after a restart. In a 42.20.2 bug report, The Indie Stone's MP QA traced lost progress to [SQLITE_BUSY] The database file is locked errors: "Most likely, multiple server instances were running at once", after Start was clicked more than once under Host. 42.21 fixed that. On a dedicated server, make sure the old process has stopped before you start a new one.

A server that won't start

  • Not enough memory. StartServer64.bat asks for 16 GB by default, and the wiki says the server fails with memory errors unless you lower -Xms and -Xmx to what the machine has.
  • Java mods after an update. The Indie Stone warned on 21 October 2026 that "Java-based mods will be fundamentally broken by those updates, without warning." Remove them and validate the server files with SteamCMD's app_update 380870 validate, the wiki's install and update command.
  • "Assertion Failed: Illegal termination of worker thread". The wiki ties it to an earlier Build 41 server on the same machine: steam_appid.txt must hold one line with 108600; if that fails, back up your .ini, .lua and save files and remove the Zomboid folder so the server recreates it.
  • It was started through Steam. The wiki says not to. Verify the files and start it with StartServer64.bat or start-server.sh.
  • A hosted world fails after the update. Test it without mods first, as The Indie Stone asks before any bug report. Since 42.21, players on another game version get a notice when they try to connect.

FAQ

How do I become admin in Project Zomboid? Join the server once, then type setaccesslevel "YourName" "admin" in the server console. Whoever hosts from the main menu is admin already.

I forgot the admin password. Can I reset it? Yes. Type setpassword "AccountName" "NewPassword" in the server console, which needs no admin login.

How do I ban someone on my Project Zomboid server? /banuser "Name" -ip -r "reason" bans the account and its IP address, /banid bans a SteamID, and /unbanuser or /unbanid lifts the ban. Run 42.21 or later, which closed a Steam authentication gap that let players get around SteamID bans.

How do I change the zombie spawn rate on my server? Set Zombies from 1 (Insane) to 6 (None) and keep ZombieConfig.PopulationMultiplier at the matching value; Normal is 0.65. Respawn stays off until you set ZombieRespawn or RespawnHours.

Can I change server settings without a restart? For the .ini, yes: save it and run reloadoptions, or change one option with changeoption. SandboxVars.lua and the mod lines need a restart.

Can I turn on sprinters on a multiplayer server? Yes, since 42.17: ZombieLore.Speed = 1 for sprinters only, or 4 (Random) with a SprinterPercentage. The Indie Stone called the option a prototype when it added it.

Sources

All opened on 1 November 2026: