Don't Starve Together Updated April 27, 2026

Generating and Configuring Your Klei Server Token

How to generate a Klei server token and correctly place it so your server appears in the public browser.

Don't Starve TogetherKlei tokenauthenticationserver visibility

What Is the Klei Server Token?

The Klei server token is a credential that authenticates your dedicated server with Klei's backend. Without a valid token, your server will not appear in the in-game server browser. Players can still direct-connect, but public discovery is disabled until a valid token is present.

Generating a Token

  1. Log into your Klei account at https://accounts.klei.com/account/game/servers?game=DontStarveTogether
  2. Click Add New Server
  3. Give the server a name (this is for your reference only — it does not affect the in-game server name)
  4. Click Generate Server Token
  5. Copy the full token string

The token is a long alphanumeric string. Copy it exactly — do not add line breaks, spaces, or quotation marks.

Placing the Token

Create or open the file at:

/dst/cluster_token.txt

Paste the token as the only content in the file. The file must contain nothing else — no trailing newline is ideal, but a single trailing newline is acceptable. Do not wrap the token in quotes.

Correct:

pds-g^KU_abc123...rest_of_token_here

Incorrect (will fail):

"pds-g^KU_abc123...rest_of_token_here"
token=pds-g^KU_abc123...rest_of_token_here

Token Expiry

Klei tokens expire after 30 days of inactivity. If your server disappears from the browser and the console log shows:

[00:00:05]: Failed to authenticate with cluster token

Generate a new token from the Klei accounts page and replace the contents of cluster_token.txt. Restart the server after replacing the file.

Token Scope

A single token is tied to one cluster. If you run multiple clusters (for example, separate PvP and PvE servers), generate a separate token for each and place each in the corresponding cluster's root directory.

Offline Mode

If you want to run a LAN-only or private server without Klei authentication, set the following in cluster.ini:

[NETWORK]
offline_server = true

In offline mode, the token is not required, but the server will only be accessible via direct connect and will not appear in the public browser under any circumstances.

Security Notes

Do not share your server token publicly. Anyone with the token can impersonate your server on Klei's backend. If a token is compromised, regenerate it immediately from the Klei accounts page — the old token is invalidated once a new one is generated for the same server entry.