Halloween sale 15% off for life code HALLOWEEN15

How to Use Dev Cheat Commands on Your Valheim Server

Your Senior · · 9 min read

Valheim has a full set of developer commands built in: god mode, flying, spawning any item or creature, changing the time of day, revealing the map. They are brilliant for testing builds, rescuing a lost tombstone, or just messing about. They are also the source of a lot of confusion, because the rules for using them on a dedicated server are different from single player, and they changed again with Valheim 1.0.

This guide covers how to open the console, how devcommands works today, the commands people actually use, how admin rights work on a dedicated server, and what using cheats means for your achievements.

Step 1: Turn on the console

The console opens with F5, but since patch 0.221.4 it is switched off by default. There are two ways to turn it on:

  • In the game's settings. Open Settings and switch the console on in the gameplay options. This is the easiest way and it sticks between sessions.
  • With a launch option. In Steam, right-click Valheim, choose Properties, and add -console under Launch Options. This still works and overrides the setting. On PC Game Pass, add -console to a shortcut to valheim.exe.

Press F5 in game. If a text box appears at the top of the screen, you're set. Type help to list the commands available to you right now.

Step 2: Enable dev commands

Cheats stay locked until you type:

devcommands

This replaced the old imacheater command back in 2021, so any guide still telling you to type imacheater is out of date. Type devcommands again to switch cheats off.

Where dev commands work

This is the part that trips most people up. Out of the box, dev commands work:

  • In single player.
  • In a world you host yourself from the game's own Start Server option, for the person hosting.

On a vanilla dedicated server, like a hosted CloudNord server, the cheat commands are blocked, even for admins. You can type devcommands, but commands like god or spawn answer that they are not valid in the current context. What admins do get on a dedicated server is a set of moderation and world commands, covered further down, and a well-known mod can unlock the rest.

Step 3: Become an admin on your dedicated server

Admin rights come from a file called adminlist.txt on the server. On a CloudNord Valheim server:

  1. Find your ID. Your SteamID64 is the 17-digit number that starts with 7656. You can look it up on a site such as steamid.io, or join the server and look for the Got connection SteamID line in the Console tab.
  2. Open the Files tab and go into .config/unity3d/IronGate/Valheim/. This is where the server keeps its worlds and its lists.
  3. Open adminlist.txt (or create it with New File) and add your ID twice: once as the plain number and once with a V_ in front, each on its own line.
  4. Save, then restart the server.
// List admin players ID  ONE per line
76561198000000000
V_76561198000000000

Current Valheim builds identify players with the V_ form, so the bare number alone may not be enough. Keep the file to numeric IDs and V_ IDs only, one per line. A stray line in another format above your entry can stop the rest of the file from being read. The same format works for bannedlist.txt and permittedlist.txt in the same folder.

For a step-by-step walkthrough of the whole process, see our knowledge base article How to Add Admins to Your Valheim Server.

What admins can do on a dedicated server

Once you're on the admin list, open the console with F5 while connected and you can use these without devcommands:

CommandWhat it does
kick [name/ip/userID]Removes a player from the server.
ban [name/ip/userID]Bans a player and adds them to the ban list.
unban [ip/userID]Lifts a ban.
bannedLists banned players.
saveSaves the world straight away. Worth doing before anything risky.
sleep / skiptime [seconds]Skips the night, or moves time forward.
listkeys / setkey [key] / removekey [key]Shows or changes the world's global keys, the flags that record which bosses are beaten (such as defeated_eikthyr).
randomevent / stopeventStarts a random raid, or ends the current one.

That covers most of what a server owner needs day to day: dealing with a griefer, skipping a night when half the group is AFK, or fixing a boss progression flag.

Getting full cheats on a dedicated server

If you want god mode, flying and spawning on your hosted server, the standard answer is the Server Devcommands mod by JereKuusela. It lets players on the admin list use dev commands on a dedicated server, and everyone else stays locked out.

  1. Install BepInEx and Server Devcommands on your own game. A mod manager such as r2modman or Thunderstore Mod Manager makes this a couple of clicks.
  2. Make sure you're in the server's adminlist.txt, as above.
  3. For the full feature set, also run it on the server. On CloudNord, switch the server to Valheim BepInEx from the Change Runtime page, then upload the mod's .dll into BepInEx/plugins from the Files tab. Take a backup from User Backups first.

Mods are made by the community, not Iron Gate. After a big Valheim update, give them a day or two to catch up before you update your own copy.

The dev commands people actually use

