Don't Starve Together Dedicated Server with Caves

Configure a Don't Starve Together dedicated server with Master and Caves shards, cluster.ini, server.ini, cluster_token.txt, UDP ports and backups.

Don't Starve Together illustration
Source: coop-legends.de

Overview

Don't Starve Together (DST) supports dedicated servers with separate shards for the overworld and caves. Klei's Dedicated Server Command Line Options Guide, last updated July 15, 2026 at the source review, documents the relevant arguments.

A normal two-world setup uses separate Master and Caves processes. Cluster, shard, authentication-token and port settings must be consistent.

Directory structure for a DST server

Klei uses a cluster folder, normally called DoNotStarveTogether, under the Klei user-data folder. The location differs by operating system:

  • Windows: Documents/Klei
  • macOS: ~/Documents/Klei
  • Linux: ~/.klei

The cluster contains a top-level cluster.ini and one directory per shard, normally Master and Caves. Each shard has its own server.ini.

Start Master and Caves shards

For a two-level cluster, Klei documents these basic launch commands:

dontstarve_dedicated_server_nullrenderer -cluster MyClusterName -shard Master dontstarve_dedicated_server_nullrenderer -cluster MyClusterName -shard Caves

Run the two processes against the same cluster while keeping their respective shard folders separate. Each shard needs its own distinct configured port.

Configure cluster.ini and server.ini

cluster.ini contains cluster-wide settings such as player limits and gameplay or network options. server.ini contains shard-specific settings.

Klei supports a -players command-line setting with documented values from 1 to 64; it overrides the cluster's configured player limit. The server's connection port comes from -port or the corresponding shard setting in server.ini. If you run multiple shards, keep those ports different.

Provide cluster_token.txt

Online dedicated servers require an authentication token. Klei accepts cluster_token.txt in the cluster directory or a token passed through -token. Keep it secret and do not include it in public configuration examples.

If a server exits with a missing or invalid authentication token error, check that the correct up-to-date token exists in the active cluster directory and is readable by the process.

Ports and LAN mode

The -port option specifies a UDP server port. Klei documents permitted values between 1024 and 65535. For automatic LAN discovery, the current documentation says the port must fall in the range 10998–11018. A multi-shard cluster requires separate ports per shard.

The -offline option starts the server in offline mode. It is not publicly listed, only reachable on the local network and cannot use Steam-related online features.

Use server mods safely

DST supports dedicated-server mods. Maintain matching server/mod files and test mod changes only after backing up the cluster. Klei also documents -ugc_directory to override the mod storage directory when needed.

For mod failures, read the logs from both Master and Caves: a fault can affect just one of the two processes.

Backups and clean shutdown

Back up the complete cluster directory, including cluster.ini, token and both Master and Caves data. Stop both shard processes first to avoid copying files while either world is being updated.

Before changing mods, world settings or shard structure, keep a tested backup that you can restore.

Rent or self-host a DST server?

Self-hosting provides full shard, mod and configuration control but is more involved than a single-process server. Managed hosting can simplify operations. Compare Workshop support, full file and backup export, server location and how a provider manages both Master and Caves. Ensure the complete cluster is downloadable for independent recovery.

DST dedicated-server FAQ

Yes. A normal cluster with overworld and caves runs separate Master and Caves processes.

It is in the cluster directory under Klei's user-data folder, normally DoNotStarveTogether. The base path differs by OS.

It authenticates an online dedicated server. Klei also permits passing the token using -token.

The UDP port is configurable rather than universally fixed. Klei specifies 10998–11018 for LAN discovery, and each shard needs a different port.