Game Hosting home

Valheim console commands and cheats

All 161 console commands in Valheim 1.0.17, from the game’s own code: what each does, which needdevcommands, and which work on a dedicated server. Looking for item IDs? The item database has the spawn ID of every item.

How to open the console

  1. Turn the console on. Settings → Gameplay → console on, or add -console to the launch options (Steam: right-click Valheim → Properties → Launch options).
  2. Press F5 in game. It’s a normal key binding, so you can change it in the controls.
  3. Type devcommands for cheats. The first cheat on a character asks for confirmcheats, which marks that character as cheated for good.

On a dedicated server

Cheats like god, fly and spawn only run on the machine that is the server, so nobody can use them on a dedicated server. Players on the server’s admin list can send 19 commands to the server instead: time, world keys and modifiers, kick, ban and save. They’re marked Admin on a serverbelow.

On a Game Hosting server you edit the admin, ban and permitted lists in the panel, no files.

Cheats (need devcommands) 72

Type devcommands first. These run in single player and for the player hosting the world; on a dedicated server only the ones marked “Admin on a server” work, and only for admins.

CommandWhat it doesWhere it works
addstatus [name]e.g. addstatus RestedAdds a status effect (ex: Rested, Burning, SoftDeath, Wet, etc)Single player or host
adrenalineSets adrenaline levelSingle player or host
aggravateAggravated all nearby neutralsSingle player or host
altbiomsList of biomes with modifiersSingle player or host
biomeinfoInfo about current biome sectorSingle player or host
catch [fishname] [level]e.g. catch Fish1 3Simulates catching a fishSingle player or host
cinematic [name]Play cinematicSingle player or host
cinematicsleep [name]Play cinematic on next sleep for everyoneSingle player or host
clearstatusClear any status modifiersSingle player or host
confirmcheatsConfirms that you want to use cheats; the game asks for it before the first cheat on a character, and marks that character as cheated for good.Not listed by help.Admin on a server
debugmodeFly modeSingle player or host
devcommandsTurns cheats on or off. On a server, it’s also sent to the server, so an admin can use the server-side cheats.Not listed by help.Admin on a server
dpsdebugToggle dps debug printSingle player or host
env [env]e.g. env ClearOverride environmentSingle player or host
event [name]e.g. event army_eikthyrStart eventSingle player or host
exploremapExplore entire mapSingle player or host
find [text] [pingmax]e.g. find Vendor_BlackForestSearches loaded objects and location list matching name and pings them on the map. pingmax defaults to 1, if more will place pins on map insteadSingle player or host
findbiomeMarks center of all biomes on map of type or containing modifier with search stringSingle player or host
findbiometpFinds the closest biome matching your search and teleports you to itSingle player or host
findtp [text] [index=-1] [closerange=30]e.g. findtp Vendor_BlackForestSearches loaded objects and location list matching name and teleports you to the closest one outside of closerange. Specify an index to tp to any other in the found list, a minus value means index by closest.Single player or host
flyFly modeSingle player or host
forcedelete [radius] [*name]e.g. forcedelete 10Force remove all objects within given radius. If name is entered, only deletes items with matching names. Caution! Use at your own risk. Make backups! Radius default: 5, max: 150.Single player or host
ghostGhost mode: enemies ignore you.Single player or host
godInvincible modeSingle player or host
goto [x,z]e.g. goto 0,0TeleportSingle player or host
healHeal to full health & staminaSingle player or host
inventorysizeSets inventory sizeSingle player or host
itemset [name] [item level override] [keep]Spawn a premade named set, add 'keep' to not drop current items.Single player or host
killallKill nearby creaturesSingle player or host
killenemiesKill nearby enemiesSingle player or host
killenemycreaturesKill nearby enemiesSingle player or host
killtameKill nearby tame creatures.Single player or host
listkeysLists the world keys that are set.Admin on a server
location [SAVE*]Spawn location (CAUTION: saving permanently disabled, *unless you specify SAVE)Single player or host
nextseedForces the next dungeon to a seed (CAUTION: saving permanently disabled)Single player or host
nocostNo build costSingle player or host
nospawnToggles natural spawning of monstersSingle player or host
peventsSubcommands: [list/start/stop/here]Single player or host
players [nr]e.g. players 3Force diffuculty scale ( 0 = reset)Admin on a server
printcreaturesShows counts and levels of active creaturesSingle player or host
printlocationsShows counts of loaded locationsSingle player or host
printnetobj [radius = 5]Lists number of network objects by name surrounding the playerSingle player or host
pukeEmpties your stomach of foodSingle player or host
raiseskill [skill] [amount]e.g. raiseskill Swords 100Raises a skill by an amount.Single player or host
randomeventStart a random eventSingle player or host
recall [*name]Recalls players to you, optionally that match given nameSingle player or host
removekeyplayer [name]Removes a key from your own character.Single player or host
repairallRepairs all equipmentSingle player or host
resetcharacterReset character dataSingle player or host
resetenvDisables environment overrideSingle player or host
resetkeys [name]Clears every world key and your player keys.Admin on a server
resetmapReset map explorationSingle player or host
resetskill [skill]e.g. resetskill SwordsResets a skill to 0.Single player or host
resetwindGives the wind back to the weather.Single player or host
respawntimeSets respawntimeSingle player or host
setfuel [amount=10]e.g. setfuel 10Sets all light fuel to specified amountSingle player or host
setkeyplayer [name]Sets a key on your own character.Single player or host
setpower [name]e.g. setpower GP_EikthyrSets your current guardian power and resets cooldown (ex: GP_Eikthyr, GP_TheElder, etc)Single player or host
skiptime [gameseconds]e.g. skiptime 600Skips head in secondsAdmin on a server
sleepSkips to next morningAdmin on a server
snow [amount]Adds/removes amount of snowbuild on all nearby buildpiecesSingle player or host
spawn [amount] [level] [radius] [p/e/i]e.g. spawn Troll 1 3Spawn something. (End word with a star (*) to create each object containing that word.) Add a 'p' after to try to pick up the spawned items, adding 'e' will try to use/equip, 'i' will only spawn and pickup if you don't have one in your inventory.Single player or host
stopeventStop current eventSingle player or host
stopfirePuts out all spreading fires and smokeSingle player or host
stopsmokePuts out all spreading firesSingle player or host
tameTame all nearby tameable creaturesSingle player or host
timescale [target] [fadetime, default: 1, max: 3]e.g. timescale 0.5Sets timescaleSingle player or host
tode.g. tod 0.5-1 OR [0-1]Single player or host
tombstone [name]e.g. tombstone RagnarCreates a tombstone with given nameSingle player or host
unlockcinematicsToggles unlocking all cinematics in the main menuSingle player or host
vegetationSpawn vegetationSingle player or host
wind [angle] [intensity]e.g. wind 90 0.5Sets the wind’s direction and strength.Single player or host

