How to Ban and Kick Players on Your Valheim Server
Remove disruptive players from your Valheim dedicated server using kick, ban, and unban commands or by editing bannedlist.txt directly.
As a server admin, you can kick or ban players who break your rules. Kicks disconnect a player immediately while bans prevent them from reconnecting. Both can be done in-game or by editing files.
Kick a Player
Kicked players are disconnected but can rejoin.
Authenticate as admin
Join the server, press F5 to open the console (player must have -console in Steam launch options).
Ban a Player
Banned players are disconnected and cannot rejoin until unbanned.
Open the in-game console
Press F5 as an admin.
Run the ban command
ban PlayerNameOr by SteamID64:
ban 76561198012345678The player is disconnected immediately and added to bannedlist.txt.
Stop the server
In the XGamingServer Panel, go to Console and stop your server.
Open bannedlist.txt
Click Files in the sidebar and open bannedlist.txt in the server root.
Save and start
Click Save Content and start the server from Console.
Unban a Player
unban 76561198012345678Open bannedlist.txt in Files and delete the player's SteamID line. Save and restart.
View Banned Players
In the in-game console:
bannedThis lists all currently banned players with their SteamIDs.
Find a Player's SteamID
| Method | How |
|---|---|
| Press F2 in-game | Shows all connected players with their SteamID64 |
| steamid.io lookup | Enter the Steam profile URL at steamid.io and copy steamID64 |
| Server console logs | When a player connects, their SteamID appears in the Console output |
Dealing With Griefers
Kick immediately
kick PlayerNameBan to prevent return
ban PlayerNameForce a save
Type save in the console to preserve the current state before any further damage.
Restore if needed
If the griefer caused damage, restore from a backup.
Tip: For a more secure server, set up a whitelist so only approved players can join in the first place.
Related Guides
How is this guide?
