Become a server admin
In 7 Days to Die, admin rights are stored in the serveradmin.xml file. You can add yourself in two ways: with a command (the easiest) or by editing the file by hand.
Method 1: the admin add command (recommended)
- Start the server and join it in game
- In the Game Panel (game.yorkhost.fr), open your server's Console
- Type the following command (without
/), replacingMyNamewith your in-game name:
admin add MyName 0
The server saves the admin in serveradmin.xml: no restart needed.
In most setups, the panel console passes your commands to the server. If a command produces no answer, make sure the server has finished starting, then try again. Once you are an admin, you can also type commands in the in-game console (F1 key).
If several players have similar names, use listplayers (or lp) to list connected players with their ID, then pass that ID to admin add.
Method 2: editing serveradmin.xml
Where is the file?
Since Alpha 21, serveradmin.xml is no longer next to serverconfig.xml: it lives in the game's saves folder, at the root of Saves/:
<UserDataFolder>/Saves/serveradmin.xml
On a Linux server, the default data folder is .local/share/7DaysToDie/, which usually gives:
.local/share/7DaysToDie/Saves/serveradmin.xml
- The
.localfolder is hidden: enable hidden files in the file manager if you cannot see it. - If the
UserDataFolderproperty is set inserverconfig.xml, that folder is used instead. - The file is created the first time the server starts. If it is missing, start the server once, then stop it.
Adding an admin
- Stop the server
- Open
Saves/serveradmin.xmlin the Files tab - In the
<users>section, add one line per admin:
<users>
<user platform="Steam" userid="76561198000000000" name="MyName" permission_level="0" />
</users>
- Save and start the server
| Attribute | Value |
|---|---|
platform | Steam for a Steam account, EOS for an Epic Online Services ID |
userid | The SteamID64 (17 digits starting with 7656…) or the EOS ID |
name | A free-form reminder, no effect on permissions |
permission_level | Permission level, 0 = full admin |
Your SteamID64 appears in your Steam profile URL if you have not set a custom URL (steamcommunity.com/profiles/7656…). Otherwise, paste your profile URL into a site such as steamid.io. Once connected to the server, the listplayerids (or lpi) command also shows the platform IDs of online players.
Older tutorials use a syntax like <admin steamID="…" permission_level="0" />. It no longer matches the current format: follow the structure found in the file generated by your server.
Understanding permission levels
Permissions range from 0 (all rights) to 1000 (regular player). The lower the number, the more rights the player has.
| Level | Typical use |
|---|---|
0 | Full admin |
1 to 999 | Moderators, to whom you grant specific commands |
1000 | Regular player (default level) |
Each command has a required level, which you can change in the <commands> section of serveradmin.xml or with the cp (command permission) command. Example to allow kick for players of level 2 or lower:
cp add kick 2
Useful console commands
Type these commands in the panel Console or in the in-game console (F1) once you are an admin. Type help for the full list on your version.
| Command | Effect |
|---|---|
help | List of available commands |
listplayers / lp | Connected players with their ID |
listplayerids / lpi | Platform IDs of connected players |
say "message" | Message to all players |
kick <player> "reason" | Kicks a player |
ban add <player> <duration> <unit> "reason" | Bans a player, for example ban add Name 7 days "Cheating" |
ban remove <id> | Lifts a ban |
ban list | List of bans |
admin add <player> <level> | Adds an admin |
admin remove <player> | Removes an admin |
whitelist add <player> | Adds a player to the whitelist |
gettime / gt | Shows the in-game day and time |
settime day / settime night | Switches to day or night |
saveworld / sa | Forces the world to be saved |
shutdown | Saves and cleanly stops the server |
mem | Shows the server's memory usage |
As soon as one player is added to the whitelist, only whitelisted players and admins can connect. Keep this in mind before adding the first entry.
In-game cheat commands
Once you are an admin, some in-game commands help with building and moderation: dm (debug mode), cm (creative menu), teleport / tele (teleport). These commands change the game balance: keep them for administration.
Giving panel access to a co-admin
In-game rights (serveradmin.xml) are independent from Game Panel access. To let a friend restart the server or edit files, add them as a panel sub-user with the required permissions.
See also
- Configure serverconfig.xml
- Backups and world reset: do not delete
serveradmin.xmlwhen resetting the world - Troubleshooting