A whitelist is an access list that limits server access to approved Factorio accounts. On your server, enable the whitelist using the Enable whitelist option. When this option is on, your server saves the player list to the server-whitelist.json file in the config folder. This means the list is retained even after a restart.
In the Configuration tab, under Startup parameters, turn on Enable whitelist, save your changes, and restart your server. Without this option, your server allows any player who knows the server password to join. Entries you add through the console while the option is off are only kept in memory by Factorio. They disappear after the next restart.
Then open the live console in the ZAP-Hosting game server management panel and add the first player to the whitelist.
/whitelist add PlayerName
You can also enable the whitelist without restarting by using the following command. However, this only applies until the next restart. To keep it enabled permanently, use Enable whitelist.
/whitelist enable
When Enable whitelist is on, new entries take effect immediately without a restart and are saved in config/server-whitelist.json. Changes to the Enable whitelist option itself only take effect after a restart.
To add more players, run the add command again with their Factorio usernames.
/whitelist add AnotherPlayer
To remove a player, use the remove command.
/whitelist remove PlayerName
To view the current whitelist, use the get command.
/whitelist get
After adding at least one player, try to join with an account that isn't on the list. The connection should be rejected. Then connect with a whitelisted account to confirm that it works.
If the server still lets everyone in, check that Enable whitelist is turned on and that you ran the commands on the correct server. Restart the server once to make sure the whitelist file is loaded at startup.
If your whitelist is empty after a restart, Enable whitelist wasn't turned on when you added the players. Turn on the option, restart the server, and add the players again.
If you followed all the steps above, your whitelist is now active, and you can control exactly who can join your server. If access still doesn't work as expected, restart the server and check the file or command output to make sure the change was applied.
If you have any further questions or issues, our support team is available every day—don't hesitate to contact us! 🙂
