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.txt

If 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_yyyyyyyy

Save 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_bbbbbbb2

Save 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:

  1. Set a cluster_password in cluster.ini (or use the Startup tab)
  2. Share the password only with people you want
  3. Use whitelist.txt to 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) end

The output looks like:

1  PlayerName  KU_xxxxxxxx
2  OtherName   KU_yyyyyyyy

Files Summary

FilePurposeEffect
adminlist.txtGrant admin privilegesListed IDs can use admin commands
blocklist.txtBan listListed IDs cannot connect
whitelist.txtSlot reservationListed IDs bypass full-server cap

How is this guide?

40% Off — Limited TimeGet your Dont Starve Together server todayInstant setup, DDoS protection, and 24/7 support included.
Get a Server

On this page