Gamehost

7 Days to Die admin commands: permissions and serveradmin.xml

How to make yourself an admin on a 7 Days to Die server, how permission levels work, where serveradmin.xml is, the most useful commands and reserved slots for admins.

Gamehost team·5 min read·Updated:
7 Days to Die serverPlans from 6 GB RAM

Server ready a moment after payment. You can change the plan in the panel at any time, your world stays.

Short answer

Join the server, then type this in the console on the panel's Dashboard:

admin add YourName 0

Level 0 means full permissions. From then on you can also use commands in the game, in the console you open with F1. In the panel console you type commands without a slash.

The panel console is connected to the server console, so every admin command works there, even when nobody is in the game.

Permission levels

7 Days to Die uses numbers from 0 to 1000. The lower the number, the more you are allowed to do. A player can use a command if the command's level is equal to or higher than their own level.

LevelTypical use
0owner, full administrator
1 to 99moderators with selected commands
100trusted players, for example with access to reserved slots
1000regular player, no admin commands

You change the level a command requires with the cp command:

cp add kick 50
cp list
cp remove kick

Example: after cp add kick 50, players with a level from 0 to 50 can kick others.

The serveradmin.xml file

The server stores admins, the whitelist, bans and command permissions in serveradmin.xml. The file is created on the first start in the game's save folder, on the server .local/share/7DaysToDie/Saves by default. You find it in Files. If UserDataFolder or SaveGameFolder is set in serverconfig.xml, the file is in the place given there.

An admin entry looks like this:

<adminTools>
  <users>
    <user platform="Steam" userid="76561198000000000" name="YourName" permission_level="0" />
  </users>
</adminTools>

userid is the player's SteamID64. It is simpler, though, to add people with admin add while they are on the server: the game fills in the correct ID itself.

If you edit the file by hand, stop the server first and start it again after saving the file.

The most useful commands

CommandWhat it does
lp (listplayers)list of online players with IDs and positions
lpi (listplayerids)list of players with IDs
admin add Name 0, admin remove Namegives and removes permissions
kick Name reasonkicks a player
ban add Name 7 days reasonbans for the given time, units from minutes to years
ban list, ban remove Namelist of bans, lifting a ban
whitelist add Nameadds a player to the whitelist
say "message"message to all players
sa (saveworld)saves the world right away
gt (gettime)shows the day and time in the game
shutdownsaves and shuts down the server
versiongame version and list of loaded mods
help commanddescription and syntax of any command

Commands accept a name, the player's number (entity id) or the account ID. When a name contains spaces or special characters, use the number from lpi.

A ban on the account ID still works when the player changes their name, so for troublemakers it is the safer route. You read the ID from lpi while the player is still on the server. Cannot remember the syntax? Type help ban and the server lists all variants of the command.

Commands such as settime change the time in the world. Be careful before a horde: moving the clock can upset the counters stored in the world.

Admin work in practice

  • Message before a restart. In Schedules, add the command say "Restart in 5 minutes" a few minutes before a planned restart. See Schedules.
  • Save before a restart. The sa command in a schedule just before the restart lowers the risk of losing the last minutes of play.
  • A helper without access to your account. If someone should manage the server from the panel, add them as a subuser with console access in Subusers. You do not have to give out your account password. See Subusers.
  • Telnet. The panel connects to the server through telnet inside the container. For everyday work you do not need to set anything up, the console on the Dashboard is enough.

Reserved slots for admins and trusted players

Permission levels are not only for commands. In serverconfig.xml you can reserve slots for selected people:

PropertyWhat it doesDefault
ServerReservedSlotsnumber of slots only for players with the right level0
ServerReservedSlotsPermissionlevel needed for a reserved slot100
ServerAdminSlotsextra slots for admins when the server is full0
ServerAdminSlotsPermissionlevel needed for an admin slot0

Example: on a public server set ServerAdminSlots to 1, so an admin can always get in and sort out a problem, even when all slots are taken.

In-game commands such as the creative menu (cm) or debug mode (dm) give a huge advantage. On a server where the admin also plays, agree with your group when they may be used, for example only to fix bugs.

Want full control over your server? Have a look at our 7 Days to Die server hosting.

FAQ

Join the server and type admin add YourName 0 in the panel console. Level 0 gives full permissions.

In the game's save folder, .local/share/7DaysToDie/Saves by default. The file is created on the first server start.

A permission level from 0 to 1000. The lower the number, the more commands you can use. 0 is a full administrator, 1000 a regular player.

Type ban add Name 7 days reason. You give the time as a number and a unit, and ban list shows the list of bans.

With the F1 key. Admin commands work if you have the right permission level in serveradmin.xml.

Your own 7 Days to Die server

Plans from 8.49 € a month, set up in a few minutes and managed from one panel.

See plans