Jump to content

Custom Dedicated Server with Docker


Recommended Posts

Hello everybody!

In an effort to ease setting up dedicated servers for Don't Starve Together, I've created an easy-to-use Docker image, which can be used to spin up one or multiple Dedicated Servers with very few work.

It uses Docker, a somewhat new kind of virtualization technology. In a nutshell and very simplified Docker runs pre-packaged programs of all sorts. In the case of DST, you don't need to fiddle around with installing SteamCMD or any weird dependencies.

Basically, all you need to do, is to install Docker (either Docker Engine or additionally Docker Compose) and run one command. One! (In detail, and if you want to customize your server more, it gets a little bit more complicated - but overall it's still really easy if you have basic computer e.g. Linux experience.)

There are two projects (repositories) on GitHub.

One for the Docker image itself - that's the place for asking about feature requests or reporting bugs; it's where the dedicated server "package" gets developed:
https://github.com/dst-academy/server

The other project holds tools and configuration presets which can be used as some kind of boilerplate for you to have an easier time running and configuring the server:
https://github.com/dst-academy/suite

Both projects are under continuous development and in early stages, but both can already be used to deploy dedicated DST servers. If you find bugs or have feature requests, feel free to post them here or report them directly on the particular issue tracker.

Our public DST:Academy server is already up and running, based on the two projects introduced here. It runs on a Digital Ocean droplet, located in the Netherlands. You can find it in the server browser when searching for "Don't Starve Alone" or you can connect directly to 188.166.49.68

Project documentation is continuously optimized and I'm really looking forward getting feedback on it! Feel free to try it out and tell me what you think about it.

As a small appetizer; this is all you need to install, set up and run a simple server:
* Install Docker: https://github.com/dst-academy/suite/blob/develop/install.sh
* Start Server: docker run -dit -p 10999:10999/udp -e SERVER_TOKEN="server-token" dstacademy/server

It all get's downloaded, installed and configured automagically, kinda. ;)

On top of that I'd like to invite all of you, to join our new Steam group DST:Academy, to hang out together on Steam and on DST servers, to have fun, enjoy the game and help each other out.Find it here: https://steamcommunity.com/groups/dst-academy

That said, I'm eager to hear your feedback and I'd like to thank everybody who helped me out so far, running and playing Don't Starve Together. The community here is awesome!

And at last - Happy 2016! :-)

Link to comment
Share on other sites

Happy to announce that version 0.2.0 has been released!

It enables custom world-generation using the worldgenoverride.lua configuration and it also enables proper save-game persistence on server/container-removal.

Link to comment
Share on other sites

Very nice! Thanks for the community contribution.

 

Swift question, if I spin up a droplet, and I want to update the data with your updated Github changes, can it be done easily?

 

Like you said, it's under continuous development. I would always want to make sure I'm on the same page as you right?

Link to comment
Share on other sites

Thanks! :-)

Yes, you can always refer to the `latest` tag of the Docker image:
https://hub.docker.com/r/dstacademy/server/tags/

Actually, if you use the image name `dstacademy/server` it's a shortcut for `dstacademy/server:latest`.
I think when starting new containers, docker checks for updates on the image.
Otherwise you can always run `docker pull` to pull the latest version.

Afterwards you can remove/destroy your existing containers and start new ones, they should use the new image.
If you want to preserve world-settings, be sure to have set up volumes properly.

Gimme a shout if you need help!

 

Update:

 

What I actually did with my server:

docker pull dstacademy/server # Update the image.docker-compose stop # Stop the containers.docker-compose rm # Remove the containers.docker-compose up -d # Start new containers.# Containers now running the new image.
Link to comment
Share on other sites

Version 0.3.0 released.

  • Add UPDATE_ON_BOOT variable to configure update-behavior on boot.
  • Add SERVER_NAME_PREFIX variable to configure a prefix for the server's name.
  • Generate a random server name if no name was configured.
  • Use the Debian base image instead of Ubuntu.
  • Relocate Steam and DST files in the image.
  • Create separate users for running Steam and the DST server.
  • Remove the CONF_DIR environment variable.
  • Remove the STORAGE_ROOT environment variable.
  • Remove the STEAM_APP_ID environment variable.
Link to comment
Share on other sites

Hey buddy!

 

Just starting to get my fingers wet. After I created a 512 meg Droplet with Docker installed I logged in using PuTTY as root. The droplet came locked and loaded with Docker so I skipped step #1.

 

According to your doc, I pasted the command 

curl -L https://github.com/docker/compose/releases/download/1.5.2/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose \  && chmod +x /usr/local/bin/docker-compose

All looks good so far and I decide to launch up the game. I don't really know what I did, but I decided to try to manually join the server VIA IP using a command I found on the wiki

Step 1) Enter DSTStep 2) Click Play! to enter the server list (authenticating your account)Step 3) Open consoleStep 4) c_connect("ip", port, [password])Example1: c_connect("45.55.77.123")Step 5) Enter

It looks like I'm going to join the game at first but than I get an error saying the server isn't responded. I check out the documentation more on Github and I'm thinking...hmmm...maybe I need to choose what kind of server to setup. I desire a Basic server.

 

That's it man. I'm stuck, what do I do? May you please point me into the right direction. I just joined the steam group, so maybe I'll catch ya in there. If you want, I can even create a tutorial about what I did so far. I tried launching up Vultr 768 meg droplet and manually installing docker but didn't get to far.

 

TTYS and thanks alot!

Link to comment
Share on other sites

Could be that the server needs a few moments to boot up initially and install mods/updates, hence why you can't connect the first  few minutes when launching the server for the first time.

Does this help you out?

Link to comment
Share on other sites

With great support of Maco02 we've released Version 0.4.0:

  • Add test cases to ensure code functionality.
  • Introduce sub-commands `start`, `update`, `log` and `console`.
  • Add `MODS_FORCE` variable to enable mods for development.
  • Relocate DST files in the image.
  • Rename some environment variables for a more consistent naming scheme.
  • Set `AUTOCOMPILER_ENABLE` to `false` by default.
  • Remove `UPDATE_ON_BOOT` environment variable.
  • Remove `WORKDIR` directive from the Dockerfile.
Link to comment
Share on other sites

We're happy to announce Version 0.5.0, supporting the recently introduced cluster-changes.

  • Add the backup_logs argument to create a backup of the old logs.
  • Implement validation for environment variables.
  • Add the environment variable LAN_ONLY.
  • Add the environment variable MAX_SNAPSHOTS.
  • Adopt the new file structure based on clusters.
  • Move the token outside the settings files.
  • Set a default of 10888 for SHARD_MASTER_PORT.
  • Use boxcutter/ubuntu1510 as the Vagrant base-box.
  • Change the Vagrant base-box name to be compatible with more providers.
  • Rename environment variable SERVER_TOKEN to TOKEN.
  • Rename environment variable SERVER_NAME to NAME.
  • Rename environment variable SERVER_DESCRIPTION to DESCRIPTION.
  • Rename environment variable SERVER_NAME_PREFIX to NAME_PREFIX.
  • Rename environment variable SERVER_PASSWORD to PASSWORD.
  • Rename environment variable SERVER_INTENTION to INTENTION.
  • Remove environment variable AUTOCOMPILER_ENABLE.
  • Remove environment variable CONNECTION_TIMEOUT.
  • Remove environment variable MODS_ENABLE.
  • Remove environment variable STEAM_CLOUD_DISABLE.

We also started our public DST server, running a sharded setup with caves. Feel free to join and have fun!
Connect to it using the in-game server-list or by running c_connect('play.dst.academy') in the console.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...