How to Use Global Keys in Valheim
Global keys gate Valheim's progression — boss-defeat flags, event unlocks, and server rules. Here's how to list, set, remove, and reset them.
Valheim tracks world progression through global keys — invisible flags that get set when a major thing happens (Eikthyr dies, a troll is killed, the noportals server rule is toggled). Those keys gate the next tier of content. Spawning Bonemass works fine on a fresh world, but bats won't start raiding your base until defeated_bonemass is set.
Three commands let you read, set, and remove keys directly: listkeys, setkey, removekey. This guide covers each one and the gameplay flags each key controls.
Cheats need to be on. See how to enable cheats in Valheim.
See which keys are set
listkeys prints every global key currently active in the world. On a fresh world it'll be empty (or just nomap/noportals if you set those at world creation). Run it after each boss kill to confirm progression registered.
Set a key
setkey adds the named key to the world state. The key takes effect immediately and persists in the save file.
Mark Eikthyr as defeated without fighting him:
Mark every boss defeated (unlocks all biome events):
Remove a key
removekey clears a single key. Useful for re-fighting a boss as a challenge, or for rolling back a key you set by mistake.
Re-lock Bonemass progression so you can re-fight him:
Wipe every key
resetkeys clears the entire key list. Effectively resets the world's progression flags to day-one state — bosses become re-fightable, events stop spawning, server rules like noportalsflip off. Use with intent.
Every global key in vanilla Valheim
Boss-defeat keys
Set when a boss dies. Each one unlocks the next tier of events and some progression gates:
defeated_eikthyr— unlocks Black Forest raids (forest is moving, troll attacks). See full reference.defeated_gdking— The Elder. Unlocks Swamp-tier events.defeated_bonemass— unlocks Mountain raids (You are being hunted) and most mid-game events (blobs, bats, skeletons).defeated_dragon— Moder. Unlocks goblin army raids in Plains.defeated_goblinking— Yagluth. Unlocks Mistlands raids (Gjall, Seeker armies).defeated_queen— Seeker Queen. Unlocks Ashlands progression.
First-kill keys
Set the first time you kill one of these enemies. Mostly used to unlock specific events that depend on you having seen the creature:
KilledTroll— required for the "Forest trolls" event to fire.killed_surtling— required for the surtling raid.KilledBat— required for the bats event.
Note the mixed-case: KilledTroll uses Pascal, killed_surtling uses snake_case. Internal inconsistency; the IDs are the IDs.
Server rule keys
nomap— disables the map for all players. See nomap key.noportals— disables portals for all players.
These two are the only keys most server admins ever touch directly. Set them once at world creation, leave them.
Complete list with descriptions on the all global keys reference.
Common workflows
Skip to mid-game on a new world
Want to start at the Swamp tier without fighting Eikthyr and The Elder?
Next morning, your world will start firing Swamp-tier random events.
Re-fight a boss
removekey defeated_bonemass- Spawn or re-summon the boss (see the spawn bosses guide).
- Re-kill it. The key sets again automatically, and any progression gated on it (e.g. trader inventory) re-enables.
Force a specific raid to be possible
Random raid events are gated on having certain keys. If you want You are being hunted (wolves) but your wolves event requires defeated_bonemass first:
Then trigger it with the event command.
Common gotchas
- Key IDs are case-sensitive and inconsistent.
defeated_eikthyruses lowercase;KilledTrolluses PascalCase. Check the key reference before typing. - Keys are world-wide, not per-player. Setting
defeated_bonemasson a multiplayer server changes progression for everyone on that world. - Spawning a boss does not set its key. Killing a spawned boss does (it's the death event that triggers the key, not the existence of the boss). Useful for testing progression-locked content.
- resetkeys can break server rules. Running it clears
nomapandnoportalstoo. If your server is configured to enforce them, players will suddenly have map and portal access until you re-runsetkey nomap/setkey noportals.