Server and admin commands 17

World keys, world modifiers, kicks, bans and saves. On a dedicated server they run for players on the admin list.

CommandWhat it doesWhere it works
achievementsShows player achievement infoSingle player or host
ban [name/ip/userID]e.g. ban PlayerNameBan userAdmin on a server
bannedList banned usersAdmin on a server
genlocRegenerate all locations.Admin on a server
getstatGet specific statSingle player or host
kick [name/ip/userID]e.g. kick PlayerNameKick userAdmin on a server
noportalsDisables portals for server.Single player or host
removekey [name]e.g. removekey nomapRemoves a world key.Shown in help after devcommands.Admin on a server
resetworldkeys [name]Resets all world modifiers to defaultAdmin on a server
restartpartyRestart playfab party networkAdmin on a server
saveForce saving of world and resets world save intervalAdmin on a server
setkey [name]e.g. setkey playerdamage 125Sets a world key (a world modifier like playerdamage 125, or a boss key like defeated_eikthyr).Shown in help after devcommands.Admin on a server
setworldmodifier [name] [value]e.g. setworldmodifier combat hardSets a world modifier valueAdmin on a server
setworldpreset [name]e.g. setworldpreset hardcoreResets all world modifiers to a named presetAdmin on a server
statsShows player statsSingle player or host
unban [ip/userID]e.g. unban 76561198000000000Unban userAdmin on a server
updatecoverForce update cover refreshShown in help after devcommands.Single player or host

Everyday commands 47

Chat, binds, graphics, your map and your own character. Anyone can use them, no cheats needed.

