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.
Want your own Valheim server? At HostValues from €5.60 per month, online within minutes. View plans →
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 complete current ID exactly as shown. Do not paste an example ID. Keep its platform prefix and letter case; Iron Gate documents both newer
V_...and olderSteam_...formats. - Find the actual save directory selected by the server’s
-savedirstartup argument, if set. Otherwise the documented Linux default is~/.config/unity3d/IronGate/Valheim; on Windows it is%USERPROFILE%/AppData/LocalLow/IronGate/Valheim. Openadminlist.txtin that directory. A managed panel may use a different configured path. - 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. For the Server devcommands mod, its author requires installation on the admin client; server installation is optional for the basic setup and required for its full feature set. Being listed as an admin alone does not enable vanilla dedicated-server cheats.
Achievements in Valheim 1.0: most cheats mark the current character and world as cheated. Iron Gate later added an explicit opt-in command in Steam hotfix 1.0.12 for players who want achievements despite previous devcommand or mod use. So the lock is not necessarily permanent. Read Iron Gate's current notes and test 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?
Vanilla dedicated-server admin rights cover moderation, not the full cheat set. The Server devcommands author's instructions require the mod on the admin client, with optional server installation for additional features. Match compatible versions and read the current mod documentation.
Where do I find my ID for adminlist.txt?
Press F2 while connected and copy your real complete current ID, including its prefix and letter case. The server log can also provide it. An example ID is not your own ID.
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?
Most cheats flag the character and world and normally block achievements. Steam hotfix 1.0.12 added an explicit opt-in for achievements after devcommand or mod use. This is not automatic; consult the official hotfix notes before choosing it.
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.
Sources
- Iron Gate: dedicated servers
- Iron Gate: Hotfix 1.0.10 and 1.0.12
- JereKuusela: Server devcommands installation
Get your own Valheim server
From €5.60 per month. Online within minutes, cancel monthly, DDoS protection included.
Which plan fits your group?
- 1 to 3 players: Meadows (4 GB), €5.60 per month
- 3 to 6 players: Swamp (6 GB), €8.40 per month
- 6 to 10 players: Plains (8 GB), €11.20 per month
New to HostValues? Use code WELKOM10 for 10% off your first order.