Skip to content

Oskar-Sterner/deadlock-dedicated-server-manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

74 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DDSM Logo

Deadlock Dedicated Server Manager

Work in progress. This project is under active development and comes with no guarantees of stability or flawless operation. Use at your own risk.

CLI/TUI: Beta. The Go CLI and terminal UI are in beta. Features may change, and bugs are expected. The web dashboard is more stable.

Manage multiple Deadlock dedicated server instances on Linux. Includes a Go CLI with an interactive TUI and a Next.js web dashboard.

Built on top of deadlock-dedicated-proton-server. The Docker image bundles the Deadworks modding framework, so every server created by DDSM is a Deadworks server out of the box — no per-server toggle to manage.

Project Structure

ddsm-project/
├── cli/                 # Go CLI + interactive TUI
│   ├── cmd/ddsm/        # Entry point
│   └── internal/
│       ├── ddsm/        # Core modules (config, db, docker, rcon, servers, autosleep, doctor)
│       └── tui/         # Bubble Tea TUI (servers, console, config, tools tabs)
├── web/                 # Next.js web dashboard
│   └── src/
│       ├── app/         # App Router pages + API routes
│       ├── components/  # React components
│       └── lib/         # Backend logic
├── data/                # Runtime data (gitignored)
└── README.md

CLI Quick Start

Prerequisites

Build and Install

cd cli
go build -o ddsm ./cmd/ddsm
sudo install -m 0755 ddsm /usr/local/bin/ddsm

Usage

Launch the interactive TUI:

ddsm

Or use CLI commands directly:

ddsm --help

Commands

Command Description
ddsm Launch interactive TUI
ddsm status List all servers with status
ddsm create Create a new server (interactive)
ddsm start [id|all] Start server(s)
ddsm stop [id|all] Stop server(s)
ddsm restart [id|all] Restart server(s)
ddsm delete [id] Delete a server
ddsm logs [id] Tail live server logs
ddsm rcon [id] [cmd] Execute RCON command
ddsm attach [id] Attach to server container
ddsm config Show current configuration
ddsm config edit Open config in $EDITOR
ddsm doctor Run health diagnostics

Web Dashboard Quick Start

cd web
bun install
npm rebuild better-sqlite3
cp .env.example .env
bun run build
bun run start -- -H 0.0.0.0 -p 3000

Visit http://your-server-ip:3000 to access the dashboard.

Configuration

CLI

The CLI reads configuration from these paths (first found wins):

  1. ~/.ddsm/config.yaml
  2. /etc/ddsm/config.yaml

Environment variables override file values (prefixed with DDSM_).

Example ~/.ddsm/config.yaml:

server_ip: "203.0.113.10"
rcon_password: "your_rcon_password"
servers_dir: "/opt/deadlock-servers"
docker_image: "deadlock-server"
db_path: "~/.ddsm/ddsm.db"
autosleep:
  enabled: true
  idle_timeout: 300
  poll_interval: 15

Web Dashboard

Copy web/.env.example to web/.env and configure:

DDSM_SERVER_IP=0.0.0.0
DDSM_RCON_PASSWORD=ddsm_rcon_secret
DDSM_SERVERS_DIR=/opt/deadlock-servers
DDSM_DOCKER_IMAGE=deadlock-server

Public read-only API (optional)

Set DDSM_PUBLIC_API_ENABLED=true to expose GET /api/public/servers. Useful when fronting DDSM behind a public landing page or status dashboard.

The endpoint is:

  • Read-only — no admin actions, no mutations.
  • Stripped — the response contains id, name, port, map, status, players, maxPlayers, cpuPercent, memoryMb, memoryLimitMb, memoryPercent, startedAt, uptimeSeconds. It never contains password, steam_login, steam_pass, steam_2fa, container_id, or created_at.
  • Rate-limited to 60 requests/minute per IP (in-memory token bucket).
  • Cached with Cache-Control: max-age=4. Pair with an nginx proxy_cache if exposed publicly.

Returns 404 {"error":"Not Found"} when the env var is unset (so probing reveals nothing).

Example:

curl -s http://localhost:3000/api/public/servers | jq .

Tech Stack

CLI (beta):

Web Dashboard:

License

MIT

About

Dedicated server manager for Deadlock with tools for setup, configuration, automation, and server lifecycle management.

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Packages

 
 
 

Contributors