Menu
 

Valheim Ban, Kick and Unban: Commands, bannedlist.txt and Player IDs

Valheim: ban, kick and unban players

Valheim keeps bans in bannedlist.txt and enforces them itself: every 5 seconds the server kicks anyone connected who is on the list. This page covers the commands, the file, and the IDs to use, checked against the Valheim 1.0.17 server code on 14 October 2026.

The commands

You must be on the server's admin list and have the console enabled (the -console launch option in Steam). Press F5:

  • kick [name/ID]: disconnects the player. The server looks for the platform ID first and the player name second. They can rejoin if they know the password.
  • ban [name/ID]: adds the player to bannedlist.txt, and the 5-second check removes them. For a connected player given by name, the server stores their ID, so a later name change does not get them back in.
  • unban [ID]: removes that exact entry. Use the same text the ban stored; banned shows it.
  • banned: lists every entry. Anyone not on the admin list gets "You are not admin".

The file

  • bannedlist.txt sits in the server's save folder with adminlist.txt and permittedlist.txt, one entry per line.
  • An entry can be a platform ID or a player name: the server refuses a joining player whose ID or name is on the list.
  • The server rereads the file within about 10 seconds of an edit, so a ban added by hand takes effect without a restart.
  • On a Supercraft server, a ban typed in game with ban, or added to bannedlist.txt, lasts across restarts, and the Banned List in the access settings of the configuration tab is written into the file at every start alongside it. To lift a ban that is in the panel's list, remove it there: unban alone lasts only until the next restart.

Which ID to use

Press F2 while the player is online: the network panel lists every connected player with their ID. A Steam player shows as V_ and their SteamID64, and their ban can also be written as Steam_ plus the number, or the bare number. Xbox, PS5 and Switch 2 players show as X_, S_ or N_ and a number, and only that ID matches them. Note the ID before you kick someone.

For a server only your group can enter, use the whitelist instead: it blocks everyone who is not on it.

Keep the gates secure. Host your Valheim server with Supercraft and manage bans from the Banned List in the panel instead of editing text files.

Launch a Valheim server with this setup

Pick a preset and your new server boots preconfigured - rates, rules and mods already dialed in. Change anything later in the panel.

Browse all Valheim recipes →

Valheim Crossplay: Passive Mobs

Crossplay preset with the passive-mobs world modifier: creatures do not aggro unprovoked. Great for mixed-ski…

Valheim Crossplay: Scheduled Restarts

Crossplay-enabled server (Steam + Xbox/PC Game Pass) with a nightly restart window for stability. Use when yo…

Tired of fighting this issue every patch?

Run a managed Valheim server with us. We handle the patches, mod-version pinning, save backups, and DDoS protection. Set up in minutes, multiple datacenter regions, no contract.

See Valheim hosting plans →
Top