VGKAMI
Advertise Get listed

Game Guides

Valheim Server Admin Commands and How to Use Them

October 26, 2026 11 min read

Valheim’s dedicated-server administration uses two separate permission tiers. Put a case-sensitive Platform User ID in adminlist.txt to grant server-management rights, then use the console commands Kick, Ban, Unban, and Banned. Cheat commands such as spawn and god belong to developer mode in single-player or a world you host yourself; they do not turn an ordinary dedicated-server player into a cheater.

This guide shows how to enable and open the console, identify the correct user ID, edit all three permission files safely, administer players, configure networking and backups, and diagnose commands that appear not to work.

What are Valheim server admin commands?

Valheim’s official dedicated-server commands are a small management set for removing players and inspecting bans. They are separate from the much larger developer-mode command set used to alter a locally hosted world. Your access comes from the server’s permission files, not from typing devcommands as a regular player.

The four core commands documented for dedicated servers are:

Command Purpose How to use it
Kick PLAYERNAME Remove a connected player Replace PLAYERNAME with the player’s exact in-game name.
Ban PLAYERNAME Ban a player Use the exact name shown to the console.
Unban PLAYERNAME Remove a ban Use the name associated with the ban.
Banned List bans Run it without an argument.

Current multiplayer references also document help, ping, lodbias, and info. Because command availability can change between Valheim builds, run help in the console and treat its output as the authority for your installed version.

How do I enable the F5 console?

On PC, add the -console launch argument before starting Valheim. On Xbox, console access is enabled by default.

Steam

  1. Open your Steam library and right-click Valheim.
  2. Choose Properties, then stay on the General tab.
  3. Enter -console in Launch Options.
  4. Close the properties window and launch the game from Steam with that option still present.

Microsoft Store PC version

  1. Locate the Valheim.exe shortcut you use to start the game.
  2. Open the shortcut’s properties and append -console to the target command.
  3. Launch Valheim through that modified shortcut. Starting the game another way can omit the argument.

Open the console after loading

Enter a world first. On a keyboard, press F5. On a controller, press LB + LT + Start. The console is available only after the world has loaded, not from the title screen.

If a laptop uses the function row for media controls, try the hardware function-lock key or the corresponding Fn combination. If F5 still does nothing, quit the game, confirm -console is in the launch option or shortcut you actually use, and restart through that same entry point.

How do I make myself an admin on a dedicated server?

Grant administration by adding your exact Platform User ID to adminlist.txt. Do not type a display name or a Steam nickname in that file.

  1. Stop the dedicated server cleanly with Ctrl+C. Editing permission files while the process is running can be overwritten or ignored.
  2. Open the server’s save directory. Unless you changed it with -savedir, the official default locations are %USERPROFILE%/AppData/LocalLow/IronGate/Valheim on Windows and ~/.config/unity3d/IronGate/Valheim on Linux.
  3. Open adminlist.txt in a plain-text editor. Create the file if it is missing.
  4. Put one Platform User ID on each line, copied exactly in the form [Platform]_[User ID]. IDs are case sensitive.
  5. Save the file, start the server again, and wait for the log message Game server connected.

You can obtain the ID from the dedicated-server log or from the in-game F2 panel. Copying it rather than retyping it avoids invisible character and capitalization errors. Each additional administrator gets a separate line.

What changes when the server uses -savedir?

The -savedir [PATH] startup argument relocates the world data and permission files together. If an edit appears to have no effect, check the active startup script for -savedir and edit the files in that custom directory instead of the operating system’s default.

How do I kick, ban, unban, or list players?

Open the console in the loaded world, then enter the command followed by the player’s exact current name. The dedicated-server command set uses player names as arguments, while the permission files use Platform User IDs.

  1. Press F5 (or LB + LT + Start on a controller).
  2. Type one command from the table below, preserving its spelling.
  3. Press Enter and watch the console for confirmation or an error.
Task Command Important detail
Remove a connected player Kick PLAYERNAME The player can reconnect unless another restriction applies.
Ban a player Ban PLAYERNAME Use the exact name currently recognized by the server.
Lift a ban Unban PLAYERNAME Run this after checking the spelling in the ban list.
Inspect bans Banned No player argument is required.

