This repository provides a CLI to build and manage a Don't Starve Together server based on docker-dontstarvetogether container.
This project was developed with the following technologies:
Before installing you need to configure your world
First thing you need to get is your server TOKEN, just follow the steps below:
Open DST, and click Account on the initial menu
A klei page will open, then click on games
This page will show all your servers, to add a new one just click on ADD NEW SERVER
A text input field will appear, put any name you want to identify your server, in this case I choose NAME OF MY CLUSTER, then click on ADD NEW SERVER
Your server will be added and now you get access to your TOKEN
Clone this repository with:
$ git clone https://github.com/douglasJovenil/dst-server
Open the files underworld and overworld, and paste your TOKEN on both files, as follows:
Besides that you can change other fields, like:
- NAME: this is the name that will appear on the server list inside the DST
- DESCRIPTION: your server's description
- GAME_MODE: can be
survival
,wilderness
orendless
- PAUSE_WHEN_EMPTY: when set to
true
the world will stop if there's no one on server. You can set it tofalse
if you like to let days running. - INTENTION: can be
social
,cooperative
,competitive
ormadness
Leave the rest of the fields with the default values. To add more configurations check out this documentation page for the available options.
Now you have to configure the options of your world, the easiest wat to do it is create a local world as you like:
Then open the data files of this world:
Navigate to WOLRD_ID/Cluster_1/Master and find leveldataoverride.lua, this file contain all configuration of your overworld, just open it, copy all content and past it on docker-compose.yml, just have shore to put it on field LEVELDATA_OVERRIDES relative to overworld.
You have to do the same thing to underworld, so navigate to WOLRD_ID/Cluster_1/Caves and do the same process:
With all done, you can jump to Installing CLI and Building Server if you want a vanilla server.
First you have to find your mod on the Don't Starve Together workshop, just open the link and choose a mod, in this case i will install Simple Health Bar. Put the mod name on the search box and once the mod appears just click it:
We will need the mod id, you can find it at URL of your browser
With the mod id copied open the file modoverrides.lua and paste it as follows:
return {
['workshop-MOD_ID_THAT_YOU_COPIED'] = { enabled=true },
}
Open the file docker-compose.yml and put all mods that you have installed on the field MODS
, you need to set this field to both overworld and underworld sections
You can have as many mods you want.
If you want to tweak some configuration on your mod, follow this simple guide:
Open DST on Steam and click on button workshop
Serach the mod that yout want to configure and open it
Right click and then Copy Page URL
Open any text editor and paste the URL and identify the mod id
Now you will have to find this mod on your computer, normally they are installed on STEAM_FOLDER/steamapps/common/Don't Starve Together/mods
, just open the folder with the ID that you identified on previous step
This file have all mod options, just search for what you want to modify and put your modifications on the file modoverrides.lua
$ sudo add-apt-repository ppa:deadsnakes/ppa -y
$ sudo apt-get update -y
$ sudo apt-get install python3.8 -y
$ cd dst-server/src
$ sudo python3.8 main.py --install
$ exec bash
$ dst --start
- install: installs all dependencias and configure the server
- start: starts the container
- stop: stops the container
- delete: deletes the server (tip: make a backup before using this option)
- overworld: opens a bash shell on overworld container
- underworld: opens a bash shell on underworld container
- containers: shows a list of all running containers
- images: shows a list of all images installed