• Stars
    star
    426
  • Rank 101,884 (Top 3 %)
  • Language
    Lua
  • License
    GNU General Publi...
  • Created almost 9 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Don't Starve Together dedicated server in Docker!

Don't Starve Together Dedicated Server Docker Image

They write their server setup instructions like sh*t, so we made this Docker image to simplify things.

Please read the whole document before putting your hands on your server.

Build Status


Versioning

The DST server code changes a lot. We offer multiple variants (tags) on Docker Hub:

  • latest or vanilla are less frequently updated images, recommended for day-to-day use
  • nightly is a nightly built image, so it (hopefully) comes with the latest server code
  • steamcmd-rebase works the same way as latest but is based on cm2network/steamcmd:root

All variants except nightly also have a -slim tagged version which does not come with DST server pre-installed; required files will be downloaded every time the container is launched. The -slim versions cannot be launched offline.

Running

Prerequisites

  • Linux x86_64 and runs Docker (18.05.0-ce or later).
  • You may need a public IP to make your server accessable from Internet.
  • You need 4 UDP ports exposed to the public network. (See FAQ for details.)
  • CPU: 1 core is somewhat enough for a small-scale server (but don't try 60 ticks, start from 15 or 30).
  • Memory: We recommend reserving 1GiB Memory for the server, plus 60MiB per active user.
  • Disk size: the Docker image takes 1.5GiB, and you need at least another 5MiB for maps, configs and logs. 4GiB available disk space is recommended.

Start server

Let's assume you are saving your server config and status to ${HOME}/.klei/DoNotStarveTogether. (This is the default location when it is running outside Docker, so we'll use this as an example. If you want to save it to other location, just mount that directory read-write to the /data folder of the container.)

Start server:

docker run -v ${HOME}/.klei/DoNotStarveTogether:/data -p 10999-11000:10999-11000/udp -p 12346-12347:12346-12347/udp -e "DST_SERVER_ARCH=amd64" -it jamesits/dst-server:latest

If you use docker-compose, an example config is provided.

Stop server

