To make a Don’t Starve Together server, install Klei’s Dedicated Server software, create a cluster folder, place a Klei cluster token at its root, configure the Master shard (and optionally Caves), then launch each shard with the same cluster name. A public server also needs online mode and correctly forwarded, non-conflicting ports. This guide covers Steam and SteamCMD installation, the exact cluster layout, two-level Master-and-Caves setup, player limits, LAN and offline choices, updates, clean shutdowns, and the fixes for servers that run but do not appear in the browser.
Should you self-host or use managed hosting?
Self-hosting gives you direct control over the files, mods, world settings, backups, ports, and restart schedule, but you must maintain every part of the installation. Managed hosting runs the same dedicated-server architecture for a recurring service fee and handles much of the operating work for you.
| Consideration | Self-hosting | Managed hosting |
|---|---|---|
| Initial setup | Install Steam or SteamCMD, build the cluster folders, create a token, and configure ports. | The provider supplies a configured server panel or instance. |
| Updates and backups | You schedule SteamCMD updates and copy the cluster directory before changes. | The provider may offer update and backup tools; confirm what is included. |
| Mods and configuration | Full access to shard files, world-generation overrides, and mod settings. | Control depends on the host’s panel and file access. |
| Connectivity | You manage firewall rules, port forwarding, and public or LAN visibility. | The provider normally manages the machine’s network exposure, while you still choose server settings. |
| Restarts and saves | You must script restarts and use a clean shutdown command. | Panels commonly provide restart and stop controls; verify that they perform a clean stop. |
| Recurring cost | No hosting subscription, but you provide the computer, storage, bandwidth, and administration. | A monthly service charge applies; current prices, uptime, and terms vary by provider. |
If you want complete control or already have an always-on machine, self-hosting is the flexible choice. If maintaining SteamCMD, firewall rules, backups, and two shard processes is the part you want to avoid, a managed service is simpler. Ask a provider whether its plan includes both Master and Caves processes, file access, automated backups, mod support, and clean restart controls rather than assuming every plan does.
What do I need before installing the server?
- A Windows or Linux computer that can remain online while people play.
- Steam, or SteamCMD if you want a command-line installation.
- Network access and permission to open or forward the ports your server uses.
- A copy of the Don’t Starve Together client for generating a cluster token, or access to Klei’s account-server token page.
- A plan for backups, updates, and clean shutdowns.
The dedicated server is headless: it does not render the game world, so it can run without a graphics window. Players still use the normal game client to connect. Decide in advance whether the machine will host only the Master shard or both Master and Caves, because each running process needs its own configuration and a non-conflicting port.
How do I install the Don’t Starve Together Dedicated Server?
Steam installation
- Open Steam and select Library.
- Enable the Tools filter.
- Install Don’t Starve Together Dedicated Server.
- Note the installation directory; the launch commands must use the cluster folder created there or in a location you select.
Steam keeps the server tool separate from the playable client. Installing the tool does not create a public server automatically: you still need a cluster, token, shard files, and launch commands.
SteamCMD installation
Install SteamCMD, open its console, and run:
login anonymous
force_install_dir /path/to/installation/directory
app_update 343050 validate
app_update 343050 installs or updates the dedicated-server application. validate checks the installation, but community documentation warns that validation can remove files that do not belong to the base installation. Make a backup first if you have added mods or other custom files inside that directory. Keep the cluster directory separate when practical, so validating or replacing the program files does not put your saved worlds and administration lists at risk.
Where do I get cluster_token.txt, and where does it go?
The cluster token authorizes your cluster for online listing and player connections. In the DST client console, run:
TheNet:GenerateClusterToken()
You can also generate a token through Klei’s account-server page. The result is a one-line value. Save it as cluster_token.txt directly in the cluster root, beside cluster.ini; do not put it inside Master or Caves.
Treat the token like a password. Do not paste it into screenshots, public repositories, support posts, or launch scripts that other users can read. If it is exposed, generate a replacement and update the file before restarting. Replacing the token does not replace the world save: keep the existing cluster and shard folders, change only the credential, and restart cleanly.
What folder structure should a DST server use?
A two-shard cluster can use this layout:
Cluster_1/
├── cluster.ini
├── cluster_token.txt
├── adminlist.txt
├── whitelist.txt
├── blocklist.txt
├── Master/
│ └── server.ini
└── Caves/
└── server.ini
cluster.ini contains settings shared by the cluster. Each shard has its own server.ini, and shard-specific world-generation or mod override files belong in that shard’s directory. Do not copy one shard’s server.ini over the other: Master and Caves have different roles and settings. The token and shared configuration must be at the root that you pass to both launch commands; placing them one directory too high or too low can leave a process running without a public listing.
The administration files are also cluster-level files. Keep them beside cluster.ini, preserve their names, and include them in backups. If you later move an existing world, move the complete cluster and shard data rather than only a single save file.
How do I configure a Master-and-Caves world?
A two-level world requires sharding in cluster.ini, exactly one shard designated as Master, and a separate Caves shard configuration. The two processes use a private master connection to coordinate, while players enter through the Master game port.
Master shard
Put the Master shard’s server.ini in Master/. It owns the primary game connection and is the shard shown in the public browser. Its game port must be reachable from the internet if people outside your home network will join.
Caves shard
Put the Caves shard’s server.ini in Caves/. Caves is reached from inside the world; it is not an additional public browser listing. Set its shard options separately and ensure its private communication settings match the cluster configuration. Caves still needs its own process and port even though players do not select it as a separate server.
Use the same cluster name for both processes and point both commands at the same cluster directory. A mismatch in either value starts separate clusters instead of a connected overworld and caves system. Start with one Master shard if you are testing, then add Caves after the basic connection and save cycle work.
How do I start the dedicated server?
Klei’s recommended two-level launch commands are:
dontstarve_dedicated_server_nullrenderer -cluster MyClusterName -shard Master
dontstarve_dedicated_server_nullrenderer -cluster MyClusterName -shard Caves
Run these from the dedicated-server installation context and make sure the cluster folder is the one containing cluster.ini and cluster_token.txt. Replace MyClusterName with the cluster name used by both processes. If your operating system requires an explicit working directory or executable path, add that path while leaving the cluster and shard arguments unchanged.
Windows
Place both commands in a .bat file if you want one shortcut to start the shards. Each command needs to remain a running process; closing its console stops that shard. You can use separate windows for clearer logs, or launch the second command only after confirming that the Master has created its world.
Linux
Put the commands in a shell script or run them under a service manager so the processes can restart after maintenance or a machine reboot. Keep the Master and Caves processes separately identifiable in logs. A restart policy should not repeatedly kill and relaunch a process that is still saving; stop both shards cleanly during planned maintenance.
Which ports and player limits should I use?
Every server process on one machine needs a distinct port. Klei documents command-line ports from 1024 through 65535. For same-LAN visibility, Klei specifies ports 10998 through 11018.
| Setting | Documented value | What it controls |
|---|---|---|
| Command-line port range | 1024–65535 | Valid port numbers for server processes. |
| LAN listing range | 10998–11018 | Ports Klei specifies for visibility on the same local network. |
-players |
1–64 | Maximum players supplied at launch; it overrides [GAMEPLAY] max_players. |
[GAMEPLAY] max_players default |
16 | Settings-file default when no command-line override is supplied. |
| Documented tick-rate default | 15 updates per second | Simulation update frequency; Klei recommends leaving this at its default. |
Forward the Master game port through your router only when players outside your LAN must connect, and allow it through the host firewall. Keep the Caves process on its own port and do not assign two processes the same value. The actual external port and firewall syntax depend on your operating system and router.
The -players value is a launch-time override, so check your startup script when the in-file limit appears to be ignored. Values outside 1–64 are not valid according to Klei’s documented range. For a small private group, choose a limit deliberately rather than exposing the default 16-player setting by accident.
How do I make the server public or LAN-only?
For a public listing, run in normal online mode with a valid token and reachable ports. To keep the server off the public listing, add -offline to the launch configuration.
Klei states that offline mode permits only local-network players, disables Steam-related functionality, and prevents public listing. Disabling data collection also restricts the server to offline mode. If you expect internet players, check that neither setting is enabled. A LAN-only configuration is useful for a household or test world, but it is not a substitute for router forwarding when friends are connecting from elsewhere.
Where do world settings and mods belong?
Keep world-generation overrides and mod settings in the shard directory they affect. Master-specific files go under Master/; Caves-specific files go under Caves/. When a mod needs settings on both levels, configure each shard rather than assuming one file is shared.
After installing or changing a mod, restart the affected shard and watch its startup output for load errors. A configuration that works on Master may not be appropriate for Caves because each shard has its own server.ini. Back up the complete cluster directory before changing world-generation settings, shard files, or mod lists so you can restore the previous working state. Update the dedicated-server program and mods in a planned window; changing several variables at once makes a failed start harder to diagnose.
How should I update, back up, and stop the server?
Update during a maintenance window
- Tell players when the server will be unavailable.
- Stop Master and Caves cleanly.
- Copy the entire cluster directory, including
cluster.ini, token, shard folders, and admin lists, to a separate backup location. - Run the SteamCMD update command again, usually
app_update 343050. - Review mod and configuration files, then start both shards and test a connection.
Retain more than one backup when possible: keep a recent copy for routine recovery and an older copy from before a major world-generation or mod change. Do not overwrite the only backup with a newly validated installation.
Save before stopping
Use c_shutdown() from the server console, or the host panel’s clean-stop function, instead of killing the process. A clean stop lets the world save; terminating a process abruptly risks lost progress or a damaged save. With two shards, stop both processes and confirm they have exited before copying files or running an update.
Why does my server run but not appear in the browser?
A running process is not proof that the cluster is publicly discoverable. Check these causes in order:
- Token: Confirm that
cluster_token.txtis in the cluster root, contains the complete one-line value, and belongs to the cluster you launched. - Offline settings: Remove
-offlinefor an internet server and check that data-collection settings have not forced offline mode. - LAN-only settings: A
lan_only_clusterconfiguration keeps the server from public discovery. - Ports: Confirm that Master uses an unused port, the firewall allows it, and the router forwards the same external port to the host.
- Shard launch: Ensure both commands use the same cluster name and folder. Only Master appears in the browser; Caves is entered from inside the world.
- Clean restart: Stop both shards with
c_shutdown(), correct the configuration, and start them again rather than repeatedly killing processes.
If LAN players can connect but internet players cannot, the installation and token are probably working; focus on router forwarding, firewall rules, and whether your internet connection permits inbound connections. If nobody can connect, first verify that the process is using the intended cluster root and that the Master shard finished loading its world rather than stopping on a configuration or mod error.
Do I need Caves?
No. A single-shard Master server is sufficient for an overworld-only game. Add Caves when you want the underground level and are prepared to maintain a second shard process, its own server.ini, a private master connection, and an additional port. Caves does not create a second public listing, so players should join the Master entry and travel to the underground level from inside the world.
What is the safest first test?
- Start with a backed-up cluster containing only the Master shard.
- Join from the host computer or another device on the same LAN.
- Verify that the world loads and that a clean
c_shutdown()saves it. - Add Caves, mods, and public port forwarding one change at a time.
- After each change, restart cleanly and test before inviting outside players.
This sequence separates file and world problems from networking problems. Once the Master works locally, add the Caves process and verify shard travel. Only then expose the Master port to the internet and test from an external connection.
Frequently Asked Questions
Can I move an existing Don’t Starve Together world to a dedicated server?
Yes. Move the relevant cluster and shard data into the dedicated server’s cluster directory, preserve the folder names, and keep a backup of the original. Check that the destination uses compatible settings and mods before allowing players back in.
Can friends join a server running on the same computer as the game client?
They can, provided the computer has enough resources and the server’s game port is reachable. Test locally first; internet players additionally need router forwarding and firewall permission.
What happens if I lose or replace the cluster token?
The token is an online credential, not the world save itself. Generate a new token, replace the one-line value in the cluster root, and restart the server; keep the cluster files and backups intact.
How do I run only the overworld without a Caves shard?
Create the cluster and Master folders, configure a single Master shard, and launch only the Master command. Do not start a Caves process until its folder and shard settings are ready.
Does Caves appear as a second server in the browser?
No. Only the Master shard is listed publicly. Caves runs as a connected shard and is reached from inside the world.
What player limit can I set?
The command-line -players option accepts 1–64 and overrides [GAMEPLAY] max_players. Without that override, the settings reference lists 16 as the default.
What tick rate should I use?
The documented default is 15 updates per second, and Klei recommends leaving it at that default unless you have a specific, tested reason to change it.
Why can LAN friends join while internet friends cannot?
The local installation is likely working. Check that the Master port is forwarded to the host, allowed through the firewall, and not blocked by your internet connection. Also verify that the server is not in offline or LAN-only mode.
Can validation damage my modded installation?
SteamCMD’s validate check can remove files that do not belong to the base installation. Back up the installation and keep custom cluster or mod files outside the program directory when possible.
How should I stop a running server safely?
Use c_shutdown() in the server console or a host panel’s clean-stop function. Avoid killing the process, especially while both Master and Caves are saving.
The Bottom Line
Install app 343050, generate a private token, place it beside cluster.ini, configure each shard in its own folder, and launch Master and (if needed) Caves with the same cluster name. Use distinct ports, keep offline mode disabled for public play, back up the cluster, and always shut down with c_shutdown().