Gamehost

Valheim admin commands

How to become an admin on a Valheim server, which console commands work (kick, ban, save, devcommands) and how to manage the admin, ban and whitelist files in the panel.

Gamehost team·4 min read·Updated:
Valheim serverPlans from 4 GB RAM

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

Short answer

  1. Add your ID to the adminlist.txt file on the server.
  2. Restart the server or rejoin.
  3. In the game, open the console with F5 and type a command, for example save.

If the console does not open, add the launch option -console in the game's properties on Steam.

How to become an admin

Valheim recognises admins by their account ID, not by character name. The lists are in the .config/unity3d/IronGate/Valheim folder:

FileWhat it is for
adminlist.txtadmins: the kick, ban, save and devcommands commands
bannedlist.txtbanned players
permittedlist.txtwhitelist: when it is not empty, only the people on it can join
  • Steam players: SteamID64, 17 digits, for example 76561198000000000. You find it by pasting your profile link into steamid.io.
  • Xbox and Microsoft Store players with crossplay: an ID with a platform prefix, which is easiest to read from the server console when they join.
  • One ID per line, with no comments on the same line.

Commands for managing the server

CommandWhat it does
kick [name/IP/ID]kicks a player from the server
ban [name/IP/ID]bans a player and adds them to bannedlist.txt
unban [IP/ID]lifts a ban
bannedshows the list of banned players
savesaves the world right away, for example before a restart
infoinformation about the server and version
pinglatency to the server

A name is handy in commands, but when names repeat it is better to use the ID. Names with spaces go in quotation marks.

Developer commands (devcommands)

The devcommands command turns on developer command mode. On a dedicated server it only works for people in adminlist.txt. Some commands change only your game, others the whole world:

CommandWhat it does
godinvulnerability
debugmodedebug mode: Z flying, B building without materials, K kills monsters nearby
spawn [name] [amount] [level]spawns an item or creature, for example spawn Wood 50
pos / goto [x] [z]shows your position / teleports
tod [0-1] / tod -1sets the time of day (0.5 is noon) / restores the normal flow
skiptime [seconds]moves world time forward
env [name] / resetenvforces weather, for example env Clear / restores normal weather
removedropsremoves items lying on the ground nearby
listkeys / setkey / removekeyshows and changes world progress keys, for example defeated bosses
Developer commands are powerful and have no undo button. removekey or an accidental spawn of hundreds of creatures can ruin a world. Before experimenting, take a backup in the Server backups tab.

Managing without joining the game

Not everything needs the in-game console. In the Gamehost panel:

  • you edit the admin list, bans and whitelist in Files, in the .config/unity3d/IronGate/Valheim folder,
  • you change the name, password, difficulty and world modifiers in the Valheim category, in the Server settings tab,
  • you set a restart at a fixed time in Schedules; Valheim saves the world on every clean shutdown.

Details on difficulty and modifiers: Valheim world difficulty and modifiers. Schedules are described in the knowledge base: Schedules.

Admin lists, bans and world settings are all in the panel of our Valheim server hosting.

FAQ

With the F5 key. If it does not open, add -console to the game's launch options on Steam.

Your ID is not in adminlist.txt, or the server was not restarted after you changed the list. Also check that the line has no spaces or comments.

Yes, but only for admins listed in adminlist.txt. Other players cannot turn it on.

With the save command in the console. A clean shutdown of the server from the panel also saves the world.

Paste the link to your Steam profile into steamid.io. SteamID64 is a 17-digit number.

Your own Valheim server

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

See plans