This guide walks you through setting up and configuring your Don't Starve Together dedicated server on Legion Hosting, from obtaining your Klei server token through server configuration, game modes, caves, world generation, and connecting. For mod installation, see DST Mod Installation. For admin commands, see DST Admin Commands. For common issues, see DST Troubleshooting.
1. Getting a Server Token
Don't Starve Together requires a Klei server token to authenticate your dedicated server. Without a valid token, the server will not start.
Step 1 — Log In to Your Klei Account
Visit accounts.klei.com and log in with the account that owns Don't Starve Together. You can sign in with Steam, PSN, Xbox, or a standalone Klei account.
Step 2 — Navigate to Game Servers
Once logged in, click on Games in the top navigation bar, then select Don't Starve Together. On the game page, find and click the Game Servers tab.
Step 3 — Generate a New Token
Click the Add New Server button. Give your server a friendly name (this is just for your reference on the Klei site) and click Add New Server to confirm. Your new token will appear — it looks like a long string of characters starting with pds-g^.
Step 4 — Copy and Apply the Token
Copy the entire token string. In GPanel, navigate to your server's Startup tab and paste the token into the Cluster Token field. Alternatively, you can place it in the cluster_token.txt file in your server's root directory.
2. Server Configuration
The easiest way to configure your server is through the Startup tab in GPanel. The following variables are available:
| Variable | Description | Example |
|---|---|---|
| Cluster Token | Your Klei server authentication token (required) | pds-g^KU_abc123... |
| Cluster Name | The name players see in the server browser | My DST Server |
| Cluster Description | A short description shown in the server browser | Friendly survival server! |
| Game Mode | The game mode for the server (see section 3) | survival |
| Max Players | Maximum number of simultaneous players | 6 |
| Cluster Password | Password required to join (leave blank for public) | mypassword |
After changing any startup variables, click Save and then Restart your server for the changes to take effect.
3. Game Modes
Don't Starve Together offers three distinct game modes, each changing how death and respawning work:
| Mode | Death Behavior | Revive Method | Best For |
|---|---|---|---|
| Survival | Dead players become ghosts. If all players are dead, the world resets. | Touch Stones, Life-Giving Amulets, Meat Effigies (limited uses) | Players who want a challenging, high-stakes experience |
| Endless | Dead players become ghosts. The world never resets from deaths. | All Survival methods plus unlimited respawn at the Florid Postern (with a max-health penalty) | Casual players, building-focused groups, new players |
| Wilderness | Dead players are fully removed. No ghosts. | Players respawn at a random location with a fresh inventory | PvP-oriented servers, hardcore players |
4. cluster.ini Configuration
For more advanced configuration, you can edit the cluster.ini file directly. This file is located in your server's root directory and controls cluster-wide settings. Access it via the File Manager in GPanel or through SFTP.
[GAMEPLAY]
game_mode = survival
max_players = 6
pvp = false
pause_when_empty = true
[NETWORK]
cluster_name = My DST Server
cluster_description = A friendly survival server
cluster_password =
cluster_language = en
[MISC]
console_enabled = true
[SHARD]
shard_enabled = true
bind_ip = 127.0.0.1
master_ip = 127.0.0.1
Key Settings Explained
| Setting | Description | Default |
|---|---|---|
game_mode |
Server game mode: survival, endless, or wilderness |
survival |
max_players |
Maximum number of concurrent players | 6 |
pvp |
Enable or disable player-versus-player combat | false |
pause_when_empty |
Pause the world simulation when no players are connected | true |
cluster_password |
Password to join; leave blank for a public server | (empty) |
shard_enabled |
Required for caves support (see section 5) | false |
console_enabled |
Allow the in-game console for admins | true |
cluster.ini file, the Startup tab values typically take priority. Use one method or the other to avoid confusion.
5. Caves Setup
Don't Starve Together uses a shard architecture where the Overworld and Caves run as separate server instances that communicate with each other. On Legion Hosting, caves support may be available depending on your plan.
Master/Caves Architecture
- Master Shard — The Overworld (surface). This is the primary server instance that players connect to.
- Caves Shard — The underground caves. This runs as a secondary instance that the master shard communicates with internally.
Enabling Caves
To enable caves, ensure the following settings are in your cluster.ini:
[SHARD]
shard_enabled = true
bind_ip = 127.0.0.1
master_ip = 127.0.0.1
Each shard has its own server.ini file. The Master shard's server.ini (located in the Master/ folder) should contain:
[SHARD]
is_master = true
[STEAM]
master_server_port = 27018
authentication_port = 8768
The Caves shard's server.ini (located in the Caves/ folder) should contain:
[SHARD]
is_master = false
name = Caves
[STEAM]
master_server_port = 27019
authentication_port = 8769
6. World Generation
You can customize world generation settings to change the frequency of resources, creatures, seasons, and biomes. World generation settings are stored in worldgenoverride.lua files inside each shard's directory (Master/ and Caves/).
Example worldgenoverride.lua (Overworld)
return {
override_enabled = true,
preset = "SURVIVAL_TOGETHER",
overrides = {
-- Resources
flint = "often", -- "never", "rare", "default", "often", "always"
rocks = "often",
trees = "default",
berrybush = "often",
-- Creatures
spiders = "default",
hounds = "less", -- "never", "less", "default", "more", "always"
-- Season length
autumn = "longseason", -- "noseason", "shortseason", "default", "longseason"
winter = "shortseason",
spring = "default",
summer = "default",
-- World size and branching
world_size = "large", -- "small", "medium", "default", "large", "huge"
branching = "default", -- "never", "least", "default", "most"
},
}
Example worldgenoverride.lua (Caves)
return {
override_enabled = true,
preset = "DST_CAVE",
overrides = {
mushtree = "often",
bunnymen = "often",
worms = "less",
cave_spiders = "default",
world_size = "default",
},
}
worldgenoverride.lua only take effect when a new world is generated. To apply changes, you must delete the existing save data and restart the server. Back up your save files first if you want to preserve them.
7. How to Connect
There are two ways to connect to your Don't Starve Together server:
Method 1 — Browse Games (Recommended)
- Launch Don't Starve Together and click Play.
- Select Browse Games from the main menu.
- Use the search bar at the top to search for your server's Cluster Name.
- Click on your server in the results and click Join.
- If your server has a password, enter it when prompted.
Method 2 — Direct Connect via Console
- Launch Don't Starve Together and click Play.
- Press the ~ (tilde) key to open the console.
- Type the following command, replacing the IP and port with your server's details from GPanel:
c_connect("YOUR_SERVER_IP", YOUR_SERVER_PORT)
If your server requires a password:
c_connect("YOUR_SERVER_IP", YOUR_SERVER_PORT, "YOUR_PASSWORD")
Related Articles
- DST Mod Installation
- DST Admin Commands
- DST Troubleshooting
- How to Find Your Server IP and Port
- How to Upload Files via SFTP
- Server Startup Guide
Need Help?
If you run into an issue not covered here, submit a support ticket and include your server ID, a description of the problem, and any relevant console output from GPanel.