DON’T STARVE TOGETHER · DEDICATED SERVER GUIDE · NOVEMBER 2026

Don’t Starve Together Dedicated Server Guide: Setup, Joining, Console Commands and Backups

Everything about running your own Don’t Starve Together server on one page: setting up the Master and Caves shards, getting players connected, the console and admin commands that fix a live server, and backing up and moving the world.

What a dedicated server is, and why caves mean two shards

A Don’t Starve Together dedicated server is not the same thing as clicking Host Game in the client. Host Game uses the game client itself to run the world and creates save folders such as Cluster_1, Cluster_2 and so on. A dedicated server uses a separate server install and its own cluster folder, so you can keep the world online without one player acting as host.

That distinction matters because a lot of first-setup mistakes come from editing the wrong files. If you unpack or build a dedicated server in MyDediServer, but later change settings inside Cluster_1, the server will ignore them. The client and the dedicated server can exist on the same PC, but they should not share the same working folder.

Caves add one more layer: DST treats a forest plus caves world as a cluster of shards. The Master shard is the overworld. The Caves shard is the caves world. They are two separate server processes, each with its own save data and listening ports, but they authenticate to each other using the same cluster_key and talk over the master_port. That is why a caves server is not “one world with a checkbox”; it is two coordinated services.

Why caves need two dedicated server processes
Master
The forest overworld. is_master = true. Players connect to its server_port, UDP 10999 by default.
Always the one master shard
The shard link
Both processes share cluster_key and talk over master_port (default 10888). On one machine, use 127.0.0.1.
Mismatched keys keep caves separate
Caves
The caves world. is_master = false, its own player port (for example 11000), and the DST_CAVE preset.
Must be started as its own process
shard_enabled defaults to false. If you leave it off, the log reports that shard server mode is disabled.
Two processes, one cluster folder, one shared key: that is what makes sinkholes lead into a real caves world.

Get the cluster token before anything else

The token is the server’s credential with Klei’s account service. Without it, the server can launch an executable, consume CPU and memory and even start creating files, but it still cannot authenticate the cluster correctly. That is why token problems are so often mistaken for “the server runs but never shows up”. Keep the token private; it identifies that server instance.

Method A: Klei Accounts and Download Settings

  1. Sign in to the Klei account that is bound to your Steam copy of the game.
  2. Open GAMES, scroll to Don’t Starve Together, then open Game Servers.
  3. Click ADD NEW SERVER or CONFIGURE on an existing valid server entry.
  4. Use Download Settings.
  5. Extract the downloaded folder so that MyDediServer sits inside Documents\Klei\DoNotStarveTogether\.

This route is the least error-prone because the download already includes cluster_token.txt and the starter file layout. If you see old or expired entries there, clean them up before you confuse yourself with the wrong token.

Method B: generate it in the game client

If you already have the game client open, you can generate the token there and then copy it into your dedicated cluster folder. Open the developer console with tilde on a standard keyboard, or ù on Azerty, and run:

TheNet:GenerateClusterToken()

Set up cluster.ini before you launch anything

Think of cluster.ini as the cluster-wide rule file. It tells the server what the cluster is called, how players join it, and whether it is actually meant to behave as a multi-shard world. For a beginner, the biggest trap is that shard_enabled defaults to false. If you never turn that on, the server will happily behave like a single-level world and caves will not link.

The other defaults worth knowing are pause_when_empty = false, max_players = 16, tick_rate = 15 and master_port = 10888. Leaving tick_rate at 15 is usually the right call. A higher tick rate means the server sends updates more often, which results in more network traffic, so it is best left at 15 unless you are on a LAN. It is not a fix for bad listing, missing caves or account failures.

Here is a clean first cluster.ini for a private friends server with caves enabled:

[GAMEPLAY]
game_mode = survival
max_players = 16
pvp = false
pause_when_empty = true
vote_enabled = true

[NETWORK]
cluster_name = YOUR SERVER NAME
cluster_description = YOUR SERVER DESCRIPTION
cluster_password = YOUR SERVER PASSWORD
cluster_intention = cooperative
autosaver_enabled = true

[MISC]
console_enabled = true

