Skip to content

Commit

Permalink
switch to tmux
Browse files Browse the repository at this point in the history
  • Loading branch information
Catoverflow committed Jan 22, 2024
1 parent 16f141c commit 26a0687
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
5 changes: 2 additions & 3 deletions entry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ bash "${STEAMCMDDIR}/steamcmd.sh" \

# launch master and cave server
cd ${STEAMAPP}-dedicated/bin
./dontstarve_dedicated_server_nullrenderer -console -cluster MyDediServer -shard Master &
./dontstarve_dedicated_server_nullrenderer -console -cluster MyDediServer -shard Caves &

tmux new-session -s -d DST-dedicated -n Master ./dontstarve_dedicated_server_nullrenderer -console -cluster MyDediServer -shard Master
tmux new-window -d -n Cave -t DST-dedicated: ./dontstarve_dedicated_server_nullrenderer -console -cluster MyDediServer -shard Caves
sleep infinity
11 changes: 10 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ chmod -R 777 ./MyDediServer

You can pull this script from docker hub: `catoverflow/dst-server`, or build yourself:

> Change the arguments according to your settings. Base location is by default set to `/home/steam` in steamcmd.
> Change the arguments according to your settings.
~~~~shell
docker build . -t dst-dedicated:latest
Expand All @@ -38,6 +38,15 @@ Follow the instructions in `/home/steam/dst-dedicated/mods/dedicated_server_mods

For mod settings, you can configure them in DST GUI and ship the settings in `~/.klel/DoNotStarveTogether/MyDediServer/[Master|Cave]/modoverrides.lua`

## Manage DST CLI

[Tmux](https://www.redhat.com/sysadmin/introduction-tmux-linux) is used in multi-process managements. A `DST-dedicated` session is created with window `Master` and `Cave` responsible for Master (main world) and Cave server.

~~~~shell
docker exec -it dst-dedicated "tmux attach -t DST-dedicated"
# then use ^C-b + [0|1] to switch between Master and Cave cli
~~~~

## Known Issues

- Mapping different ports for cave server will make it unusable. Once you enter the cave you will be locked out, as the master server keeps redirecting you to inaccessible cave server port outside the container.
Expand Down

0 comments on commit 26a0687

Please sign in to comment.