How do I set up a Don't Starve Together server?

Don't Starve Together is a cooperative survival game where players face harsh seasons, monsters and hunger. Running your own server lets you enable caves, install mods and tune the world to your liking. A HostValues VPS with 4 GB of RAM is enough for a server with caves enabled.

Getting a server token

You need a cluster token from Klei. Log in at accounts.klei.com, go to the Don't Starve Together game page, and generate a server token. Save it as cluster_token.txt in your cluster directory.

Installation

  1. Install SteamCMD and download the server: steamcmd +force_install_dir /home/dst/server +login anonymous +app_update 343050 validate +quit
  2. Create a cluster directory: mkdir -p ~/.klei/DoNotStarveTogether/MyCluster
  3. Place your cluster_token.txt in that directory.
  4. Create cluster.ini with settings for the cluster name, game mode (survival, endless or wilderness), max players and password.
  5. Create a Master subfolder for the overworld, with its own server.ini (port, is_master=true).
  6. If you want caves, create a Caves subfolder with its own server.ini (different port, is_master=false) and a worldgenoverride.lua setting the preset to DST_CAVE.
  7. Start both shards. The Master shard runs with: ./dontstarve_dedicated_server_nullrenderer_x64 -cluster MyCluster -shard Master

Caves

Caves run as a second shard connected to the Master. Each shard needs its own port and enough RAM. Budget roughly 2 GB per shard. Caves add an entire underground world with exclusive resources, bosses and biomes.

Mods

Server mods are listed in dedicated_server_mods_setup.lua using their Workshop ID. Configuration for each mod goes in modoverrides.lua inside each shard folder. Popular server mods include Global Positions (shows all players on the map), Extra Equip Slots and Geometric Placement.

Seasons and world settings

Edit worldgenoverride.lua to control season length, resource density, enemy spawning and world size. You can make autumn longer for a gentler start, or shorten it for a tougher challenge.

Do I need caves enabled?

Caves are optional but add a lot of content, including unique bosses and the Ruins biome. They require a second shard process and extra RAM, so disable them if your server resources are limited.

How do I add mods to the server?

Add ServerModSetup("WORKSHOP_ID") lines to dedicated_server_mods_setup.lua. The server downloads the mods on startup. Configure mod options in modoverrides.lua in each shard folder. Players download client mods automatically when connecting.

What game mode should I choose?

Survival mode has permadeath and world resets when everyone dies. Endless mode lets players respawn at a portal, and the world persists regardless. Wilderness mode scatters spawn points and skips the lobby. Endless is the most popular for casual groups.


Still stuck? Open a support ticket, our team is happy to help.

Back to the knowledge base