Valheim server commands help you manage players, check issues, and control test worlds faster. The important distinction is this: real server admin commands run through admin rights on the server, while according to the official Valheim documentation, many cheat and spawn commands are only available in suitable game modes after devcommands.
Requirements for Valheim Server Commands
Before using commands, you need access to the console and, for server management, an entry in the admin list. The official Valheim support page describes the Steam startup option -console and names F5 as the key for opening the console: documentation at valheim.com
For a paid Valheim server, it is also crucial that you can control configuration files. At game-serverhosting, you manage your server not through guesses, but through traceable settings, files, logs, and support channels. If you are just planning a server, the internal guide Rent and Set Up a Valheim Server fits well. For local Windows setups, you can also use Set Up a Valheim Dedicated Server on Windows.
Open the Admin Console
Press F5 in-game to open the console. If nothing happens, first check whether Valheim was started with the correct startup option. On Steam, enter -console in the game's properties under launch options. Then start Valheim through the same platform or shortcut for which you set the option.
A quick function test is:
help
If the console outputs commands, it is accessible. But if you are on a server, that does not automatically mean you have admin rights.
Maintain the Admin List
For server admin commands, your ID must be in adminlist.txt. Enter one ID per line, for example:
76561198012345678 # SteamID64
76561198087654321 # Second admin
Save the file and then reconnect to the server. If a panel requires a restart or reload for this file, perform it deliberately and then check with a harmless command whether your rights apply. Keep the list short: only people who really moderate or handle technical tasks should be listed there.

Server Admin Commands
These commands are relevant for live server operation. They are not for cheating, but for moderation and administration.
ban <name/ip> # Ban player
kick <name> # Kick player
unban <name/ip> # Unban player
banned # Show ban list
Use kick when a player should be disconnected immediately but no permanent exclusion is needed. ban is intended for clear rule violations. With banned, you check the current ban list before making further changes. If you accidentally excluded someone, remove the entry with unban.
Understand Cheat Mode and devcommands Correctly
The command for enabling it is:
devcommands
According to the official Valheim documentation, many cheat commands only become available after devcommands. At the same time, you should not confuse them with normal server admin rights: commands like flying, god mode, or spawning items are mainly intended for tests, single-player worlds, or self-hosted sessions. On dedicated servers, depending on the game version and context, they cannot be used like classic admin commands.
Important Commands
| Command | Description |
|---|---|
god |
Invincible |
ghost |
Invisible to enemies |
fly |
Fly |
pos |
Show position |
goto x,y,z |
Teleport |
exploremap |
Reveal the entire map |
resetmap |
Reset the map |
killall |
Kill all enemies nearby |
Use these commands sparingly. For team worlds, it makes sense to run tests in a separate world so game progress, map state, and resources are not changed unintentionally.
Spawn Items
The basic pattern is:
spawn <ItemName> <Anzahl> <Level>
Examples:
spawn SwordBlackmetal 1 4 # Blackmetal sword
spawn ArmorPaddedCuirass 1 4 # Padded armor
spawn DragonEgg 1 # Dragon egg
spawn Coins 999 # 999 coins
Pay attention to exact spelling for item names. If a spawn command does not respond, it is often because devcommands is missing, the item name is wrong, the context is unsupported, or you are currently on a dedicated server instead of in a suitable test environment.
Weather and Time
For testing visibility, events, or building sites, weather and time commands can be helpful:
tod 0.5 # Noon (0-1, 0=midnight)
wind 0 0 0 # Stop wind
resetwind # Reset wind
env clear # Weather: clear
env rain # Weather: rain
env thunder # Weather: thunderstorm
After each intervention, check whether the desired effect is visible. Weather and time commands in particular are more suitable for diagnostics and testing than for permanent server balancing.
Check the Result
After admin changes, you should check three things: Does the console open with F5? Is your admin role recognized after the entry in adminlist.txt? Do harmless commands like banned or pos work? Only after that should you perform actions like kick, ban, or world changes.
If you are working on mods, boss order, or the general server structure, the guide Rent a Valheim Server: Mods, Configuration, and Boss Order will also help.
Troubleshooting
If F5 does not open a console, check the -console startup option, the platform used, and on laptops the function key behavior. If admin commands do not apply, check the ID in adminlist.txt, remove whitespace errors, and reconnect. If spawn, god, or fly do not work, do not treat it as a server error; first check whether devcommands is supported in the current game context.
Checks, Limits, and a Safe Rollback
The guide “Valheim Server Commands – Use Admin Commands Correctly” applies to the server type described in the article and the version state visible at the time of checking. Menu names, available versions, mod or plugin compatibility, and required resources may differ after updates. Therefore, do not transfer any values unchecked to another game, loader, or server version.
Before making changes to the world, save, configuration, or extensions, create a backup of the affected files. Then change only one related step and test it with the same client and server version you want to play with later.
| Checkpoint | Expected result | Abort and rollback |
|---|---|---|
| Server start | The server reaches the ready state without a new error message. | If startup errors occur, revert the change and restore the last backup. |
| Connection test | A test account can connect via the address shown in the panel. | If version or connection errors occur, compare version, port, and allowances again. |
| Function test | The specifically changed function works without damaging existing world or game data. | If side effects occur, stop the server and restore backed-up files. |
A successful single test is not a guarantee of performance or availability. World size, mods, plugins, player count, network path, and simultaneous load can change the result. Document the version, change, and test result so you can understand later deviations.
FAQ
Why does F5 not open the Valheim console?
Usually the -console startup option is missing or Valheim was not started through the shortcut where this option is set. Also check whether your keyboard sends F5 directly or whether an Fn key is required.
Is devcommands enough for server admin rights?
No. devcommands enables cheat or developer commands in supported contexts. For server administration, you need a correct entry in adminlist.txt.
Which commands are most important for a dedicated server?
For operation, kick, ban, unban, banned, and depending on context save or administration commands are especially relevant. You should treat cheat commands separately.
Can I spawn items on my Valheim server?
That depends on the game context. The spawn command exists, but it does not automatically work as a normal dedicated server admin command. Test commands like this in a suitable world before planning them into your processes.
What should I check before a ban?
Check the player name or ID, document the reason, and then check with banned whether the correct entry was set. This helps you avoid unnecessary false bans.