[SHARD]
shard_enabled = true
bind_ip = 127.0.0.1
master_ip = 127.0.0.1
master_port = 10888
cluster_key = REPLACE_WITH_A_PRIVATE_KEY

The cluster_key is the internal password the non-master shard uses to authenticate to the master. It is not the same as the player join password. If the keys do not match across the cluster, Caves cannot attach. On one machine, 127.0.0.1 is correct for the shard link because both processes are talking locally.

Configure Master and Caves correctly

Each shard needs its own server.ini. This is where beginners often end up with “only Master runs” or “the caves process starts and vanishes”. The reason is simple: each process needs its own network sockets. If both shards try to bind the same player port or the same Steam ports on one machine, one of them loses. That failure is not about world settings; it is an operating system networking conflict.

Start by making sure exactly one shard has is_master = true. That is the forest shard. The Caves shard must have is_master = false and its own name. Use different server_port, authentication_port and master_server_port values for each shard on the same machine.

Master/server.ini

[NETWORK]
server_port = 10999

[SHARD]
is_master = true

[STEAM]
master_server_port = 27016
authentication_port = 8766

Caves/server.ini

[NETWORK]
server_port = 11000

[SHARD]
is_master = false
name = Caves

[STEAM]
master_server_port = 27018
authentication_port = 8768

Master keeps Klei’s defaults: player port 10999, Steam ports 27016 and 8766. Caves moves every port up so nothing collides. Keep both player ports between 10998 and 11018, because that is the range players on the same LAN can see in their server listing, and make sure the master_port in cluster.ini (default 10888) is not the same as either shard’s player port. Leave out the shard id: the game writes it for the Caves shard on first launch, and changing it later can strand any character who is down in the caves.

The last piece is caves world generation. Put this in Caves/worldgenoverride.lua before the first launch, or the Caves shard generates a second forest:

return {
    override_enabled = true,
    preset = "DST_CAVE",
}

This file only matters when a world is generated. Once a save exists in the shard’s save folder, the server loads that world from disk, so fixing the preset after a wrong first launch does not change the existing world.

Install and start both shards

The dedicated server is a free download, SteamCMD app 343050, and it does not need a Steam account that owns the game. On Windows, Klei’s start file follows this pattern: update the server, then open both shards from the bin64 folder with the same -cluster name and a different -shard name. Older copies also add -console, which is no longer needed (see the console section below).

c:\steamcmd\steamcmd.exe +login anonymous +app_update 343050 validate +quit
cd /D "c:\steamcmd\steamapps\common\Don't Starve Together Dedicated Server\bin64"
start dontstarve_dedicated_server_nullrenderer_x64 -cluster MyDediServer -shard Master
start dontstarve_dedicated_server_nullrenderer_x64 -cluster MyDediServer -shard Caves

Both windows should stay open. In the logs, look for the token being read from cluster_token.txt and then [200] Account Communication Success; once both shards are up, the server appears in Browse Games under its cluster_name. Run the same update line after every DST patch, because players on the new build cannot see a server that has not updated yet.

Joining: what players need before they join

Once both shards are live, the next job is getting friends in. For a smooth first join, get the basics from the server owner before opening the browser. The game can only connect if your client and the server are on the same version, you are logged into your Klei account, and you are trying to reach the right server entry or the right Master port.

  • The server name, if you plan to use Browse Games.
  • The IP:port, if you plan to use direct connect. The important port is the Master shard’s server_port, not the Caves port.
  • The password, if the server uses cluster_password.
  • The same game version as the server. After a DST patch, servers that have not updated yet are hidden from the live list.
  • A logged-in Klei account. If you are offline, the game will block normal online joining.
  • The correct platform. PC players join PC dedicated servers; Xbox and PlayStation versions do not join PC dedicated servers.

Direct connect with c_connect

Direct connect is the best fallback when the browser list is getting in the way. It bypasses search and listing problems, but it still needs the correct address, the correct port and a server that is actually online.

Open the console from the main menu. The default key is ~; on AZERTY keyboards it is ù; the current hotkey is listed in Options > Controls. Then type one of these:

c_connect("IP", port, "password")
c_connect("IP", port)

