Skip to content

Instantly share code, notes, and snippets.

@yechentide
Last active March 30, 2023 09:56
Show Gist options
  • Save yechentide/2b7ab5f00e0b2474274bd3632c38c828 to your computer and use it in GitHub Desktop.
Save yechentide/2b7ab5f00e0b2474274bd3632c38c828 to your computer and use it in GitHub Desktop.

Start a docker container

docker run -it --name dst -v ~/dst-server:/root/Server -v ~/dst-worlds:/root/Klei ubuntu:22.04
version: "3.0"

services:
  dst:
    image: debian:11-slim
    container_name: dst
    hostname: dst-host
    volumes:
      - /home/tide/servers/dst:/root/Server
      - /home/tide/worlds/dst:/root/Klei
        #- ~/DSTServerManage:/root/DSTServerManager
    tty: true

Install server

apt update
apt install -y lib32gcc-s1 lua5.3 tmux wget git curl
# apt install -y vim
# echo ':set encoding=utf-8' > ~/.vimrc
mkdir ~/Steam
wget --output-document ~/Steam/steamcmd_linux.tar.gz 'https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz' && tar -xvzf ~/Steam/steamcmd_linux.tar.gz --directory ~/Steam
~/Steam/steamcmd.sh +force_install_dir /root/Server +login anonymous +app_update 343050 validate +quit

Run server

# pds-g^KU_J9MSP3g1^a+7K6p5v4rQFMOq+wRiZbeupFqqrWoFBSV8yhzlt2ww=
tmux -u new -d -s 'main' 'cd /root/Server/bin64; ./dontstarve_dedicated_server_nullrenderer_x64 -skip_update_server_mods -ugc_directory /root/Server/ugc_mods -persistent_storage_root /root/Klei -conf_dir worlds -cluster test -shard Main'
tmux -u new -d -s 'cave' 'cd /root/Server/bin64; ./dontstarve_dedicated_server_nullrenderer_x64 -skip_update_server_mods -ugc_directory /root/Server/ugc_mods -persistent_storage_root /root/Klei -conf_dir worlds -cluster test -shard Cave'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment