How Valheim's Console Commands Work on a Server

Valheim’s console has two separate tiers, and confusing them is why command lists on the internet contradict each other. Admin commands are server moderation — kicking, banning, forcing a save — and they work if your ID is in the server’s adminlist.txt. Devcommands are the cheat/debug layer, off by default, and they change the game rather than administer it. The command set shifts between game builds, so the only list worth trusting is the one your own build prints.

Getting a console at all

The console is a client feature. The server doesn’t have an interactive prompt you type into; you open a console inside your own game client and issue commands to the server you’re connected to. Enable it by adding the console launch option to Valheim in Steam — right-click the game → Properties → Launch Options — then press F5 in-game to open it.

Admin rights come from the server. Add your SteamID64 to adminlist.txt in the server’s Valheim data directory, one ID per line, and restart to be sure it’s loaded. Without that, you have a console that can’t do anything to the server.

Both halves are required, and each is easy to forget. If commands seem to be ignored, check which half is missing before assuming the command name is wrong.

Get the authoritative list from the game

This is the single most useful habit:

help

Typed in the console, this prints the commands your build actually supports. Do it once after every major game update. Any published list — including the examples below — is a snapshot of some past build, and commands are added, renamed, and removed. Two minutes with help beats twenty minutes wondering why a command from a two-year-old video does nothing.

If a command doesn’t appear in help, it either doesn’t exist on your build or it’s behind devcommands.

The admin commands you’ll actually use

A small handful cover almost all real server administration:

  • kick — disconnect a player. They can rejoin.
  • ban — disconnect and block. Mirrors bannedlist.txt.
  • unban — reverse a block.
  • banned — print the current block list. Use it to confirm a ban or unban landed; it’s the only feedback you get.
  • save — force the server to write the world to disk right now. Run this before any planned restart, update, or backup.
  • ping — show your latency to the server. Useful when someone reports lag, because it separates “the server is struggling” from “your connection is bad”.
  • info — print performance information, handy when chasing stutter.

Prefer IDs over names. Names can contain spaces and look-alike characters, and a name-based command that matches nothing fails silently — indistinguishable from one that worked. That’s why banned matters.

Moderation workflow in detail: How to Kick and Ban Players on a Valheim Server.

save is the one to internalise

Valheim autosaves on an interval. Everything since the last autosave is at risk if the process is killed, the machine loses power, or a crash takes it down mid-session.

So build these two habits:

  • Run save before any restart or update. Your update script can stop the service politely, but a manual save first costs nothing.
  • Run save before taking a backup, so the archive contains the current state rather than whatever the last autosave held.

Combine that with a real backup schedule from Essential Valheim Admin Commands and Automated Backups.

Devcommands: the cheat layer

Typing devcommands in the console toggles the debug/cheat commands on for your session — as an admin on a dedicated server. That unlocks things like invincibility, flight, spawning items, and teleporting. Typing it again turns them back off.

Three honest points about them:

They’re legitimate and useful for admin work. Recovering a base after a griefing incident, testing a mod, checking whether a build causes lag, retrieving something lost to a bug — these are real jobs and cheats are the practical tool.

They change the game for everyone who knows they’re available. Once someone has flown to a boss, the group’s relationship with the game has shifted. Agree as a group before using them on a shared world, and turn them back off afterwards.

The exact command names change. Rather than reproducing a list that will be wrong within a patch or two, enable devcommands and run help again — the list expands to include them. That’s the version that’s actually true for your server.

What the console can’t do

  • It can’t change launch settings. Server name, password, port, public flag and world are read at launch. Change them where the server starts, then restart: Valheim Server Configuration: Every Setting That Matters.
  • It can’t fix a server you can’t connect to. The console lives in a connected client, so a server that refuses connections is out of reach — you need shell access and logs instead.
  • It isn’t a server terminal. Commands that look like server administration in other games (reload configs, list connected sessions with full detail) mostly don’t exist here.
  • It can’t undo world damage. Restoring a world is a file operation with the server stopped: How to Restore a Valheim World From a Backup.

When commands don’t work

Work through this in order:

  1. Is the console even open? The launch option has to be set on your client, and it survives until you reinstall or reset launch options.
  2. Are you on the admin list? Correct file, right directory, 17-digit SteamID64, one per line, server restarted. On Linux that directory is in the home of the user running the server — not the install directory, and not your own home.
  3. Does the command exist on this build? Run help.
  4. Is it a devcommand? Toggle devcommands first.
  5. Did it silently match nothing? Use the ID form and verify with banned where applicable.
  6. Are mods interfering? A plugin can add, alter, or gate commands. Check BepInEx/LogOutput.log.

The short version

Enable the console on your client, put your ID in adminlist.txt, learn save, kick, ban, unban, banned, and ping — and treat help as the real documentation. That’s a complete admin toolkit, and it stays correct across updates precisely because it doesn’t depend on memorising a list.