These work after devcommands in single player, in a self-hosted world, or on a dedicated server with Server Devcommands. Square brackets mark optional values.

Survival and movement

  • god: no damage taken.
  • ghost: creatures ignore you.
  • fly: toggles flying. Space to rise, Ctrl to descend.
  • heal: restores your health.
  • nocost: build and craft without materials.
  • debugmode: turns on debug keys. Z toggles flying, B toggles free building, and K kills nearby enemies.

Spawning

  • spawn [name] [amount] [level]: spawns an item or creature by its internal name. For example, spawn Wood 50 gives you 50 wood, and spawn Boar 1 3 spawns a two-star boar (level 3 means two stars).
  • tame: tames every creature near you.
  • removedrops: clears dropped items lying around, which is also a good fix for lag near a messy base.
  • killall / killenemies: kills creatures around you.

Spawn names are case-sensitive and often differ from what the game shows. Wood, Stone, Coins and Boar are simple; others are less obvious, so keep a prefab list from a Valheim wiki open while you play.

World, time and weather

  • tod [0-1]: sets the time of day, where 0.5 is midday. tod -1 goes back to the normal cycle.
  • env [name]: forces a weather type, such as env Clear. resetenv undoes it.
  • wind [angle] [intensity]: sets the wind. Handy for sailing tests.
  • event [name]: starts a specific raid.

Map and position

  • pos: prints your coordinates. It works without dev commands and is the quickest way to share a location.
  • goto [x] [z]: teleports you to coordinates.
  • exploremap / resetmap: reveals the whole map, or wipes it back to unexplored. Both change your character's own map, so think twice before using them on your main character.
  • findtomb: marks your tombstones on the map. A lifesaver after a bad swim.
  • freefly: a free camera for screenshots and videos. ffsmooth [0-1] smooths the camera movement.

Skills and character

  • raiseskill [skill] [amount]: raises a skill, such as raiseskill Swords 10.
  • resetskill [skill]: resets a skill.
  • resetcharacter: wipes your character's progress. Use it with care.

Cheats and achievements in Valheim 1.0

Valheim 1.0 added achievements, and with them a cheat flag. Most dev commands, like spawn, ask you to confirm the first time, then mark your character and the world as having used cheats, which blocks achievements. Camera-only commands such as freefly don't count. Items made with cheats are labelled as cheated items.

Iron Gate added a way back in after launch. Patch 1.0.12 introduced a console command, yesiuseddevcommandsbutiwantmyachievementsanyway, that opts a character back into achievements. If achievements matter to your group, the simplest approach is still a separate test world and character for cheating, and a clean one for the real playthrough.

A safe way to experiment

  • Run save, or take a backup from User Backups, before spawning anything big. A spawned boss or a hundred trolls can do lasting damage to a base.
  • Test builds in a separate world. Valheim servers run one world at a time, and you can change the world name in the Startup tab to switch to a test world and back.
  • Tell your group. Nothing ends a playthrough faster than someone finding out the boss was killed in god mode.

Just getting started with 1.0? Our Valheim 1.0 and Deep North guide covers what is new and whether to start a fresh world.

Frequently asked questions

What replaced imacheater in Valheim?

devcommands. The old command was renamed in 2021 and imacheater no longer does anything.

Why do dev commands say "not valid in the current context"?

Either you haven't typed devcommands yet, or you're on a vanilla dedicated server, where cheat commands are blocked even for admins. Use them in single player or a self-hosted world, or install Server Devcommands for your dedicated server.

Do I need the -console launch option?

Not any more. You can switch the console on in the game's settings. The -console launch option still works if you prefer it.

Why isn't my admin list working?

Check three things: the file is in the same folder as the worlds (.config/unity3d/IronGate/Valheim/ on our servers), it contains your ID both as a plain number and with a V_ prefix, and you restarted the server after saving it. The admin setup guide walks through each step.

Do dev commands disable achievements?

Most of them do, once you confirm. Camera commands like freefly don't. Patch 1.0.12 added an opt-in command to get achievements back.

Can other players use cheats on my server?

Not on a vanilla dedicated server. With Server Devcommands, only players on the admin list can.

Host your Viking world

Dev commands are best enjoyed on a world that is always there when your group logs in. Our Valheim server hosting runs 1.0 from the stable branch, gives you the file manager for admin lists, and switches to BepInEx from the Change Runtime page when you want mods.

Tagged valheim admin console commands
Ready to play?

Spin up a server in under a minute, on hardware built for it.

See plans and pricing