RE:NODE

Valheim global keys: listkeys, setkey and boss keys

By RE:NODE Team
11 min read


A global key is a named flag stored in the world file. When someone kills Eikthyr, the world gains defeated_eikthyr; when someone kills The Elder, defeated_gdking; and so on down the bosses. Those keys decide which raids can happen, and they belong to the world rather than to any player - which is why one kill on a shared server moves the whole group forward, including the friend who joins next month in leather armour. Since the world modifiers arrived in patch 0.217, the difficulty settings are stored as global keys too. listkeys shows them, setkey and removekey add and remove one, and resetkeys removes all of them, settings included.

This guide lists the keys that matter, what each one turns on, and how to change them on a dedicated server where the console commands that do it are not available by default.

What a global key is#

Valheim tracks world progress as a flat list of strings. There is no quest log, no stored boss state, and no per-player progression in the world file - just keys that are either present or not, some of them with a value. Game systems check the list when they need to know where the world is:

  • The raid system reads boss and creature keys to decide which events are eligible, and which have retired.
  • Biome spawners check some keys, so a few spawns change once a boss is down.
  • Traders check keys for part of their stock.
  • World modifiers are keys themselves: NoMap, PlayerEvents, EventRate with a percentage, PassiveMobs and the rest.

Keys are set by events in the world. The boss key is written the moment the boss dies, whoever killed it, wherever the group was. Nothing about the key records who was there, so it cannot be "partly" set for the players who missed the fight. That model is what the boss progression on shared servers guide is about; this one is about the keys and the commands.

Characters carry something separate: the forsaken powers you collected, the recipes you know, the map you explored. Those live in each player's own character file. A late joiner on a world with defeated_bonemass gets Bonemass-era raids at their base but not the Bonemass power - they still have to visit the boss stone with a trophy.

The boss and creature keys#

KeySet whenWhat it changes for the world
defeated_eikthyrEikthyr diesRetires the boar and neck raid, enables the greydwarf raid
defeated_gdkingThe Elder diesRetires greydwarf and troll raids, enables the draugr raid
defeated_bonemassBonemass diesRetires the swamp-era raids, enables the drake raid
defeated_dragonModer diesRetires drakes, enables the Fuling raid
defeated_goblinkingYagluth diesRetires Fulings, enables the Gjall and Seeker raids
defeated_queenThe Queen diesRetires the Mistlands raids, enables the Charred raids
defeated_faderFader diesRetires the Charred raids
KilledTrollAny troll diesWith The Elder alive, enables the troll raid
killed_surtlingAny surtling diesMakes the surtling raid possible
KilledBatAny bat diesMakes the bat raid possible

The internal names are leftovers from development - The Elder is gdking, Moder is dragon, Yagluth is goblinking - and they are the names the commands want. Note the inconsistent casing between KilledTroll and killed_surtling; type keys exactly as listkeys prints them. The creature raids also check boss keys, so a creature key alone does not guarantee the raid - the exact pairing has changed between versions.

Two details that cause confusion on servers:

  • Creature keys do not care who killed the creature. A troll that dies to a falling tree, or a surtling killed by water drifting out of the Swamp, still sets the key. Groups who never fought a troll get the troll raid and wonder why.
  • The keys after Ashlands depend on your version. Later updates add bosses and creature keys of their own. Run listkeys on your world after a big patch rather than trusting any list, this one included.

The full mapping from keys to raids, including the non-boss events, how the server picks a target and what stopevent does, is in Valheim raids and events on servers.

The modifier keys you will see in listkeys#

Run listkeys on any world created or launched with modifiers since patch 0.217 and the boss keys are not alone. The world rules appear beside them, because that is where the game stores them. Knowing what they are stops an admin deleting one by mistake while tidying up.

KeyKindWhat it means
NoMapSwitchThe map is disabled for everyone
PlayerEventsSwitchRaids follow each player's own progress
PassiveMobsSwitchCreatures stay passive until attacked
NoBuildCostSwitchBuilding costs nothing
NoPortals, NoBossPortalsSwitchPortal restrictions from the portals modifier
TeleportAllSwitchOres and metals may pass through portals
EventRatePercentageRaid frequency, 100 is the normal rate
ResourceRatePercentageDrop amounts from the resources modifier
EnemyDamage, PlayerDamagePercentageCombat difficulty
SkillReductionRatePercentageSkill loss on death
PresetValueThe preset the world was set to, if any

Switches work by being present: the world has no map because NoMap exists, and removing the key restores the map. Percentage keys carry a number, where 100 is the default, so EventRate 50 is half as many raids and EventRate 200 twice as many. The difficulty sliders in the world settings menu write these numbers for you, which is why using the modifier commands is safer than typing a value with setkey.

Key names in listkeys output may appear in a different case from the launch arguments - -setkey nomap on the command line, NoMap in the list. The game treats them as the same switch. The values each modifier accepts on the command line, and what they do in play, are in the world modifiers guide linked below.

The commands: listkeys, setkey, removekey, resetkeys#

CommandEffect
listkeysPrints every global key currently set, with values
setkey [name]Adds a key
setkey [name] [value]Adds a key with a value, for the numeric modifier keys
removekey [name]Removes one key
resetkeysRemoves every key - progress and world modifiers alike

All four are part of the cheat set, so they need devcommands first. That works in single player and for the host of a world hosted from the game. On a vanilla dedicated server it does not work, even for accounts in adminlist.txt - see Valheim devcommands explained for why, and for the other cheat commands.

code
> listkeys> setkey defeated_eikthyr> removekey KilledTroll

