A whitelist is an access list that restricts who can join your server. In Don't Starve Together, it is implemented as an allowlist based on Klei User IDs. On your server with us, it consists of the whitelist.txt file and the Whitelist Slots setting in your game server panel.
Connect to your server via FTP and open the DoNotStarveTogether/Cluster_1/ folder. Create or edit the whitelist.txt file there. Add one Klei ID in KU_ format per line.
KU_aaaaaaaa
KU_bbbbbbbb
Then set how many player slots are reserved for players on the whitelist:
- In your game server management panel, open the Configuration tab.
- Select the Startup parameters category.
- Set Whitelist Slots to the number of reserved slots. If only whitelisted players should be able to join, use the same value as Max. players. A higher value is automatically limited to the player count, while
0disables the whitelist. - Click Save.
- Restart the server. The setting and
whitelist.txtare read when the server starts.
Do not add whitelist_slots to cluster.ini yourself. The file is rewritten every time the server starts, and the value comes from the Whitelist Slots setting.
To add a player, add their KU_ ID to whitelist.txt, save the file, and restart the server.
To remove a player, delete their KU_ ID from whitelist.txt, save the file, and restart the server.
Make sure whitelist.txt contains at least as many IDs as the number of Whitelist Slots you have set. Otherwise, you may run into join issues if more slots are reserved than there are players on the list.
After restarting the server, try joining with an account that is not listed in whitelist.txt. If Whitelist Slots is set to the same value as Max. players, the join attempt should fail. Then test whether access works with a listed KU_ ID.
If the server still lets unlisted players join, check that whitelist.txt is in the DoNotStarveTogether/Cluster_1/ folder and that Whitelist Slots has been saved and is greater than 0. Then restart the server again.
