Valheim Console Commands: Difference between revisions
Full rewrite: enabling the console, admin vs cheat commands, every devcommands cheat, spawn IDs, dedicated-server behaviour, 1.0 achievement rule, ValheimOne browser console |
Update Valheim 1.0 save guidance and ValheimOne map, fog and client requirements |
||
| Line 318: | Line 318: | ||
== 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. | [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. | ||
[[File:ValheimOne_web_admin_console.png|none|800px|ValheimOne web admin console]] | [[File:ValheimOne_web_admin_console.png|none|800px|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, so 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, so 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. | ||
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. | |||
'''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. | ||
Revision as of 13:35, 9 September 2026
This is the complete reference for Valheim console commands: how to open the console, the admin commands that work on a dedicated server, every cheat behind devcommands, the spawn syntax, and what changes on 9 September 2026 when Valheim 1.0 adds achievements.
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.
- Cheat commands (spawn, god, fly, exploremap and the rest) are unlocked with
devcommandsand 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.
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. 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 cannot happen by accident. Admin commands such as kick, ban and save are not 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 |
Anyone with the console open |
| 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. Most guides only mention the older one.
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 the developer console on. Nothing else is needed and it survives 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 -console launch option
-console still works and overrides the setting, which makes it the reliable choice on an older build.
- Steam: right click Valheim in your library, Properties, General, and put
-consolein the Launch Options box. Start the game from Steam. - PC Game Pass / Microsoft Store: there is no launch options box. Make a shortcut to
Valheim.exe, open its properties and add-consoleto the end of the Target field. Launch from that shortcut. - Mac (App Store): start the binary with the argument:
/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 build.
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 latency 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 |
tutorialtoggle / tutorialreset |
Toggles or 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 whole 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.
| Command | What it does |
|---|---|
kick [name/ip/userID] |
Removes a player from the server |
ban [name/ip/userID] |
Bans a player |
unban [name/ip/userID] |
Lifts a ban |
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 parameters listed in Valheim Server Settings; they are how you change raid frequency or resource rates on an existing world without a restart.
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:
| File | Effect |
|---|---|
adminlist.txt |
Grants admin rights |
bannedlist.txt |
Those players cannot 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 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 arriving through crossplay have a PlayFab identity rather than a Steam one, which is why the F2 panel is the safe source.
On a Survival Servers server the file is written for you. Open the control panel, put each ID in the Admin UID field (the plus icon adds more), save, and restart the server. The panel writes the IDs into adminlist.txt in the server root exactly as typed, and you can also edit the file directly in the File Manager or over FTP.
Cheat commands (devcommands)
Type devcommands 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).
Character
| Command | What it does |
|---|---|
god |
God mode. Damage cannot 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 |
model [0-1] |
Switches the character model |
resetcharacter |
Wipes your character's data |
Movement and camera
| Command | What it does |
|---|---|
fly |
Toggles flight |
freefly |
Free camera. One of the few cheats that does not flag achievements |
ffsmooth [0-1] |
Smooths free camera movement |
goto [x] [z] |
Teleports to map coordinates |
pos |
Prints your coordinates |
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 the syntax section below |
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 |
removebirds / removefish |
Removes active birds or fish |
forcedelete [radius] [name] |
Deletes objects within up to 50 metres. 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 everything nearby |
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 internal prefab names, they are case sensitive, and the level for creatures is 1 (no star), 2 (one star) or 3 (two stars). spawn Wood 50 drops fifty wood at your feet; 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 build; every 1.0 and Deep North prefab will appear there on launch day.
Cheats on a dedicated server
This is the part most command lists leave out. devcommands unlocks cheats in single player and in a world hosted from the game client. On a dedicated server, including a rented one, the cheat commands are refused no matter who you are, and being an admin does not change that. 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.
On a Survival Servers server BepInEx is already available as a mod option in the control panel, and plugins are uploaded to BepInEx/plugins 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.
Running admin commands from a browser
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.
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, so 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.
For self-hosted installations, enable both Enabled = true and ConsoleEnabled = true in the existing [LiveMap] section of BepInEx/config/valheimone.cfg, and configure a long, unique AccessToken. The map and console are disabled by default. Follow the live-map setup instructions for the port, authenticated URL and HTTPS access.
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 hosted server it is usually a mod option in the control panel.
Frequently asked questions
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 adminlist.txt, the ID in the file is in the wrong format (use what F2 shows), or the console is not enabled on your client.
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. -console still works and overrides the setting.
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.
Which ID goes in adminlist.txt?
The platform user ID exactly as the F2 panel prints it, one per line, for example Steam_76561197960287930. Bare SteamID64 numbers are the pre crossplay format and usually still work for Steam players, but the F2 format is the one Iron Gate documents.
Can I remove the cheat flag from my character or world?
Not for a permanent flag: the 1.0 FAQ says the character and world are "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
Need a host? Valheim server hosting from Survival Servers comes with instant setup, one click mods, a browser admin console and 24/7 support.
