How to Use Console Commands in Valheim
A beginner-friendly walkthrough of the Valheim console: opening it, running commands, passing arguments, finding IDs, and recovering from typos.
Valheim's console is a single text box at the bottom of the screen that runs typed commands. It's powerful — almost everything in the game is accessible from it — but the interface is bare-bones and there's no in-game tutorial. This guide walks through using it end-to-end: opening it, finding commands, passing parameters, and recovering from typos.
If you haven't enabled the console yet, the prerequisite is short: add -console to Valheim's Steam launch options and restart the game. Cheat commands additionally need devcommands enabled each time you load a world.
Open the console
Load into a world. Press F5. A small text input appears at the bottom of the screen.
Press F5 again to close it. You can leave it open while you play — it doesn't pause the game or block input — but most people open it, type a command, and close it again.
Run your first command
With the console open, type:
Press Enter. A wall of text scrolls past — every command the game knows about, in alphabetical order. That's the source of truth for what's available, even though it's not the most readable. Our searchable command reference is the same data with descriptions and examples.
The anatomy of a command
Most Valheim commands follow one of three shapes:
1. Bare commands (no arguments)
Toggle something on or off, or perform a one-shot action. No parameters. Examples:
2. Commands with one argument
Take a single value — usually an ID, a player name, or a number:
3. Commands with multiple arguments
The most common multi-argument command is spawn:
Arguments are positional and separated by spaces. The level parameter is 1-indexed: spawn Boar 1 1 gives you one normal boar (no stars), spawn Boar 1 2 gives you a one-star boar, and so on. See the spawn items guide for the full rules.
Where IDs come from
Most commands that take an ID expect an internal Valheim identifier, not the display name. Internal names are usually PascalCase (no spaces) and sometimes don't match what the game shows you. A few examples:
Woodfor Wood,Ironfor Iron — simple materials are usually obvious.SwordIron,BowFineWood,ArmorIronChest— weapons and armor combine the piece type and the tier.gd_kingfor The Elder,Dragonfor Moder,GoblinKingfor Yagluth — bosses use dev codenames that don't match their in-game names.
Don't guess. Use the appropriate index:
- All item IDs
- All character / creature IDs
- All skill IDs
- All location codes
- All environment codes
- All event IDs
- All global keys
- All status effect codes
Console keys you'll actually use
| Key | What it does |
|---|---|
F5 | Open / close the console. |
Enter | Run the typed command. |
Up / Down | Cycle through previously-typed commands. |
Tab | Autocomplete a command name from what you've typed so far. |
Esc | Close the console without running anything. |
The Up-arrow history is genuinely useful — repeating the same spawn command with a small tweak is faster than retyping the ID each time. Tab-complete fills in partial command names, but it does not complete item IDs.
Common gotchas
- Case matters.
spawn wooddoes nothing;spawn Woodworks. IDs are case-sensitive. - Cheats reset on world reload. Every time you log back in, re-run
devcommandsbefore the cheat commands work again. - No undo.
spawn Trollat your base is forever (or until that troll dies). There's no rewind. Use killall to clean up. - Quiet failures. Most commands fail silently if the ID is wrong. If a spawn didn't appear, check your ID spelling and case before trying anything else.
Recipes — common things people want to do
Restock building materials
Skip a bad night
The argument is in seconds (1800 = 30 in-game minutes), but the exact mapping to day/night cycle varies. See the skiptime reference for details. Or use tod 0.5 to jump directly to midday.
Get back to base
Teleports to world coordinates. Coordinates are visible in pos before you teleport away — write them down first.
Where to go next
- The complete console commands guide — every command category in detail.
- How to fly, god mode, and no-clip — movement and invincibility cheats.
- How to spawn items in Valheim — deep dive on the spawn syntax.