Enable Dev Commands on Your Server
Install the Server Devcommands mod to use debug and spawn commands on your Valheim dedicated server.
Valheim blocks dev commands (like spawning items, flying, and god mode) on dedicated servers by default. You need a mod to unlock them.
Why Dev Commands Are Blocked
Vanilla Valheim only allows dev commands in singleplayer. On a dedicated server, typing devcommands in the console does nothing. This is a security measure to prevent abuse.
Install the Server Devcommands Mod
Enable BepInEx
Make sure BepInEx is enabled in Startup. See Install Mods.
Install the mod
Go to Mods in the sidebar, search for Server devcommands, and install it.
Or download from Thunderstore and upload to BepInEx/plugins/.
Connect and enable
Join the server, press F5 to open the console, and type:
devcommandsYou should see devcommands = true.
📝 Note: You must be on the admin list to use dev commands, even with the mod installed.
Useful Dev Commands
Item Spawning
spawn SwordIron 1
spawn ArrowFire 50
spawn Wood 100
spawn Coins 999See Spawn Items for a full item ID reference.
Movement
| Command | Effect |
|---|---|
fly | Toggle flight (press Space to go up, Ctrl to go down) |
ghost | Enemies ignore you |
god | Toggle invincibility |
goto [x,z] | Teleport to world coordinates |
World Management
| Command | Effect |
|---|---|
exploremap | Reveal the entire map |
resetmap | Reset map fog of war |
killall | Kill all enemies nearby |
tame | Tame all nearby creatures |
genloc | Regenerate locations (dungeons, etc.) |
Time and Weather
| Command | Effect |
|---|---|
tod [0-1] | Set time (0 = midnight, 0.5 = noon) |
skiptime [seconds] | Skip forward in time |
sleep | Skip to next morning |
wind [angle] [intensity] | Control wind |
resetwind | Reset wind to normal |
Client-Side Requirement
The Server Devcommands mod is server-side only — clients don't need to install it. However, admins who want to use the commands must be on the server's admin list.
Security Considerations
- Only players on the admin list can use dev commands
- Dev commands can break game balance (spawning endgame items, etc.)
- Consider using the access features of the mod to restrict which commands specific admins can use
- Monitor the server console for command usage
Related Guides
See also: Console Commands | Adding Admins | Spawn Items
If you need help, join our Discord.
How is this guide?