There are also admin commands, available to adminlist.txt accounts without devcommands, that only touch the modifier side: setworldpreset [name], setworldmodifier [name] [value] and resetworldkeys, which resets the modifiers to defaults and leaves the boss keys alone. For world rules those are the right tools, and the values they accept are the ones in Valheim world modifiers and presets. Changing difficulty through setkey with raw numbers works, but it is easy to set a value the preset menu never would.

Changing keys on a dedicated server#

Because vanilla dedicated servers refuse devcommands, there are three ways to change keys on one.

Server Devcommands

The mod gives the cheat set to your admins on the dedicated server, so listkeys, setkey and removekey work live. It is the convenient route for a group that already runs BepInEx. Setup and permissions are in the Server Devcommands guide.

Edit a copy of the world

No mod needed, at the cost of a little downtime. This is the method to use when you need it once.

  1. Stop the server cleanly and wait for the save. Take a backup.
  2. Download Name.db and Name.fwl from the server's worlds_local folder.
  3. On your PC, put them in %USERPROFILE%\AppData\LocalLow\IronGate\Valheim\worlds_local\.
  4. Start Valheim, pick any character, load the world, open the console with F5 and run devcommands.
  5. Run listkeys, make your changes, run listkeys again to confirm.
  6. Quit to the menu so the world saves, then upload both files back over the server's copy.
  7. Start the server and check the log for the world loading under its usual name.

The server must stay stopped from step 1 to step 6, or its next save overwrites the edited world with the old one. Uploading a local world to a server covers the file side, including the Steam Cloud trap if the world shows up in the wrong list.

The -setkey launch argument

The dedicated server accepts -setkey at launch, repeatable, and it is documented for the world switches: nobuildcost, playerevents, passivemobs and nomap.

bash
./valheim_server.x86_64 -nographics -batchmode -name "Longship Crew" \    -world "Midgard" -password "herring-barrel-42" -setkey playerevents

Use it for those switches. It is not a supported way to grant boss progress, and a key added at every launch is added at every launch - removing it later means removing the argument and the key. For boss keys, use one of the two routes above.

When changing keys is the right call#

Keys are progress, so editing them is a decision for the group rather than for whichever admin is awake. These are the cases where it is clearly right.

A test or an accident set a key. Someone spawned a boss to look at it and killed it, or a stray troll died to a tree two biomes early. removekey on the key it set returns the world's raid table to where it was. Do it soon - the longer it stays, the more raids have rolled from it.

A world was moved or regenerated. You started fresh on a new seed with the same group and want the progress you already earned. setkey the bosses you had beaten. The characters already have their powers and gear, so only the world needs catching up.

Raids stopped making sense. The group is in the Plains and still getting greydwarf raids because The Elder was never killed - they skipped it on a lucky swamp key from a friend. Setting the key matches the raid table to where the group really is.

A long-running server takes newcomers. Rather than removing keys so new players get gentle raids, turn on the playerevents switch. Raids are then picked from each targeted player's own progress, and the world keys stay as they are. Valheim world modifiers and presets explains the switch.

The case where it is wrong: setting keys so the group can skip a boss. Nothing is unlocked for players by a key - no power, no recipes, no materials - so the group ends up with harder raids and none of the tools that were meant to come with them.

Backing up before you touch keys#

A key edit is a one-line change with world-wide effect, and resetkeys has no undo. Take a backup before every key session, whatever route you use. The world pair is small, and restoring it is the only way to get back a modifier setup or a key list you did not write down. Valheim backups and world corruption covers where the files are and how the built-in backups work.

It also helps to keep the output. Paste listkeys into your Discord before and after each change; it is the only record of the world's progress that does not depend on someone's memory.

On RE:NODE, stopping the server from the panel saves the world first, the file manager and SFTP give you the .db and .fwl for the copy-edit route, and backup slots on every Valheim plan mean you can lock a backup before the change and restore it with one button if the result is not what the group wanted.

Troubleshooting key changes#

`setkey` says nothing and `listkeys` does not show the key. devcommands was off, or you are on a vanilla dedicated server where it cannot be turned on.

The key is there but raids did not change. A raid already running finishes on its own terms, and the raid system rolls on a timer - give it a few in-game days. Also check playerevents: with it on, the targeted player's own progress decides, not the world key.

The edited world came back unchanged. The server saved over it. It was running, or it was started before the upload finished. Stop it, upload again, then start.

Difficulty settings vanished. Someone ran resetkeys. Restore the backup, or reapply the modifiers with setworldpreset and setworldmodifier.

A late joiner has no boss power. Expected. Powers belong to characters. They need a trophy at the boss stone, and the trophy can come from the group's trophy wall or another fight.

FAQ#

What does listkeys show in Valheim?

Every global key in the current world: boss keys such as defeated_eikthyr, creature keys such as KilledTroll, and the world modifier keys. It needs devcommands, so on a vanilla dedicated server you run it on a local copy of the world.

Does setkey give me the boss power?

No. Keys are world flags. The forsaken power belongs to a character and is gained at the boss stone with the trophy. Setting a key only changes raids and other world checks.

Is resetkeys the same as resetworldkeys?

No. resetkeys removes every key, boss progress and world modifiers together. resetworldkeys is an admin command that resets only the modifiers and keeps progress.

Do global keys apply to every player on a server?

Yes. They are stored in the world, so every player in it is affected, including players who were offline for the fight. With playerevents on, raids use each player's own progress instead.

Can a key be set without anyone killing the boss?

Yes - setkey does exactly that, and so does a spawned boss that dies. Neither gives the power, the trophy or the materials the fight was meant to provide.