Skip to content

Instantly share code, notes, and snippets.

@bskinner
Last active January 21, 2023 23:20
Show Gist options
  • Save bskinner/c98af8c00b6c203bda9f1927fa80c2e2 to your computer and use it in GitHub Desktop.
Save bskinner/c98af8c00b6c203bda9f1927fa80c2e2 to your computer and use it in GitHub Desktop.
Don't Start Together dedicated server setup

Don't Starve Together Dedicated Server

Requirements

  • Server token from Klei needs work

Getting a server token

  • Visit Klei's Games page
    • link your Steam account with them, if you haven't already
  • Click on the Game Servers button to view all the servers associated with your account.
  • To create a new server:
    • type the name of the new server in the "Cluster Name" field.
    • click the "Add New Server" button
    • once the page reloads, click the "Configure Server" button

Installing DST using SteamCMD

  • Set the installation directory
    force_install_dir /home/dst/server_dst
    
  • Log into Steam
    Steam> login anonymous
    
  • Install Don't Starve Together
    Steam> app_update 343050 validate
    
  • Wrap things up
    Steam> quit
    

Startup Scripts

Init script

This script should be called once before all of the shards are launched.

#!/usr/bin/env bash
# start-init.sh

DST_PREFIX="${DST_PREFIX:=$HOME/Steam}"
DST_APP_ID="${DST_APP_ID:=343050}"

steamcmd \
  +force_install_dir "$DST_PREFIX" \
  +login anonymous \
  +app_update $DST_APP_ID validate \
  +quit

Start the main shard

#!/usr/bin/env bash
# ~/start-main.sh

DST_PREFIX="${DST_PREFIX:=$HOME/Steam}"
DST_BIN="$DST_PREFIX/bin64"
CLUSTER_NAME="${CLUSTER_NAME:=Cluster_1}"

(
  cd $DST_BIN
  ./dontstarve_dedicated_server_nullrenderer_x64 \
    -console \
    -cluster "$CLUSTER_NAME" \
    -shard Master
)

Start the Caves shard

#!/usr/bin/env bash
# ~/start-caves.sh

DST_PREFIX="${DST_PREFIX:=$HOME/Steam}"
DST_BIN="$DST_PREFIX/bin64"
CLUSTER_NAME="${CLUSTER_NAME:=Cluster_1}"

(
  cd $DST_BIN
  ./dontstarve_dedicated_server_nullrenderer_x64 \
    -console \
    -cluster "$CLUSTER_NAME" \
    -shard Caves
)

Tmuxinator Project

# /home/dst/.tmuxinator/dst-server.yml

name: dst-server
root: ~/

on_project_start: ~/start-init.sh

windows:
  - editor:
      layout: even-horizontal
      panes:
        - ~/start-main.sh
        - ~/start-caves.sh

Cluster configuration

Server configuration

Table Key Type Description
ACCOUNT encode_user_path boolean if enabled, normalizes the paths to user data for all clients.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment