Valheim Server Console Commands – How to kick, ban and whitelist players

If you just created a dedicated server for your Valheim world, there are a few good console commands to know about that can be useful. Here you will find a detailed guide with the most useful commands and simple step-to-step guides on how to use them.

In this post we’ll go through these commands, you can jump directly to them by clicking the links below:

How to enable the console

Add server admins

Kick players in-game

Ban players in-game

Unban players in-game

Ban and unban players from the server files

Add an allowlist to the server

Get a list over banned users

If you don’t have a dedicated Valheim Server but was simply wondering if this was possible, the answer is yes! We offer quality Valheim servers that gives your world a permanent home for you and your friends to connect to whenever. Rent a Valheim server from DatHost here.

How to enable the console

Steam launch options

To be able to use these commands, you must have the console enabled in-game. This is pretty straightforward, all you have to do is the following:

  1. Open Steam Right Click on Valheim Select Properties
  2. Type -console into your Launch Options

You’re done! Now when opening the game your console will be enabled and you can open it by pressing F5 on your keyboard.

How to add server admins

DatHost Sever Admins Control Panel

To be able to use these commands, you must first be a server admin. This is pretty straightforward on DatHost Valheim Servers, all you have to do is the following:

  1. Open the DatHost Control Panel
  2. Go to Edit Settings for your Valheim server and scroll down to Server Admins
  3. Here you can easily add and remove admins by entering the user’s SteamID64. If you are in-game you can find this ID easily. Hit F2 to bring up a list of the current players in the server followed by their SteamID64, use this ID in the Server Admin section.

If you don’t host your server at Dathost, you can also do this via the server files. Locate the file adminlist.txt located in the servers folder. Here you can add and remove admins by adding or removing lines with the user’s SteamID64.

How to kick players in-game

Valheim Kick Players

Have someone entered your Valheim server without your permission, and you need to know how to quickly kick them? Follow these simple steps below:

  1. Open the console in-game by pressing F5.
  2. Write kick followed by the user’s name, IP or SteamID64. You can always press F2 to bring up the list of current players in the server followed by their SteamID64. Note that the input is case sensitive if you are writing the user’s name.
  3. Hit Enter and the user will be kicked from the server to the main menu.

How to ban players in-game

Valheim Ban Players

If you need to ban someone and make sure they can’t reconnect to your Valheim server, the procedure is very similar to how you kick someone. Follow these simple steps below:

  1. Open the console in-game by pressing F5
  2. Write ban followed by the user’s name, IP or SteamID64. You can always press F2 to bring up the list of current players in the server followed by their SteamID. Note that the input is case sensitive if you are writing the user’s name.
  3. Hit Enter and the user will be kicked from the server to the main menu.

How to unban players in-game

Valheim Unban Players

Have you accidentally banned someone, or want to give the user another chance in your Valheim world? You can unban them from your console in-game, follow these simple steps below:

  1. Open the console in-game by pressing F5
  2. Write unban followed by the user’s name, IP or SteamID64. You can always press F2 to bring up the list of current players in the server followed by their SteamID64. Note that the input is case sensitive if you are writing the user’s name.
  3. Hit Enter and the user will be kicked from the server to the main menu.

How to ban and unban players from the server files

Valheim Ban Users from Server Files

If you would like to manage bans and unbans from the server files, you can do so by editing the files in your server. Follow these steps below:

  1. Open the DatHost Control Panel
  2. Go to EditFile Manager for your Valheim server
  3. Navigate to the folder SaveDir and expand it 
  4. Open the file bannedlist.txt
  5. Here you can simply ban a player by adding a new line with the users SteamID64, or unban by removing the line corresponding to the users SteamID64
  6. Click Save.

How to add an allowlist to the server

DatHost Add a Allowlist to Valheim Servers

Allowlist, or permitted players, could be a useful tool if you want to limit which players can join your server. If you use an allowlist, only those users can join the server, whether or not they know the servers IP and password.

  1. Open the DatHost Control Panel
  2. Go to EditFile Manager for your Valheim server
  3. Navigate to the folder SaveDir and expand it 
  4. Open the file permittedplayers.txt
  5. Here you can simply add a user by adding a new line with the user’s SteamID64, or remove a user by removing the line corresponding to the user’s SteamID64. Note that you need to list these with one SteamID64 per row.
  6. Click Save.

How to get a list over banned users

Get a list of Banned Users Valheim

There are two different ways to get a list over the banned users, you can either do it in-game or see it in the server files of your dedicated server.

In-game

  1. Open the console in-game by pressing F5
  2. Write banned and hit Enter.

Server files

  1. Open the DatHost Control Panel
  2. Go to Edit File Manager for your Valheim server
  3. Navigate to the folder SaveDir and expand it 
  4. Open the file bannedlist.txt
  5. Here you have a full view over the users that are banned from the server. If the file is empty then no one has been banned from the server.