This guide shows you how to restrict your Valheim dedicated server to a specific list of players using the whitelist feature. By setting up a whitelist, you control exactly who can join, keeping your server private and secure from random players. You’ll need access to your server’s configuration files and the Steam ID of each player you want to allow.
What You’ll Need
- Access to your Valheim dedicated server’s installation folder (where the server files are located).
- Administrative access to edit files on the server (via FTP, SSH, or a file manager in your hosting panel).
- The Steam ID (17-digit number) of each player you want to whitelist. You can find this via third-party Steam ID lookup sites or by asking players to check their Steam profile URL.
- Basic familiarity with editing text files (like Notepad or a code editor).
Step-by-Step
- Stop your Valheim server to avoid any file conflicts. If you’re using a hosting panel, use its stop button. If you’re running the server manually, close the console window or use the appropriate command (e.g., Ctrl+C).
- Locate the whitelist file. In your server folder, look for a file named
whitelist.txt. If it doesn’t exist, you’ll need to create it. In most setups, this file is in the same directory as the server executable (e.g.,valheim_server.exeon Windows, or the folder where you run the server on Linux). - Open the whitelist file with a plain text editor (like Notepad on Windows, or nano/vim on Linux). Do not use a word processor like Word, as it may add formatting that breaks the file.
- Add the Steam IDs of the players you want to allow. Enter each ID on a separate line. Make sure there are no extra spaces, commas, or other characters. For example:
76561198000000000
76561198011111111 - Save the file and close the editor.
- Start your Valheim server again. The whitelist will be loaded automatically. Players not listed will be unable to join and will see a message indicating they are not whitelisted.
- Test the whitelist by trying to join from a non-whitelisted account (if you have one) or by asking a friend who is not on the list to attempt to join. They should be rejected.
Common Mistakes
- Incorrect Steam ID format: Steam IDs are 17 digits long. Double-check that you’ve copied the full ID without missing any digits. A common error is copying the Steam profile’s custom URL (like
steamcommunity.com/id/MyName) instead of the numeric ID. - Extra characters in the file: Spaces, tabs, or blank lines can cause the whitelist to fail. Ensure each line contains only the Steam ID, with no trailing spaces.
- Editing while the server is running: Changes to the whitelist file are usually only read at server startup. If you edit the file while the server is running, the changes won’t take effect until you restart the server.
- Wrong file location: Some server setups (especially those using Docker or a custom directory) might have the whitelist file in a different location. If you can’t find it, check your server configuration file (like
start_server.shorvalheim_server.cfg) for a path setting. - Using the wrong ID type: Valheim uses the Steam ID (SteamID64). Make sure you’re not using the Steam3 ID (which starts with
STEAM_0:) or the account ID (a shorter number).
Tips
- Back up your whitelist file before making changes, especially if you have a large list. This way, you can easily revert if something goes wrong.
- Keep the whitelist updated: If you want to remove a player, simply delete their line from the file and restart the server.
- Use a script or panel: If your hosting panel supports it, you might be able to manage the whitelist through a web interface, which can be more convenient than editing files manually.
- Combine with a password: For extra security, you can also set a server password in the
start_server.shorvalheim_server.cfgfile. The whitelist restricts who can join, while the password adds an additional layer of protection.
Troubleshooting
If the whitelist isn’t working as expected, try the following:
- Check the file name and extension: The file must be exactly
whitelist.txt(case-sensitive on Linux). If you created it aswhitelist.txt.txt(because Windows hides extensions), it won’t be recognized. - Verify the server is reading the file: Some server configurations require a specific command-line argument to enable the whitelist. Check your server startup script for a parameter like
-whitelistor-public 0. If it’s not there, you may need to add it. - Look for error messages: When the server starts, watch the console for any errors related to the whitelist. If you see a message like “Failed to load whitelist”, it usually means the file is malformed or in the wrong location.
- Restart the server completely: Sometimes a simple restart doesn’t reload the whitelist. Try a full stop and start, ensuring the process is completely terminated.
- Check file permissions: On Linux, ensure the server process has read permissions for the whitelist file. You can set permissions with
chmod 644 whitelist.txt. - Test with a known good ID: If you’re unsure if your Steam ID is correct, use a tool like SteamID.io to convert your profile URL to a SteamID64 and test with that.
Frequently Asked Questions
How do I find a player’s Steam ID?
Ask the player to open their Steam profile in a web browser. The URL will contain either a custom name (like steamcommunity.com/id/MyName) or a long number (like steamcommunity.com/profiles/76561198000000000). If it’s a custom name, you can use a third-party site like steamid.io to convert it to the numeric ID.
Can I use a whitelist and a password at the same time?
Yes, you can. The whitelist controls who is allowed to join, and the password adds an extra barrier. Players must be on the whitelist and enter the correct password to connect. This is a good practice for private servers.
Does the whitelist apply to admins?
Yes, the whitelist applies to all players, including admins. If an admin is not on the list, they won’t be able to join. Make sure to add yourself and any other admins to the whitelist.
What happens if I add a player’s Steam ID incorrectly?
If the ID is incorrect (e.g., missing a digit), that player will not be able to join. The server will treat them as not whitelisted. Double-check the ID and restart the server after any changes.
Can I edit the whitelist while the server is running?
You can edit the file, but the changes won’t take effect until the server is restarted. The whitelist is loaded at server startup, so you’ll need to restart to apply any changes.
My whitelist file is missing. What should I do?
If the file doesn’t exist, create a new one named whitelist.txt in the server’s root directory. The server will recognize it on the next startup. Make sure it’s in the same folder as the server executable.
Related
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.
More cards in this drawer
- Access the DOM in Angular Safely
- Websites Create QR Code? How It Works
- Evaluate Private Cloud AI Security Operations Platforms
- Space Engineers Server Name & Description Setup
- Tongue Escape Events Schedule: Full Guide
- f/2.8 Telephoto Zoom: What to Consider