The IP goes in quotes, the port is a plain number, and if there is a password it also goes in quotes. This command only works from the menus; the game refuses it while you are already inside a world. If you need the console basics, the console and admin commands section covers the menu console as well.

Which port to use

Use the Master shard’s server_port from server.ini. Its default is 10999. On rented servers, the panel normally shows the IP and port clearly. If the cluster has caves, do not tell players to connect to the Caves port: the Caves shard is a separate process reached in-game through sinkholes after the player has joined the Master. When someone takes a sinkhole, the game moves their connection to the Caves shard’s own server_port by itself, so on a home server forward both player ports over UDP, or players will drop back to the surface every time they try to go down.

Console commands: open the console and check Remote or Local first

The default console key is ~, the key under Esc on UK and US keyboards. You can rebind it in Controls. The console is on by default through console_enabled under [MISC], and the old launch flag is deprecated: [WARNING] -console has been deprecated: Use the [MISC] / console_enabled setting instead.

What matters is the prefix at the start of the console line. It will say Remote: or Local:. While the console is open, pressing Ctrl toggles between them.

  • Remote: sends the command to the server you are connected to. This is what you want for almost all admin work.
  • Local: runs the command only in your own game client. If you spawn, move or change something here, the server does not take it as an admin action.

Save, roll back and shut down safely

These commands are the recovery set. They matter because they touch the server’s saved world state on disk, not just what one player sees. A good rule is simple: save before risky admin work, roll back only as far as needed, and shut down without saving only when the current state is the problem.

The game keeps snapshots, one per save, with an autosave at the end of each in-game day. max_snapshots defaults to 6 in cluster.ini under [MISC], so that is your normal step-back window. Before destructive work, back up and transfer your DST world. If the mess started after a server mod change, fix the mod setup instead of wiping the cluster; our guide to installing mods on a DST server covers the file side.

Use this save-history view if you are not sure how far back each rollback step really goes.

What each command does to your save history
c_rollback(0)
Same as c_reset()
loads
The latest save
loses
Everything since that save
c_rollback(1)
One save back
loads
The latest save, if older than 30 seconds
loses
The current day so far
c_rollback(2)
Two saves back
loads
The save before that
loses
Yesterday as well
c_regenerateworld()
Not a rollback
deletes
Every world in the cluster
loses
Everything: a brand-new world
The server keeps max_snapshots = 6 saves by default, one per in-game day, so that is how far back you can go.
Count in days: each rollback step goes back one end-of-day save.
Command What it does When to use it Notes
c_save() Saves immediately Before c_removeall("prefab"), moderation cleanup, or planned shutdown Creates a known recovery point on disk
c_rollback(count) Rolls back the current world by the requested number of saves Undoing a bad in-game day, grief, or broken cleanup step c_rollback(1) returns to the latest save, as long as it is more than 30 seconds old; that is usually the start of the current day
c_rollback(0)
c_reset()
Restarts from the last save, discarding everything since You want to drop unsaved recent changes without stepping back a whole extra save Useful when the live state is bad but the last snapshot is fine
c_shutdown()
c_shutdown(false)
Shuts down with save by default; false shuts down without saving Normal maintenance, or stopping before a bad live state is written out false is deliberate damage control, not your normal restart path
/rollback [numsaves] Starts an admin rollback or a rollback vote When you need a visible, shared rollback process Players see Should we rollback this world? and, if it passes, Rolling server back in 5 seconds…
c_regenerateworld()
/regenerate
Permanently deletes and regenerates worlds Only when you truly want a brand new world Not a fix. It destroys progress, and it will not work properly for any shard that is offline or in a loading state
c_save()
c_rollback(0)
c_rollback(1)
c_rollback(2)
c_shutdown(false)

Backups: what a DST world actually is

Console rollbacks only reach back a few saves, so anything you would hate to lose needs a real backup. A Don’t Starve Together world is a cluster folder. On a local machine you usually see names like Cluster_1, Cluster_2 and so on. On a dedicated server the folder can be named anything. Inside that folder sit the cluster-wide files, then one folder per shard: Master for the overworld and Caves if caves are enabled.

