Valheim ships with a developer console that stays hidden until you deliberately turn it on. It handles two very different jobs — harmless admin and diagnostic work, and full-blown cheating like flight, god mode, and spawning items out of thin air. The switch that separates those two sets of commands is a single word typed into the console, and flipping it has a permanent cost for the save you use it on.
Quick answer: Add -console to Valheim’s Steam launch options (or tick Enable Console under Settings → Gameplay), press F5 in game, type devcommands and press Enter, then type confirmcheats to authorize cheat commands.
Two ways to switch the console on
The launch-option method has worked since the game’s early access days and is the one to use if the in-game toggle is missing from your build. Newer patches also expose a checkbox in the options menu, which is faster and survives restarts without touching Steam.
Method 1: Add the -console launch option in Steam
-console into it. There is no save button — just close the Properties window when the text is in the box.

Method 2: Use the in-game Enable Console setting
Join readers who trust AllThings.How
Add us as a preferred source on Google so our practical guides show up first next time you search.
Add to Google Preferences →Turn on devcommands and confirm cheats
Opening the console is only half the job. Cheat-tier commands sit behind a second gate, and until you unlock it, typing something like god or spawn produces no result at all.
devcommands and press Enter. The console prints a confirmation that dev commands are now true, alongside the warning that “using any dev commands is not recommended and is done at your own risk.” Typing it again toggles cheats back off.confirmcheats and press Enter to accept the achievement warning. Since the 1.0 release, Valheim asks for this acknowledgement so nobody locks a save by accident.
fly is the easiest test — your Viking lifts off the ground straight away, and typing it again drops you back down.How to check the console is working
Type help and press Enter. The console responds with a paged list of available commands, which is proof that the input line is live and reading your text. You can narrow it down with page numbers, so help 2 4 prints only the second quarter of the list.

For a non-cheat sanity check, pos prints your current coordinates and ping measures latency to the server. Neither needs devcommands, and neither affects your save. If flight is active, you will also see your character hovering with no stamina drain and no fall damage on descent.

Why F5 or devcommands does nothing
There are only a handful of reasons the console refuses to cooperate, and all of them are easy to rule out.
- The launch option was added while the game was still running. Quit fully and start Valheim again.
- You typed
imacheater. That command was retired back in patch 0.148.6 and the game no longer recognizes it —devcommandsreplaced it. - You skipped
devcommandsentirely. Cheat-tier commands accept the input and silently do nothing without it. - You are on a vanilla dedicated server. Iron Gate blocks devcommands server-side, even for listed admins, so this is not a permissions problem you can fix from the admin list.
- An item or creature ID is wrong.
spawntakes internal IDs, which are case-sensitive and do not always match the display name.
Achievements: what enabling cheats permanently disables
The console spells this out before it lets you through. “Using cheats will permanently disable the ability to unlock achievements for this character and this world.” That flag is not cleared by restarting the game, reloading, or turning devcommands back off.
It also spreads further than most people expect. The lock applies to the entire world, not just the character who typed the command, and items created with spawn carry the flag with them. A player who never touched the console can pick up a spawned sword on your server and lose achievement eligibility for as long as they hold it.
Note: freefly is the exception. It detaches the camera for screenshots rather than changing gameplay, and it does not trigger the achievement lock.
A few commands carry separate risks worth knowing about. Running location without specifying SAVE, or using nextseed, can disable saving for that session, and forcedelete permanently removes world objects inside a radius. Back up your world file before touching any of them.
Console access outside Steam
Every platform ends at the same place — F5 opens the console — but how you get the -console flag in differs.
| Platform | How to enable it |
|---|---|
| PC Game Pass | Create a desktop shortcut to Valheim.exe (usually in C:XboxGamesValheimContent), open its Properties, and add “-console” to the end of the Target field. Launch from that shortcut. |
| Xbox Game Pass (console) | Hold LB + RB + Menu while in game, then press A to bring up the on-screen keyboard. |
| macOS (App Store) | Create a valheim.sh text file containing #!bin/bash /Applications/Valheim.app/Contents/MacOS/Valheim -console and run it to start the game. |
| GeForce Now | Enable Steam family sharing, open Valheim through GeForce Now, enter your PIN to reach the Steam client, then apply the Steam launch option. This resets every session. |
Commands worth knowing once devcommands is active
| Command | What it does |
|---|---|
god | Toggles invulnerability. |
ghost | Makes you invisible to enemies. |
fly | Toggles flight. |
debugmode | Enables creative mode, adding flight and building without a workbench. |
nocost | Removes resource costs from building and crafting. |
spawn <name> [amount] [level] | Spawns an item or creature by its internal ID. |
goto <x> <z> | Teleports you to coordinates. |
exploremap / resetmap | Reveals or re-hides the whole map. |
heal | Restores health and stamina in full. |
tame | Instantly tames every tameable creature nearby. |
killenemies | Kills hostile creatures nearby; killall also kills tamed animals. |
raiseskill <skill> <amount> | Raises a skill by a number of levels, or lowers it with a negative value. |
Player-level commands sit outside all of this. Things like clear, fov, info, printseeds, die, and the emote commands run from the chat window without devcommands and carry no penalty.
Admin commands on a dedicated server
Server moderation works natively and does not involve cheats at all. kick, ban, unban, banned, and save need -console and F5, but not devcommands, and they leave achievement eligibility untouched.
Access depends on being listed in adminlist.txt, one SteamID64 or crossplay ID per line. On Windows that file lives in %USERPROFILE%AppDataLocalLowIronGateValheim, and on Linux in ~/.config/unity3d/IronGate/Valheim/. You can find your own ID by pressing F2 in game.
If you want actual cheat commands running on a dedicated server, the base game will not do it — that requires a third-party mod, commonly the Dedicated Server Devcommands plugin.
The safest approach, if you care about achievements at all, is to keep a separate throwaway world for cheating and leave your main save clean. The console itself is harmless to enable — it is devcommands, and the confirmation prompt that follows it, that marks the point of no return.





