Skip to content
Valheim Wiki Home

Version-verified guide

Valheim Console Commands — Full List and How to Enable Cheats

How to open the Valheim console, enable cheats with devcommands, and the full command reference: spawn, god, fly, debugmode, time and weather, skills, and server admin commands.

Verified Valheim 1.0

By Valheim Field Guide Editorial Team

Before you start

Three things to know:

  1. Cheats are opt-in. Since build 0.148.6, cheat commands are disabled by default; you enable them per session with devcommands.
  2. Single-player only. Cheats do not work in multiplayer sessions. Server admins have a separate command set (below).
  3. Back up your world. The world lives in .db and .fwl files. spawn, raiseskill and debugmode all change a save permanently.

Using cheat commands (anything behind devcommands) marks your character and world and disables the 1.0 achievements — confirmed in Iron Gate’s 1.0 notes and the 1.0.12 hotfix, which also adds the yes i used devcommands but i want my achievements anyway opt-in (no spaces) to restore eligibility. Camera-only commands such as freefly are not treated as cheats. See the achievements list for the full details.

Movement and invulnerability

Command Effect
god Toggle invulnerability
ghost Toggle ghost mode — enemies ignore you
fly Toggle flight for your character
freefly Detached camera that flies independently of your character
nocost Toggle free building — pieces cost no materials

Health, skills and creatures

Command Effect
heal Restore your health to full
puke Empty your food slots (removes current food buffs)
raiseskill [skill] [amount] Add levels to a skill
resetskill [skill] Remove levels from a skill
tame Tame nearby tamable creatures
killall Kill all nearby creatures

Spawning items

spawn [item] [amount] [level]

Item names are the internal IDs and are case-sensitive, so spawn Wood 50 works and spawn wood 50 generally does not. The level argument sets quality. Useful for testing a build, screenshotting a base with nocost, or recovering after a lost cargo run.

debugmode — four cheats in one

debugmode enables a bundle of developer tools with hotkeys:

Key Effect while debugmode is on
Z Fly
K Kill all nearby enemies
L Loot drops from nearby enemies
B Free building — no material cost, no build-radius limit

Run debugmode again to turn it off. B is the one base builders use: it removes both the material cost and the workbench radius restriction.

Time, weather and map

Command Effect
tod [0-1] Set the time of day; tod -1 restores normal time flow
skiptime [seconds] Advances in-game time by the specified number of seconds
env [weather] Force a weather/environment state (clear, rain, storm, fog and similar)
wind [direction] [intensity] Set wind direction and strength
exploremap Reveal the entire map
pos Print your current coordinates
goto [x] [z] Teleport to coordinates

Coordinates come from pos or from the map. Use goto with care in the Mountains and Mistlands — arriving at a coordinate puts you at that point without checking what is around it.

Events and raids

Command Effect
event [name] Trigger a named raid event
stopevent End the currently running event

Pair these with the raids world modifier if you want raids permanently changed rather than triggered once — see World Modifiers.

Server admin commands

These work on dedicated servers and are separate from cheats:

Command Effect
kick [name/ip/userid] Remove a player from the server
ban [name/ip/userid] Ban a player
unban [name/ip/userid] Lift a ban
banned List currently banned players

For server setup, ports and hosting options: dedicated server guide.

Legitimate alternatives to cheating

Console commands are fine for testing and for recovering a lost cargo run, but they remove the progression loop that makes Valheim work. If the goal is a friendlier game rather than free items, World Modifiers get you there properly: raise resources, lower raids, soften combat and deathpenalty — no console, and the world still plays like Valheim.

Frequently asked questions

Do console commands disable achievements in Valheim?
Yes, for cheat commands. Iron Gate's 1.0 notes confirm that using devcommands (or mods) marks your character and world and disables achievements; the 1.0.12 hotfix adds the opt-in command 'yes i used devcommands but i want my achievements anyway' (no spaces) to restore eligibility. Camera-only commands such as freefly do not count as cheats. See the achievements page for the full details.
Can I use cheats on a multiplayer server?
No. Cheat commands are not available in multiplayer sessions — devcommands and the commands behind it only work in single-player worlds. Server admins get their own separate set: kick, ban, unban and banned.
The console opens but commands do nothing. Why?
Almost always because devcommands has not been run in this session, or the -console launch option is missing. Check both, then re-open the console with F5.
How do I undo a command?
Most have a reverse form: god and ghost toggle off by running the same command again, tod -1 restores normal time, stopevent ends an active raid, resetskill removes skill levels, and nocost toggles free building off. Spawned items cannot be un-spawned — delete them or start a fresh world.

All Advanced guides →