Start and control a Don't Starve Together server process.
Project description
Don't Starve Together Dedicated Server Image
English | 简体中文
Container image: quay.io/wh2099/dst-server
The image runs every shard in one DST cluster and keeps the familiar console FIFO. It can also export validated game events through OpenTelemetry.
Quick Start
-
Install a container runtime such as Podman.
-
Create and download a dedicated-server configuration from Klei's server management page.
-
Extract the archive on the host.
The directory mounted at
/clustermust directly containcluster.ini,cluster_token.txt, and the shard directories:Cluster_1/ ├── cluster.ini ├── cluster_token.txt ├── Master/ │ └── server.ini └── Caves/ └── server.ini -
Start the container, replacing the host path with the extracted cluster directory:
sudo podman run \ --name dst \ --detach \ --network host \ --volume "${HOME}/Cluster_1:/cluster" \ quay.io/wh2099/dst-server:latest
Operations
podman logs dst
podman stop dst
podman start dst
podman restart dst
Stopping the container terminates every shard gracefully, and DST saves during shutdown.
The entrypoint creates a named console pipe for the master shard at the cluster root.
Each secondary shard receives one in its own directory:
echo 'c_announce("Server maintenance is coming.")' > "${HOME}/Cluster_1/console"
echo 'c_save()' > "${HOME}/Cluster_1/Caves/console"
Common lifecycle commands include c_reset(), c_regenerateworld(), c_save(), and c_shutdown(false).
Use c_announce("...") to send a message and c_listallplayers() to inspect players.
What the Entrypoint Does
On startup, entrypoint.py validates the cluster and prepares permission and Mod files.
It updates Workshop content once, discovers every shard, and starts one Server per shard in -cloudserver mode.
DST_SKIP_MOD_UPDATE=1 skips the one-shot Workshop update.
DST_INSTALL_PATH and DST_CLUSTER_PATH override /install and /cluster for development and tests.
An OTEL_EXPORTER_OTLP_*_ENDPOINT variable enables the official OpenTelemetry pipeline.
The entrypoint then exports validated game events.
Python SDK
The dst-server package starts and controls one Linux DST shard process.
import asyncio
from dst_server import Server, ServerArgs
async def main() -> None:
async with Server(ServerArgs(shard="Master")) as server:
world = await server.game.world.state()
players = await server.game.players.list()
await server.game.world.announce(
f"Day {world.day}: {len(players)} player(s) online"
)
await server.save()
asyncio.run(main())
The typed API covers world and player queries, inventory, administration, confirmed saves, and raw Lua. It also exposes lifecycle and game events.
Install dst-server[otel] for OTLP export or dst-server[klei] for Klei build and lobby services.
Lua Annotations
The dst-annotations command generates LSP-compatible Lua definitions from DST components or modutil.lua.
dst-annotations dst-scripts/scripts/components --output components_def.lua
dst-annotations dst-scripts/scripts/modutil.lua --output modutil_def.lua
Documentation
Game server reference:
Technical design:
Source reference:
The detailed documentation is maintained in Simplified Chinese.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dst_server-0.1.0.tar.gz.
File metadata
- Download URL: dst_server-0.1.0.tar.gz
- Upload date:
- Size: 45.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ab5064b48d2ac2e460d9cdeb773b9336871629b245b48878e0aa135c2b6411b8
|
|
| MD5 |
f3ff3e80858c8e701d0b441918f9c792
|
|
| BLAKE2b-256 |
038850ae78bdcfd4b53ab96a6f7bd81decce5877d9224194d2d582476be9a488
|
Provenance
The following attestation bundles were made for dst_server-0.1.0.tar.gz:
Publisher:
release.yml on LetsStarveTogether/dst-server
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dst_server-0.1.0.tar.gz -
Subject digest:
ab5064b48d2ac2e460d9cdeb773b9336871629b245b48878e0aa135c2b6411b8 - Sigstore transparency entry: 2195082831
- Sigstore integration time:
-
Permalink:
LetsStarveTogether/dst-server@38d57d0a7baac417add0d8bbfcbf401215c5155c -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/LetsStarveTogether
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@38d57d0a7baac417add0d8bbfcbf401215c5155c -
Trigger Event:
push
-
Statement type:
File details
Details for the file dst_server-0.1.0-py3-none-any.whl.
File metadata
- Download URL: dst_server-0.1.0-py3-none-any.whl
- Upload date:
- Size: 65.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c5cf0fe63c115057ea66b9dd1361b60bafde9b786c9c36d86da702688d51b595
|
|
| MD5 |
c221825a1da5c570773c1417e1f158f9
|
|
| BLAKE2b-256 |
a22afd83ffa18093e36762a8098f105462405a5d77872c19503418930b06360f
|
Provenance
The following attestation bundles were made for dst_server-0.1.0-py3-none-any.whl:
Publisher:
release.yml on LetsStarveTogether/dst-server
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dst_server-0.1.0-py3-none-any.whl -
Subject digest:
c5cf0fe63c115057ea66b9dd1361b60bafde9b786c9c36d86da702688d51b595 - Sigstore transparency entry: 2195082837
- Sigstore integration time:
-
Permalink:
LetsStarveTogether/dst-server@38d57d0a7baac417add0d8bbfcbf401215c5155c -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/LetsStarveTogether
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@38d57d0a7baac417add0d8bbfcbf401215c5155c -
Trigger Event:
push
-
Statement type: