A DST dedicated server is a Don’t Starve Together world that runs on its own, so the camp survives when the host logs off. The software is free: install Don’t Starve Together Dedicated Server from Steam’s Tools list (or SteamCMD app 343050), generate a cluster token in the game, set up a cluster folder with a Master shard and a Caves shard, and start both. This guide walks through every file, then covers ports, mods, admin and console commands, updates, and the two errors everyone hits: “dedicated server failed to start” and “server not responding”.
Dedicated server vs. hosting from the game
When you click Host Game, DST runs the world on your PC and it stops when you quit. A dedicated server runs the same world as separate programs, one per shard, so friends can keep playing through the night and the world doesn’t age without them.
| Host Game | Dedicated server | |
|---|---|---|
| Host has to be online | Yes | No |
| Caves | Started for you in the background | A second shard you configure and start |
| Player limit | Set in the host screen | max_players, 1 to 64 |
| Mods | Picked in the menu | Declared in two files (see mods) |
| Uses your gaming PC’s CPU and RAM | Yes | Only if you run it there |
What a “shard” is
A DST world is a cluster of up to two shards: the Master (the forest overworld) and Caves. Each shard is its own server process with its own server.ini. They talk to each other through the settings in cluster.ini, and players move between them through sinkholes. Skip the Caves shard and you get a surface-only world.
DST dedicated server requirements
- RAM: 2–4 GB for both shards together. Heavy mod lists and long-running worlds sit at the top of that range.
- CPU: two shards means two processes, so two decent cores beat one fast one. Keep
tick_rateat 15; raising it costs CPU and bandwidth for little gain online. - OS: Windows or Linux; Klei ships 32-bit and 64-bit builds for both. Linux servers need the
libcurl-gnutlspackage that matches the build you run (32-bit or 64-bit). - Network: a UDP port per shard if players connect from outside your home network.
- A Klei account and a copy of the game, to generate the cluster token.
No spare machine? Don’t Starve Together server hosting runs both shards for you.
How to set up a Don’t Starve Together dedicated server
Step 1: install the server
Windows, through Steam: in your library, switch the filter to Tools and install Don’t Starve Together Dedicated Server like a normal game.
Windows or Linux, through SteamCMD: the server is app 343050 and downloads anonymously. The same command updates it later.
steamcmd +login anonymous +force_install_dir ~/dont-starve-together +app_update 343050 validate +quit
Drop validate once you install mods: it deletes files Steam doesn’t recognise, mods included.
Step 2: get a cluster token
An online server needs a token tied to your Klei account. Generate one in either of two ways:
- Launch DST, click Play, open the Account screen (bottom left) and use Generate Server Token. Copy the token it lists.
- Or open the console with
~and runTheNet:GenerateClusterToken(). It writescluster_token.txtto yourDocuments\Klei\DoNotStarveTogetherfolder.
The account that made the token is automatically an admin on the server. Paste the token into cluster_token.txt with no extra spaces or blank lines; a stray character is the classic cause of a token error later.
Step 3: build the cluster folder
The server looks for clusters in Documents\Klei\DoNotStarveTogether on Windows and ~/.klei/DoNotStarveTogether on Linux. Create a folder there (the default name is Cluster_1) with this layout:
Cluster_1/
cluster.ini
cluster_token.txt
adminlist.txt (optional, one Klei user ID per line)
Master/
server.ini
worldgenoverride.lua (optional)
modoverrides.lua (optional)
Caves/
server.ini
worldgenoverride.lua
modoverrides.lua (optional)
Step 4: cluster.ini
This file holds the settings both shards share. A working starting point:
[GAMEPLAY]
game_mode = survival
max_players = 8
pvp = false
pause_when_empty = true
[NETWORK]
cluster_name = Our Camp
cluster_description = Friends only, mods on
cluster_password = changeme
cluster_intention = cooperative
tick_rate = 15
[MISC]
console_enabled = true
[SHARD]
shard_enabled = true
bind_ip = 127.0.0.1
master_ip = 127.0.0.1
cluster_key = any-long-secret
master_ip is the address of the machine running the Master shard. When both shards run on the same machine, that’s 127.0.0.1. Run them on separate machines and you’ll need to change bind_ip and master_ip to real addresses.
| Setting | Values | What it does |
|---|---|---|
game_mode |
survival, endless, wilderness | The game mode for the whole cluster |
max_players |
1–64 | How many players can be connected at once |
pvp |
true / false | Player damage |
pause_when_empty |
true / false | Freezes the world when nobody’s on, so you don’t lose a winter while you sleep |
cluster_intention |
cooperative, social, competitive, madness | The server playstyle shown in the server browser |
cluster_password |
text | Join password; leave it empty for an open server |
max_snapshots |
number | How many saves are kept for rollback |
Step 5: server.ini for each shard
Master/server.ini
[SHARD]
is_master = true
name = Master
[NETWORK]
server_port = 10999
Caves/server.ini
[SHARD]
is_master = false
name = Caves
[NETWORK]
server_port = 10998
Each shard needs its own server_port. The Caves shard also gets an id line written into its file on first start; don’t change it once the world exists, or the Master stops recognising its caves. Every server you run on the same machine, each shard included, also needs its own master_server_port and authentication_port values under [STEAM] in its server.ini.
Step 6: tell the Caves shard to generate caves
Put a worldgenoverride.lua in the Caves folder that selects the cave preset:
return {
override_enabled = true,
preset = "DST_CAVE",
}
Without it, the second shard generates another forest. For the Master, the forest preset is SURVIVAL_TOGETHER, and the same file is where you change world settings before generation.
Step 7: start both shards
The server must run with its bin folder as the working directory, one process per shard. On Windows, save this as start_dst.bat (adjust the install path):
cd /D "C:\Program Files (x86)\Steam\steamapps\common\Don't Starve Together Dedicated Server\bin"
start "DST Master" dontstarve_dedicated_server_nullrenderer -console -cluster Cluster_1 -shard Master
start "DST Caves" dontstarve_dedicated_server_nullrenderer -console -cluster Cluster_1 -shard Caves
On Linux:
cd ~/dont-starve-together/bin
./dontstarve_dedicated_server_nullrenderer -console -cluster Cluster_1 -shard Master &
./dontstarve_dedicated_server_nullrenderer -console -cluster Cluster_1 -shard Caves
A 64-bit build also ships in the bin64 folder. For a server that restarts itself, run each shard under screen, tmux or systemd, or let LinuxGSM manage it; the community dst-dedicated-server Docker setup runs the two shards as two containers.
DST server ports
Players connect over UDP to each shard’s server_port. With the values above that’s 10999 for the Master and 10998 for the Caves. If friends outside your home can’t see the server, forward those UDP ports on your router to the server machine and allow them through the firewall. LAN-only servers must use ports between 10998 and 11018. Forward both shard ports, not just the Master.
Mods on a DST dedicated server
Mods take two files, and both matter:
- Download them: in the server install’s
modsfolder, editdedicated_server_mods_setup.lua. Add one line per Workshop mod, using the number from the end of its Workshop URL, or pull a whole collection:ServerModSetup("350811795") ServerModCollectionSetup("379114180") - Enable them: in each shard folder, create
modoverrides.lua. Downloaded mods are namedworkshop-<id>:return { ["workshop-350811795"] = { enabled = true }, }
Use the same modoverrides.lua in Master and Caves. A mod enabled on the surface but not underground is the classic reason players get disconnected the moment they go down a sinkhole.
DST server commands
With -console on the launch line, you can type commands straight into the Master shard’s window. In game, admins open the console with ~ and press Ctrl to switch to remote mode so the command runs on the server, not just locally.
| Command | What it does |
|---|---|
c_save() |
Save now (the server also saves at the end of each night) |
c_shutdown(true) |
Save and stop. Run on the Master, it stops the Caves too; false quits without saving |
c_rollback(2) |
Roll back two saves (no number = one) |
c_reset() |
Reload the world without saving |
c_regenerateworld() |
Regenerate the world |
c_announce("Restart in 5 minutes") |
Message everyone |
c_listallplayers() |
List players and their numbers |
TheNet:Kick("KU_xxxxxxxx") |
Kick a player by user ID |
TheNet:Ban("KU_xxxxxxxx") |
Ban a player by user ID |
TheNet:SetAllowIncomingConnections(false) |
Stop new players joining (true reopens) |
c_despawn(AllPlayers[1]) |
Send a player back to character select (deletes their inventory) |
c_skip(3) |
Skip three days |
TheWorld:PushEvent("ms_setseason", "autumn") |
Jump to a season |
To make someone else an admin, add their Klei user ID (it starts with KU_) to adminlist.txt in the cluster folder and restart. blocklist.txt and whitelist.txt work the same way.
How to keep a DST server up and updated
Klei updates DST often, and a server on an old version simply stops appearing for players on the new one. To update, stop both shards with c_shutdown() on the Master, rerun the SteamCMD command (or let Steam update the Tools app), then start both shards again. Back up the cluster folder first. Keeping it up between sessions just means leaving both processes running; pause_when_empty = true keeps the world from ticking along with nobody there.
“Dedicated server failed to start” and other DST server problems
“Dedicated server failed to start” mostly shows up when you host a world with caves from inside the game: the caves run as their own server process even then, and that process didn’t come up. Check, in order: that your firewall or antivirus isn’t blocking the dedicated server program; the Caves shard’s server_log.txt (inside your cluster’s Caves folder under Documents\Klei\DoNotStarveTogether), which usually names the problem; and a mod that only breaks the caves (try the world with mods off). If none of that helps, back up Documents\Klei\DoNotStarveTogether, rename it, and create a fresh caves world to see whether the old folder was the problem.
| Problem | Most likely cause | Fix |
|---|---|---|
| “Server not responding” when joining | Server still generating the world, UDP port blocked, or the server is on an older version | Wait for the log to show the shard is ready, forward the UDP ports, update the server |
| Server runs but nobody can find it | Port not forwarded, or a version mismatch after a game update | Forward UDP 10999 (and the Caves port), update, check the server is listed |
E_EXPIRED_TOKEN / account failed |
Bad or expired cluster token, or invisible extra characters | Generate a new token and paste it with nothing else on the line |
| Caves never connect, sinkholes stay closed | Caves shard not running, wrong master_ip, or different cluster_key |
Start the Caves process, match [SHARD] settings in cluster.ini |
| Disconnected at a sinkhole | Mods differ between shards | Use the same modoverrides.lua in Master and Caves |
| Second shard generated a forest | No cave preset | Add worldgenoverride.lua with DST_CAVE in Caves before first start |
libcurl-gnutls.so.4: cannot open shared object file |
Missing Linux library | Install libcurl-gnutls for the right architecture |
| Mods vanished after an update | SteamCMD validate removed them |
Update without validate, check your lines are still in dedicated_server_mods_setup.lua, and restart: the server downloads every mod listed there on start |
Skip the setup: rent a DST server
Two shards, a token, four config files and a mod list that has to match in two places: it’s a lot of setup before the first night falls. With Don’t Starve Together server hosting on GameTeam you get both shards on one plan, pay per GB of RAM with unlimited slots (from $0.49/GB a week, or $1.99/GB billed monthly; DST’s own max_players cap still applies), and skip port forwarding. The built-in AI copilot does the file work. Tell it “add Global Positions and Combined Status, enabled on both shards, then restart” and it edits the mod files and restarts, or ask “why does the caves shard keep failing to start?” and it reads the Caves log and tells you.
FAQ
Is a DST dedicated server free?
Yes. The server software is a free download (SteamCMD app 343050, anonymous login). You pay only for the machine it runs on, or for hosting.
How many players can a Don’t Starve Together server hold?
max_players accepts 1 to 64. Most groups run 6 to 16; past that, a modded world gets heavy.
Do I need caves?
No, but most of the game’s late content lives underground. Skip the Caves shard for a lighter, surface-only server and add it before you need the ruins.
Can I move my existing world to a dedicated server?
Yes. Your hosted worlds are clusters too, inside a numbered folder under Documents\Klei\DoNotStarveTogether. Copy the cluster folder (Master, Caves and cluster.ini) to the server, add your cluster_token.txt and the [SHARD] settings, and start both shards.
How do I run a Don’t Starve Together server on Linux?
Download app 343050 with SteamCMD, install libcurl-gnutls, put your cluster in ~/.klei/DoNotStarveTogether, and start each shard from the bin folder with -cluster and -shard.
What does server playstyle mean in the server list?
It’s cluster_intention in cluster.ini: cooperative, social, competitive or madness. It’s a label for players browsing DST servers and doesn’t change any game rules.