If a name-based command fails, confirm that you are an administrator, check the spelling and capitalization shown in the console, and restart the server after any change to adminlist.txt. Do not repeatedly enable developer mode: that is a different permission tier.

How does Valheim’s whitelist work?

The allowlist is controlled by permittedlist.txt. Add one case-sensitive Platform User ID per line, using the same [Platform]_[User ID] format as adminlist.txt.

Adding even one person to permittedlist.txt excludes everyone who is not listed. Iron Gate’s guidance explicitly warns that adding a person to the permitted list bans everyone else from the server. Use this file only when you intend to run a closed allowlist server; a typo can lock out a legitimate player just as effectively as an intentional restriction.

  1. Stop the server with Ctrl+C.
  2. Open the active save directory and edit permittedlist.txt in a plain-text editor.
  3. Enter one exact Platform User ID per line.
  4. Save the file and start the server again.

bannedlist.txt stores banned users. Normally you manage bans with Ban and Unban, but the file is useful when auditing the server’s saved state. Keep a backup before manually changing it.

What is the difference between admin commands and cheat commands?

Administration and cheating are intentionally separate. Admin-list membership gives you server-management privileges; it does not grant god, spawn, or other world-altering commands to every dedicated-server participant.

Developer-mode commands

In single-player or a world you host yourself, the developer-mode workflow generally requires opening the console and entering devcommands. Examples documented for that environment include god, ghost, nocost, spawn, tame, killall, raiseskill, goto, and debugmode.

Those commands are outside ordinary dedicated-server administration. A regular player connected to someone else’s dedicated server cannot make them work simply by typing devcommands. If a cheat command does nothing, first identify whether the world is single-player/self-hosted or a dedicated server, then check whether your account has the relevant permission tier.

Which other server commands are available?

Use help to see what the current build exposes. Secondary multiplayer references commonly list the following commands in addition to the official kick and ban set:

Command Reported use Qualification
help Print available server commands Verify the output in your build.
ping Measure server latency Availability is version dependent.
lodbias [number] Set server draw distance The cited reference describes a range of 1–5; verify behavior in your version.
info Print system information Use help if it is not recognized.
save Force a world save A community reference documents it; verify availability before relying on it for maintenance.
setworldpreset [preset] Change the world preset World-changing operation; back up first.
setworldmodifier [name] [value] Change a world modifier World-changing operation; back up first.

Iron Gate also documents startup parameters for world presets and modifiers. Startup configuration is preferable when you want a repeatable server setup rather than an ad-hoc console change.

How should I protect the world before destructive commands?

Make a copy of the world before using commands that can alter terrain, entities, or procedural locations. Current command references specifically warn about spawn, forcedelete, location, and genloc. A mistaken argument or an interrupted operation can damage a world, and an admin command does not provide an undo function.

  • Stop the server or use a verified save procedure before copying files.
  • Keep the original world and the backup in separate folders or storage locations.
  • Label backups with the date and the change you are about to make.
  • Test that a backup can be restored before making major world edits.

For routine protection, the official startup settings provide a 30-minute default save interval with -saveinterval 1800. The documented backup defaults are four backups total, consisting of one short backup and three long backups; -backupshort 7200 sets a two-hour short-backup interval and -backuplong 43200 sets a 12-hour long-backup interval. These are seconds, so keep the units visible when editing a script.

Which ports and startup settings does a dedicated server need?

For the Steam backend, Valheim uses ports 2456–2457 by default and generally requires router port forwarding for players outside your local network. The exact forwarding rule depends on your router and host firewall, so open the same port range configured in the server script.

When should I use Crossplay?

Adding -crossplay selects the PlayFab relay backend and allows players from any platform to connect. External access through the relay does not require router port forwarding. Crossplay has a trade-off: local-IP and loopback connections are not supported, so a machine on the same network cannot join by connecting to its local address.

