Valheim admin and console commands
Grant admin on a Valheim dedicated server with the crossplay Platform User ID format, use the official kick, ban, unban and banned commands from the F5 console, and avoid locking your group out with permittedlist.txt.
Valheim keeps server permissions in three plain-text files rather than a command. Each holds one Platform User ID per line, with no comments and no extra formatting. Changes are read at startup, so every edit needs a restart.
Find a player's Platform User ID
Since crossplay, an ID is the platform and the user ID joined by an underscore:
Steam_76561198000000000There are two reliable places to read it:
- In game. Press F2 while connected to open the player panel and copy the ID shown next to the name.
- In the server console. Valheim logs the ID whenever a player connects.
Copy the value exactly, including capitalisation and the platform prefix. A bare steamID64 with no prefix is the pre-crossplay format. It will not match a player connecting from PS5, Switch 2 or Xbox, and is the usual reason an admin entry silently does nothing.
Make yourself admin on berrybyte
Get your Platform User ID
Join the server, press F2, and copy your own ID from the player panel.
Stop the server
The permission files are only read at startup, so edits made while it runs are ignored.
Open adminlist.txt
In Files, open adminlist.txt in the save directory. Create it if it is not there yet.
Add one ID per line
Steam_76561198000000000
Steam_76561198000000001No commas, no quotes, no comments.
Start the server and confirm
Rejoin, press F5, and run a harmless command such as banned. A response means admin is
active.
The three permission files
| File | What it does | Effect when empty |
|---|---|---|
adminlist.txt | Grants moderation commands to the listed players | Nobody has admin |
bannedlist.txt | Blocks the listed players | Nobody is banned |
permittedlist.txt | Allowlist. Only the listed players may join | Everybody may join |
permittedlist.txt inverts the moment it is not empty. Add one person and every other player,
including you, is refused. If your group was kicked off after an admin edit, this file is why.
Add everyone who should have access before you restart, or empty the file and restart to go back
to open access.
Command reference
Open the console with F5 while connected. On Steam, -console has to be in
the game's launch options for F5 to respond.
| Command | What it does |
|---|---|
kick <name> | Disconnects a player. They can rejoin |
ban <name> | Disconnects a player and adds them to bannedlist.txt |
unban <name> | Removes a player from bannedlist.txt |
banned | Lists everyone currently banned |
These take the player name, while the permission files take the Platform User ID. That asymmetry is intentional. Names are what you see in the moment; IDs are what survive a rename.
Admin commands are not cheats
Two different things get called "Valheim commands":
- Dedicated-server admin commands: the four above. Moderation only.
devcommands: the cheat set, with things likespawn,fly,godanddebugmode. These are built for single-player and locally hosted worlds, not for a dedicated server, and being inadminlist.txtdoes not unlock them.
If your group wants relaxed rules on a dedicated server, that is a world-modifier or mod question rather than an admin one. World presets and modifiers are set with launch flags (see setting up a server), and anything beyond that means a modded server.
When admin does not work
F5 does nothing
On Steam, open Valheim's Properties → Launch Options and add -console, then restart the
game. This is separate from admin rights.
The console opens but commands are refused
Your ID is not matching. Check for a missing platform prefix, a changed capitalisation, or a trailing space. Then confirm the server was restarted after the edit.
The file keeps reverting
You are probably editing while the server runs. Valheim rewrites these files on shutdown. Stop the server first, then edit.
A banned player is still connecting
Bans are stored by ID. If they were banned by name before crossplay, re-add them using the full Platform User ID.
Next steps
Server settings, launch flags and where the save directory lives.
Upload or migrate a worldMove permission files across with the world so bans survive.
Join on PS5, Switch 2 and XboxHelp players get the ID you need from the F2 panel.
Back up your serverSnapshot the world and permission files before an edit.
Frequently asked questions
How do I become admin on a Valheim server?
Add your Platform User ID to adminlist.txt, one ID per line, then restart the server. The ID is case-sensitive and must be copied exactly. You can read it from Valheim's F2 player panel while connected, or from the server console when you join.
What is the Valheim admin ID format with crossplay?
It is Platform followed by an underscore and your user ID, such as Steam_76561198000000000. The bare steamID64 format is from before crossplay and will not match a player who connects from another platform. Copy the whole value the game shows you and do not change its capitalisation.
Why did everyone get kicked off my Valheim server?
Almost certainly permittedlist.txt. The moment that file contains a single ID it becomes a strict allowlist, and every player not named in it is refused. Either add every player who should have access, or empty the file and restart to go back to open access.
Can Valheim server admins use cheats?
No. Admin on a dedicated server grants moderation only - kick, ban, unban and banned. The cheat commands people mean by devcommands, such as spawn, fly and god, are for single-player and locally hosted worlds and are not available to dedicated-server admins.