Overview
Don't Starve Together is a co-op survival game. A dedicated server allows persistent worlds with up to 64 players.
Requirements
- A Breeze with at least 1 GB RAM
- A Klei account with the game purchased
Step 1: Install SteamCMD and the Server
sudo useradd -r -m -d /opt/dst dstserver
sudo -u dstserver steamcmd +force_install_dir /opt/dst/server \
+login anonymous \
+app_update 343050 validate \
+quitStep 2: Get a Cluster Token
You need a cluster token from Klei:
- Go to your Klei account settings
- Navigate to the Game Servers section
- Generate a new server token
- Save it as
/opt/dst/.klei/DoNotStarveTogether/MyServer/cluster_token.txt
Step 3: Configure the Cluster
mkdir -p /opt/dst/.klei/DoNotStarveTogether/MyServer/Master
mkdir -p /opt/dst/.klei/DoNotStarveTogether/MyServer/Caves
# Cluster settings
tee /opt/dst/.klei/DoNotStarveTogether/MyServer/cluster.ini <<EOF
[GAMEPLAY]
game_mode = survival
max_players = 6
pvp = false
[NETWORK]
cluster_name = My DST Server
cluster_description = A Breeze-hosted DST server
cluster_password = changeme
cluster_intention = cooperative
[MISC]
console_enabled = true
[SHARD]
shard_enabled = true
bind_ip = 127.0.0.1
master_ip = 127.0.0.1
master_port = 10889
cluster_key = supersecret
EOFStep 4: Create a Systemd Service
sudo tee /etc/systemd/system/dst.service <<EOF
[Unit]
Description=Don't Starve Together Server
After=network.target
[Service]
User=dstserver
WorkingDirectory=/opt/dst/server/bin64
ExecStart=/opt/dst/server/bin64/dontstarve_dedicated_server_nullrenderer_x64 -console -cluster MyServer -shard Master
Restart=on-failure
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable --now dstFirewall
sudo ufw allow 10999/udp
sudo ufw allow 10998/udp