Useful startup arguments

  • -public 0 hides the server from the browser. It does not create a whitelist; players must join by IP, subject to the server’s other access controls.
  • -preset selects a world preset at startup.
  • -modifier configures world modifiers at startup.
  • -setkey sets a world key at startup.
  • -savedir [PATH] moves the world and permission files to a chosen directory.

Copy the original startup script before editing it. Steam updates can reset the original script, and a saved copy lets you compare or restore your intended arguments.

Why do Valheim admin commands not work?

Work through the failure that matches what you see rather than changing several settings at once.

F5 does nothing

  • Confirm -console was present before launch.
  • Restart through the same Steam launch option or Microsoft Store shortcut that contains the argument.
  • Check the laptop’s function-lock or Fn behavior.
  • On Xbox, use LB + LT + Start after the world has loaded.

The console opens, but a cheat command has no effect

Check the world type. Developer-mode cheats are intended for single-player or a world you host yourself; a normal player on a dedicated server cannot activate that tier. Admin-list membership is the correct path for kick, ban, unban, and ban-list management.

An admin command is rejected

  • Verify that your own Platform User ID is copied exactly into adminlist.txt.
  • Confirm the file is in the active -savedir directory, if one is configured.
  • Check the player name’s exact spelling and capitalization.
  • Stop and restart the server after saving the file.
  • Run help to confirm the command exists in the current build.

The server cannot be reached

For a Steam backend, check forwarding and firewall rules for ports 2456–2457. For cross-platform external access, consider -crossplay; remember that Crossplay relay access removes the need for router forwarding but does not support local-IP or loopback joins.

A world-editing command caused damage

Stop making further changes, shut down the server cleanly, and restore the most recent known-good backup. Treat spawn, forcedelete, location, and genloc as destructive maintenance commands, not routine administration.

Should I self-host or use managed Valheim hosting?

Self-hosting gives you direct control over the scripts, permission files, ports, save intervals, and backup retention. It also makes you responsible for forwarding, firewall rules, updates, file backups, and recovering from a bad command.

Decision factor Self-hosted server Managed host
Backend choice You choose Steam or Crossplay and edit the startup script. Availability depends on the provider and its current Valheim build.
Port forwarding Usually required for Steam; not required for external Crossplay access. Typically handled by the host’s network setup, but verify the selected backend.
Permission files Direct access to adminlist.txt, bannedlist.txt, and permittedlist.txt. May be exposed through a panel, file manager, or support request.
Backups You set save and backup intervals and must verify restoration. Retention and restore controls vary by provider.
Maintenance burden You maintain scripts, updates, firewall rules, and recovery copies. The provider reduces infrastructure work but may limit low-level access.

Choose self-hosting when you are comfortable maintaining files and network access. Choose a managed service when reducing infrastructure work matters more than having unrestricted script and filesystem control; confirm that it supports the current game build and gives you the permission and backup controls your group needs.

What is the safest everyday administration routine?

  1. Keep a dated copy of the startup script and the world folder.
  2. Use Platform User IDs, not nicknames, in the permission files.
  3. Stop the server before editing adminlist.txt, bannedlist.txt, or permittedlist.txt.
  4. Restart and wait for Game server connected. before testing access.
  5. Use name-based commands only for immediate player actions, and verify the result with Banned or the server log.
  6. Run help after a game update to discover changes in the command inventory.
  7. Back up before any world-editing command and keep the backup outside the live save directory.

Frequently Asked Questions

Can I add a player to more than one permission file?

Yes. The files serve different purposes: an ID can be in adminlist.txt for management rights and also in permittedlist.txt for allowlist access. Keep each file’s role separate when auditing who can join and who can administer the server.

Does hiding a server with -public 0 secure it?

No. That setting removes the server from the browser and makes Join IP the normal discovery route. It does not authenticate players or replace the permitted, banned, and admin lists.

Why does a player still appear connected after I edit a ban file?

File edits are read during server startup, so stop and restart the server after changing a permission file. For an immediate removal, use Kick PLAYERNAME first, then apply the persistent ban and restart as needed.

Can Crossplay players connect through a local IP address?

No. Crossplay uses a relay for external access and does not support local-IP or loopback connections. Players on the same network should use the supported server-join method rather than relying on a local address.