CommandWhat it doesWhere it works
beardChange beardShown in help after devcommands.Anyone
bind [keycode] [command and parameters]Bind a key to a console command. note: may cause conflicts with game controlsAnyone
clearClear the console windowAnyone
clearpopupsStops all current unlock UI messagesAnyone
crUnloads unused assetsShown in help after devcommands.Anyone
dieKill yourselfAnyone
exclusivefullscreenChanges window mode to exclusive fullscreen, or back to borderlessAnyone
ffsmoothFreefly smoothnessAnyone
filtercraft [name]Filters crafting list to contain part of textAnyone
fovChanges camera field of viewAnyone
freeflyFreefly photo modeAnyone
gcShows garbage collector informationShown in help after devcommands.Anyone
hairChange hairShown in help after devcommands.Anyone
haslocationCheck if zone has locationShown in help after devcommands.Anyone
heightPrints height from worldgen at current positionAnyone
helpShows a list of console commands (optional: help 2 4 shows the second quarter)Anyone
hidebetatextHides the beta text in the corner.Not listed by help.Anyone
infoPrint system infoAnyone
inventorycleanThrows out any items in inventory on invalid positionsAnyone
lodbiasSet distance lod biasAnyone
maxfps [FPS]e.g. maxfps 120Sets fps limitAnyone
modelChange player modelShown in help after devcommands.Anyone
nomapDisables map for this character. If used as host, will disable for all joining players from now on.Anyone
optterrainOptimize old terrain modificationsAnyone
pingPing serverAnyone
posPrint current player positionShown in help after devcommands.Anyone
printbindsPrints current bindsAnyone
printseedsPrint seeds of loaded dungeonsAnyone
removebirdsRemove all birdsShown in help after devcommands.Anyone
removedropsRemove all item-drops in areaShown in help after devcommands.Anyone
removefishRemove all fishShown in help after devcommands.Anyone
resetbindsResets all custom binds to default dev commandsAnyone
resetbuilduiResets build ui save data that stores recent and favoritesNot listed by help.Anyone
resetknownitemsReset character known items & recipesAnyone
resetplayerprefsResets any saved settings and variables (not the save game)Not listed by help.Anyone
resetsharedmapRemoves any shared map data from cartography tableAnyone
resetspawnResets spawn locationAnyone
sShout messageAnyone
sayChat messageAnyone
sortcraft [type]Sorts crafting lists according to settingAnyone
test [key] [value]Set test string, with optional value. set empty existing key to removeNot listed by help.Anyone
timeShows current timeShown in help after devcommands.Anyone
tutorialresetReset tutorial dataAnyone
unbind [keycode]Clears all binds connected to keycodeAnyone
w [playername]e.g. w PlayerName helloWhispers a private message to a playerAnyone
xb:versionPrints mercurial hashset used for this buildAnyone
yesiuseddevcommandsbutiwantmyachievementsanyway [1 = true/ 0 = false]Normally cheated items / pieces don't trigger achievements. Turn this on to disable cheat checks.Shown in help after devcommands.Anyone

Emotes 25

Type them in chat or the console to play the animation.

CommandWhat it doesWhere it works
blowkissEmote: BlowKissAnyone
bowEmote: BowAnyone
challengeEmote: ChallengeAnyone
cheerEmote: CheerAnyone
comehereEmote: ComeHereAnyone
cowerEmote: CowerAnyone
cryEmote: CryAnyone
danceEmote: DanceAnyone
despairEmote: DespairAnyone
flexEmote: FlexAnyone
headbangEmote: HeadbangAnyone
kneelEmote: KneelAnyone
laughEmote: LaughAnyone
loveyouEmote: LoveYouAnyone
nononoEmote: NoNoNoAnyone
pointEmote: PointAnyone
relaxEmote: RelaxAnyone
restEmote: RestAnyone
roarEmote: RoarAnyone
shrugEmote: ShrugAnyone
sitEmote: SitAnyone
thumbsupEmote: ThumbsUpAnyone
toastEmote: ToastAnyone
vibeEmote: VibeAnyone
waveEmote: WaveAnyone

Spawn commands

spawn <ID> [amount] [level] drops things in front of you. For items the level is the quality, up to 4; for creatures it’s the star level, up to 9 (level 3 is a two-star). Add p to pick items up. A few to try:

Every item ID is in the item database, with a builder for the amount and quality.

World modifiers with setkey

