# Cluster Configuration

### <h3 style="color:#f6c177">Cluster.ini
The cluster.ini is the primary configuration file for cluster wide options. The server will look in `<persistent_storage_root>/<conf_dir>/<cluster>/` for the existence of this file. 

An example of the file
```ini
[GAMEPLAY]
game_mode = endless
max_players = 12
pvp = false
pause_when_empty = true

[NETWORK]
cluster_description = Silence Miranda
cluster_name = Mirandaville
cluster_intention = madness
cluster_password = password1234

[MISC]
console_enabled = true

[SHARD]
shard_enabled = true
master_port = 10889
```

<style>
table th:first-of-type {
    width: 20%;
}
table th:nth-of-type(2) {
    width: 14%;
}
table th:nth-of-type(3) {
    width: 40%;
}
table th:nth-of-type(4) {
    width: 30%;
}
</style>


#### <h4 style="color:#31748f">Gameplay
|<p style="color:#b4637a">Name                                      |<p style="color:#b4637a">Default   |<p style="color:#b4637a">Options                        |<p style="color:#b4637a">Description|
|------------------------------------------|----------|-------------------------------|-----------|
|<p style="color:#907aa9">game_mode        |`survival`|`endless, survival, wilderness`|Sets the game mode: [Reference](https://dontstarve.fandom.com/wiki/Don%27t_Starve_Together)|
|<p style="color:#907aa9">max_players      |`6`       |`2, 4, 6, 8, 10, ...`          |No functional limit
|<p style="color:#907aa9">pvp              |`false`   |`true, false`                  |Enable/Disable player-vs-player
|<p style="color:#907aa9">pause_when_empty |`true`    |`true, false`                  |Wether the game will pause with no players online.




#### <h4 style="color:#31748f">Network
|<p style="color:#b4637a">Name                                      |<p style="color:#b4637a">Default   |<p style="color:#b4637a">Options                        |<p style="color:#b4637a">Description|
|--------------------------------------------|-------------|----------------------------------------------|-----------|
|<p style="color:#907aa9">cluster_description|`empty`      |`Anything`                                    |The description of your server seen when someone selects your server in the server browser.
|<p style="color:#907aa9">cluster_name       |`None`       |`Anything`                                    |The name of your server seen on the server browser.
|<p style="color:#907aa9">cluster_intention  |`cooperative`|`cooperative, competitive, social, or madness`|Basically deprecated
|<p style="color:#907aa9">cluster_password   |`None`    |`Anything`                 |This sets the password people need to input to enter your server.


#### <h4 style="color:#31748f">Misc
|<p style="color:#b4637a">Name                                      |<p style="color:#b4637a">Default   |<p style="color:#b4637a">Options                        |<p style="color:#b4637a">Description|
|---|---|---|---|
|<p style="color:#907aa9">console_enabled|`true`|`true, false`|DST runs with an interactive console that you can send commands to locally on the server itself. This option enables or disables that.|
|<p style="color:#907aa9">max_snapshots|`6`|`Any Integer`|Maximum number of snapshots to retain.


### <h4 style="color:#31748f">Shard
|<p style="color:#b4637a">Name                                      |<p style="color:#b4637a">Default   |<p style="color:#b4637a">Options                        |<p style="color:#b4637a">Description|
|---|---|---|---|
|<p style="color:#907aa9">shard_enabled|`false`|`true, false`|Enables sharding, aka multi world. If you want caves enabled you need this, and the cave shard enabled.
|<p style="color:#907aa9">master_port|`10888`|`Any integer`|The port slave shards will connect to the master shard on.|



### <h3 style="color:#f6c177">Cluster Token
This file just contains a token that you generate from [Klei's Website](https://accounts.klei.com/account/game/servers?game=DontStarveTogether)

The server will look for the token in `<persistent_storage_root>/<conf_dir>/<cluster>/cluster_token.txt`