Valheim Commands: The Console, Cheats and What Works on a Dedicated Server
The Valheim console has two kinds of commands: admin ones, which work on any server if you're an admin, and the devcommands cheats, which don't turn on on a normal dedicated server even if you are one. Almost every “it doesn't work for me” comes from mixing the two up.
Open the console
Add -console to the game
In Steam, right-click Valheim → Properties → General → Launch Options, and type -console. Without it, F5 opens nothing.
Press F5 in the game
A text box opens at the top. On laptops it's sometimes Fn + F5. It closes with F5 or Esc.
Type help
It lists the commands you can use right there. It's the quickest way to find out what works in your version of the game.
Rather not set it up yourself? Valheim servers from €8 a month, no contract and a full refund within 72 hours. Or create a free Valheim server, no card needed.
Admin commands (they work on the server)
On a dedicated server, only those in adminlist.txt (with their player ID, one per line) can use them; how to add yourself is in the Valheim server admin guide, and the SteamID64 finder gets you your SteamID64. After adding yourself, restart the server.
kick name: kicks a player (their SteamID64 or IP also works). ban name and unban name: bans them or removes them from the ban list, which is stored in bannedlist.txt. banned: shows who is banned. save: saves the world right then, useful before shutting down or trying something risky.
The server already saves by itself every so often (every 30 minutes by default; on NapNodes, “Save the world every (seconds)” in “Settings”), so save is for when you don't want to wait.
The cheats: devcommands
devcommands turns cheats on (type it again to turn them off). They work in a game of your own, without a dedicated server: a solo world or the one you open from the game itself for your friends. Since 1.0 there are achievements, and almost all cheats (spawn, for example) permanently flag the character and the world, which stop earning achievements; the game asks you to confirm first. Some, like freefly, don't flag. The details, in achievements and cheats in 1.0.
The most used: god (you take no damage), ghost (enemies don't see you), fly or debugmode and then Z (fly), pos (your coordinates), goto x,z (go to that point), tod 0.5 (midday; tod -1 sets it back to normal), skiptime seconds (skips time forward), heal (heals you), spawn item amount level (creates items or creatures by their internal name, for example spawn Wood 50), exploremap and resetmap (reveal or cover the map again), tame (tames nearby animals), killall (kills nearby enemies), removedrops (deletes items lying on the ground) and raiseskill skill amount (raises a skill).
Why devcommands doesn't work on your dedicated server
A Valheim dedicated server without mods doesn't let anyone use cheats, admins included: you type devcommands and the cheats don't turn on. It's not a hosting fault or a problem with your adminlist.txt; the game does it on purpose so nobody cheats in a shared game.
If you really want them on the server (to build in creative mode or recover something that was lost), the usual way is a mod made for it, like “Server devcommands”, which gives them back only to those in adminlist.txt. At least the admin has to have it on their PC and, for some features, the server too. Before installing it, check on Thunderstore that it's been updated for your version of Valheim: with 1.0 many mods were left behind. We checked it alongside other admin mods in Valheim mods for playing with friends.
With mods the player has to have, console players (Xbox, PlayStation 5, Switch 2) can't join: consoles have no mods. If you play with crossplay, better skip the cheats.
Install it on the server from the panel
On NapNodes, in your server's “Mods”: search for it and install it; the panel adds BepInEx the first time and it loads on restart.
Install it on your PC with the same profile
The “Installed” tab has the r2modman profile code: “Import / Update” → “Import new profile” → “From code”. That way you have the same mods as the server.
Join and type devcommands
With your ID in adminlist.txt and the server restarted, open the console with F5 and turn them on. If something stops starting, remove the last mod from “Installed”.
What about the difficulty and world modifiers?
The modifiers (combat, death penalty, resources, raids, portals, no map...) are set on a dedicated server with launch options: -preset, -modifier and -setkey. An admin can also change them from the console without cheats: setworldpreset, setworldmodifier and resetworldkeys. On NapNodes they're in “Settings” → “World difficulty and modifiers” and apply on restart. All of it, in the Valheim world modifiers guide.
“Settings” also has the server name and the world name, the password, whether it shows on the public list, crossplay, how often it saves and how many of the game's backups are kept.
Frequently asked questions
How do you open the console in Valheim?
Add -console to Valheim's launch options in Steam and press F5 in the game.
Why doesn't devcommands work on my server?
Because a Valheim dedicated server without mods doesn't let anyone use cheats, not even admins. They work in a game of your own or on a server with a mod like “Server devcommands”.
What commands can an admin use on a Valheim server?
kick, ban, unban, banned and save, plus the world modifier ones (setworldpreset, setworldmodifier, resetworldkeys), from the console (F5), if their ID is in adminlist.txt and the server has been restarted after adding it.
How do I fly in Valheim?
With cheats on (devcommands), type fly in the console, or debugmode and press Z. On a dedicated server it only works with a mod that allows them.
Do cheats disable achievements?
Since 1.0, yes: almost all cheats permanently flag the character and the world, which stop earning achievements. The game asks you to confirm first, and since patch 1.0.12 there's a command to become eligible for them again.
Shall we set it up for you?
Valheim servers from €8 a month, never oversold: your RAM is yours alone. And if you'd rather start without paying, there's a free Valheim server, no card needed.
Not sure whether your server is online? Check it in a second with the Valheim server status checker: players, version and password, free.
Free tool: SteamID64 finder. Paste a Steam link, a username or a STEAM_0 ID and get every form of the ID and the adminlist.txt line for Valheim.
Free tool: Valheim world modifiers. Pick the difficulty, combat, portals or no build cost and copy the -preset, -modifier and -setkey for your Valheim dedicated server.
Keep reading
- Running a Valheim Server: Admins, Kicks and Bans
How to make yourself admin on a Valheim dedicated server: adminlist.txt, your SteamID64, the F5 console, kick, ban and a list of allowed players.
- Valheim Server Seed: How to See It, Choose It and Change It
How to find your Valheim world's seed, how to use a specific one on a dedicated server (it has no option for it) and what happens if you want to change it.
- How Much RAM Does a Valheim Server Need (With and Without Mods)
How much RAM to give a Valheim server for 10 players: 4 GB for a group of friends, 6 GB with mods or huge bases. And how to tell you're running short.