Project Zomboid Server Commands: Admin and Console Command List (Build 42)

Project Zomboid server commands are typed in the in-game chat with a slash, like /players, or in the server console without one. Only an admin, moderator or other staff role can use most of them, so the first step is giving your own account the admin role. This list is checked against the Build 42 server code (42.20), so it includes the new commands, drops the ones that never existed, and notes what each role is allowed to run.

How to use admin commands in Project Zomboid

There are three places to type a command. In game, press Enter to open chat and type the command with a slash in front, for example /servermsg "Restart in 5 minutes". In the server console, type the same thing without the slash: servermsg "Restart in 5 minutes". Over RCON, send it without the slash too. Console and RCON commands always run with full admin rights, while chat commands run with your account’s role.

  • Quote names with spaces. Usernames and messages go in double quotes: /kickuser "Big Dave".
  • Ask the server. /help lists the server’s commands, and /help additem shows how one command works.
  • Hosting with the Host button? The person who pressed Host already has admin rights in chat. Everyone else needs a role.

How to become admin on a Project Zomboid server

On a dedicated server, the first start asks for an administrator password and creates an account named admin. You can log in with that account, but it’s easier to give your normal account the role. Type this in the server console, using your in-game username.

setaccesslevel "YourName" admin

From then on you can run admin commands in chat, and you get the in-game Admin Panel, with buttons for server options, the player database, safehouses, tickets and statistics. To take a role away, use /setaccesslevel "YourName" none. /grantadmin "name" and /removeadmin "name" are shortcuts for the same thing. If you never saw the password prompt, start the server with -adminpassword yourpassword. The Project Zomboid dedicated server guide covers that first start in full.

Build 42 roles: who can run what

Build 42 replaced the old access levels with roles. Each role comes with a set of capabilities, and a command only runs if your role has the one it needs. The old “overseer” level now maps to gm.

Role What it can do
admin Everything, including server options, Lua reloads and editing roles
moderator Everything except editing roles, reloading Lua, changing server options, and /save or /quit
gm Teleport, god mode, invisibility, noclip, items, XP, weather and events. No kicks or bans
observer Teleport, god mode, invisibility and noclip on themselves, see who’s online. Can’t give items or XP
priority A normal player who gets login priority and isn’t kicked for lag
user A normal player, no admin commands

Give a role with /setaccesslevel "name" moderator, swapping in the role you want.

Project Zomboid server admin commands for managing players

These are the moderation commands you’ll use most: seeing who’s online, kicking, banning and managing accounts on a whitelisted server. Kicks and bans need the moderator or admin role. A reason after -r is optional and is shown to the player. Bans by username can also ban the player’s IP address with -ip.

Command What it does
/players Lists everyone connected
/kickuser "name" -r "reason" Kicks a player (/kick works too)
/banuser "name" -ip -r "reason" Bans a player, and their IP with -ip
/unbanuser "name" Lifts a ban
/banid SteamID / /unbanid SteamID Bans or unbans a Steam ID
/banip IP / /unbanip IP Bans or unbans an IP address
/adduser "name" "password" Creates an account on a whitelisted server (Open=false)
/setpassword "name" "newpassword" Resets a player’s account password
/addusertowhitelist "name" Adds a connected player to the whitelist so their account is protected
/addalltowhitelist Does the same for everyone connected
/removeuserfromwhitelist "name" Removes a player from the whitelist
/voiceban "name" -true Blocks a player’s voice chat; -false lifts it
/connections Shows details of every connection

Project Zomboid server console commands

These keep the server itself running: saving, shutting down, messages and options. Most work the same in chat and in the server console. Changing options and reloading Lua are admin-only, and /save and /quit are kept from moderators too. Use /quit rather than closing the window, because it saves the world first.

Command What it does
/save Saves the world now
/quit Saves and shuts the server down
/servermsg "message" Broadcasts a message to every player
/showoptions Lists the current server options (passwords left out)
/changeoption Name "value" Changes one servertest.ini option and writes it to the file
/reloadoptions Re-reads servertest.ini and sends the options to players
/checkModsNeedUpdate Checks whether a Workshop mod has updated; the answer goes to the log and chat
/reloadlua "filename" Reloads one Lua file on the server
/releasesafehouse "title" Frees a safehouse by its title
/addtosafehouse "title" "name" Invites a player to a safehouse
/kickfromsafehouse Removes a player from a safehouse
/clear Clears the console or your chat

Which options /changeoption takes, and why edits sometimes don’t stick, is covered in Project Zomboid server settings explained. For mod updates, see how to add mods to a Project Zomboid server.

Teleport, items and XP

These are the commands people look for when they ask about cheats. They work on a multiplayer server, or a Host-button game, for anyone whose role allows them: gm, moderator and admin can give items and XP, and observers can only teleport and toggle modes on themselves. Leave the username out of /additem to give the item to yourself.

Command What it does
/teleport "name" Takes you to a player (/tp). Wait a moment for the map to load
/teleportplayer "name1" "name2" Sends one player to another (/tpp)
/teleportto x,y,z Takes you to coordinates, e.g. /teleportto 10000,11000,0 (/tpto). Add a name first to move someone else
/additem "name" Base.Axe 5 Gives items, up to 100 at a time
/removeitem Base.Axe 1 Removes items from your own inventory; 0 removes them all
/addxp "name" Fitness=100 Gives XP in one skill. An unknown skill name returns the list of valid ones
/addvehicle Base.VanAmbulance "name" Spawns a vehicle next to a player, at x,y,z, or next to you
/addkey Gives a key for a given key ID
/godmode -true Makes you invincible; with no value it toggles
/godmodeplayer "name" -true Does the same for another player
/invisible -true / /invisibleplayer "name" Makes you, or a player, invisible to zombies
/noclip -true Walk through walls; add a name to do it for someone else

