Valheim Console Commands: Difference between revisions

From Survival Servers
Jump to navigation Jump to search
[wiki:ss-claude-11372] Fixes: wrong or outdated steps, labels and facts corrected, current pictures, dead links fixed, search title and description
[wiki:wiki-operator] Fixes from the review of the rewording: claims, example addresses, names and wording (approved by Ryan, Nov 19)
 
(2 intermediate revisions by the same user not shown)
Line 5: Line 5:
__TOC__
__TOC__


Valheim has two separate command systems and mixing them up is the usual reason a command "does nothing":
Valheim has two separate command systems, and mixing them up is the usual reason a command "does nothing":


* '''Admin commands''' (kick, ban, save, world modifiers) are the only commands a dedicated server honours. You need to be on the server's admin list to run them.
* '''Admin commands''' (kick, ban, save, world modifiers) are the only commands a dedicated server honors. You need to be on the server's admin list to run them.
* '''Cheat commands''' (spawn, god, fly, exploremap and the rest) are unlocked with <code>devcommands</code> and work in single player and in a world you host from your own game. A vanilla dedicated server refuses them, admin or not. The workaround is a mod, covered below.
* '''Cheat commands''' (spawn, god, fly, exploremap and the rest) are unlocked with <code>devcommands</code> and work in single player and in a world you host from your own game. A vanilla dedicated server refuses them, admin or not. The workaround is a mod (see [[#Cheats on a dedicated server|Cheats on a dedicated server]]).


== Valheim 1.0: cheats lock achievements ==
== Valheim 1.0: cheats lock achievements ==
Line 14: Line 14:
Valheim 1.0 adds achievements, and Iron Gate's 1.0 FAQ spells out the cost of cheating. Using most console commands, <code>spawn</code> included, puts a permanent flag on the character '''and''' the world that says they can never earn achievements ([[#Can I remove the cheat flag from my character or world?|hotfix 1.0.12 added a way around it]]). Characters that used cheats before 1.0 are flagged too. Spawned items are marked, and a clean character who picks one up enters a temporary cheat state until every cheated item is out of their inventory. The "Hammer" world modifier (no build cost) counts as a temporary cheat as well.
Valheim 1.0 adds achievements, and Iron Gate's 1.0 FAQ spells out the cost of cheating. Using most console commands, <code>spawn</code> included, puts a permanent flag on the character '''and''' the world that says they can never earn achievements ([[#Can I remove the cheat flag from my character or world?|hotfix 1.0.12 added a way around it]]). Characters that used cheats before 1.0 are flagged too. Spawned items are marked, and a clean character who picks one up enters a temporary cheat state until every cheated item is out of their inventory. The "Hammer" world modifier (no build cost) counts as a temporary cheat as well.


A few commands are exceptions, <code>freefly</code> among them, and the game asks for confirmation before it puts you into a cheated state so it cannot happen by accident. Admin commands such as <code>kick</code>, <code>ban</code> and <code>save</code> are not cheats and never flag anything.
A few commands are exceptions, <code>freefly</code> among them, and the game asks for confirmation before it puts you into a cheated state so it can't happen by accident. Admin commands such as <code>kick</code>, <code>ban</code> and <code>save</code> aren't cheats and never flag anything.


So on a shared server: run admin commands freely, and treat <code>devcommands</code> as a decision for the whole group.
So on a shared server: run admin commands freely, and treat <code>devcommands</code> as a decision for the whole group.
Line 40: Line 40:
=== The settings toggle ===
=== The settings toggle ===


Since the Call to Arms update (patch 0.221.4, 9 September 2025) the developer console has its own switch in the settings menu. Open '''Settings''', go to the gameplay tab and turn on '''Enable Console'''. Nothing else is needed and it survives restarts.
Since the Call to Arms update (patch 0.221.4, Sep 9, 2025) the developer console has its own switch in the settings menu. Open '''Settings''', go to the gameplay tab and turn on '''Enable Console'''. Nothing else is needed, and it stays on after restarts.


The same patch turned the console '''off by default on Xbox'''. Xbox players enable it through that gameplay setting; older guides that say Xbox needs no setup are out of date.
The same patch turned the console '''off by default on Xbox'''. Xbox players turn it on with that gameplay setting. Older guides that say Xbox needs no setup are out of date.


=== The -console launch option ===
=== The -console launch option ===


<code>-console</code> still works and overrides the setting, which makes it the reliable choice on an older build.
<code>-console</code> still works and overrides the setting, which makes it the reliable choice on an older version.


* '''Steam''': right click Valheim in your library, '''Properties''', '''General''', and put <code>-console</code> in the Launch Options box. Start the game from Steam.
* '''Steam''': right-click Valheim in your library, '''Properties''', '''General''', and put <code>-console</code> in the Launch Options box. Start the game from Steam.
* '''PC Game Pass / Microsoft Store''': there is no launch options box. Make a shortcut to <code>Valheim.exe</code>, open its properties and add <code>-console</code> to the end of the Target field. Launch from that shortcut.
* '''PC Game Pass / Microsoft Store''': there's no launch options box. Make a shortcut to <code>Valheim.exe</code>, open its properties and add <code>-console</code> to the end of the Target field. Launch from that shortcut.
* '''Mac (App Store)''': start the binary with the argument: <code>/Applications/Valheim.app/Contents/MacOS/Valheim -console</code>
* '''Mac (App Store)''': start the game with this launch option: <code>/Applications/Valheim.app/Contents/MacOS/Valheim -console</code>


=== Opening the console ===
=== Opening the console ===
Line 56: Line 56:
Press '''F5'''. If nothing happens: you launched the game a different way than the one you enabled the console through (Steam launch options only apply when Steam starts the game). Or your keyboard has function lock on and F5 is sending a media key.
Press '''F5'''. If nothing happens: you launched the game a different way than the one you enabled the console through (Steam launch options only apply when Steam starts the game). Or your keyboard has function lock on and F5 is sending a media key.


Type <code>help</code> for the list of commands available on your build.
Type <code>help</code> for the list of commands available on your version.


== Player commands ==
== Player commands ==
Line 69: Line 69:
| <code>info</code> || Prints system information
| <code>info</code> || Prints system information
|-
|-
| <code>ping</code> || Shows your latency to the server
| <code>ping</code> || Shows your ping to the server
|-
|-
| <code>clear</code> || Clears the console window
| <code>clear</code> || Clears the console window
Line 112: Line 112:
== Admin commands ==
== Admin commands ==


This is the vanilla admin set. It is short on purpose: admin rights on a Valheim server are about moderation, not cheating. Everything here works on a dedicated server, from the in game console (F5) once you are on the admin list.
This is the vanilla admin set. It's short on purpose: admin rights on a Valheim server are about moderation, not cheating. Everything here works on a dedicated server, from the in-game console (F5) once you're on the admin list.


{| class="wikitable"
{| class="wikitable"
Line 134: Line 134:
|}
|}


Run <code>save</code> before anything risky: a mod change, a restart, a big demolition. The worst case is then a few seconds of lost progress instead of everything since the last autosave. The modifier commands are the live version of the <code>-preset</code>, <code>-modifier</code> and <code>-setkey</code> launch parameters listed in [[Valheim Server Settings]]; they are how you change raid frequency or resource rates on an existing world without a restart.
Run <code>save</code> before anything risky: a mod change, a restart, a big demolition. The worst case is then a few seconds of lost progress instead of everything since the last autosave. The modifier commands are the live version of the <code>-preset</code>, <code>-modifier</code> and <code>-setkey</code> launch options listed in [[Valheim Server Settings]]. They're how you change raid frequency or resource rates on an existing world without a restart.


== How to become an admin ==
== How to become an admin ==


Admins are granted by a text file, not by a command. The server reads three files from its save directory, one platform user ID per line:
You make someone admin with a text file, not a command. The server reads three files from its save folder, one platform user ID per line:


{| class="wikitable"
{| class="wikitable"
Line 145: Line 145:
| <code>adminlist.txt</code> || Grants admin rights
| <code>adminlist.txt</code> || Grants admin rights
|-
|-
| <code>bannedlist.txt</code> || Those players cannot join
| <code>bannedlist.txt</code> || Those players can't join
|-
|-
| <code>permittedlist.txt</code> || Whitelist. '''If it has any entries, only those players can join'''
| <code>permittedlist.txt</code> || Whitelist. '''If it has any entries, only those players can join'''
|}
|}


Iron Gate's dedicated server guide asks for the ID in the format <code>[Platform]_[User ID]</code>, case sensitive, for example <code>Steam_76561197960287930</code>. Press '''F2''' in game and copy the ID exactly as it appears next to the player's name, or read it from the server log. A bare 17 digit SteamID64 is the older format and still the one most guides show; if admin rights refuse to apply, the F2 format is the first thing to try. Players on Xbox, PlayStation or Switch 2 have their own platform's ID rather than a Steam one, which is why the F2 panel is the safe source.
Iron Gate's dedicated server guide asks for the ID in the format <code>[Platform]_[User ID]</code>, case sensitive, for example <code>Steam_76561197960287930</code>. Press '''F2''' in the game and copy the ID exactly as it appears next to the player's name, or read it from the server log. A bare 17-digit Steam ID is the older format and still the one most guides show. If admin rights don't apply, try the F2 format first. Players on Xbox, PlayStation or Switch 2 have their own platform's ID rather than a Steam one, which is why the F2 panel is the safe place to copy it from.


'''On a Survival Servers server''' the file is written for you. Open your server's page in the Command Center, put each Steam ID in the '''Admin UID''' field (the plus icon adds more) and press '''Save Settings & Restart'''. The panel writes the IDs into <code>adminlist.txt</code> in the server root exactly as typed, and you can also edit the file directly in the File Manager or over FTP.
'''On a Survival Servers server''' the file is written for you. Open the Game Server page in the Command Center, put each Steam ID in the '''Admin UID''' field (the plus icon adds more) and press '''Save Settings & Restart'''. The Command Center writes the IDs into <code>adminlist.txt</code> in the server's main folder exactly as typed, and you can also edit the file directly in the File Manager or over FTP.


[[File:valheim-panel-admin-uid-2026-10.png|thumb|none|707px|alt=Valheim settings form in the Command Center with the Admin UID field outlined in gold and an example Steam ID in it.|Admin UID takes a 17-digit Steam ID. The plus adds another admin.]]
[[File:valheim-panel-admin-uid-2026-10.png|thumb|none|707px|alt=Valheim settings form in the Command Center with the Admin UID field outlined in gold and an example Steam ID in it.|Admin UID takes a 17-digit Steam ID. The plus adds another admin.]]
Line 158: Line 158:
== Cheat commands (devcommands) ==
== Cheat commands (devcommands) ==


Type <code>devcommands</code> and press Enter to switch cheats on; type it again to switch them off. Everything in this section needs it, everything in this section flags achievements from 1.0 onwards, and none of it works on a vanilla dedicated server (see [[#Cheats on a dedicated server|Cheats on a dedicated server]]). The rows marked '''not a cheat''' are the exception: they run without <code>devcommands</code> and never flag anything.
Type <code>devcommands</code> and press Enter to turn cheats on. Type it again to turn them off. Everything in this section needs it and flags achievements from 1.0 onwards. None of it works on a vanilla dedicated server (see [[#Cheats on a dedicated server|Cheats on a dedicated server]]). The rows marked '''not a cheat''' are the exception: they run without <code>devcommands</code> and never flag anything.


=== Character ===
=== Character ===
Line 165: Line 165:
! Command !! What it does
! Command !! What it does
|-
|-
| <code>god</code> || God mode. Damage cannot drop you below 1 health
| <code>god</code> || God mode. Damage can't drop you below 1 health
|-
|-
| <code>ghost</code> || Enemies ignore you
| <code>ghost</code> || Enemies ignore you
Line 195: Line 195:
| <code>fly</code> || Toggles flight
| <code>fly</code> || Toggles flight
|-
|-
| <code>freefly</code> || Free camera. Not a cheat, so it does not flag achievements
| <code>freefly</code> || Free camera. Not a cheat, so it doesn't flag achievements
|-
|-
| <code>ffsmooth [0-1]</code> || Smooths free camera movement. Not a cheat
| <code>ffsmooth [0-1]</code> || Smooths free camera movement. Not a cheat
Line 251: Line 251:
! Command !! What it does
! Command !! What it does
|-
|-
| <code>spawn [name] [amount] [level]</code> || Spawns an item or creature. See the syntax section below
| <code>spawn [name] [amount] [level]</code> || Spawns an item or creature. See [[#Spawn command syntax and common IDs|Spawn command syntax and common IDs]]
|-
|-
| <code>itemset [name] [keep]</code> || Spawns a full gear set, for example <code>itemset Mistlands</code> or <code>itemset AshlandsMage</code>
| <code>itemset [name] [keep]</code> || Spawns a full gear set, for example <code>itemset Mistlands</code> or <code>itemset AshlandsMage</code>
Line 288: Line 288:
<pre>spawn [PrefabName] [amount] [level]</pre>
<pre>spawn [PrefabName] [amount] [level]</pre>


Names are the internal prefab names (the console fixes capitals), and the level for creatures is 1 (no star), 2 (one star) or 3 (two stars). <code>spawn Wood 50</code> drops fifty wood at your feet; <code>spawn Troll 1 3</code> spawns one two star troll, so be ready.
Names are the game's internal prefab names (the console fixes capitals). The level for creatures is 1 (no star), 2 (one star) or 3 (two stars). <code>spawn Wood 50</code> drops fifty wood at your feet, and <code>spawn Troll 1 3</code> spawns one two-star troll, so be ready.


{| class="wikitable"
{| class="wikitable"
Line 306: Line 306:
|}
|}


The game's own <code>help</code> output and the tab completion in the console are the full list for your build; every 1.0 and Deep North prefab appears there.
The game's own <code>help</code> output and the tab completion in the console are the full list for your version. Every 1.0 and Deep North prefab appears there.


== Cheats on a dedicated server ==
== Cheats on a dedicated server ==


The supported answer is a server side mod: '''Server devcommands''' (a BepInEx plugin) lets listed admins use the cheat set on a dedicated server, with a permission list of its own.
The supported answer is a server mod: '''Server devcommands''' (a BepInEx plugin) lets listed admins use the cheat set on a dedicated server, with a permission list of its own.


On a Survival Servers server BepInEx is already available as a mod option in the Command Center, and plugins are uploaded to <code>BepInEx/plugins</code> over FTP or the File Manager. Keep the 1.0 rule in mind before you do: anything spawned that way is flagged for whoever picks it up.
On a Survival Servers server BepInEx comes with the ValheimOne and BepInEx mod options in the Command Center, and plugins are uploaded to <code>BepInEx/plugins</code> over FTP or the File Manager. Remember the 1.0 rule before you do: anything spawned that way is flagged for whoever picks it up.


== Running admin commands from a browser ==
== Running admin commands from a browser ==


[https://github.com/HumanGenome/ValheimOne ValheimOne] is a free, open source, server side mod that adds a web admin console to a Valheim dedicated server. The browser console works with vanilla players on PC or console. Optional Synced gameplay modules have separate client requirements.
[https://github.com/HumanGenome/ValheimOne ValheimOne] is a free, open source server mod that adds a web admin console to a Valheim dedicated server. Players on PC or console need nothing installed for the browser console. Optional Synced gameplay modules need the mod on each player's PC.


[[File:valheimone-console-20260909-r3.png|none|800px|alt=ValheimOne browser console with the command list for server, player, moderation and world commands and a command box at the bottom.|ValheimOne web admin console]]
[[File:valheimone-console-20260909-r3.png|none|800px|alt=ValheimOne browser console with the command list for server, player, moderation and world commands and a command box at the bottom.|ValheimOne web admin console]]


The console tab shows the live server log and a command box with history and autocomplete. Commands run through the game's own console on the server. You can kick or ban a player, save the world, or schedule a graceful shutdown that warns players before the server goes down, all from a browser and without being logged into the game. Only commands on the console's whitelist can run.
The console tab shows the live server log and a command box with history and autocomplete. Commands run through the game's own console on the server. You can kick or ban a player, save the world, or schedule a clean shutdown that warns players before the server goes down, all from a browser and without being logged into the game. Only commands on the console's whitelist can run.


For self-hosted installations, enable both <code>Enabled = true</code> and <code>ConsoleEnabled = true</code> in the existing <code>[LiveMap]</code> section of <code>BepInEx/config/valheimone.cfg</code>, and configure a long, unique <code>AccessToken</code>. The map and console are disabled by default. Follow [[Valheim Live Map#Self hosted dedicated server|the live-map setup instructions]] for the port, authenticated URL and HTTPS access.
On a self-hosted server, set both <code>Enabled = true</code> and <code>ConsoleEnabled = true</code> in the existing <code>[LiveMap]</code> section of <code>BepInEx/config/valheimone.cfg</code>, and set a long, unique <code>AccessToken</code>. The map and console are off by default. For the port, the access URL and HTTPS access, follow [[Valheim Live Map#Self-hosted dedicated server|the live map setup steps]].


'''Note:''' The console only exists in the Admin view. The Shared and Public links to the mod's live map never expose it, so you can hand the map to your players without handing out admin.
'''Note:''' The console only exists in the Admin view. The Shared and Public links to the mod's live map never expose it, so you can hand the map to your players without handing out admin.


The same mod draws a live map of the world with players, ships and portals on it. What it shows, how the three share views work, and the install steps for a self hosted server are in [[Valheim Live Map]]. On a Survival Servers server it is a mod option in the Command Center.
The same mod draws a live map of the world with players, ships and portals on it. What it shows, how the three share views work, and the install steps for a self-hosted server are in [[Valheim Live Map]]. On a Survival Servers server, it's a mod option in the Command Center.


== Frequently asked questions ==
== Frequently asked questions ==


=== Why do console commands not work on my Valheim server? ===
=== Why do console commands not work on my Valheim server? ===
Nine times out of ten you are trying a cheat command on a dedicated server. Vanilla dedicated servers only honour the admin commands above. The other common causes: you are not on <code>adminlist.txt</code>, the ID in the file is in the wrong format (use what F2 shows), or the console is not enabled on your client.
Nine times out of ten, you're trying a cheat command on a dedicated server. Vanilla dedicated servers only accept the admin commands. The other common causes: you're not on <code>adminlist.txt</code>, the ID in the file is in the wrong format (use what F2 shows), or the console isn't turned on in your game.


=== Do I still need -console in my launch options? ===
=== Do I still need -console in my launch options? ===
Not on a current build. The gameplay setting added in patch 0.221.4 does the same job. <code>-console</code> still works and overrides the setting.
Not on a current version. The gameplay setting added in patch 0.221.4 does the same job. <code>-console</code> still works and overrides the setting.


=== How do I open the console on Xbox? ===
=== How do I open the console on Xbox? ===
Turn the developer console on in the gameplay settings first; since patch 0.221.4 it is off by default on Xbox. Cheats flag achievements there the same way they do on PC.
Turn on the developer console in the gameplay settings first. Since patch 0.221.4, it's off by default on Xbox. Cheats flag achievements there the same way they do on PC.


=== Which ID goes in adminlist.txt? ===
=== Which ID goes in adminlist.txt? ===
The platform user ID exactly as the F2 panel prints it, one per line, for example <code>V_76561197960287930</code> for a Steam player. Bare SteamID64 numbers are the pre crossplay format and still work for Steam players, as does the <code>Steam_</code> form from Iron Gate's guide.
The platform user ID exactly as the F2 panel prints it, one per line, for example <code>V_76561197960287930</code> for a Steam player. Bare 17-digit Steam IDs are the pre-crossplay format and still work for Steam players, as does the <code>Steam_</code> form from Iron Gate's guide.


=== Can I remove the cheat flag from my character or world? ===
=== Can I remove the cheat flag from my character or world? ===
Since hotfix 1.0.12 you can work around it. Type <code>yesiuseddevcommandsbutiwantmyachievementsanyway 1</code> and the console answers <code>Set cheat bypass to true</code>. That character can then earn achievements even though the flag stays; the 1.0 FAQ calls a flagged character and world "permanently locked from getting any achievements". A temporary cheat state, the kind you get from picking up a spawned item, clears once every cheated item is out of your inventory.
Since hotfix 1.0.12 you can work around it. Type <code>yesiuseddevcommandsbutiwantmyachievementsanyway 1</code> and the console answers <code>Set cheat bypass to true</code>. That character can then earn achievements even though the flag stays. The 1.0 FAQ calls a flagged character and world "permanently locked from getting any achievements". A temporary cheat state, the kind you get from picking up a spawned item, clears once every cheated item is out of your inventory.


=== What does devcommands replace? ===
=== What does devcommands replace? ===
The old <code>imacheater</code> command. It stopped working with Hearth and Home in 2021; guides that still mention it are out of date.
The old <code>imacheater</code> command. It stopped working with Hearth and Home in 2021. Guides that still mention it are out of date.


== See also ==
== See also ==
Line 356: Line 356:
:[[How to Find Your Valheim Seed|How to Find Your Valheim Seed]]
:[[How to Find Your Valheim Seed|How to Find Your Valheim Seed]]


Need a host? [https://www.survivalservers.com/services/game_servers/valheim/ Valheim server hosting] from Survival Servers comes with instant setup, one click mods, a browser admin console and 24/7 support.
[https://www.survivalservers.com/services/game_servers/valheim/ Valheim server hosting] from Survival Servers comes with instant setup, one-click mods, a browser admin console and DDoS protection.

Latest revision as of 12:21, 19 November 2026

Valheim has two separate command systems, and mixing them up is the usual reason a command "does nothing":

  • Admin commands (kick, ban, save, world modifiers) are the only commands a dedicated server honors. You need to be on the server's admin list to run them.
  • Cheat commands (spawn, god, fly, exploremap and the rest) are unlocked with devcommands and work in single player and in a world you host from your own game. A vanilla dedicated server refuses them, admin or not. The workaround is a mod (see Cheats on a dedicated server).

Valheim 1.0: cheats lock achievements

Valheim 1.0 adds achievements, and Iron Gate's 1.0 FAQ spells out the cost of cheating. Using most console commands, spawn included, puts a permanent flag on the character and the world that says they can never earn achievements (hotfix 1.0.12 added a way around it). Characters that used cheats before 1.0 are flagged too. Spawned items are marked, and a clean character who picks one up enters a temporary cheat state until every cheated item is out of their inventory. The "Hammer" world modifier (no build cost) counts as a temporary cheat as well.

A few commands are exceptions, freefly among them, and the game asks for confirmation before it puts you into a cheated state so it can't happen by accident. Admin commands such as kick, ban and save aren't cheats and never flag anything.

So on a shared server: run admin commands freely, and treat devcommands as a decision for the whole group.

Which commands work where

Player commands Admin commands Cheat commands
Who can run them Anyone with the console open Only IDs in adminlist.txt Only the player hosting the world
Unlocked by Nothing Being on the admin list Typing devcommands
Single player / self hosted from the game Yes Not needed Yes
Dedicated server (rented or your own) Yes Yes No, unless a mod allows it
Examples help, ping, fov, printseeds kick, ban, save, setworldmodifier spawn, god, fly, tod

How to enable the console

There are two ways.

The settings toggle

Since the Call to Arms update (patch 0.221.4, Sep 9, 2025) the developer console has its own switch in the settings menu. Open Settings, go to the gameplay tab and turn on Enable Console. Nothing else is needed, and it stays on after restarts.

The same patch turned the console off by default on Xbox. Xbox players turn it on with that gameplay setting. Older guides that say Xbox needs no setup are out of date.

The -console launch option

-console still works and overrides the setting, which makes it the reliable choice on an older version.

  • Steam: right-click Valheim in your library, Properties, General, and put -console in the Launch Options box. Start the game from Steam.
  • PC Game Pass / Microsoft Store: there's no launch options box. Make a shortcut to Valheim.exe, open its properties and add -console to the end of the Target field. Launch from that shortcut.
  • Mac (App Store): start the game with this launch option: /Applications/Valheim.app/Contents/MacOS/Valheim -console

Opening the console

Press F5. If nothing happens: you launched the game a different way than the one you enabled the console through (Steam launch options only apply when Steam starts the game). Or your keyboard has function lock on and F5 is sending a media key.

Type help for the list of commands available on your version.

Player commands

No cheats and no admin rights needed. Nothing here flags achievements.

Command What it does
help Prints the command list
info Prints system information
ping Shows your ping to the server
clear Clears the console window
fov [number] Sets the field of view
maxfps [number] Caps the frame rate
lodbias [1-7] Draw distance. Default is 1.5
exclusivefullscreen Switches between exclusive fullscreen and borderless
bind [key] [command] Binds a command to a key, for example bind mouse4 cheer
printbinds / unbind [key] / resetbinds Lists, clears one, or clears all key binds
die Kills your character
say [text] / s [text] / w [player] [text] Chat, shout, whisper
printseeds Prints the seeds and positions of nearby dungeons
filtercraft [text] / sortcraft [type] Filters or sorts the crafting list
resetspawn Clears your bed spawn point
resetsharedmap Clears the shared map data you pulled from a cartography table
resetknownitems Forgets every item and recipe your character has learned
resetplayerprefs Resets settings and saved preferences, not the save game
tutorialreset Resets Hugin's tutorial messages
cr Unloads unused assets now instead of on the 20 minute timer
optterrain Converts old terrain edits nearby to the current terrain system
restartparty Restarts the crossplay (PlayFab) party network

Admin commands

This is the vanilla admin set. It's short on purpose: admin rights on a Valheim server are about moderation, not cheating. Everything here works on a dedicated server, from the in-game console (F5) once you're on the admin list.

Command What it does
kick [name/ip/userID] Removes a player from the server
ban [name/ip/userID] Bans a player
unban [ip/userID] Lifts a ban. Use the ID or IP, not the name
banned Lists every banned player
save Saves the world right now
setworldmodifier [name] [value] Changes one world modifier on the running world, for example setworldmodifier raids none
setworldpreset [name] Applies a whole preset (casual, easy, normal, hard, hardcore, immersive, hammer)
resetworldkeys Puts every world modifier back to default. Boss progress is untouched

Run save before anything risky: a mod change, a restart, a big demolition. The worst case is then a few seconds of lost progress instead of everything since the last autosave. The modifier commands are the live version of the -preset, -modifier and -setkey launch options listed in Valheim Server Settings. They're how you change raid frequency or resource rates on an existing world without a restart.

How to become an admin

You make someone admin with a text file, not a command. The server reads three files from its save folder, one platform user ID per line:

File Effect
adminlist.txt Grants admin rights
bannedlist.txt Those players can't join
permittedlist.txt Whitelist. If it has any entries, only those players can join

Iron Gate's dedicated server guide asks for the ID in the format [Platform]_[User ID], case sensitive, for example Steam_76561197960287930. Press F2 in the game and copy the ID exactly as it appears next to the player's name, or read it from the server log. A bare 17-digit Steam ID is the older format and still the one most guides show. If admin rights don't apply, try the F2 format first. Players on Xbox, PlayStation or Switch 2 have their own platform's ID rather than a Steam one, which is why the F2 panel is the safe place to copy it from.

On a Survival Servers server the file is written for you. Open the Game Server page in the Command Center, put each Steam ID in the Admin UID field (the plus icon adds more) and press Save Settings & Restart. The Command Center writes the IDs into adminlist.txt in the server's main folder exactly as typed, and you can also edit the file directly in the File Manager or over FTP.

Valheim settings form in the Command Center with the Admin UID field outlined in gold and an example Steam ID in it.
Admin UID takes a 17-digit Steam ID. The plus adds another admin.

Cheat commands (devcommands)

Type devcommands and press Enter to turn cheats on. Type it again to turn them off. Everything in this section needs it and flags achievements from 1.0 onwards. None of it works on a vanilla dedicated server (see Cheats on a dedicated server). The rows marked not a cheat are the exception: they run without devcommands and never flag anything.

Character

Command What it does
god God mode. Damage can't drop you below 1 health
ghost Enemies ignore you
heal Refills health, stamina and eitr
puke Clears your food buffs back to base stats
addstatus [name] / clearstatus Applies a status effect (Rested, Wet, Burning) or removes them all
raiseskill [skill] [amount] Raises a skill. raiseskill all 50 raises everything; a negative amount lowers it
resetskill [skill] Sets a skill to zero. resetskill all resets everything
setpower [name] Sets your forsaken power and clears its cooldown, for example setpower GP_Eikthyr
beard [id] / hair [id] Changes beard or hair. No argument removes it. Not a cheat
model [0-1] Switches the character model. Not a cheat
resetcharacter Wipes your character's data

Movement and camera

Command What it does
fly Toggles flight
freefly Free camera. Not a cheat, so it doesn't flag achievements
ffsmooth [0-1] Smooths free camera movement. Not a cheat
goto [x] [z] Teleports to map coordinates
pos Prints your coordinates. Not a cheat
findtp [text] Teleports you to the nearest matching object
recall [name] Pulls a player to you. No name pulls everyone

World, time and weather

Command What it does
tod [0-1] Sets time of day. 0.5 is noon, -1 returns to the normal clock
skiptime [seconds] Jumps time forward. Default is 240
sleep Skips one night
timescale [speed] Speeds time up, up to 5x. 0 pauses it
env [name] / resetenv Forces a weather type (ThunderStorm, Misty, Rain) or returns to normal
wind [angle] [intensity] / resetwind Sets or resets the wind
exploremap / resetmap Reveals or hides the whole map
setkey [name] / removekey [name] Adds or removes a global key, the flags that track boss kills and world modifiers
listkeys / resetkeys Lists or clears every global key
event [name] / randomevent / stopevent Starts a named raid, a random raid, or stops the current one
players [number] Scales difficulty as if that many players were nearby. 0 resets
nocost Building and crafting cost nothing
location [name] Spawns a location. Permanently disables saving unless you add SAVE
genloc Redistributes unplaced locations
nextseed Rerolls the next dungeon. Permanently disables saving
setfuel [amount] Tops up nearby fires and torches. Negative values drain them

Spawning and removing

Command What it does
spawn [name] [amount] [level] Spawns an item or creature. See Spawn command syntax and common IDs
itemset [name] [keep] Spawns a full gear set, for example itemset Mistlands or itemset AshlandsMage
tame Tames every tameable creature nearby
killall Kills nearby enemies and tamed creatures, not players
killenemies / killtame Kills only enemies, or only tamed creatures
aggravate Makes neutral creatures nearby hostile
removedrops Deletes item drops in the area. Not a cheat
removebirds / removefish Removes active birds or fish. Not a cheat
forcedelete [radius] [name] Deletes objects within up to 150 metres (5 if you leave the radius out). Leaves players, tombstones, dungeons and boss stones alone
find [text] Finds matching objects and pings them on the map

Debug and creative mode

Command What it does
debugmode Creative mode. With it on, close the console and press B for free building, Z to fly and K to kill nearby enemies
printcreatures / printlocations Lists active creatures with levels, or loaded locations with distances
dpsdebug Toggles damage per second output

Spawn command syntax and common IDs

spawn [PrefabName] [amount] [level]

Names are the game's internal prefab names (the console fixes capitals). The level for creatures is 1 (no star), 2 (one star) or 3 (two stars). spawn Wood 50 drops fifty wood at your feet, and spawn Troll 1 3 spawns one two-star troll, so be ready.

Type Prefab names
Basic materials Wood, FineWood, RoundLog, Stone, Flint, Resin, Coal, LeatherScraps, DeerHide, Coins
Metals Copper, Tin, Bronze, Iron, Silver, BlackMetal, Flametal
Tools and weapons Hammer, Hoe, Cultivator, PickaxeIron, AxeBronze, SwordBronze, SwordIron, SwordSilver, SwordBlackmetal, BowFineWood, BowHuntsman
Animals Boar, Deer, Neck, Wolf, Lox, Hen
Enemies Greyling, Greydwarf, Greydwarf_Elite, Greydwarf_Shaman, Troll, Skeleton, Draugr, Blob, Leech, Fenring, Hatchling, Goblin, GoblinBrute, Seeker, Tick, Gjall, Serpent
Bosses Eikthyr, gd_king (The Elder), Bonemass, Dragon (Moder), GoblinKing (Yagluth), SeekerQueen, Fader

The game's own help output and the tab completion in the console are the full list for your version. Every 1.0 and Deep North prefab appears there.

Cheats on a dedicated server

The supported answer is a server mod: Server devcommands (a BepInEx plugin) lets listed admins use the cheat set on a dedicated server, with a permission list of its own.

On a Survival Servers server BepInEx comes with the ValheimOne and BepInEx mod options in the Command Center, and plugins are uploaded to BepInEx/plugins over FTP or the File Manager. Remember the 1.0 rule before you do: anything spawned that way is flagged for whoever picks it up.

Running admin commands from a browser

ValheimOne is a free, open source server mod that adds a web admin console to a Valheim dedicated server. Players on PC or console need nothing installed for the browser console. Optional Synced gameplay modules need the mod on each player's PC.

ValheimOne browser console with the command list for server, player, moderation and world commands and a command box at the bottom.

The console tab shows the live server log and a command box with history and autocomplete. Commands run through the game's own console on the server. You can kick or ban a player, save the world, or schedule a clean shutdown that warns players before the server goes down, all from a browser and without being logged into the game. Only commands on the console's whitelist can run.

On a self-hosted server, set both Enabled = true and ConsoleEnabled = true in the existing [LiveMap] section of BepInEx/config/valheimone.cfg, and set a long, unique AccessToken. The map and console are off by default. For the port, the access URL and HTTPS access, follow the live map setup steps.

Note: The console only exists in the Admin view. The Shared and Public links to the mod's live map never expose it, so you can hand the map to your players without handing out admin.

The same mod draws a live map of the world with players, ships and portals on it. What it shows, how the three share views work, and the install steps for a self-hosted server are in Valheim Live Map. On a Survival Servers server, it's a mod option in the Command Center.

Frequently asked questions

Why do console commands not work on my Valheim server?

Nine times out of ten, you're trying a cheat command on a dedicated server. Vanilla dedicated servers only accept the admin commands. The other common causes: you're not on adminlist.txt, the ID in the file is in the wrong format (use what F2 shows), or the console isn't turned on in your game.

Do I still need -console in my launch options?

Not on a current version. The gameplay setting added in patch 0.221.4 does the same job. -console still works and overrides the setting.

How do I open the console on Xbox?

Turn on the developer console in the gameplay settings first. Since patch 0.221.4, it's off by default on Xbox. Cheats flag achievements there the same way they do on PC.

Which ID goes in adminlist.txt?

The platform user ID exactly as the F2 panel prints it, one per line, for example V_76561197960287930 for a Steam player. Bare 17-digit Steam IDs are the pre-crossplay format and still work for Steam players, as does the Steam_ form from Iron Gate's guide.

Can I remove the cheat flag from my character or world?

Since hotfix 1.0.12 you can work around it. Type yesiuseddevcommandsbutiwantmyachievementsanyway 1 and the console answers Set cheat bypass to true. That character can then earn achievements even though the flag stays. The 1.0 FAQ calls a flagged character and world "permanently locked from getting any achievements". A temporary cheat state, the kind you get from picking up a spawned item, clears once every cheated item is out of your inventory.

What does devcommands replace?

The old imacheater command. It stopped working with Hearth and Home in 2021. Guides that still mention it are out of date.

See also

Valheim Server Settings: every launch parameter and world modifier
How to Create a Valheim Server
Valheim Live Map
Valheim Incompatible Version Error
How to Set Up a Valheim Crossplay Server
How to Find Your Valheim Seed

Valheim server hosting from Survival Servers comes with instant setup, one-click mods, a browser admin console and DDoS protection.