This project provides a set of shell scripts to automate the installation, configuration, startup, shutdown, and update of a Don't Starve Together (DST) dedicated server on Linux.
Initializes the environment, installs dependencies, creates the DST user, sets up SteamCMD, and copies scripts.
./setup.shStarts the DST Master server and, if enabled, the Caves server.
./start.shStops both the Master and Caves servers.
./stop.shRestarts the servers, optionally updating the server files.
./restart.sh [update]
# [update]: 1 to update server files, 0 (default) to just restartRestarts the servers and triggers an update.
./update.shStarts a specific server shard (Master or Caves).
./scripts/dst-start.sh <server_type> [cluster_name]
# <server_type>: Master or Caves
# [cluster_name]: Optional, defaults to value in configStops a specific server shard.
./scripts/dst-stop.sh <server_type> [cluster_name] [signal]
# <server_type>: Master or Caves
# [cluster_name]: Optional, defaults to value in config
# [signal]: Optional, default 5 (SIGTRAP)Generates the mod setup file from modoverrides.lua.
./scripts/setup-dst-mods.sh <DST_CLUSTER_NAME> <DST_SERVER_PATH>If DST_MOD_ENABLE=1 in your configuration, this script will be run automatically before starting the server (see start.sh).
Edit config/config.properties to set:
STEAMCMD_USERNAME: Linux user for DST serverSTEAMCMD_PATH: SteamCMD install directoryDST_SCRIPT_PATH: Script directoryDST_SERVER_PATH: DST server directoryDST_GAME_ID: DST game ID (default: 343050)DST_CLUSTER_NAME: Cluster nameDST_CAVES_ENABLE: 1 to enable caves, 0 to disableDST_MOD_ENABLE: 1 to enable mod setup (runsetup-dst-mods.shbefore server start), 0 to disableLANGUAGE:enfor English (default),zhfor Chinese. Controls all user-facing messages.
- Scripts:
dst_scripts/ - Config:
dst_scripts/config/ - Logs:
dst_scripts/log/ - Documentation:
dst_scripts/docs/ - Language files:
dst_scripts/lang/ - DST server:
/home/<user>/<DST_SERVER_PATH>/ - Saves:
/home/<user>/.Klei/DoNotStarveTogether/<DST_CLUSTER_NAME>/
- Install/Setup: Run
setup.shas root or with sudo. - Start Server: Run
start.shas the DST user. - Stop Server: Run
stop.shas the DST user. - Restart/Update: Run
restart.shorupdate.shas the DST user. - Manage Mods: Use
setup-dst-mods.shafter editingmodoverrides.lua.
To enable daily auto-updates, add the cron job:
crontab -u <DST_USER> /home/<DST_USER>/<DST_SCRIPT_PATH>/config/cron.cmdAll user-facing messages are localized using .properties files in the lang/ directory. The language is selected via the LANGUAGE variable in config/config.properties.
You can add or edit messages in lang/en.properties (English) and lang/zh.properties (Chinese). To add more languages, create a new .properties file in the lang/ directory and set LANGUAGE accordingly.
- Check logs in the
log/directory for errors. - Ensure all dependencies are installed (see
setup-sys-*scripts). - Make sure the correct user permissions are set for all files and directories.