Valheim has a built-in console for two different jobs: moderating a server (kick, ban, unban) and cheat commands for testing and building. This guide lists the commands that matter, shows how to make yourself admin on a dedicated server and explains what changed with Valheim 1.0.
How to open the console
Press F5 in game. If nothing happens, the console is switched off: in Steam, right-click Valheim, open Properties and add -console to the launch options. Type help to see every command your version supports.
Admin commands on a dedicated server
Iron Gate's server guide lists four moderation commands for admins:
| Command | What it does |
|---|---|
kick [name] | Removes a player from the server. They can join again. |
ban [name] | Removes the player and adds them to bannedlist.txt. |
unban [name] | Lifts a ban. |
banned | Lists everyone who is banned. |
Instead of a name you can also use the player's platform ID from the F2 panel. That is more reliable when two players have similar names.
Make yourself admin with adminlist.txt
- Join the server and press F2. Copy your ID exactly as shown, for example
Steam_76561198012345678. The platform prefix is part of the ID and is case sensitive. - Open the file manager in the game panel and go to the
savesfolder. Openadminlist.txt, or create it if it is missing. - Put one ID on each line, save the file and restart the server.
The same folder holds bannedlist.txt and permittedlist.txt. Be careful with the last one: as soon as it contains an ID, everyone who is not on the list is refused.
Cheat commands (devcommands)
Type devcommands to unlock the cheat set. It is made for single-player worlds and worlds you host from the game yourself. On a vanilla dedicated server, adminlist.txt only gives you the moderation commands above. If you want cheats as an admin on a dedicated server, you need a server-side mod such as Server devcommands (BepInEx).
New in Valheim 1.0: most cheat commands permanently lock achievements for the character and the world they are used in. If achievements matter to your group, try cheats on a copy of your world first.
| Command | Effect |
|---|---|
god | You take no damage. |
ghost | Creatures ignore you. |
debugmode | Creative mode: fly with Z, build without a workbench with B. |
nocost | Build and craft without materials. |
spawn [item] [amount] [level] | Spawns an item or creature by its internal name, for example spawn Wood 50. |
tame | Tames the creatures around you. |
killall | Kills the creatures around you. |
goto [x] [z] | Teleports you to a coordinate. Use pos to see where you are. |
exploremap / resetmap | Reveals or hides the whole map. |
raiseskill [skill] [amount] | Raises a skill, for example raiseskill swords 10. |
tod [0-1] | Sets the time of day (0.5 is noon, -1 restores the normal cycle). |
env [name] / resetenv | Forces a weather type or clears it again. |
heal | Restores your health. |
puke | Empties your food slots so you can eat something else. |
Frequently asked questions
Why does devcommands not work on my server?
On a vanilla dedicated server the cheat set is not available, not even to admins. Kick, ban, unban and banned do work once your ID is in adminlist.txt. For cheats on a dedicated server you need a server-side mod such as Server devcommands.
Where do I find my ID for adminlist.txt?
Press F2 while you are connected to the server and copy the ID including the platform prefix, for example Steam_76561198012345678. The server log shows the same ID when you join.
Do I have to restart after editing adminlist.txt?
Yes, restart the server after changing adminlist.txt, bannedlist.txt or permittedlist.txt so the new lists are loaded.
Do cheat commands turn off achievements?
Since Valheim 1.0 most cheat commands lock achievements for that character and world for good. Test them on a copy of your world if your group wants to keep achievements.
Running your own world? With Valheim hosting from HostValues you get full file access through the panel and SFTP, so adminlist.txt and your world backups stay in your own hands.