Prerequisites
- A running Project Zomboid server hosted with Legion Hosting
- Access to GPanel
- The game installed and able to connect to your server
Setting Up Admin Access
Before you can use admin commands in-game, you need to configure an admin password on your server. There are two ways to do this.
Option 1: Server Settings File
- Open GPanel and navigate to your server.
- Go to the File Manager and open
/.cache/server/<servername>.ini(replace<servername>with your server's name). - Find the line that reads
AdminPassword=and set it to a secure password:AdminPassword=YourSecurePassword123 - Save the file and restart your server.
Option 2: GPanel Startup Tab
- Open GPanel and navigate to your server.
- Go to the Startup tab.
- Look for the Admin Password field and enter your desired password.
- Restart your server for the change to take effect.
Granting Admin Access to Players
Once your admin password is set, players who connect and enter the admin password will have admin access. You can also set access levels directly from the server console.
In the GPanel Console tab, type:
setaccesslevel <username> admin
This is a console-only command — it must be run from the GPanel Console or server console, not from in-game chat.
Common Admin Commands
Commands prefixed with / are typed in the in-game chat — press T or Enter to open the chat window. Commands without a / prefix are console-only and must be run from the GPanel Console tab.
Player Management
| Command | Description |
|---|---|
/players |
List all currently connected players |
/kick <username> |
Kick a player from the server |
/banuser <username> |
Ban a player from the server |
/unbanuser <username> |
Remove a player's ban |
/adduser <username> <password> |
Create a whitelist account for a player |
/servermsg <message> |
Broadcast a message to all players on the server |
Teleportation
| Command | Description |
|---|---|
/teleport <username> |
Teleport yourself to a player's location |
/teleportto <x> <y> <z> |
Teleport yourself to specific map coordinates |
Player Cheats / Debug
| Command | Description |
|---|---|
/godmod <username> |
Toggle god mode (invincibility) for a player |
/invisible <username> |
Toggle invisibility for a player (zombies ignore them) |
/noclip <username> |
Toggle noclip for a player (fly through walls and terrain) |
/addxp <username> <perk> <amount> |
Grant XP to a player in a specific skill (e.g., /addxp Player1 Carpentry 1000) |
World & Events
| Command | Description |
|---|---|
/startrain |
Start a rain event |
/stoprain |
Stop the current rain |
/gunshot |
Trigger a gunshot sound event nearby to attract zombies |
/chopper |
Trigger a helicopter fly-over event |
Server Control
| Command | Description |
|---|---|
/save |
Force save the world immediately |
/quit |
Save the world and stop the server gracefully |
Access Levels
Project Zomboid has several access levels that control what commands a player can use. Set a player's access level from the GPanel Console (this is a console-only command):
setaccesslevel <username> <level>
| Level | Description |
|---|---|
| admin | Full access to all commands. Can manage other admins, change server settings, and control the server. |
| moderator | Can kick and ban players, teleport, and view player information. Cannot change server settings. |
| overseer | Limited moderation capabilities. Can view player information and perform basic moderation. |
| gm | Game Master. Can spawn items, teleport, and manage in-game events. Useful for roleplay servers. |
| observer | Can spectate players. Minimal command access. Useful for monitoring the server. |
| none | Regular player with no special privileges. This is the default for all players. |
none from the GPanel Console:setaccesslevel PlayerName none
Using the GPanel Console
You can also run commands through the GPanel web console without being logged into the game:
- Open GPanel and navigate to your server.
- Go to the Console tab.
- Type your command in the input box at the bottom and press Enter.
/ prefix) can also be run from the GPanel console by typing them with the / prefix. Some commands like setaccesslevel are console-only and do not use a / prefix. Certain commands (such as teleportation and god mode) may only work when you are logged into the game.
Managing the Ban List
When you ban a player using /banuser, the ban is stored in the server's database located at /.cache/db/.
To manage bans:
- Ban a player:
/banuser <username> - Unban a player:
/unbanuser <username> - Manual editing: You can also use the GPanel File Manager to browse the
/.cache/db/directory and manually edit the ban list if needed.
Troubleshooting
- Make sure your admin password is set correctly in
/.cache/server/<servername>.ini(theAdminPassword=line) and the server was restarted after the change. - Ensure you entered the admin password when connecting to the server.
- Check the server logs at
/.cache/Logs/for any error messages.
- Your access level may not be high enough. Ask a server admin to set your access level from the GPanel Console using
setaccesslevel <username> admin. - Some commands require the admin access level. If you were set to a lower level (like moderator or gm), certain commands may not be available to you.
- Make sure the perk name is spelled correctly and uses the exact PZ perk name (e.g.,
Carpentry,Cooking,Farming,Fitness,Strength). - The player must be online when you run the command.
- Some commands only work when typed in-game, not through the GPanel console.
- Make sure the server is running and not in a crashed or stopped state.
- Try restarting the server from GPanel and attempting the command again.
Related Guides
- Project Zomboid Server Settings Guide — Configure your server's gameplay settings, difficulty, and sandbox options.
- Project Zomboid Mod Installation Guide — Add Workshop mods to your server.