How to Ban and Whitelist Players on Your Don't Starve Together Server
Use blocklist.txt and whitelist.txt to permanently ban grief players or reserve slots for trusted players on your DST dedicated server.
Don't Starve Together has two separate player-control files alongside adminlist.txt:
blocklist.txt— players who can never join (the ban list)whitelist.txt— players who get a reserved slot even when the server is full
Both live in the cluster directory and use one Klei User ID per line.
File Locations
DoNotStarveTogether/Cluster_1/blocklist.txt
DoNotStarveTogether/Cluster_1/whitelist.txt
DoNotStarveTogether/Cluster_1/adminlist.txtIf a file doesn't exist, create it. They're plain text — one KU_xxxxxxxx ID per line, no commas, no quotes.
Ban a Player (blocklist.txt)
From In-Game (Easiest)
If you're an admin, the in-game console handles banning automatically — and the result is written to blocklist.txt for you.
TheNet:Ban("KU_xxxxxxxx")Or by player list index:
c_ban(1)The player is kicked immediately and their Klei ID gets appended to blocklist.txt. They can never reconnect.
Manually via blocklist.txt
Stop the server from Console.
In Files, navigate to DoNotStarveTogether/Cluster_1/. Open blocklist.txt (create if missing).
Add one Klei ID per line:
KU_xxxxxxxx
KU_yyyyyyyySave and start the server. Listed players are blocked from connecting.
Unban a Player
Stop the server, remove the Klei ID line from blocklist.txt, and restart. The player can now reconnect.
Whitelist a Player (whitelist.txt)
The whitelist does not restrict who can join by itself — it reserves a slot for listed players. If your server is full and a whitelisted player tries to join, the most recently joined non-whitelisted player gets booted to make room.
Add to Whitelist
Stop the server.
Open DoNotStarveTogether/Cluster_1/whitelist.txt (create if missing). Add one Klei ID per line:
KU_aaaaaaa1
KU_bbbbbbb2Save and start the server.
The listed players now bypass the player count cap.
Whitelist-Only Server (Closed Group)
To make your server only accept whitelisted players (a closed friends-only server), set a cluster password instead — that's the supported pattern. There is no native "whitelist-only" mode without a password.
For a fully invite-only server:
- Set a
cluster_passwordincluster.ini(or use the Startup tab) - Share the password only with people you want
- Use
whitelist.txtto reserve their slots so they can always get in
Find a Player's Klei ID
Players can find their own ID by opening the in-game console and typing:
TheNet:GetUserID()Admins can list all connected players' IDs with:
for i,v in ipairs(AllPlayers) do print(i, v.name, v.userid) endThe output looks like:
1 PlayerName KU_xxxxxxxx
2 OtherName KU_yyyyyyyyFiles Summary
| File | Purpose | Effect |
|---|---|---|
adminlist.txt | Grant admin privileges | Listed IDs can use admin commands |
blocklist.txt | Ban list | Listed IDs cannot connect |
whitelist.txt | Slot reservation | Listed IDs bypass full-server cap |
Related Guides
How is this guide?

Don't Starve Together Admin Console Commands Reference
Complete admin console command reference for Don't Starve Together — c_save, c_rollback, c_spawn, c_give, c_shutdown, kick, ban, and more.
How to Set Up Caves on Your Don't Starve Together Server (Master + Caves Shards)
Enable the Caves shard on your Don't Starve Together dedicated server with the correct cluster.ini, server.ini, and worldgenoverride.lua configuration.