This is the Docker image for DST dedicated server, based on debian:latest
.
It's been proved working on at least 2 servers with a customizes settings. There is currently no automated tests or CI.
Functions:
- Server up and running
-
server_token.txt
settings - Data persistance
- Backup and restore
- Cave server
- Switch saved status
- Config via
ENV
- Cross-platform test
Tested environments:
- An Antergos (based on Arch Linux)
- System inside a Hyper-V Virtual Machine of Windows 8.1
- 8GB RAM
- running the
latest
tag of Docker Hub image, i.e. the most recent code frommaster
of this Github repo
- An DaoCloud server
- 1GB RAM
- running the most recent tagged code in this Github repo
- image built from DaoCloud custom mechanism
- There is currently no easy way to set up Cave server using this. Working in progress.
- 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. ) - It should be cross-platform, but OS X and Windows haven't been fully tested.
It's the recommended way for those who are not familiar with Docker.
Create a folder for storing DST server files, then put a docker-compose.yml
inside it, paste the following content:
overworld-server:
image: jamesits/don-t-starve-together-dedicated-server:latest
restart: always
ports:
- 10999:10999/udp
volumes:
- ./server_config:/data/DoNotStarveTogether
Then use docker-compose up
to bring up the server. You can change server config in ./server_config
.
To update image, use docker-compose pull
to update automatically.
Do this only if you know how to use Docker and know exactly what every command means. Data is invaluable.
docker pull jamesits/don-t-starve-together-dedicated-server
Chinese users may experience a faster download speed in this way. I can't promise it will be available in a long time.
docker pull daocloud.io/codevs/dst_server
Note: If you use Docker the VM way (i.e. running the image without /data/DoNotStarveTogether
mounted to a volume or host), please be cautious:
- All data (server settings, saved game status, etc.) will be DELETED PERMANATELY when deleting or updating image
- You have to use the default server configuration or pass command line arguments by yourself
More Information please refer to Docker Hub page.
start
: the defaultCMD
to start server
Launch a steam client on a system with GUI, install Don't Starve Together, log in, press ~
button then type TheNet:GenerateServerToken()
then press enter. You'll find a server_token.txt
under your client config directory. (See "References" section below for more detailed instructions. )
If you use the Docker Compose way, or have /data/DoNotStarveTogether
mounted to your host machine, copy the FILE server_token.txt
(not its content) to that folder. Also you may set token in settings.ini
.
In other cases, you can set ENV DST_SERVER_TOKEN
using the content of your server_token.txt
. Just open it use any text editor and copy the CONTENT. Please note that if server_token.txt
already exists, it won't be changed by startup script.
- Create or use a Docker container which have SSH Daemon service (Like
rastasheep/ubuntu-sshd
, but for security issues I recommend using your own image and use pubkey authencation. ) - Mount your server config volume to some place of our SSH Daemon container
- SSH into daemon container and change settings
- Restart game server using
docker-compose restart
Sample docker-compose.yml
which can be appended after original one:
manager:
image: rastasheep/ubuntu-sshd
restart: always
ports:
- 22
volumes:
- ./server_config:/mnt/DoNotStarveTogether
Don't Starve Together Dedicated Server Docker Image
Copyright (C) 2015 James Swineson
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.
- Guides/Don’t Starve Together Dedicated Servers
- [GUIDE] How to setup server dedicated cave on Linux
- Run dedicated server in Docker (This post was written by me)