This guide walks you through kicking and banning disruptive players on a Don’t Starve Together server, covering both in-game commands and server configuration files. You’ll learn the exact steps for dedicated servers, player-hosted games, and admin console access, plus how to reverse a ban if needed.
What You’ll Need
- Admin or host privileges on the server (the player who created the world, or an assigned admin via the
adminlist.txtfile). - Access to the server console (for dedicated servers) or the in-game chat (for player-hosted games).
- The player’s name or their Klei User ID (KU_ID) for permanent bans.
- For dedicated servers: access to the server files (usually via FTP or a control panel).
Step-by-Step
Method 1: In-Game Commands (Player-Hosted or Admin)
- Press
/to open the chat console (or~for the developer console if enabled). - Type
/kick [playername]and press Enter. This removes the player from the server immediately. Example:/kick Alice - To permanently ban a player, type
/ban [playername]. This adds them to the server’s ban list and prevents them from rejoining. Example:/ban Bob - To ban by Klei ID (more reliable if the player changes names), type
/ban [KU_ID]. You can find a player’s KU_ID by hovering over their name in the player list (if using a mod) or by checking the server logs. - Confirm the action: the player will be disconnected immediately, and a message appears in chat.
Method 2: Dedicated Server Console
- Open the terminal or control panel where your dedicated server is running.
- Use the console command
c_kick(“playername�)to kick a player. Replaceplayernamewith the exact name. Example:c_kick(“Alice�) - For a ban, use
c_ban(“playername�)orc_ban(“KU_ID�). Example:c_ban(“Bob�) - Press Enter. The command executes immediately.
Method 3: Editing Server Files (Permanent Ban List)
- Stop the server to avoid file conflicts.
- Navigate to the server’s save directory (usually
save/in the Klei folder). - Open the file
blocklist.txt(this is the ban list). If it doesn’t exist, create it. - Add the player’s Klei ID (KU_xxxxxxxx) on a new line. You can get the KU_ID from the server log when they join, or from the
playerlist.txtfile in the same folder. - Save the file and restart the server. The player will be unable to join.
Method 4: Using the Admin Console (Remote)
- If you have admin privileges in-game, open the console with
~(tilde) key (if enabled in settings). - Type
TheNet:Kick(“playername�)to kick, orTheNet:Ban(“playername�)to ban. Example:TheNet:Kick(“Alice�) - Press Enter. The action happens instantly.
Common Mistakes
- Typing the name incorrectly: Player names are case-sensitive. Use the exact name as shown in the player list.
- Banning by name when the player changes names: If a player changes their display name, a name-based ban won’t stop them. Always use KU_ID for permanent bans.
- Forgetting to save blocklist.txt: If you edit the file manually, you must save it and restart the server. Otherwise, changes are lost.
- Using the wrong console: In-game chat (
/) commands don’t work in the dedicated server console. Usec_kickthere. - Kicking instead of banning: A kick only removes the player temporarily; they can rejoin immediately. Use ban for repeat offenders.
Tips
- Always warn a player before banning if possible, unless they are griefing or cheating.
- Keep a record of banned KU_IDs in a separate text file for reference.
- Use the
playerlist.txtfile to identify players by KU_ID easily. - If you run a dedicated server, set up the admin list (
adminlist.txt) so trusted players can also kick/ban. - Test the kick/ban command on a dummy player (if possible) to ensure you’re using the right syntax.
Troubleshooting
Command not working: Make sure you have admin privileges. If you’re the host, you should have them by default. If not, check that your KU_ID is in adminlist.txt.
Player not found: The name might be misspelled or the player might have left. Check the player list or server logs for the exact name.
Ban doesn’t stick: If the player can rejoin after a ban, you may have banned by name and they changed it. Use the KU_ID method.
Server won’t start after editing blocklist.txt: Ensure the file is saved in plain text (UTF-8) and each KU_ID is on a new line. Remove any extra spaces or characters.
Console commands not recognized: For dedicated servers, the console commands must be typed exactly as shown, including parentheses and quotes. Also, ensure you are using the server console, not the game chat.
Frequently Asked Questions
Can I unban a player?
Yes. Remove their KU_ID from blocklist.txt and restart the server. Alternatively, use the console command c_unban(“KU_ID�) if available.
What’s the difference between kick and ban?
Kick removes a player from the server immediately, but they can rejoin. Ban prevents them from joining again until you remove the ban.
How do I find a player’s Klei ID?
Check the server log when they join, or look in the playerlist.txt file in the save directory. Some mods also show it in the player list UI.
Can I ban a player by IP address?
Don’t Starve Together does not support IP bans natively. You can only ban by Klei ID.
Do I need to be the host to ban?
You need admin privileges. The host is an admin by default, but other players can be added to the admin list via adminlist.txt.
Will a banned player lose their character progress?
No, bans only affect server access. Their character data is stored locally or on their own server, not on your server.
Related
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.
More cards in this drawer
- Valheim Server Not Showing in Community List Fixes
- DisplayPort vs HDMI: Which Cable Should You Use?
- Soundbar vs 2.1 Speaker System: Which Is Better?
- Mouse Moving on Its Own? Causes & Fixes
- Slack Channels for Construction Projects: Setup Guide
- Surface Won’t Turn On: Quick Fixes1.8 h