01
The admin account and access levels
On the very first launch, the server asks you to choose the password of an admin account, which it creates itself: the account named admin by default. Two launch options documented by the official wiki change this behaviour: -adminpassword sets the password without asking, and -adminusername gives this account another name.
To log in as admin, join the server from the game with that username and password. You can then grant rights to your usual account, or to another player's, with /setaccesslevel. The levels listed by the official wiki for Build 42 are, from lowest to highest: user, priority, observer, gm, moderator and admin.
/setaccesslevel "Bob" "moderator"
/setaccesslevel "Bob" "user"
The second line removes the rights. Quotes are required as soon as a name contains a space; always keep them, as in the wiki's examples. Give the admin level to very few accounts: it opens every command, including those that stop the server.
02
Where to type commands
- In game: open the chat and type the command preceded by a slash, for example
/players.
- In the server console: the same command, without the slash. With the setup from the guide creating a Project Zomboid server, the console runs in a
tmux session:
sudo -u pzserver tmux attach -t pz
Leave it with Ctrl+B then D, without stopping the server. A command can also be sent without opening the console, which is handy in a scheduled task (see scheduled tasks on a VPS):
sudo -u pzserver tmux send-keys -t pz "save" Enter
/help shows the full list of commands, and /help followed by a command name shows its help. The wiki points out that some items are case-sensitive: Base.Axe works, base.axe does not.
03
Managing players
/players: the list of connected players.
/kickuser "Bob" -r "reason": kicks a player; the reason is optional.
/banuser "Bob" -ip -r "reason": bans a player; -ip also bans their IP address. /unbanuser "Bob" lifts the ban.
/banid and /unbanid followed by a SteamID: ban or unban a Steam account.
/adduser "Bob" "password": creates an account on a whitelisted server; /removeuserfromwhitelist "Bob" removes it.
/voiceban "Bob" -true: mutes a player's voice chat (-false to restore it).
/servermsg "Restart in 10 minutes": a message to all connected players.
The whitelist depends on the Open setting in the server's .ini file: with Open=false, only accounts created by an admin can join.
04
The world, items and the server
/save: saves the world. /quit: saves, then stops the server.
/showoptions: shows the current settings. /changeoption SettingName "value": changes one.
/reloadoptions: reads the server's .ini file again and sends it to players. According to the wiki, you can therefore edit this file while the server is running, then apply the changes with this command.
/additem "Bob" "Base.Axe" 5: gives an item to a player (without a name, the item goes to you); the count is optional.
/teleport "Bob": teleports you to a player. /teleportplayer "Bob" "Alice": sends one player to another. /teleportto 10000,11000,0: to coordinates.
/createhorde 50 "Bob", /startrain, /stoprain, /chopper: events to liven up the game.
The official wiki states that its list was written for a recent version of Build 42 and flags some commands as buggy or work in progress. Check with /help on your server before relying on a command, and back up the Zomboid folder before trying a new one. For mods, see adding Workshop mods to a Project Zomboid server.
05
Remote admin with RCON
RCON (Remote Console) lets you send commands to the server without being in game or logged in over SSH. It is set in the server's .ini file, here /home/pzserver/Zomboid/Server/pz1.ini:
RCONPort=27015
RCONPassword=un-long-mot-de-passe-aleatoire
The default port is 27015, in TCP; the wiki asks for a strong password. Restart the server after the change. Commands are then sent with an RCON client, without the slash.
Do not open this port to the Internet. The RCON password travels unencrypted, and anyone who guesses it controls the server. Keep 27015 closed in the firewall and use an SSH tunnel, which makes the port reachable from your computer only:
ssh -L 27015:127.0.0.1:27015 vous@adresse-du-vps
Your RCON client then connects to 127.0.0.1, port 27015, as long as the SSH session stays open. The guide connecting to a VPS over SSH covers the connection, and game server ports the ports to open, 16261 and 16262 in UDP for the game.
06
On CloudFive
CloudFive has no ready-made Project Zomboid plan: the server is installed on a VPS, and managed as described in this guide. The Ryzen VPS, from €5.99 per month, is well suited:
- an AMD Ryzen 9 9950X, with DDR5 memory and NVMe storage;
- root access and a dedicated IPv4 address;
- basic anti-DDoS protection included. The game-specific filter is part of Premium Protection, a paid option (see protecting a game server against DDoS).
The servers are in France, on our own network, monthly with no commitment, with support in French 7 days a week. To choose the VPS size, see which VPS for a game server and the gaming VPS page. Other guides of the same kind: Valheim admin commands and 7 Days to Die admin commands.
07
Frequently asked questions
How do I become an admin on a Project Zomboid server?
On first launch, the server asks for the password of an admin account, named admin by default. Join the server with that account, then grant rights to your usual account with /setaccesslevel "YourName" "admin".
What are the access levels in Project Zomboid?
For Build 42, the official wiki lists, from lowest to highest: user, priority, observer, gm, moderator and admin. They are granted with /setaccesslevel followed by the player's name and the level, in quotes.
How do I ban a player on Project Zomboid?
Type /banuser "PlayerName" in the chat, with -ip to also ban their IP address and -r "reason" to give a reason. /unbanuser followed by the name lifts the ban, and /banid bans a SteamID.
How do I save and stop a Project Zomboid server cleanly?
The /save command saves the world, and /quit saves it then stops the server. In the server console, type the same commands without the slash.
How do I enable RCON on Project Zomboid?
Set RCONPort (27015 by default, in TCP) and a strong RCONPassword in the server's .ini file, then restart it. Do not leave this port open to the Internet: use an SSH tunnel to connect to it.