Valheim Admin and Console Commands (Server and Solo)

Published on | Updated

Valheim admin commands for a dedicated server, how to add yourself to adminlist.txt, and console cheats for solo play, with what they do to 1.0 achievements.

Two Vikings resting at a campfire in a dark Valheim forest under the Valheim logo

You run a Valheim server and want the admin commands, or you play solo and want the cheats. Those are two different lists, and most of the confusion comes from mixing them. Admin commands such as kick, ban and save work on a dedicated server once your ID is in adminlist.txt. Cheat commands such as spawn, god and fly need devcommands and only work in a solo world or a world you host from the game. This guide starts with the Valheim admin commands for your server and then lists the cheats, checked against Iron Gate's own guides and patch notes up to patch 1.0.21.

Quick answer: To use Valheim admin commands on a dedicated server, add your ID (for example Steam_76561198000000000, copied from the F2 panel in game or from the server log) on its own line in adminlist.txt in the server's save folder and restart the server. Then press F5 in game and use kick, ban, unban, banned, save, setworldmodifier, setworldpreset and resetworldkeys. Cheats like spawn, god and fly do not work on a vanilla dedicated server, even for admins. In solo play, add -console to the launch options, press F5 and type devcommands; since Valheim 1.0 most cheats lock that character and world out of achievements.

Admin commands on a dedicated server

Make yourself admin

  1. Turn the console on in your own game. In Steam, right-click Valheim in the library, open Properties, and type -console in the Launch Options field on the General tab. On Xbox the console is on by default (Iron Gate: developer mode).
  2. Join the server and find your ID. Iron Gate's server guide says the ID shows in the F2 panel in game and in the server log (Iron Gate dedicated server guide).
  3. Open adminlist.txt. It sits in the server's save path together with bannedlist.txt and permittedlist.txt. By default that is %USERPROFILE%/AppData/LocalLow/IronGate/Valheim on Windows and ~/.config/unity3d/IronGate/Valheim on Linux. If the server starts with -savedir, the worlds and these three files are in that folder instead.
  4. Add one ID per line in the format [Platform]_[User ID]. Iron Gate notes that the ID is case sensitive.
  5. Save the file, restart the server, join again, press F5 and type banned. It only lists banned players, so it is a safe first test.

IDs can look different since 1.0. Iron Gate's notes for hotfix 1.0.12 (11 September 2026) mention new IDs such as V_123456789 next to old ones such as Steam_123456789, and say the ban list and the whitelist accept both (Hotfix 1.0.10 and 1.0.12). The simple rule: copy the ID exactly as the F2 panel or the log shows it.

The three permission files

FileWhat it does
adminlist.txtPlayers on it can use the admin commands below
bannedlist.txtPlayers on it cannot join the server
permittedlist.txtA whitelist: Iron Gate warns that adding one person bans everyone who is not on it

Leave permittedlist.txt empty unless you really want a whitelist. A single test ID in that file locks out your whole group.

Valheim admin commands list

CommandWhat it does
kick [name/ip/userID]Kicks a player from the server
ban [name/ip/userID]Bans a player
unban [name/ip/userID]Lifts a ban
bannedLists all banned players
saveForces a world save
setworldmodifier [name] [value]Changes one world modifier
setworldpreset [name]Resets all world modifiers to a named preset
resetworldkeysResets all world modifiers to default

The first four are the admin commands in Iron Gate's server guide. A remote save works for players on the admin list (Patch 0.214.300). Patch 0.217.22 (5 October 2023) made world modifiers and presets settable on a dedicated server through launch parameters "or using the console as an admin" (Patch 0.217.22).

The same 0.217.22 notes name more commands that admins can now use: players, setkey, removekey, resetkeys, listkeys, sleep, skiptime, restartparty and genloc, with a warning that genloc takes time and may cause disconnects. Several of those count as cheat commands in solo play and the community wiki's admin list leaves them out, so the patch notes alone do not tell you which still work for an admin without devcommands. Type help in the console first: it lists the available commands with a short description of each, so you can see what your session offers before you rely on one.

Change world modifiers while the server runs

setworldpreset hard
setworldmodifier portals casual
resetworldkeys

Iron Gate's guide lists the presets as normal, casual, easy, hard, hardcore, immersive and hammer, and the modifiers as Combat, DeathPenalty, Resources, Raids and Portals. The Valheim Wiki notes that setworldmodifier portals normal does not undo a change, so use resetworldkeys or a preset to go back. If your start script sets -preset or -modifier, update those flags as well, so the next start does not apply the old values.

Mind the achievements: the Valheim 1.0 FAQ says some modifiers, such as hammer mode, block certain achievements, and hammer mode counts as a temporary cheat.

Doing this on a hosted server

A rented server works the same way, only through the panel: watch the live log as a player joins to copy their ID, edit adminlist.txt in the file manager or over FTP, then restart. Our Valheim server hosting has a web console with live server logs plus a file manager and FTP access, and it accepts Windows (Steam) players only. For the full server setup, see our Valheim dedicated server guide.

Can admins use cheats on a dedicated server?

