---
title: "Don't Starve Together Dedicated Server Setup"
description: "Setting up a Don't Starve Together server: the Master and Caves shards, cluster.ini, server.ini and the cluster token."
url: "https://www.gameserverkings.com/knowledge-base/dont-starve-together/dont-starve-together-dedicated-server-setup/"
category: "Don't Starve Together"
category_url: "https://www.gameserverkings.com/knowledge-base/dont-starve-together/"
published: "2026-09-12T06:30:40.782Z"
updated: "2026-09-12T06:32:35.847Z"
source_format: "markdown"
site: "GameServerKings"
---

# Don't Starve Together Dedicated Server Setup

A Don't Starve Together server with caves is not one server. It is **two server processes** sharing one cluster folder — the surface runs as the `Master` shard, the underground runs as the `Caves` shard, and they find each other over a private port. Klei's command-line guide calls two processes "the recommended way to run a two level server". Almost everything people get wrong about DST hosting starts here.

> [!NOTE] Checked against Don't Starve Together dedicated server build **747465**
> That is the version string Klei's own dedicated-server app (Steam app `343050`) reports as of 12 September 2026. Key names, defaults and quoted text come from Klei's *Dedicated Server Settings Guide*, their *Dedicated Server Command Line Options Guide* (last updated 15 July 2026), the server's own shipped files, and the Don't Starve Together egg running on our panel. Klei also note that "Dedicated Servers are not supported for the Xbox and PlayStation versions of the game".

## The cluster folder

