Deployment
The quick way: the installer
The installer guides the initial deployment. It checks the machine, installs Docker if it is missing, asks a few questions, writes the files and starts the platform. Linux (Debian, Ubuntu, 64-bit Raspberry Pi OS):
curl -fsSLO https://dylaris.com/install.sh
curl -fsSLO https://dylaris.com/install/SHA256SUMS
sha256sum -c --ignore-missing SHA256SUMS && sudo bash install.shWindows 10/11 (elevated PowerShell; it sets up WSL2 and runs the same installer inside it):
Invoke-WebRequest https://dylaris.com/install.ps1 -OutFile install.ps1
powershell -ExecutionPolicy Bypass -File install.ps1These addresses redirect to the newest installer release on GitHub and count the download by day, file and client kind (curl, PowerShell, ...). No IP, User-Agent or cookie is stored, and the installer itself reports nothing.
It asks: one machine or a Swarm; automatic nightly updates or updates by
hand; a bundled or your own PostgreSQL and
Valkey/Redis (both are tested before anything is written); the panel address
and HTTPS (a self-signed certificate made by DYLARIS, your own certificate, your
own reverse proxy, or plain HTTP inside a private network); the generated
secrets; and the first administrator. It shows the plan and waits for your yes.
Choose files only if you want to review/deploy the generated configuration
yourself. --check runs preflight checks; --dry-run previews the installation
without applying it. Other commands include update, diagnostics,
uninstall (keeps data unless --purge is explicitly selected) and
add-node (join a further machine to the Swarm). A rerun keeps existing secrets
and data unless you explicitly change them. See the
installer reference.
Voice chat and other extra ports use 25700-25799 by default; open it for TCP
and UDP, or set another range under Settings, Extra ports once the panel is up.
With several machines, also open the Swarm ports between them (2377/tcp,
7946/tcp+udp, 4789/udp and ESP). See
Networking and ports.
From one machine to a Swarm
An installation that started on one machine can move to a Swarm with the installer:
- Make a platform backup and download it first.
- Run
bash install.shagain on that machine and choose several machines (Docker Swarm). It notices the running single-machine installation and asks before it touches anything. - On yes it stops the node, removes its game server containers, runs
docker compose down(the data volumes are kept), removes the old network anddocker-compose.yml, and deploys the Swarm stack on the same volumes and secrets. Servers are offline for those few minutes; check each one in the panel afterwards and start it if it is stopped. - Join the other machines with
bash install.sh add-node. Every machine in the Swarm runs a node.
The way back, from a Swarm to one machine, is not automated: on a Swarm installation the installer refuses the single-machine choice before it changes anything.
The rest of this page is the same setup by hand.
By hand
The examples below run Core (including the panel), Node, TimescaleDB and Valkey. There is no separate panel image. Pick the topology that matches your machines. These manual examples bundle the database and Redis; the repository's Swarm file defaults to external services, and the installer asks which you want.
- Docker Swarm - several machines, Core survives one of them rebooting, and labelling a host is what turns it into a Dylaris node.
- Single host - one machine, one file, no build step. For a single box this loses you nothing and is simpler.
Everything here assumes you have worked through Prerequisites: Docker installed, the swarm initialised and labelled if you are using one, a database chosen and the three secrets generated.
Redis runs ACL-only, and both stacks set that up for you. Valkey starts with
--aclfile and there is no open-Redis fallback, so the ACL file has to exist
before it does. The stacks below write it in the container's own entrypoint,
which means the only thing you fill in is the password.
Losing Redis outright is less serious than it looks. The only user that has to
be right is the default admin Core logs in as - that is what the entrypoint
writes. Core re-creates every scoped per-node user from its own records within a
minute of Redis coming back, with the same derived passwords it used before, and
the running services re-authenticate on their next command without a restart.
Docker Swarm
Your swarm is initialised and the hosts are labelled, so what is left is the stack file and what Docker does with it.
What deploy: is for
A stack is a compose file that Docker schedules for you. You do not say "start
this container on that machine", you say "I want two of these" and the manager
places them. The deploy: block is where that is written - Compose ignores it,
Swarm obeys it:
deploy:
replicas: 2 # how many copies
placement:
constraints: [node.labels.dylaris.core == true] # only on hosts you labelled
update_config:
order: start-first # new one healthy before the old one dies
parallelism: 1 # one at a time, never all at once
restart_policy:
condition: anyThat block is why an update is not an outage: start-first with parallelism: 1
replaces one replica at a time and only after the replacement answers.
mode: global instead of replicas means "one per host" - with a constraint
beside it, one per host that carries the label. The node service uses exactly
that, so what turns a machine into a Dylaris node is labelling it, not joining
the swarm.
Every service below is constrained to a label you set yourself, rather than
to node.role == manager or to nothing at all. Placement is an operational
decision and the roles differ: the database must never move, the node service
decides which machines run Minecraft servers, and Core serves the panel and
API. Multi-Core deployments require shared file storage as described below.
A service whose label exists on no
host stays pending forever, which is the loud version of getting it wrong -
Prerequisites has the label commands.
The Swarm stack file
Save this as docker-stack.yml on the manager. Every line you have to change is
marked # CHANGE ME; the rest is meant to stay as it is.
services:
core:
image: ghcr.io/dylaris-dev/platform-core:latest
environment:
API_PORT: "25500"
# CHANGE ME - the URL a browser opens the panel on.
FRONTEND_URL: "https://panel.example.com"
# Leave EMPTY. Core serves the pages and /api together; browser session
# cookies do not work across a separate API hostname.
PANEL_API_URL: ""
# CHANGE ME - three independent values from `openssl rand -hex 32`.
JWT_SECRET: "paste-the-first-random-hex-here"
CLUSTER_SECRET: "paste-the-second-random-hex-here"
BEAM_JWT_SECRET: "paste-the-third-random-hex-here"
DB_HOST: timescaledb
DB_PORT: "5432"
DB_USER: dylaris
DB_PASSWORD: "change-this-too" # CHANGE ME
DB_NAME: dylaris
DB_TYPE: "timescaledb"
DB_SSLMODE: "disable"
REDIS_ADDR: "redis:6379"
# CHANGE ME - must equal the password on the redis service below.
REDIS_PASSWORD: "change-this-redis-password"
# Must match on Core AND every node, or the mesh does not form.
GRPC_TLS_ENABLED: "true"
ports:
- "25500:25500" # REST API
- "25501:25501" # gRPC, node to Core
volumes:
# Templates, ticket attachments and ticket backups. This is a per-host
# volume and there are two Cores, so they do NOT share it. Point "Core
# File Storage" in the panel at S3-compatible storage, or at a filesystem
# mounted at the same path on every host that may run Core. Core proves
# the path is genuinely shared before it accepts it, so a half-configured
# mount is refused rather than silently splitting your files in two.
# See "Core file storage" in Prerequisites.
- core_data:/app/dylaris_data
# Core's shutdown drains listeners, then releases its leader lease. Docker's
# default of 10s cuts that off before the first step finishes.
stop_grace_period: 90s
healthcheck:
test: ["CMD", "wget", "-q", "-O", "/dev/null", "http://127.0.0.1:25500/healthz"]
interval: 30s
timeout: 5s
retries: 3
start_period: 10s
networks: [dylaris_net]
deploy:
# Safe: Redis leader election keeps the singleton jobs on one replica
# while all of them serve the API.
replicas: 2
placement:
# YOUR choice which hosts run Core, expressed as a label you add
# yourself (see Prerequisites). Core is stateless apart from its file
# storage, so any host will do - but every host you label here must be
# able to reach that storage, or a Core scheduled onto it serves an
# empty file store.
constraints: [node.labels.dylaris.core == true]
update_config:
order: start-first
parallelism: 1
restart_policy:
condition: any
node:
image: ghcr.io/dylaris-dev/platform-node:latest
environment:
# The name this node introduces itself with, templated per host so the
# value differs on every machine. It is NOT the node's identity: on first
# contact Core assigns a server-side id the node cannot choose, and logs
# "identity REPLACED ... the previous node row and its Redis ACL users are
# now orphaned". On a first boot there is no previous row and that line is
# noise; it means something only when a node that already had one lost its
# cached secret.
NODE_HOSTNAME: "{{.Node.Hostname}}"
# CHANGE ME - the SAME value as Core's CLUSTER_SECRET.
CLUSTER_SECRET: "paste-the-second-random-hex-here"
# CHANGE ME - the SAME value as Core's dedicated BEAM_JWT_SECRET.
# Never give a node the panel session-signing JWT_SECRET.
BEAM_JWT_SECRET: "paste-the-third-random-hex-here"
REDIS_ADDR: "redis:6379"
CORE_GRPC_ADDR: "core:25501"
GRPC_TLS_ENABLED: "true"
# Host ports Minecraft servers bind, one each.
PORT_RANGE: "25600-25699"
volumes:
# The node drives the host Docker daemon to start server containers.
- /var/run/docker.sock:/var/run/docker.sock
- dylaris_data:/app/dylaris_data
networks: [dylaris_net]
# Nothing is published here on purpose. Each Minecraft container binds its
# own host port out of PORT_RANGE; claiming that range for the node makes
# every one of them fail with "port is already allocated".
deploy:
# One node task per LABELLED host. Global mode still means "one per
# host", the constraint just narrows which hosts count - so labelling a
# new machine is what turns it into a Dylaris node, not merely joining
# the swarm. That is the difference between deciding where servers run
# and finding out afterwards.
mode: global
placement:
constraints: [node.labels.dylaris.node == true]
restart_policy:
condition: any
timescaledb:
image: timescale/timescaledb:latest-pg16
environment:
POSTGRES_USER: dylaris
POSTGRES_PASSWORD: "change-this-too" # CHANGE ME - same as Core's DB_PASSWORD
POSTGRES_DB: dylaris
volumes:
- timescaledb_data:/var/lib/postgresql/data
networks: [dylaris_net]
deploy:
replicas: 1
placement:
# Its data is on one host's disk, so it must not be scheduled anywhere
# else - a reboot that moves it brings up an EMPTY database. Label
# exactly one host with dylaris.data.
constraints: [node.labels.dylaris.data == true]
restart_policy:
condition: any
redis:
# Valkey, a drop-in Redis fork. The service name stays "redis" so
# REDIS_ADDR=redis:6379 is right everywhere. Coordination bus only -
# Postgres is the source of truth, so nothing here needs persisting.
image: valkey/valkey:8-alpine
environment:
# CHANGE ME - the same value as Core's REDIS_PASSWORD. No spaces: ACL
# fields are space-delimited.
REDIS_PASSWORD: "change-this-redis-password"
# Valkey refuses to start against a missing --aclfile, so this writes the
# admin user first and then hands over to the image's own entrypoint, which
# is what drops the process from root to the valkey user. Overriding
# `command` instead would skip that drop.
entrypoint:
- sh
- -c
- |
printf 'user default on >%s ~* &* +@all\n' "$$REDIS_PASSWORD" > /data/users.acl
exec docker-entrypoint.sh valkey-server --save "" --appendonly no --aclfile /data/users.acl
networks: [dylaris_net]
deploy:
replicas: 1
placement:
# The SAME label as the database, deliberately. Valkey persists nothing,
# so it is not its own data that pins it - it is that the two singletons
# of this stack should live on one predictable host instead of drifting
# apart across reboots.
constraints: [node.labels.dylaris.data == true]
restart_policy:
condition: any
# ── Optional: MinIO, if you want S3 without an S3 provider ─────────────────
# Core's file storage wants S3-compatible storage or a filesystem every Core
# host can reach. Cloudflare R2 or any S3 provider is less to run; MinIO is
# here for a fleet that should not depend on anything outside it. Uncomment
# this, the minio_data volume, and point Settings -> Core File Storage at
# http://minio:9000 with path-style addressing on.
#
# It is a singleton on a disk, exactly like the database, so it carries the
# same label. Publishing 9001 is optional - it is the admin console, not the
# API Core talks to.
# minio:
# image: minio/minio:latest
# command: ["server", "/data", "--console-address", ":9001"]
# environment:
# MINIO_ROOT_USER: "dylaris" # CHANGE ME
# MINIO_ROOT_PASSWORD: "change-this-minio-password" # CHANGE ME - min 8 chars
# volumes:
# - minio_data:/data
# networks: [dylaris_net]
# deploy:
# replicas: 1
# placement:
# constraints: [node.labels.dylaris.data == true]
# restart_policy:
# condition: any
volumes:
timescaledb_data:
dylaris_data:
core_data:
# minio_data: # uncomment together with the minio service above
networks:
dylaris_net:
driver: overlay
attachable: trueAlready run a managed Postgres or Redis? Delete the timescaledb and redis
services, point DB_HOST / REDIS_ADDR at your endpoints and set
DB_SSLMODE: "require". One database on one host's disk is not high
availability, so a fleet that has to survive that host is better off external.
Deploy it
docker stack deploy -c docker-stack.yml dylaris
docker stack services dylaris
docker service logs -f dylaris_coreIf you parameterise the file with ${...} instead of the literal values above,
remember that Swarm resolves them at deploy time and does not read a .env for
you - set -a; . ./.env; set +a first, or use Docker secrets and the _FILE
form, which sidesteps it entirely.
Two things that bite
Minecraft containers are not swarm services. The node starts them on its host's Docker daemon directly, as siblings. Swarm does not know about them, will not move them, and will not restart them if the host dies - the node does that. A server's files live on the host it was created on.
A server belongs to a machine. Each node keeps its data in a volume on its
own host, so give the hosts that will run servers the roomy disks, and set
STORAGE_PATHS if you want that data somewhere specific.
Operations covers backups, which is what makes losing a host
survivable.
Then continue at Create the first admin.
Single host
One machine, plain Compose, no swarm involved. You paste one file, fill in the marked values and start it.
The single-host compose file
Save this as docker-compose.yml. Every line you have to change is marked
# CHANGE ME.
services:
core:
image: ghcr.io/dylaris-dev/platform-core:latest
restart: unless-stopped
depends_on:
timescaledb: { condition: service_healthy }
redis: { condition: service_started }
environment:
API_PORT: "25500"
# CHANGE ME - the URL a browser opens the panel on.
FRONTEND_URL: "http://localhost:25500"
# CHANGE ME - three independent values from `openssl rand -hex 32`.
JWT_SECRET: "paste-the-first-random-hex-here"
CLUSTER_SECRET: "paste-the-second-random-hex-here"
BEAM_JWT_SECRET: "paste-the-third-random-hex-here"
DB_HOST: timescaledb
DB_PORT: "5432"
DB_USER: dylaris
DB_PASSWORD: "change-this-too" # CHANGE ME
DB_NAME: dylaris
# timescaledb (hypertable + native retention) or postgres (plain table).
DB_TYPE: "timescaledb"
REDIS_ADDR: "redis:6379"
# CHANGE ME - must equal the password on the redis service below. Core
# logs in as the `default` admin and provisions the scoped users itself.
REDIS_PASSWORD: "change-this-redis-password"
# Must match on Core AND every node, or the mesh does not form.
GRPC_TLS_ENABLED: "true"
ports:
- "25500:25500" # REST API
networks: [dylaris_net]
volumes:
- core_data:/app/dylaris_data
node:
image: ghcr.io/dylaris-dev/platform-node:latest
restart: unless-stopped
depends_on: [redis]
environment:
# The name this node introduces itself with. Core assigns the real
# identity on first contact and logs that it replaced this one - expected
# on a fresh install, see the Swarm stack above.
NODE_HOSTNAME: "node-01"
# CHANGE ME - the SAME value as Core's CLUSTER_SECRET.
CLUSTER_SECRET: "paste-the-second-random-hex-here"
# CHANGE ME - the SAME value as Core's dedicated BEAM_JWT_SECRET.
# Never give a node the panel session-signing JWT_SECRET.
BEAM_JWT_SECRET: "paste-the-third-random-hex-here"
REDIS_ADDR: "redis:6379"
CORE_GRPC_ADDR: "core:25501"
GRPC_TLS_ENABLED: "true"
# Host ports Minecraft servers bind, one each.
PORT_RANGE: "25600-25699"
volumes:
# The node drives the host Docker daemon to start server containers.
- /var/run/docker.sock:/var/run/docker.sock
- dylaris_data:/app/dylaris_data
ports:
- "25520:25520" # SFTP
- "25523:25523" # Beam LAN fast path
# NOTE: do NOT publish 25600-25699 here. Each Minecraft container binds its
# own host port from that range; claiming the range for the node makes every
# one of them fail with "port is already allocated".
networks: [dylaris_net]
timescaledb:
image: timescale/timescaledb:latest-pg16
restart: unless-stopped
environment:
POSTGRES_USER: dylaris
POSTGRES_PASSWORD: "change-this-too" # CHANGE ME - same as Core's DB_PASSWORD
POSTGRES_DB: dylaris
volumes:
- timescaledb_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
networks: [dylaris_net]
redis:
# Valkey, a drop-in Redis fork. The service name stays "redis" so
# REDIS_ADDR=redis:6379 is right everywhere. Coordination bus only - Postgres
# is the source of truth, so nothing here needs persisting.
image: valkey/valkey:8-alpine
restart: unless-stopped
environment:
# CHANGE ME - the same value as Core's REDIS_PASSWORD. No spaces: ACL
# fields are space-delimited.
REDIS_PASSWORD: "change-this-redis-password"
# Valkey refuses to start against a missing --aclfile, so this writes the
# admin user first and then hands over to the image's own entrypoint, which
# is what drops the process from root to the valkey user. Overriding
# `command` instead would skip that drop.
entrypoint:
- sh
- -c
- |
printf 'user default on >%s ~* &* +@all\n' "$$REDIS_PASSWORD" > /data/users.acl
exec docker-entrypoint.sh valkey-server --save "" --appendonly no --aclfile /data/users.acl
networks: [dylaris_net]
volumes:
timescaledb_data:
dylaris_data:
core_data:
networks:
dylaris_net:
driver: bridgeCheck it before you start it - this catches a typo in seconds instead of in a crash loop:
docker compose config >/dev/null && echo "the file is valid"Then start it:
docker compose up -d
docker compose psFour containers: core, node, timescaledb, redis. The panel is not one of them - Core builds it into its own image and serves it on the same port as the API.
Create the first admin
Open the address shown by the installer, http://localhost:25500 for the manual single-host example, or your proxy's HTTPS address. If the installer created the first administrator, sign in with that account. Otherwise, on a fresh database the setup wizard creates the first administrator. It only works while no admin exists.
The wizard asks for a setup code. Core prints it once, on its first start, as one line in its log:
docker compose logs core 2>&1 | grep 'SETUP CODE' # one machine
docker service logs dylaris_core 2>&1 | grep 'SETUP CODE' # SwarmSETUP CODE: XXXX-XXXX-XXXX (needed once to create the first administrator)Only someone who can read the host's logs has it, so whoever reaches the port first cannot claim the platform. The installer prints it in its final summary. The code survives Core restarts until it is used, and is deleted once the first administrator exists. If you lost it (the container was recreated and its log is gone), delete the stored hash and restart Core; it logs a new one:
echo "DELETE FROM settings WHERE key = 'setup.code_hash';" | docker compose exec -T timescaledb sh -c 'psql -U "$POSTGRES_USER" -d "$POSTGRES_DB"'
docker compose restart coreWith several Core replicas only one of them generates and logs the code; the others log that a code already exists.
Then create your first server - see Servers.
If a fresh database unexpectedly shows a login form, inspect the request to
/api/setup/status, Core logs and database connectivity. Leave PANEL_API_URL
unset or empty; pages and API must reach Core on the same origin. A 404 is a
routing symptom, not proof of one particular configuration error. See
Troubleshooting.
Before you put it on the internet
Use HTTPS through Core's native TLS listener or a reverse proxy. These manual
examples expose HTTP 25500; keep it private and route the public HTTPS host
to Core, or configure native TLS and restrict direct HTTP access. Set
FRONTEND_URL to the public HTTPS address. Leave PANEL_API_URL unset or empty:
the panel and /api share that origin, and a separate API hostname is
unsupported because browser sessions use host-only cookies. See
Reverse proxy and TLS.
Set DB_SSLMODE=require if the database is on another host. Every other setting
is in Configuration.