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 tobannedlist.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;bannedshows it.banned: lists every entry. Anyone not on the admin list gets "You are not admin".
The file
bannedlist.txtsits in the server's save folder withadminlist.txtandpermittedlist.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 tobannedlist.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:unbanalone 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.