The World Modifiers screen writes world keys. You can set the same ones from the console with setkey (or setworldmodifier combat hard). These exact values don’t count as cheats; other values do. Remove one with removekey, or reset them all with resetworldkeys.

Portals

Changes how portals work in the game.

SettingKeys to set
Portal Itemssetkey teleportallAllows you to bring all items with you through portals for a more casual playstyle. This will circumvent the progression and exploration of the world as it is intended.
NormalDefaultNo key (the default)
No boss portalssetkey nobossportalsYou will not be able to use portals or exit boss dungeons while a boss is active.
No portalssetkey noportalsYou will not be able to use portals to teleport yourself across the world.

Combat

Governs how much damage you give and take. Also governs how likely you are to encounter higher leveled enemies, and how dangerous they are.

SettingKeys to set
Very Easysetkey playerdamage 125setkey enemydamage 50setkey enemyspeedsize 90
EasyDefaultsetkey playerdamage 110setkey enemydamage 75setkey enemyspeedsize 95
NormalNo key (the default)
Hardsetkey playerdamage 85setkey enemydamage 150setkey enemyspeedsize 110setkey enemyleveluprate 120
Very Hardsetkey playerdamage 70setkey enemydamage 200setkey enemyspeedsize 120setkey enemyleveluprate 140

Death penalty

Governs what happens when you die.

SettingKeys to set
Casualsetkey deathkeepequipsetkey skillreductionrate 15You do not drop equipped gear, and skills are reduced a lot less than on normal mode.
Very EasyDefaultsetkey skillreductionrate 15You drop all items, and skills are reduced a lot less than on normal mode.
Easysetkey skillreductionrate 50You drop all items, and skills are reduced less than on normal mode.
NormalNo key (the default)You drop all items, and skills are reduced normally.
Hardsetkey deathdeleteunequippedsetkey skillreductionrate 150Equipped items are dropped, the rest of your inventory is lost permanently, and skills are reduced faster.
Hardcoresetkey deathdeleteitemssetkey deathskillsresetYou lose all carried items and skills permanently.

Raids

Governs how often enemies may raid your base.

SettingKeys to set
Nonesetkey eventrate 0
Much Lesssetkey eventrate 200
LessDefaultsetkey eventrate 150
NormalNo key (the default)
Moresetkey eventrate 60
Much Moresetkey eventrate 30

Resources

Governs the amount of resources you gain from the world and from enemies.

SettingKeys to set
x 0.5setkey resourcerate 50
x 0.75Defaultsetkey resourcerate 75
NormalNo key (the default)
x 1.5setkey resourcerate 150
x 2setkey resourcerate 200
x 3setkey resourcerate 300

Difficulty presets

The slider at the top of World Modifiers sets several keys at once. setworldpreset takes these names: Normal, Casual, Easy, Hard, Hardcore, Immersive, Hammer.

PresetKeys it sets
Hammernobuildcostpassivemobseventrate 0
Casualpassivemobseventrate 0resourcerate 200playerdamage 200enemydamage 50deathkeepequipdeathnoskillslost
Easyplayerdamage 150enemydamage 75eventrate 200
NormalNone (normal)
Hardplayerdamage 75enemydamage 150eventrate 50fire
Hardcoreplayerdamage 50enemydamage 200eventrate 40deathskillsresetdeathdeleteitemsfirenomapnoportals

On or off

ModifierKey
Player based raidsRaids are based on the progress of each individual player, rather than on which bosses have been killed on the server. This setting is recommended if you want the game to be slightly friendlier to players with different progress.setkey playerevents
No Build CostBuild pieces require no materials to build. You still need to discover recipes as per usual.setkey nobuildcost
Passive enemiesEnemies won't attack until you provoke them.setkey passivemobs
No MapYou will not have access to the map or the minimap. This makes the game harder than intended.setkey nomap
Fire HazardsWood can catch fire and spread throughout the whole world, not just in the Ashlands.setkey fire
Portal ItemsAllows you to bring all items with you through portals for a more casual playstyle. This will circumvent the progression and exploration of the world as it is intended.setkey teleportall
No portalsYou will not be able to use portals to teleport yourself across the world.setkey noportals

Running a server? Our server settings generator writes the same modifiers as launch arguments.

Boss keys

Each boss sets a world key when it falls. Raids and what traders sell follow them, so setting one with setkey defeated_eikthyr (a cheat) moves a world ahead, and removekey takes it back. listkeys shows the ones a world has.