Not in vanilla Valheim. The Valheim Wiki's console page says the cheat commands work in single player or a manually hosted world only and "do not work on a dedicated server". Being on the admin list does not change that.

Server admins who want spawn, god or fly anyway use the Server Devcommands mod for BepInEx. Its Thunderstore page says to install it on the admin's game and optionally on the server, notes that the full features need the server side, and asks you to put your ID in adminlist.txt. Valheim has no official mod support, so check the mod page for a release that matches your game version. Our BepInEx install guide covers the loader itself.

How to enable the Valheim console for solo play

  1. Add -console to the launch options. In Steam: right-click Valheim, Properties, General, Launch Options. For the Microsoft Store version, Iron Gate says to add -console to the target field of the Valheim shortcut. On Xbox the console is already on. The wiki adds that you can also switch it on in the game settings.
  2. Press F5 in game. On a controller, Iron Gate gives LB + LT + Start.
  3. Type devcommands and press Enter. Older guides use imacheater, which Iron Gate replaced with devcommands in patch 0.148.6 in March 2021 (0.148.6 notes).
  4. Cheats now work in that session. They work in single player and in a world you host from the game's own menu.

Essential cheat commands

CommandEffect
devcommandsTurns cheats on or off
godGod mode, no damage
flyToggles flying
ghostEnemies ignore you
nocostBuilding and crafting without resources
healRestores health, stamina and eitr
tod 0.5Sets the time to noon (0 and 1 are midnight)
tod -1Reverts the time of day to default
raiseskill <skill> <amount>Raises a skill; All raises every skill, a minus value lowers it
resetcharacterWipes all of your character data

Spawning items and creatures

spawn <item> <amount> <level>

Examples:

  • spawn Wood 50 gives you 50 wood
  • spawn Coins 9999 gives you gold coins
  • spawn Boar 3 2 spawns three level 2 boars

For food and feasts, use the item name, for example spawn QueensJam 10. Since 1.0, spawned items are marked as "cheated item" when you look at them in your inventory (Valheim 1.0 launch notes).

Useful utility commands

CommandEffect
posShows your coordinates
goto [x] [z]Teleports you to coordinates
find [text]Finds matching objects and pings them on the map
removedropsClears dropped items in the area
killallKills nearby enemies and tamed creatures, not players
killenemiesKills nearby enemies only
tameTames nearby tameable creatures
exploremapReveals the entire map
resetmapHides the map again
debugmodeExtra cheats: Z to fly, B to build without a workbench or resources

Avoid location and nextseed. They spawn a location or regenerate a dungeon and permanently turn off saving for that world, unless you add SAVE to location (Valheim Wiki). Make a copy of your world before you test them; our guide to restoring a Valheim world backup shows where the files are.

Commands that work without devcommands

A few console commands are not cheats and work for every player: help lists the commands you can use, ping measures your latency to the server, lodbias [number] changes the draw distance, resetspawn resets your spawn point and freefly gives you a photo camera. The 1.0 FAQ names freefly as one of the exceptions that does not flag your character.

Do cheats block achievements in Valheim 1.0?

Yes, for most commands. The Valheim 1.0 FAQ says that using most commands, such as spawn, places a flag on your current character and world save, and that characters that used cheats before 1.0 are marked too. A player without cheats who picks up a cheated item enters a temporary cheat state and becomes eligible again after throwing out all cheated items.

Two later patches changed this. Hotfix 1.0.12 on Steam added a devcommand to opt back into achievements after using devcommands or mods: yesiuseddevcommandsbutiwantmyachievementsanyway. Iron Gate leaves it "to your own judgement" whether to use it. Patch 1.0.20 (15 October 2026) reset the cheated flag on items and build pieces from older versions, because a bug in the first 1.0 release had marked some validly obtained items as cheated (Patch 1.0.20).

FAQ

What are the Valheim admin commands? kick, ban, unban and banned from Iron Gate's server guide, plus save, setworldmodifier, setworldpreset and resetworldkeys. You type them in the F5 console while you are connected to the server, and they only work when your ID is in adminlist.txt.

How do I make myself admin on a Valheim server? Copy your ID from the F2 panel or the server log, add it on its own line to adminlist.txt in the server's save folder, and restart the server. Use the ID exactly as shown, for example Steam_76561198000000000.

How do I open the Valheim console? Add -console to the launch options (or turn the console on in the settings), then press F5 in game. To enable cheats, type devcommands.

What is the spawn command in Valheim? spawn <item> <amount> <level> creates items or creatures, for example spawn Wood 50. It needs devcommands and does not work on a vanilla dedicated server.

Can I use dev commands on a dedicated server? Not in vanilla Valheim. The admin list gives you the admin commands, but cheats like spawn, god and fly only work in single player or a world you host from the game. Admins who want them on a dedicated server install the Server Devcommands mod.

Do Valheim dev commands disable achievements? Most do since 1.0: they flag your character and world save. Some, such as freefly, are exceptions, and hotfix 1.0.12 added an opt back in command for players who used devcommands.

Related: Valheim dedicated server, Valheim progression guide, Valheim best seeds

Sources

All opened on 2 November 2026: