Gaming How-To

Valheim: How to Enable Console Commands and Cheat Menu

Switch on the F5 console, activate devcommands safely, and understand exactly which saves lose achievements.

Switch on the F5 console, activate devcommands safely, and understand exactly which saves lose achievements.

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

Close Valheim completely. Launch options are only read when the game starts, so editing them while the game is running does nothing.
Open your Steam library, right-click Valheim, and pick Properties. The window opens on the General tab.
Find the Launch Options field near the bottom and type -console into it. There is no save button — just close the Properties window when the text is in the box.
Steam Properties window for Valheim with -console typed into the Launch Options field
The Launch Options field on Valheim’s General properties tab, with the -console parameter entered.
Start Valheim from Steam and load into your character and world as normal. The console is now available but not yet visible.
Valheim running in-game after relaunching with the console launch option applied
Valheim relaunched with the console parameter active, loaded into a world. Image: Iron Gate

Method 2: Use the in-game Enable Console setting

Press Esc while in game to bring up the pause menu, then choose Settings.
Open the Gameplay tab and tick the Enable Console box.
Click OK to apply. F5 works immediately afterwards, with no restart needed.

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.

Press F5 in game. An input line appears in the top-left corner of the screen. On some laptop keyboards you may need Fn + F5.
Type 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.
Type 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.
Valheim developer console showing devcommands, debugmode and fly entries with cheat warnings
The developer console after enabling devcommands, showing debugmode and fly alongside the cheat warnings. Image: Iron Gate
Run a cheat command to confirm the gate is open. 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.

Valheim chat console printing the command help list above the text input field
The console printing its command list while text is typed into the input field. Image: Iron Gate

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.

Valheim character hovering above the terrain with flight mode active
Flight mode in action after entering the fly command. Image: Iron Gate

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 — devcommands replaced it.
  • You skipped devcommands entirely. 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. spawn takes 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.

PlatformHow to enable it
PC Game PassCreate 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 NowEnable 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

CommandWhat it does
godToggles invulnerability.
ghostMakes you invisible to enemies.
flyToggles flight.
debugmodeEnables creative mode, adding flight and building without a workbench.
nocostRemoves 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 / resetmapReveals or re-hides the whole map.
healRestores health and stamina in full.
tameInstantly tames every tameable creature nearby.
killenemiesKills 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.