A whitelist is an access mode where you must explicitly create user accounts before they can join. In Project Zomboid, this is usually done by disabling open registration in the server configuration and then adding users with console commands.
In the Configuration tab, open Startup parameters and set Open Server to false. Your server writes the Open entry in servertest.ini from this start parameter every time it starts, so any changes made directly in the file will be overwritten.
Save and restart the server. With open registration disabled, only accounts you have created can join.
Open your game server's Console and create accounts for the players you want to allow. Use the adduser command with a username and password. In the Console, enter commands without a slash; only add a / before commands entered in the in-game chat.
adduser "username" "password"
To revoke a user's access, remove them from the whitelist with the appropriate command.
removeuserfromwhitelist "username"
If you previously allowed open registration and want to convert existing connected accounts into whitelist entries, use the command that adds all currently connected users to the whitelist.
addalltowhitelist
After setting Open Server to false, a new user who hasn't been added with adduser should not be able to join. Test whether access works with a whitelisted account.
If unbanned users can still join, check that Open Server is set to false in the start parameters and that you restarted the server.
If you've followed all the steps correctly, your whitelist is now active and you have full control over who can join the server. If access still isn't working as expected, restart the server again and check the file or console output to confirm that the change was applied.
Our support team is here to help every day if you have any questions or run into problems! 🙂
