How to Kick and Ban Players on Your Don’t Starve Together Server
Don’t Starve Together comes with built-in kick and ban functions. You can use them conveniently through the in-game player list, run them as console commands or edit the ban list directly on the server.
Note
You need admin rights to kick or ban players. See Add Admin.
Via the in-game player list
Join the server
Join your server as an admin.Open the player list
Hold down theTABkey to show the player list.Kick a player
Click the shoe icon next to the player to remove them from the server.Ban a player
Click the hammer icon next to the player to ban them permanently.
Via the console
Open the console
Press~in game to open the console.List the players
Show all players together with their Klei user ID:c_listallplayers()Kick a player
The player is removed from the server but can rejoin:TheNet:Kick("KU_xxxxxxxx")Ban a player
The player is permanently banned:TheNet:Ban("KU_xxxxxxxx")Ban for a limited time
The second value is the duration in seconds —120therefore equals two minutes:TheNet:BanForTime("KU_xxxxxxxx", 120)
Edit the ban list
All bans are stored in the blocklist.txt file in the cluster folder. If you ban a player in game, their Klei user ID is added there automatically. You can also edit the file yourself.
Stop the server
Stop your server via the dashboard.Connect via SFTP
Connect to your server via SFTP or use the file browser in the dashboard.Open blocklist.txt
Navigate to the folder that contains thecluster.inifile and open this file:<cluster folder>/blocklist.txtAdjust the entries
Add exactly one Klei user ID per line — without commas and without quotation marks. To unban someone, remove the corresponding line:KU_xxxxxxxx KU_yyyyyyyyStart the server
Save the file and start your server. The server only reloads theblocklist.txton startup.
Warning
Only edit the blocklist.txt while the server is stopped. If the server is running it can overwrite the file and your changes will be lost.
Find the Klei user ID
The guide Add Admin explains how to find the KU_ ID of a player.
All commands
| Command | Description |
|---|---|
c_listallplayers() | List all players with their user ID |
TheNet:Kick("KU_xxxxxxxx") | Kick a player |
TheNet:Ban("KU_xxxxxxxx") | Permanently ban a player |
TheNet:BanForTime("KU_xxxxxxxx", 120) | Ban a player for 120 seconds |
c_announce("text") | Send a message to all players |
c_save() | Save the world immediately |