Klei build the path from the launch flags: `<persistent_storage_root>/<conf_dir>/<cluster>/cluster.ini`. On a [hosted Don't Starve Together server](/games/dont-starve-together/) that resolves to:

```text
DoNotStarveTogether/config/server/
├── cluster.ini            # settings shared by both shards
├── cluster_token.txt      # your Klei server token
├── adminlist.txt
├── whitelist.txt
├── blocklist.txt
├── Master/
│   └── server.ini         # surface shard
└── Caves/
    └── server.ini         # caves shard
```

The split matters. `cluster.ini`, the token and the player lists sit at the **cluster root** and apply to both shards. `server.ini` is **per shard** and is the only file that differs between the surface and the caves. Klei are explicit about where the whitelist goes: "add their Klei UserId to the whitelist.txt file (Place this file in the same directory as cluster.ini)".

## What makes a shard a shard

Three keys do the work, and they live in the shard's own `server.ini`:

| `server.ini` key | Master | Caves | Klei's note |
|---|---|---|---|
| `[SHARD] is_master` | `true` | `false` | "There must be exactly one master server per cluster" |
| `[SHARD] name` | ignored | `Caves` | Master "always has the name [SHDMASTER]" |
| `[SHARD] id` | — | generated | Do not edit it |
| `[NETWORK] server_port` | your game port | `11000` | Default `10999`; must be unique per shard on a machine |

The two processes meet through `cluster.ini`:

```ini title="cluster.ini"
[SHARD]
shard_enabled = true
bind_ip = 127.0.0.1
master_ip = 127.0.0.1
master_port = 11001
cluster_key = dst
```

`master_port` (Klei's default is `10888`; our egg sets `11001`) is not a port players connect to — it is the UDP channel Caves uses to register with Master, which is why both IPs are loopback. `cluster_key` is "a password used to authenticate a slave server to the master".

> [!IMPORTANT] Only the Master shard is in the server browser
> Players always connect to the Master shard's game port. Caves has no browser entry and no public port; players reach it by walking into a sinkhole, at which point Master hands them across.

## Your cluster token

A public DST server will not run without a token, and the token comes from Klei rather than from your host. Klei's guide: sign in at the Klei Accounts site, "visit the 'GAMES' tab, then scroll down to Don't Starve Together and click on the 'Game Servers' button", then "ADD NEW SERVER". Expired entries "are colored in red and should be deleted".

The token is one line of text in `cluster_token.txt` at the cluster root, so **both shards share it** — there is no per-shard token.

> [!CAUTION] Changing the Server Token field later does not rewrite the file
> Our egg writes `cluster_token.txt` during installation, and only if the file is not already there. Paste a new token into the Server Token field on the Startup tab afterwards and the file on disk keeps the old one. Rotate a token by editing `cluster_token.txt` in the File Manager.

## The fields on the Startup tab

These are the only variables our Don't Starve Together egg exposes:

| Field | What it does |
|---|---|
| Max Players | Passed to both shards as `-players`, which Klei document as overriding "the [GAMEPLAY] / max_players setting in cluster.ini". Klei's flag allows 1–64; our field accepts 1–31 |
| Server Token | Written to `cluster_token.txt` at install time |
| Game mode | `[GAMEPLAY] game_mode`. Leave it on `survival` — see the warning below |
| Cluster Name | `[NETWORK] cluster_name`, "the name that will show up in server browser" |
| Cluster Description | `[NETWORK] cluster_description`, "shown in the server details area on the 'Browse Games' screen" |
| Auto-update server | Off by default. Set to `1` to pull Steam updates on restart |
| App ID | `343050`, the dedicated-server app. Display only |

> [!TIP] Some keys are rewritten every time the server starts
> `game_mode`, `max_players`, `cluster_name` and `cluster_description` in `cluster.ini`, plus `server_port` and `is_master` in each `server.ini`, are regenerated from the Startup tab and your port allocation on every boot. Change those four in the panel; change everything else in the file.

## Everything else in cluster.ini

The rest of the file is yours. Klei's documented defaults are worth knowing, because the shipped template does not always match them:

| Key | Section | Klei default | What it does |
|---|---|---|---|
| `max_players` | `[GAMEPLAY]` | `16` | Players connected to the cluster at once |
| `pvp` | `[GAMEPLAY]` | `false` | Enable PVP |
| `pause_when_empty` | `[GAMEPLAY]` | `false` | "Pause the server when there are no players connected" |
| `vote_enabled` | `[GAMEPLAY]` | `true` | Enables voting features |
| `cluster_password` | `[NETWORK]` | none | Password players must enter to join |
| `whitelist_slots` | `[NETWORK]` | `0` | "The number of reserved slots for whitelisted players" |
| `autosaver_enabled` | `[NETWORK]` | `true` | Autosave at the end of each day |

`pause_when_empty` is the one most people want and never find: with it on, the world stops advancing when nobody is connected, so a week away does not cost you a week of seasons.

> [!WARNING] Endless and Wilderness are no longer game modes
> Klei converted them to world presets in October 2022 — "Wilderness and Endless Game modes have been converted to presets. Existing worlds will be retrofitted" — and removed server intention in the same update: "Server intention has been removed (Social/Cooperative/Competitive/Madness)." In the current build both values are commented out of the game-mode table and the server rewrites them to `survival` at boot. Choose a playstyle in `worldgenoverride.lua` instead.

> [!WARNING] `whitelist_slots` does not make your server whitelist-only
> It reserves slots so whitelisted players can still get in when the server is full. To close a server off, use `cluster_password`, or `[STEAM] steam_group_only` with `steam_group_id`. Our shipped template also carries an `enable_vote_kick` line, which is not in Klei's documented key list — the documented key is `vote_enabled`.

## Stopping and restarting cleanly

The panel's Stop button sends `c_shutdown()` to the Master shard, which saves and brings the cluster down; our startup command passes the same to Caves. Killing the process instead loses everything since the last autosave — up to a full in-game day. Both shards stop together, so a [scheduled restart](/knowledge-base/general/how-to-setup-schedules/) needs no special handling.

## Common Questions

### Do I need caves on a Don't Starve Together server?

No. Caves are optional, and Klei ship fixes for "a server without Caves" as a supported configuration. But caves hold a lot of the mid-game content, and adding them later means generating a fresh caves world rather than converting an existing one.

### Where is cluster.ini on a hosted server?

`DoNotStarveTogether/config/server/cluster.ini`, in the File Manager or over [SFTP](/knowledge-base/general/how-to-upload-files-via-sftp/). The shard folders sit next to it. Klei's default cluster name is `Cluster_1`; ours is `server`, set by the `-cluster` flag.

### Why does my server not show in the server browser?

Most often the cluster token: a missing, expired or mistyped `cluster_token.txt` leaves the server running but unlisted. Check the file holds one line with no stray spaces. `offline_cluster` and `lan_only_cluster` will also keep a server off the public list.

### What is the difference between survival, endless and wilderness?

They used to be three game modes. Since October 2022 only `survival` remains a real game mode; Endless and Wilderness became world presets, and the server quietly converts the old values back to `survival` on startup. Set the playstyle you want in `worldgenoverride.lua` on the Master shard.

## What to Read Next

- [Don't Starve Together World Settings and How to Regenerate a World](/knowledge-base/dont-starve-together/dont-starve-together-world-settings/) — `worldgenoverride.lua`, presets, and resetting one shard without wiping the other.
- [How to Install Don't Starve Together Server Mods](/knowledge-base/dont-starve-together/dont-starve-together-server-mods/) — why mods have to be configured twice, once per shard.
- [Don't Starve Together Console Commands](/knowledge-base/dont-starve-together/dont-starve-together-console-commands/) — `adminlist.txt`, local versus remote mode, and the `c_` commands for each shard.
- [How to upload files via SFTP](/knowledge-base/general/how-to-upload-files-via-sftp/) — for editing `cluster.ini` and the shard files off-server.
- [How to setup Schedules](/knowledge-base/general/how-to-setup-schedules/) — automatic restarts that stop both shards cleanly.

---

Made with 💜 by GameServerKings
