LogoLogo
  • Home
  • Getting Started
  • Configuration
    • LinuxGSM Config
    • Game Server Config
    • Start Parameters
    • cronjobs
    • Running on Boot
    • Running Multiple Game Servers
    • IP Address Configuration
    • LinuxGSM Stats
  • Commands
    • install
    • start-stop-restart
    • monitor
    • test-alert
    • console
    • debug
    • update
    • check-update
    • force-update
    • validate
    • update-lgsm
    • backup
    • map-compressor
    • details
    • mods
    • skeleton
    • fastdl
    • change-password
  • Game Servers
    • 7 Days to Die
    • Arma 3
    • ARK: Survival Evolved
    • Call of Duty 4
    • Dont Starve Together
    • Counter-Strike 2
    • Counter-Strike: Global Offensive
    • Factorio
    • Garry's Mod
    • Insurgency: SandStorm
    • Killing Floor 2
    • Minecraft: Java Edition
    • Multi Theft Auto
    • Rust
    • Sven Co-op
    • Trackmania Nations Forever / Trackmania United Forever
    • TeamSpeak 3
    • Unreal Tournament 99
    • Unreal Tournament 2004
    • Unreal Tournament 3
    • Valheim
    • Xonotic
    • The Front [WIP]
  • Networking
    • IP Address
    • Ports
    • Source Engine
  • Alerts
    • Discord
    • Email
    • IFTTT
    • Pushbullet
    • Pushover
    • Rocket.Chat
    • Slack
    • Telegram
  • Dependencies
    • Java
    • tmux
    • jq
    • gamedig
    • glibc
  • Features
    • ANSI Colors
    • Stop Mode
    • Log Management
    • Message Display Time
  • SteamCMD
    • Steam Master Server
    • Game Server Login Token
    • Branch
    • LAN Discovery
    • Workshop
    • Error Codes
  • Linux
    • distro
    • ftp-scp
    • file-ownership
    • firewalls
    • network-interfaces
    • permissions
    • Symlinking and ln command
  • Troubleshooting
  • FAQ
  • Guides
    • Security
    • Make Webserver Case Insensitive
    • Sourcemod and Metamod:Source
  • Other
    • server-migration
    • basic-usage
    • brand
Powered by GitBook
On this page
  • Authentication Token
  • Clusters and Shards
  • Single-Shard
  • Multi-Shard
  • Guides / Documentations:
Edit on GitHub
Export as PDF
  1. Game Servers

Dont Starve Together

PreviousCall of Duty 4NextCounter-Strike 2

Last updated 1 year ago

Authentication Token

Don't Starve Together server requires an Authentication Token.

  1. Go to the Klei website .

  2. After logging into your account to get your game server authentication token.

  3. Enter a friendly name for your server and copy the access token and paste it into the file cluster_token.txt.

You can quickly do this by running the following command, replacing [AUTHTOKEN] with your authentication token.

echo '[AUTHTOKEN]' > ~/.klei/DoNotStarveTogether/[CLUSTER]/cluster_token.txt

Clusters and Shards

A Don't Starve Together server consists of clusters and shards.

One cluster can contain multiple shards. A shard is simply a map/level. Multiple shards are connected by cave entrances/exits found on the map. These are functioning as portals to allow players to travel between actual game servers.

Each shard (level of the world) has to be run as an individual game server instance.

Single-Shard

By default, the cluster will be single-sharded. So you only need one server but you will also only have one map.

Default start parameter setting:

sharding="false"

Multi-Shard

There are two types of shards:

  1. master shard: the shard you enter when joining the server / the shard/server you have to join (one per cluster)

  2. slave shard: shard that will connect to the master (arbitrary number per cluster)

In this example, we will only use two shards, one overworld shard and one cave shard, on the same machine using the same installation. If you want to use more shards or run the shards on different machines, take a look at the guides mentioned at the bottom. First of all we need two scripts:

./dstserver-1
./dstserver-2

Server #1

dstserver-1 will be the master shard with an overworld as level.

## Predefined Parameters
sharding="true"
master="true"
shard="Master" 
cluster="Cluster_1"
cave="false"

~/.klei/DoNotStarveTogether/Cluster_1/Master/server.ini

[NETWORK]
server_port = 11000

[STEAM]
authentication_port = 8768
master_server_port = 27018

Server #2

dstserver-2 (this will be the slave shard with a cave as level):

## Predefined Parameters
sharding="true"
master="false"
shard="Caves" 
cluster="Cluster_1"
cave="true"

~/.klei/DoNotStarveTogether/Cluster_1/Caves/server.ini

[NETWORK]
server_port = 11001

[STEAM]
authentication_port = 8769
master_server_port = 27019

If you want to Caves and Overworld to display on the same server, you also to change the cluster.ini, otherwise it will run two instances, one with the Overworld and another with the Caves:

~/.klei/DoNotStarveTogether/Cluster_1/cluster.ini

[SHARD]
shard_enabled = true

Set all installation variables BEFORE running the ./dstserver-[1,2] install commands. Feel free to change these settings but make sure that you set them to the same clusters. You also should not change them afterwards.

For clarity it is recommended recommend naming the master shard Master.

Lastly you have to start both servers. The order does not matter because the slave server will auto-retry connecting to the master server which is listening.

Guides / Documentations:

Take a look at to get a general idea of how to create multiple game servers.

https://accounts.klei.com
visit this page
Multiple-Servers
Quick Setup
Server Settings
Command Line Options
Understanding Shards and Migration Portals