Just press Ctrl+C and wait a little while to let itself spin down. (If the server is saving data, don't press ^C twice to force kill the server.)

To programmatically shut down the server, send a SIGINT to the supervisord process.

Note: the server may take up to ~5min to save map and fully shut down.

Server Configuration

If you don't already have a set of server config in your data directory, we will generate one for you. Start server once using the command above, and you will see:

Creating default server config...
Please fill in `DoNotStarveTogether/Cluster_1/cluster_token.txt` with your cluster token and restart server!

To generate a cluster token (as of 2019-11-02):

  1. Open a genuine copy of Don't Starve Together client and log in
  2. Click "Play" to go to the main menu
  3. click "account" button on the bottom left of the main menu
  4. In the popup browser, click "GAMES" on the top nav bar
  5. Click "Don't Starve Toegther Servers" button on the top right
  6. Scroll down to "ADD NEW SERVER" section, fill in a server name (it is not important), and copy the generated token

The token looks like pds-g^aaaaaaaaa-q^jaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa=. Then either set DST_CLUSTER_TOKEN environment variable during docker run, or paste the token into your_data_directory/DoNotStarveTogether/Cluster_1/cluster_token.txt.

If you need to add mods, change world generation config, etc., please do it now. Don't forget to edit your_data_directory/DoNotStarveTogether/Cluster_1/cluster.ini and get your server an unique name!

After you finish this, re-run start server command, and the server should be running.

Build Docker image locally

(In most cases you don't need this; just pull the prebuilt image from Docker Hub.)

git clone https://github.com/Jamesits/docker-dst-server.git docker-dst-server
cd docker-dst-server
docker build . -t dst-server:latest

There are some arguments you can set via --build-arg:

  • BASE_IMAGE: the FROM image (recent Debian or Ubuntu based images are supported)
  • STEAMCMD_PATH: where is steamcmd.sh in the base image
  • DST_DOWNLOAD: set to 1 to embed DST server into the image
  • DST_USER: the user to run server as (inside container)
  • DST_GROUP: the group to run server as (inside container)

Known Issues

  • On Docker environment which doesn't support UDP port forwarding, LAN only server cannot be used. (Still you can enable Steam punchthrough and search for your server in Online catalog. )
  • Docker IPv6 support is another sh*t and we currently don't have any idea on it. Help and advices are always welcomed. (see #7.)

FAQ

How to update server or mods?

Restart the server. Updates will be downloaded automatically.

How to connect to a LAN only server?

Run c_connect("IP address", port) or c_connect("IP address", port, "password") in client console.

How to check if the server is online?

You can try the 3rd party website Don't Starve Together Server List.

What port does this server require?

You need to expose UDP 10999 (master) and 11000 (caves) for client to connect; udp 12346 and 12347 for steam connection. Don't NAT these ports to different port numbers.

The server use another 2 high UDP ports for unknown communication, and UDP 10998 (listen on localhost) for communication between cluster servers.

Here is a netstat -tulpn output on our test server:

Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
udp        0      0 0.0.0.0:12346           0.0.0.0:*                           54/./dontstarve_ded 
udp        0      0 0.0.0.0:12347           0.0.0.0:*                           53/./dontstarve_ded 
udp        0      0 0.0.0.0:38223           0.0.0.0:*                           53/./dontstarve_ded 
udp        0      0 0.0.0.0:36517           0.0.0.0:*                           54/./dontstarve_ded 
udp        0      0 127.0.0.1:10998         0.0.0.0:*                           54/./dontstarve_ded 
udp        0      0 0.0.0.0:10999           0.0.0.0:*                           54/./dontstarve_ded 
udp        0      0 0.0.0.0:11000           0.0.0.0:*                           53/./dontstarve_ded 

Error! App '343050' state is 0x202 after update job.

Your disk is full.

Error! App '343050' state is 0x602 after update job.

Usually there is a file system permission issue preventing steamcmd from writing to your game installation directory.

Client high latency or lagging

Possible causes:

  • High packet drop rate
  • High server tick rate with low-performance clients (e.g. notebook users with tick rate 60)

How can I copy local data to server?

Local data is stored in <User Documents>\Klei\DoNotStarveTogether\<Random Number>.

There are two situations:

  1. Local data has cave enabled.
    Just copy the Cluster_X to server and rename to Cluster_1, then it should work.
  2. Local data has no cave.
    Copy everything in client_save except session and Cluster_X/save/session to server Cluster_1/save.
    If your local data is not in slot 1, you also have to modify saveindex because the server recognize only the first slot.
    The server will create a cave for you. If you don't want the cave, you have to modify supervisor.conf to disable cave server.

How can I enable mods after copy local data to server?

Open Cluster_X/Master/modoverrides.lua and you will see something like workshop-XXXXX where XXXXX is a number.
Open Cluster_1/mods/dedicated_server_mods_setup.lua on server and write ServerModSetup("XXXXX").

Maintainer

Thanks

License

Don't Starve Together Dedicated Server Docker Image
Copyright (C) 2015-2018 James Swineson (Jamesits) and Mingye Wang (Arthur2e5)

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

References

More Repositories

1

proxifier-profiles

My Proxifier profiles
534
star
2

pve-fake-subscription

Disables the "No valid subscription" dialog on all Proxmox products.
Python
355
star
3

dropWPBT

Disables the Windows Platform Binary Table (WPBT) in your UEFI firmware.
C
286
star
4

docker-ripe-atlas

This is the RIPE Atlas software probe packaged as a Docker image.
Dockerfile
146
star
5

systemd-named-netns

Use named netns (net namespace) with systemd services!
Shell
130
star
6

menhera.sh

Start a RAM Linux system and free your system disk without physical access to your server.
Shell
86
star
7

vps2routeros

Install RouterOS without screen and keyboard, only Telnet/SSH is required.
Shell
67
star
8

alwaysonline

Hijack/bypass Windows NCSI and iOS portal detection on a network level.
Go
58
star
9

BGRTInjector

Customize Windows 10 boot logo without modifying UEFI firmware.
C
51
star
10

SvcGuest

Install any executable as a Windows service. (systemd compatible config!)
C#
50
star
11

linux-gre-keepalive

High-performance passive (a.k.a. reply-only) GRE keepalive support for Linux, written in eBPF/XDP.
C
42
star
12

windows-10-font-fallback-reg

Windows 10 default font fallback config registry files
35
star
13

pilot

Simple web-based SDN controller for family and friends
Python
35
star
14

MindGoWrapper

辣鸡同花顺 MindGo 量化交易平台的回测框架 Some wrapper for sh*t quant platform 10qjka MindGo
Python
33
star
15

terminal-duplicator

Record your terminal and share it with the world on a web page.
Python
29
star
16

nginx-config-boilerplate

Modular Nginx config for modern, secure sites in 2023.
Shell
24
star
17

sound-blaster-e5-battery

This repo provides some information on the battery swollen issue of Creative Sound Blaster E5.
23
star
18

CTryCatch

C++ style try/catch support library in pure C.
C
23
star
19

S0ixEnabler

Force enable S0 Low Power Idle mode on your computer.
C
22
star
20

monument

Allow a file to be decrypted when and only when you die.
Go
21
star
21

selfCA

Generate your own CA and sign certs fast. (maybe I should rename it to "not-so-easy-rsa" or "hardcore-rsa"?)
Shell
20
star
22

bin2array

Converts binary file to C-style array initializer.
Python
19
star
23

alfred-workflow-telegram

Find your friends at Telegram!
18
star
24

bgpiano

MIDI tunneling through BGP, for times when you want to broadcast your music instead of your IP packets.
Go
16
star
25

myip

Get your external IP address from command line - STUN, DNS, HTTPS API supported
Go
14
star
26

docker-meshcentral2

Automated Docker build for MeshCentral 2
Shell
14
star
27

BrainPower

PCI express x1 (full-height, half-length) socket to 12V DC adapter with specific MikroTik router mounting holes
12
star
28

SND

Minimal authoritative PTR (rDNS, reverse DNS) resolver with automatic generation of records.
Go
12
star
29

goinvoke

Load DLLs with ease, without cgo.
Go
11
star
30

ubuntu-live-miner-x86_64

Ubuntu LiveCD with xmr-stak pre-installed and pre-configured. Plug and mine!
Makefile
11
star
31

DisableSystemUpdateService

Disables wakelock caused by SystemUpdateService and save your battery. [Root required]
Java
11
star
32

jupyter-theme-chesterish-paranoid

Modified chesterish Jupyter theme with larger font and Iosevka webfont
CSS
10
star
33

DRIPSEnabler

Enables Intel PEP (Power Engine Plug-in) and adds support for DRIPS. (Hackindows?)
C
10
star
34

netease-music-status

Monitor status of Netease Music for OS X, written in Python.
Python
9
star
35

zhihudaily

Zhihu Daily Web Portal on SAE
PHP
9
star
36

SMSGateway

SMS routing server for VOIP/GOIP devices.
Python
9
star
37

vyos-buildbot

Automated build for VyOS >=1.2.0 at home
Shell
9
star
38

bird2-bgp-china-route-selector

Shell
8
star
39

webvpn-portal-skin-routeros

RouterOS style Cisco Clientless SSL VPN / AnyConnect login portal.
HTML
7
star
40

goodgoodstudy-ios

7
star
41

docker-etherpad-lite

Production ready Etherpad Lite image, with auto installation of plugins, and full fault tolerant.
Shell
7
star
42

umbrella

Git repo backup/versioning solution
Python
7
star
43

hugo-theme-ZhihuZhuanlan

仿知乎专栏的 Hugo 主题
CSS
6
star
44

debian-readonly-media-generator-base

Prebuilt minimal Debian disk image for network experiments. (eve-ng ready, wireguard/mpls/FRRouting/bird2/srext)
Shell
6
star
45

DeadManSwitch

Trigger actions remotely using DNS records.
Go
6
star
46

armbian-embedded

Generates full-customized read-only Armbian image for your embedded, long-running devices
Shell
6
star
47

james-karabiner-config

Prebuilt, device-specific Karabiner config files to enable every button on your mouse, touchpad or keyboard on OS X.
6
star
48

ScreenShooter

An automatic web page screenshot service.
C#
5
star
49

i-HDU-Auto-Login-Alfred-Workflow

Log into i-HDU with your keyboard!
Shell
5
star
50

ComOn

Quick launch PuTTY to connect to a serial (COM) port.
C#
5
star
51

HDU-Student-ID-Card

All the information you need to extract information from Hangzhou Dianzi University student ID cards.
5
star
52

docker-mtproxy

MTProxy Docker image
Shell
5
star
53

auto-image-cutter

A Matlab program to cut text into columns from an image.
MATLAB
5
star
54

go-windivert

Go
5
star
55

auto-email-homework-fetcher

Collects and organizes attachments from POP3 email server, automatically.
Python
5
star
56

RSSCrawler

Automatically archives RSS and podcast.
Python
4
star
57

EDIDTaxi

A random collection of EDID dumps.
4
star
58

Tochidjan

Real cloud accounting: Beancount + Fava + GitHub Codespaces (template repo)
Python
4
star
59

dnsdist-autoconf

Brain-friendly dnsdist config generator with Active Directory support.
Go
4
star
60

go-rkvendorstorage

A pure Golang implementation of Rockchip rknand vendor storage interface.
Go
4
star
61

AutoPeer

[WIP, do not use] Bird config generator for massive BGP players.
Go
4
star
62

libreinth

Windows 11 upgrade assistant (physical)
4
star
63

libiferr

Golang common helper routines.
Go
4
star
64

TSTool

A tool to manipulate the grace period of Terminal Services.
C#
4
star
65

docker-meow

(Deprecated due to removal of original MEOW repo) The ultimate auto-proxy solution, now on Docker!
Shell
4
star
66

HDU-Scripts

Some useful scripts and documents for Hangzhou Dianzi University 杭州电子科技大学实用脚本合集
TeX
4
star
67

docker-debug

Debian with some networking debug tools preinstalled
Dockerfile
3
star
68

PyMinerMonitor

Collect hash rates from miner and log to InfluxDB automatically.
Python
3
star
69

qemu-buildbot-windows

Builds QEMU for Windows.
Shell
3
star
70

JSPaint

Realtime synced canvas on web.
JavaScript
3
star
71

docker-compose-devicefarmer

DeviceFarmer (formerly OpenSTF) full deployment example with docker compose
Shell
3
star
72

ingestion.life

开源菜谱
CSS
3
star
73

wp-keybase-verification

Keybase.txt (Keybase.io Verification) file for WordPress.
PHP
3
star
74

NoWebview

Say no to webview.
JavaScript
2
star
75

lottery-predictor

Lottery predictor for 双色球. NO WARRANTY(TM).
C
2
star
76

class-website-model1

一个静态的班级网站模板,应用了 jQuery、Bootstrap 3 等。
CSS
2
star
77

go-procgroup

Process grouping and atomic filicide operation
Go
2
star
78

XboxRemoteWakeUp

Python
2
star
79

windows-internet-sharing-enabler

使用 Powershell 启用 Windows 7+ 自带的热点功能。
Visual Basic
2
star
80

VMWare-ESXi-buildbot

PowerShell
2
star
81

userspace-fat-filesystem

Simple FAT12/16/32 filesystem with a shell to do some basic work.
C
2
star
82

archlinux-xmr-stak-pxe

Shell
2
star
83

domain-lists

2
star
84

real.dev

real.dev assignments (don't write code like me, thanks)
JavaScript
2
star
85

NaiveSocketLibrary

Cross-platform C socket library.
C
2
star
86

TheOtherShoes

Tell the user to install an ad blocker before continuing viewing your site!
2
star
87

DebianPreseed

automate your installer
Shell
2
star
88

qianliyun-desktop

Alibaba Qianniu automation platform built using accessibility APIs (not working anymore, open-sourced for historical reason)
C#
2
star
89

mentohust

Automatically exported from code.google.com/p/mentohust
C
2
star
90

serial

Go
1
star
91

theMillionaireFastlane4Programmers

Magic code to make you RICH.
Shell
1
star
92

gohugo-theme-wp-twentytwelve

CSS
1
star
93

vpp-buildbot

Experimental nightly CI building FD.io VPP packages for Debian 10.
Shell
1
star
94

badmips

Not working single shot 32-bit MIPS processor.
C
1
star
95

pQuery

Write less, draw more: the fluent interface based Processing drawing library
Processing
1
star
96

interactive-wallpaper-collection

Some abstract wallpapers for Wallpaper Engine, with mouse tracking effects.
HTML
1
star
97

go-bytebuilder

Write any object's internal memory representation into a byte buffer
Go
1
star
98

verilog-basic-blocks

数电作业
Verilog
1
star
99

EuDilemma

Privacy or Cookies dilemma for European Union users.
HTML
1
star
100

sms_send

Python
1
star