The part people call “the save” is not one file. Each shard has its own save folder, and inside that are a shardindex file plus the current session tree with numbered snapshots and one folder per player. That is why copying only a session folder, only Master, or only a few files from inside save tends to fail: the server needs the shard index and the matching session state together.

The layers of a DST world, and which ones travel
File or folderWhat it holdsWhen you move to a rented server
Master/save and Caves/saveThe world itself: shardindex, snapshots and one folder per playerCopy both, from the same save point
modoverrides.lua, worldgenoverride.luaWhich mods and world settings the shard expectsCopy for each shard
cluster.iniWorld name, snapshots, and the [SHARD] link valuesKeep the host’s [SHARD] values
server.ini (each shard)That shard’s ports and shard settingsKeep the host’s ports
cluster_token.txtThe dedicated server’s identityNever overwrite; keep it private
client_saveYour client data, not a worldNever upload it
Most failed transfers copy the wrong row: a world with no save, or a save that brings another machine’s ports and token with it.
Copy the world and its mod settings; leave everything that belongs to the machine where it is.
Cluster_1/
├─ cluster.ini                  # cluster_name lives here
├─ cluster_token.txt            # dedicated server token; keep private
├─ adminlist.txt                # created once used
├─ whitelist.txt
├─ blocklist.txt
├─ Master/
│  ├─ server.ini
│  ├─ modoverrides.lua
│  ├─ worldgenoverride.lua      # optional user world settings
│  ├─ leveldataoverride.lua     # optional, written by the game
│  └─ save/
│     ├─ shardindex
│     └─ session/
│        └─ <session ID>/
│           ├─ 0000000001       # world snapshot
│           ├─ 0000000002
│           └─ KU_xxxx_/        # one folder per player
└─ Caves/                       # only if caves are enabled
   ├─ server.ini
   ├─ modoverrides.lua
   ├─ worldgenoverride.lua
   ├─ leveldataoverride.lua
   └─ save/
      ├─ shardindex
      └─ session/...

The practical rule is simple: if you are protecting the whole world, copy the whole cluster. If you are merging a world into a rented server’s existing cluster shell, copy the whole save folder for each shard so shardindex and the matching session stay together.

Move a local world to a rented dedicated server

Do the version check first. If the local world was saved by a newer game build than the server is running, the destination may show “Not playable – saved data from newer game version”. Update the server before you try to load the upload. This is a read-compatibility problem, not a sign that the save is bad.

Before the final save, get everybody out of the caves if you can. Master and Caves are separate shard servers, and players are stored in the shard they were in when saved. If someone is still in caves and the Caves shard is the part that goes wrong, that character data is exactly where the problem will be.

  1. Close the game. If the world is a cloud save, use Convert To Local Save. If you want a fallback, use Duplicate World first.
  2. Use Open World Folder and zip the local cluster.
  3. On the rented server, stop the server fully.
  4. Back up the server’s current cluster before touching it.
  5. Find the live cluster folder. If the panel is unclear, search for cluster.ini. Dedicated servers use <persistent_storage_root>/<conf_dir>/<cluster>/; the default conf_dir is DoNotStarveTogether and the default -cluster is Cluster_1.

Method A: copy only the save folders into the host’s existing cluster

This is the safer method on rented servers because it keeps the host’s own network shell intact. Back up the host’s current Master/save and Caves/save, then remove or rename them. As long as a save already exists in save/, the server will not generate a new world, so you need that old save out of the way before replacing it.

Method B: upload the whole cluster, then restore the host’s own values

Keep the host’s own cluster_token.txt as well. In each shard’s server.ini, keep the host’s port settings too. The same point applies here: those values belong to the machine and panel, not to the save data.

Other Don’t Starve Together server questions

Which port do I use if the server has caves?

Use the Master shard’s server_port. Players arrive in the forest and reach the caves through a sinkhole; the Caves shard is a separate process with its own port that the game switches players to during travel. On a home server, forward both shards’ player ports over UDP, or nobody can get into the caves.

Do I need to copy the Caves folder too?

Yes, if the world uses caves. Master and Caves are separate shard servers with separate saves, and they need to come from the same moment. Skipping Caves, or mixing Caves from a different backup point, is one of the main causes of broken transfers and missing character state.

More Don’t Starve Together server help

Similar Posts