Skip to content
This repository has been archived by the owner on Jan 6, 2023. It is now read-only.
/ dst-server Public archive

Simple docker setup for a Don't Starve Together server with LinuxGSM

License

Notifications You must be signed in to change notification settings

Jetbo/dst-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dst-server

Simple docker-compose setup for a Don't Starve Together server running on LinuxGSM. App can be built to be portable for cloud container services.

Build the app with docker-compose up --build.

You can change the ENVs in the docker-compose. ENVs control the basic server config. I only picked the configs I cared about. Feel free to fork and change them up.

SERVER_PASSWORD       # Sets the server password (string)
SERVER_NAME           # Sets the server name (string)
SERVER_DESCRIPTION    # Sets the server description (string)
SERVER_INTENTION      # Sets the server intention (cooperative|competitive|social|madness)
CLUSTER_NAME          # Sets the cluster name. This controls what directory your cluster runs in. (string)
CLUSTER_TOKEN         # Required token from Klei to run a server. SERVER WILL NOT START WITHOUT THIS! (string)
GAME_MODE             # Sets the game mode (survival|endless|wilderness)
MAX_PLAYERS           # Sets the max players (int, 1..64)
ENABLE_PVP            # Enables PVP (true|false)
ENABLE_CONSOLE        # Enables the Lua console (true|false)
MAX_SNAPSHOTS         # Number of backup snapshots to keep of your world (int)
HEALTH_CHECK_PORT     # Sets the health check port (int)
ENABLE_CLEAN_SHUTDOWN # Enables the clean shutdown script. This script runs the vhserver stop command on SIG traps. (0, 1)
UPDATE_ON_RUN         # Updates LinuxGSM and the Valheim server on run (0, 1)

If you want to make sure the world saves before the container exits, enable ENABLE_CLEAN_SHUTDOWN in the ENV. Don't Starve Together saves to the world files when players leave and in time intervals. Killing the container suddenly could lead to corruption or world progress loss, so I recommend enabling this option.

If you want to the server to update itself (like on a nightly reboot cron) enable UPDATE_ON_RUN in the ENV. This will run both the LinuxGSM and Don't Starve Together server update commands before the server boots up. Keep in mind the server will start faster with this disabled. If disabled, remember to update the server manually or re-build the container periodically to install new versions.

Mods

Don't Starve Together supports mods. You need to fill out the Lua mod files yourself.

scripts/dedicated_server_mods_setup.lua
scripts/modsettings.lua

After you configure those files, you can enable mods by setting:

ENABLE_MODS # Enables mods (0, 1)

This ENV is optional. Not setting ENABLE_MODS will cause the server to assume mods are disabled.

Useful file locations

# Holds the Don't Starve Together world files
# This directory is setup as a volume to remain persistent
/home/linuxgsm/.klei/DoNotStarveTogether/

# Holds the GSM and game logs
# This directory is setup as a volume to remain persistent
/home/linuxgsm/gsm/log/

# Holds the Don't Starve Together mod files
/home/linuxgsm/gsm/serverfiles/mods

Hot Tips

Don't forget to your Cluster Token from Klei or your game won't start!

  • Go to the Klei website.
  • Get your game server authentication token.
  • Enter a friendly name for your server and copy the access token and set CLUSTER_TOKEN.

About

Simple docker setup for a Don't Starve Together server with LinuxGSM

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published