-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve dockerfile and documentation (#11)
* Optimize Dockerfile commands * Add Cluster Token generation guide * Add rollback example images * Bump version to 0.3.0
- Loading branch information
Showing
13 changed files
with
72 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1 @@ | ||
This file MUST be generated based on your Steam account. Enter the game and press "Play". | ||
After you're logged in, bring up the console (by pressing `~`) and type the following command: | ||
|
||
TheNet:GenerateClusterToken() | ||
|
||
Press enter. The console will go away, and a `cluster_token.txt` was generated in: | ||
- Unix: ~/.klei/DoNotStarveTogether | ||
- Windows: C:\Users\<your name>\Documents\Klei\DoNotStarveTogether | ||
|
||
Get the generated file and OVERRIDE this one with the proper cluster token. | ||
YourClusterTokenGoesHere-SeeTheDocs!=~ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,24 +2,39 @@ FROM debian:latest | |
|
||
MAINTAINER Caio Mathielo <[email protected]> | ||
|
||
# Install required packages | ||
RUN dpkg --add-architecture i386 && apt-get update | ||
RUN apt-get install -y curl lib32gcc1 lib32stdc++6 libcurl4-gnutls-dev:i386 && apt-get clean | ||
LABEL \ | ||
description="Don't Starve Together dedicated server" \ | ||
source="https://github.com/mathielo/dst-dedicated-server" | ||
|
||
# Create specific user to run DST server | ||
RUN useradd -ms /bin/bash/ dst | ||
USER dst | ||
WORKDIR /home/dst | ||
|
||
# Install Steam CMD (https://developer.valvesoftware.com/wiki/SteamCMD#Downloading_SteamCMD) | ||
RUN curl -sqL "https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz" | tar zxvf - | ||
RUN mkdir -p server_dst/mods | ||
# Install required packages | ||
RUN set -x && \ | ||
dpkg --add-architecture i386 && \ | ||
apt-get update && apt-get upgrade -y && \ | ||
DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y wget ca-certificates lib32gcc1 lib32stdc++6 libcurl4-gnutls-dev:i386 && \ | ||
# Download Steam CMD (https://developer.valvesoftware.com/wiki/SteamCMD#Downloading_SteamCMD) | ||
wget -q -O - "https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz" | tar zxvf - && \ | ||
chown -R dst:dst ./ && \ | ||
# Cleanup | ||
apt-get autoremove --purge -y wget && \ | ||
apt-get clean && rm -rf /var/lib/apt/lists/* | ||
|
||
USER dst | ||
RUN mkdir -p .klei/DoNotStarveTogether server_dst/mods | ||
|
||
# Install Don't Starve Together | ||
RUN ./steamcmd.sh +@ShutdownOnFailedCommand 1 +@NoPromptForPassword 1 +login anonymous +force_install_dir /home/dst/server_dst +app_update 343050 validate +quit | ||
RUN ./steamcmd.sh \ | ||
+@ShutdownOnFailedCommand 1 \ | ||
+@NoPromptForPassword 1 \ | ||
+login anonymous \ | ||
+force_install_dir /home/dst/server_dst \ | ||
+app_update 343050 validate \ | ||
+quit | ||
|
||
VOLUME ["/home/dst/.klei/DoNotStarveTogether", "/home/dst/server_dst/mods"] | ||
|
||
COPY ["start-container-server.sh", "/home/dst/"] | ||
|
||
ENTRYPOINT ["/home/dst/start-container-server.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Cluster Token Generation | ||
|
||
_The definitive guide on how to generate a cluster token for your Don't Starve Together dedicated server._ | ||
|
||
There are two main ways a cluster token can be generated. While both ways are in-game (you need to launch the game client), one is done via typing in a console command, while the other is done via GUI. | ||
|
||
For this project, the `cluster_token.txt` file is located in `DSTClusterConfig/cluster_token.txt`. | ||
|
||
> :closed_lock_with_key: This file **must** be generated based on your Steam account. The account that generates the token automatically gains **admin** access in-game, meaning you can rollback, regenerate the world or use console commands while playing. | ||
## Via console command | ||
|
||
Enter the game and press "Play". After you're logged in, bring up the console (by pressing `~`) and type the following command: | ||
|
||
TheNet:GenerateClusterToken() | ||
|
||
Press enter. The console will go away, and a `cluster_token.txt` was generated in: | ||
- Unix: `~/.klei/DoNotStarveTogether` | ||
- Windows: `C:\Users\<username>\Documents\Klei\DoNotStarveTogether` | ||
|
||
Get the generated file and **override** `DSTClusterConfig/cluster_token.txt` with it. | ||
|
||
## Via "Account" interface | ||
|
||
Open the game and press "Play". | ||
|
||
![Play](./img/cluster_token_1.jpg) | ||
|
||
On the bottom left of the screen, click "Account". This will bring up information about your Klei Account. | ||
|
||
![Account](./img/cluster_token_2.jpg) | ||
|
||
You'll see your account information along with a list of all the Cluster Tokens your account ever generated in any way (console command, hosting a local server, etc). | ||
|
||
![Account](./img/cluster_token_3.jpg) | ||
|
||
Scroll to the bottom and you'll see a "Generate Server Token" button. You can add a "friendly name" for it so you can remember what it was created for. | ||
|
||
![Account](./img/cluster_token_4.jpg) | ||
|
||
The newly generated token will show up in the list along with the name you gave it. Open `DSTClusterConfig/cluster_token.txt`, **erase** it completely and paste the token in the file. Make sure to not leave any extra spaces or blank lines. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.