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:
Ban and unban players from the server files
Add an allowlist to the server
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
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:
- Open Steam → Right Click on Valheim → Select Properties
- 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
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:
- Open the DatHost Control Panel
- Go to Edit → Settings for your Valheim server and scroll down to Server Admins
- 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
Have someone entered your Valheim server without your permission, and you need to know how to quickly kick them? Follow these simple steps below:
- Open the console in-game by pressing F5.
- 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.
- Hit Enter and the user will be kicked from the server to the main menu.
How to ban players in-game
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:
- Open the console in-game by pressing F5
- 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.
- Hit Enter and the user will be kicked from the server to the main menu.
How to unban players in-game
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:
- Open the console in-game by pressing F5
- 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.
- 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
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:
- Open the DatHost Control Panel
- Go to Edit → File Manager for your Valheim server
- Navigate to the folder SaveDir and expand it
- Open the file bannedlist.txt
- 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
- Click Save.
How to add an allowlist to the server
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.
- Open the DatHost Control Panel
- Go to Edit → File Manager for your Valheim server
- Navigate to the folder SaveDir and expand it
- Open the file permittedplayers.txt
- 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.
- Click Save.
How to get a list over banned users
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
- Open the console in-game by pressing F5
- Write banned and hit Enter.
Server files
- Open the DatHost Control Panel
- Go to Edit → File Manager for your Valheim server
- Navigate to the folder SaveDir and expand it
- Open the file bannedlist.txt
- 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.