In Build 42, /godmode and /invisible only affect you. Older guides that write /godmode "name" mean /godmodeplayer and /invisibleplayer now.

Zombie, weather and event commands

These spawn hordes, clear areas, change the weather and fake the noises that pull zombies in. They’re how admins run events on PvE and roleplay servers. A horde is capped at 500 zombies per command. Weather and event commands need the gm role or above; hordes and zombie removal need moderator or admin.

Command What it does
/createhorde 150 "name" Spawns zombies around a player (around you if you leave the name out)
/createhorde2 -count 50 -radius 10 -x … -y … -z 0 Spawns a horde at coordinates, spread over a radius
/remove zombies Removes zombies; also takes animals, corpses or vehicles
/removezombies -x … -y … -z 0 -radius 20 Removes zombies in a square around a point
/chopper Starts the helicopter event on a random player (stop ends it)
/gunshot Plays a gunshot sound on a random player
/alarm Sets off the building alarm where you stand (you must be in a room)
/startrain 50 / /stoprain Starts rain at an intensity from 1 to 100, or stops it
/startstorm 12 Starts a thunderstorm for a number of game hours (24 if you leave it out)
/stopweather Stops the current weather
/thunder "name" / /lightning "name" Thunder or a lightning strike at a player

Commands every player can use

A few chat commands need no role at all. Players can change their own account password with /changepwd "old" "new", give up a safehouse they own with /safehouse release, roll a die with /roll 6 and draw a card with /card.

Using RCON for remote console commands

RCON lets you send console commands from outside the game, from a tool or a bot. It’s off until you set a password. In servertest.ini, set RCONPassword and keep RCONPort (27015 by default), then restart the server. Connect any Source-RCON client to the server’s address on that TCP port. Commands go in without the slash and run with full admin rights, so treat the RCON password like the keys to the server.

RCONPort=27015
RCONPassword=a-long-random-password

Cheat commands in single player

Single player has no chat commands. The closest thing is debug mode: in Steam, right-click Project Zomboid, open Properties, and add -debug to the launch options. The game then starts in debug mode with its developer tools. It’s meant for testing, so keep it off for a normal playthrough. On a multiplayer server, use the commands above instead.

Commands that don’t exist

Plenty of lists online copy commands that the server doesn’t recognise, and you’ll get “Unknown command” back. /time, /spawn, /givexp, /god and skill commands like /farming aren’t in Build 42. Use /additem, /addxp and /godmode. Some others, like /sendpulse and /replay, came from older builds and aren’t in the 42.20 command list. When in doubt, type /help: it only lists what your server actually has.

Troubleshooting commands

What you see Why Fix
“Unknown command” The command doesn’t exist, or you added a slash in the console Check /help; drop the slash in the console
“Not enough rights”, or the command is refused Your role doesn’t have that capability Run setaccesslevel "YourName" admin in the console
“No such user” / “User not found” Wrong username, or the player is offline Use /players and copy the exact name, in quotes
“Pass username” or “Pass a username” You ran a “to me” command from the console, which has no character Add the player’s name
“This user can’t be kicked.” The target’s role is protected from kicks Change their role first
Your setting reverted after /changeoption The server rewrote the file from memory See why settings don’t save in the settings guide

Can’t even reach the server, or stuck on “Getting Server Info”? That’s a connection problem, not a command one. The fixes are in the dedicated server guide.

Skip the console: let the copilot run the commands

On Project Zomboid server hosting from GameTeam, you don’t need to remember syntax. The built-in AI copilot runs console commands for you. Type “make Sam a moderator, kick whoever’s griefing the mall and tell everyone we restart in 10 minutes”. It runs setaccesslevel, checks /players, kicks with a reason and sends the servermsg, then restarts the server when you say so. It reads server-console.txt when a command fails, and edits servertest.ini when what you want is a setting rather than a command. You pay per GB of RAM, from $0.49/GB a week or $1.99/GB billed monthly, with no slot fees. Set up Project Zomboid server hosting and give your group the address.

FAQ

How do you give admin commands in Project Zomboid?

Give the player a role from the server console with setaccesslevel "name" admin, or from chat with /setaccesslevel if you’re already admin. They can then use admin commands in chat.

What are the admin commands in Project Zomboid 42?

The core ones are /players, /kickuser, /banuser, /setaccesslevel, /servermsg, /save, /quit, /changeoption, /reloadoptions, /teleport, /additem, /addxp and /createhorde. Build 42 also has /remove, /createhorde2, /godmodeplayer and /invisibleplayer.

Are there console commands in Project Zomboid?

Yes, on servers. The dedicated server console accepts every admin command without the slash, and RCON does too. Single player has no command console; it has debug mode instead.

Can a non-dedicated host use commands?

Yes. Whoever started the game with the Host button has admin rights in chat and can give roles to friends with /setaccesslevel.

Are admin commands logged?

Yes. Kicks, items, XP, teleports, hordes and similar actions are written to the server’s admin log with the name of the admin who ran them.

Total
0
Shares
Leave a Reply

Your email address will not be published. Required fields are marked *