Docker Compose & Dokploy
Run rugen-server with the provided compose file, on any Docker host or as a Dokploy Compose app.
The server repository ships deploy/docker-compose.yml. It runs only
rugen-server and publishes its two ports; HTTPS in front is your choice
(Dokploy’s domains, any reverse proxy, or the
Cloudflare Tunnel add-on).
The image is ghcr.io/rugen-dev/rugen-server:latest, published on every
v* tag (amd64; arm64 builds are available by running the image workflow
manually).
Plain Docker Compose
git clone https://github.com/rugen-dev/rugen-server
cd rugen-server/deploy
cp .env.example .env # optional: name, MOTD, public URL
docker compose up -d
Then open 7001/udp in the host firewall. Check it is up:
docker compose logs -f # "http + websocket on 0.0.0.0:8080", "udp relay advertised as ..."
curl http://localhost:8080/health
/health answers with the server name, version, players online and the backup state.
The compose file
name: rugen
services:
rugen-server:
# prebuilt image from GHCR (published on v* tags); or build locally:
image: ${RUGEN_IMAGE:-ghcr.io/rugen-dev/rugen-server:latest}
# build:
# context: ..
# dockerfile: deploy/Dockerfile
container_name: rugen-server
restart: unless-stopped
env_file:
- path: .env
required: false
environment:
RUGEN_BIND: 0.0.0.0:8080
RUGEN_UDP_BIND: ${RUGEN_UDP_BIND:-0.0.0.0:7001}
RUGEN_DATA: /data
volumes:
- rugen-data:/data
ports:
- "${RUGEN_HTTP_PORT:-8080}:8080"
# match relay fast path: open it in the host / VPS firewall too
- "${RUGEN_UDP_PORT:-7001}:7001/udp"
healthcheck:
test: ["CMD", "/rugen-server", "--healthcheck"]
interval: 30s
timeout: 5s
retries: 3
start_period: 5s
networks:
- rugen
read_only: true
security_opt:
- no-new-privileges:true
cap_drop:
- ALL
networks:
# fixed name so optional add-ons (deploy/cloudflared) can join it
rugen:
name: rugen
volumes:
rugen-data: {}
All state lives in the rugen-data volume: the SQLite database rugen.db
and the temporary character packages/.
Dokploy
- Create Project → Create Service → Compose. Source: the rugen-server Git repository, compose path
deploy/docker-compose.yml(or paste the file in the Raw editor). - Environment tab (optional): paste
deploy/.env.exampleand setRUGEN_PUBLIC_URL,RUGEN_NAME,RUGEN_MOTD. Dokploy writes.envnext to the compose file; without it the defaults are used. - Domains tab: add
rugen.example.com→ servicerugen-server, port8080, HTTPS on (WebSocket upgrades pass through Traefik). Skip this if you use the Cloudflare Tunnel add-on instead. - Open 7001/udp in the VPS firewall / security group.
- Deploy. The logs show
http + websocket on 0.0.0.0:8080andudp relay advertised as ...;https://rugen.example.com/healthanswers.
The .env file
# Public URL players put in rugen.toml ([net] server) or the ONLINE screen.
RUGEN_PUBLIC_URL=https://rugen.example.com
# Name and message of the day shown in the in-game server list.
RUGEN_NAME=my rugen server
RUGEN_MOTD=be nice, have fun
# Host:port players send UDP match traffic to. Must NOT go through
# Cloudflare's proxy. Empty = the host of RUGEN_PUBLIC_URL.
RUGEN_UDP_PUBLIC=
# RUGEN_UDP_BIND=off # WebSocket relay only, no open UDP port
RUST_LOG=info
# RUGEN_IMAGE=ghcr.io/rugen-dev/rugen-server:v0.3.0
# RUGEN_HTTP_PORT=8080
# RUGEN_UDP_PORT=7001
Every variable is described on Configuration.
Building the image yourself
To build on the server instead of pulling, uncomment the build: block in
the compose file (and drop image: or point RUGEN_IMAGE at a local tag),
or build directly from the repository root:
docker build -f deploy/Dockerfile -t rugen-server .
docker build -f deploy/Dockerfile --build-arg FEATURES=resim -t rugen-server:resim .
The image is a static musl binary on scratch, running as user 65532 with
/data as a volume. With no shell or curl inside, the binary probes
GET /health itself for the healthcheck (/rugen-server --healthcheck).
Without a proxy
The compose already publishes 8080 and 7001/udp: give players
http://your-ip:8080 and set RUGEN_UDP_PUBLIC=your-ip:7001. Any reverse
proxy with TLS works too; it must pass WebSocket upgrades for /ws and
/relay.
Something wrong on this page? Edit it on GitHub.