Valheim server commands help you manage players, check for problems, and control test worlds more quickly. The distinction is important: real server admin commands run via 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 you use commands, you need access to the console and, for server management, an entry in the admin list. For Steam, the official Valheim support page describes the launch option -console and names F5 as the key to open the console: Documentation at valheim.com

For a paid Valheim server, it's also crucial that you can control the configuration files. At game-serverhosting, you manage your server not through guesswork but through traceable settings, files, logs, and support channels. If you're only just planning a server, the internal guide Renting and Setting Up a Valheim Server fits well. For local Windows setups, you'll also find Setting Up a Valheim Dedicated Server on Windows.

Opening the Admin Console

Press F5 in the game to open the console. If nothing happens, first check whether Valheim was started with the right launch option. On Steam, you enter -console for this in the game's properties under launch options. Then start Valheim via the same platform or shortcut for which you set the option.

A quick function test is:

help

If the console outputs commands, it is reachable. If you're on a server, however, that doesn't automatically mean you have admin rights.

Maintaining the Admin List

For server admin commands, your complete Platform User ID must be in adminlist.txt. The current Iron Gate guide requires the format [Platform]_[User ID], including correct capitalization. Read the ID with F2 in the game or from the server log; for Steam, an entry looks like this, for example:

Steam_76561198012345678
Steam_76561198087654321

Enter one complete ID per line, without explanatory comments. For crossplay, use the platform prefix that is actually displayed. The official dedicated server guide describes both the ID and the storage location of the lists.

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 use a harmless command to check that your rights take effect. Keep the list short: only people who actually moderate or take on technical tasks should be on it.

Live console of a Valheim server in the game-serverhosting panel: server startup and admin output in real time
Live console of a Valheim server in the game-serverhosting panel: server startup and admin output in real time

Server Admin Commands

These commands are relevant for running the server. They are not for cheating, but for moderation and management.

ban <PlayerName>
kick <PlayerName>
unban <PlayerName>
banned

Replace <PlayerName> with the actual name. The manufacturer's guide documents these name-based commands; for other identifiers, check the help of the running version.

Use kick when a player should be disconnected from the server immediately but a permanent exclusion isn't necessary. ban is intended for clear rule violations. With banned, you check the current ban list before making further changes. If you've excluded someone by mistake, you remove the entry with unban.

Understanding the Cheat Mode and devcommands

The command to enable it is:

devcommands

According to the official Valheim documentation, many cheat commands only become available after devcommands. At the same time, you shouldn't confuse them with normal server admin rights: commands such as flying, god mode, or spawning items are intended mainly for tests, single-player worlds, or self-hosted sessions. An entry in the admin list of a dedicated server does not automatically unlock these developer functions. Additional mods can change the scope; in that case, consult the specific mod documentation rather than reading the following list as a guaranteed dedicated server feature.

Important Commands

Command Description
god Invincible
ghost Invisible to enemies
fly Fly
pos Show position
goto Teleport in a supported test environment; check the exact parameters in the current command help
exploremap Reveal the entire map
resetmap Reset the map
killall Kill all enemies in the vicinity

Use these commands sparingly. For team worlds, it makes sense to run tests in a separate world so that game progress, map state, and resources aren't changed unintentionally.

Spawning Items

The basic pattern is:

spawn <ItemName> <Amount> <Level>

Examples:

spawn SwordBlackmetal 1 4
spawn ArmorPaddedCuirass 1 4
spawn DragonEgg 1
spawn Coins 999

Pay attention to exact spelling for item names. If a spawn command doesn't respond, it's often due to a missing devcommands, a wrong item name, an unsupported context, or the fact that you're currently working on a dedicated server instead of in a suitable test environment.

Weather and Time

For tests of visibility, events, or building sites, weather and time commands can be helpful:

help

For time or weather tests, read the parameters of the running version instead of copying unverified environment names. Such developer functions are no proof of admin rights on a dedicated server. Note the previous state and test on a separate world.

After each intervention, check whether the desired effect is visible. Weather and time commands in particular are better suited to diagnosis and testing than to permanent server balancing.

Checking 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? Can the server-side ban list be queried with banned? help and pos alone do not confirm a server admin role. Only then should you carry out interventions such as kick, ban, or world changes.

If you're working on mods, boss order, or general server structure, the guide Renting a Valheim Server: Mods, Configuration, and Boss Order also helps.

Troubleshooting

If F5 doesn't open a console, check the launch option -console, the platform used, and, on laptops, the function key assignment. If admin commands don't take effect, compare the entire entry in adminlist.txt with the Platform User ID from F2 or the server log, including prefix and capitalization, and reconnect. If spawn, god, or fly don't work, don't treat this as a server error, but first check whether devcommands is supported in the current game context.

FAQ

Why doesn't F5 open the Valheim console?

Usually the launch option -console is missing, or Valheim wasn't started via the shortcut in which this option is set. Also check whether your keyboard sends F5 directly or an Fn key is needed.

Is devcommands enough for server admin rights?

No. devcommands enables cheat or developer commands in supported contexts. For server management, 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 the context, save or management commands are the most 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 doesn't automatically work as a normal dedicated server admin command. Test such commands in a suitable world before you build them into your workflows.

What should I check before a ban?

Check the player name or ID, document the reason, and then use banned to verify that the right entry was set. That way you avoid unnecessary wrongful bans.