KeySet when you kill
BossHildir1Brenna (Hildir’s first quest)
BossHildir2Geirrhafa (Hildir’s second quest)
BossHildir3Zil & Thungr (Hildir’s third quest)
KilledBatA Bat
KilledTrollA Troll
defeated_bonemassBonemass
defeated_dragonModer
defeated_eikthyrEikthyr
defeated_faderFader
defeated_frozenkingKall Fimbulbringer (first phase)
defeated_frozenking_p3Kall Fimbulbringer
defeated_gdkingThe Elder
defeated_goblinkingYagluth
defeated_hiveThe Hive
defeated_queenThe Queen
defeated_serpentA Serpent
defeated_writhanA Writhan
elakingmole_defeatedThe Eyeless One
jotun_killedA Krigen or Hexen
killed_fryslingA Frysling
killed_surtlingA Surtling

Every boss, what summons it and what to bring is on the bosses page.

All 52 world keys

The names the game accepts for setkey (some take a value, like resourcerate 200):

  • PlayerDamage
  • EnemyDamage
  • WorldLevel
  • EventRate
  • ResourceRate
  • StaminaRate
  • AdrenalineRate
  • EitrRate
  • DurabilityRate
  • FoodRate
  • MoveStaminaRate
  • StaminaRegenRate
  • SkillGainRate
  • SkillReductionRate
  • EnemySpeedSize
  • EnemyLevelUpRate
  • CarryWeightRate
  • PlayerEvents
  • Fire
  • DeathKeepEquip
  • DeathDeleteItems
  • DeathDeleteUnequipped
  • DeathSkillsReset
  • DeathKeepInventory
  • NoBuildCost
  • NoCraftCost
  • AllPiecesUnlocked
  • NoWorkbench
  • AllRecipesUnlocked
  • WorldLevelLockedTools
  • PassiveMobs
  • NoMap
  • NoPortals
  • NoBossPortals
  • DungeonBuild
  • TeleportAll
  • NoPseudoDrops
  • NoBuildingFall
  • NoHeavySnow
  • AllHeavySnow
  • Preset
  • defeated_eikthyr
  • defeated_dragon
  • defeated_goblinking
  • defeated_gdking
  • defeated_bonemass
  • activeBosses
  • StoneCircle
  • KilledTroll
  • killed_surtling
  • KilledBat
  • AshlandsOcean

7 cheats are sent to the server for admins: confirmcheats, devcommands, listkeys, players, resetkeys, skiptime, sleep. The other server commands: ban, banned, genloc, kick, removekey, resetworldkeys, restartparty, save, setkey, setworldmodifier, setworldpreset, unban.

Quick answers

How do I open the console in Valheim?

Turn it on first: in Settings, Gameplay, switch on the console, or add -console to the game’s launch options (Steam: right-click Valheim, Properties, Launch options). Then press F5 in game; you can change the key in the controls settings.

How do I turn on cheats in Valheim?

Open the console and type devcommands. The first cheat you use on a character asks you to type confirmcheats: that marks the character as one that used cheats, for good. Cheats only run in single player or for the player hosting the world from the game.

Do Valheim cheats work on a dedicated server?

Only some, and only for admins. In 1.0.17 the game checks that you are the server before it runs a cheat, so god, fly, spawn and the rest don’t work for anyone on a dedicated server. 19 commands are sent to the server instead and run there for players on its admin list: time (sleep, skiptime), world keys and modifiers, kick, ban and save. Type devcommands first for the cheat ones.

How do I spawn items in Valheim?

With devcommands on, type spawn and the item’s ID: spawn SwordIron 1 4 gives a quality 4 Iron Sword, spawn Wood 50 p gives 50 Wood straight into your inventory. Our item database has the ID of every item and builds the command for you.

How do I change world modifiers on an existing world?

With setkey and the values the World Modifiers screen uses (setkey playerdamage 85, setkey nomap), or setworldmodifier and setworldpreset. The keys the screen can set don’t count as cheats; other values do. On a dedicated server an admin can send them, or set them as launch arguments.

Which version of Valheim is this for?

Valheim 1.0.17. The commands, their descriptions and where they run come from the game’s own code.

Valheim 1.0.17: commands and their flags from the game’s own console code. Game Hosting is not affiliated with Iron Gate or Coffee Stain.