Configuration
Every rugen-server environment variable and command line flag, with defaults.
rugen-server is configured with environment variables (in compose: the
.env file or Dokploy’s Environment tab). Everything is optional.
Server
| Variable | Default | Meaning |
|---|---|---|
RUGEN_PUBLIC_URL | – | Public https URL. Logged, and its host is the UDP fallback host. |
RUGEN_NAME | rugen server | Name in the in-game server list. |
RUGEN_MOTD | empty | Message of the day. |
RUGEN_BIND | 0.0.0.0:8080 | HTTP / WebSocket listener. |
RUGEN_UDP_BIND | 0.0.0.0:7001 | UDP relay listener; off to disable it. |
RUGEN_UDP_PUBLIC | public URL host + port | host:port clients send UDP to. Must not be Cloudflare-proxied. |
RUGEN_DATA | /data | Directory of rugen.db (and packages/). |
RUST_LOG | info | error, warn, info, debug. Client IPs only appear at debug. |
Packages
Temporary character packages for bring your own character.
| Variable | Default | Meaning |
|---|---|---|
RUGEN_PKG_DAYS | 3 | Days a package is kept after its upload, whatever uses it. Players see it in the game’s consent dialog. |
RUGEN_PKG_TTL | RUGEN_PKG_DAYS | A package expires this long after its last use (90m, 2d, or seconds), never later than RUGEN_PKG_DAYS. |
RUGEN_PKG_MAX_TOTAL | 5GB | All packages together; least recently used are evicted above it. |
RUGEN_PKG_MAX | 150MB | Largest single package accepted. |
RUGEN_PKG_S3 | (off) | Bucket that also serves packages (Cloudflare R2), same URL format as RUGEN_BACKUP_S3; objects under chars/. See Packages. |
RUGEN_PKG_S3_MAX_GB | 8 | Stop copying new packages to that bucket above this many GB (they are served directly). |
RUGEN_PKG_RATE_ACCOUNT | 1GB | Upload bytes per account per hour. |
RUGEN_PKG_RATE_IP | 2GB | Upload bytes per client IP per hour. |
RUGEN_PKG_REPLAY_TTL | 720 | Hours the packages of a stored ranked replay are evicted last (still deleted after RUGEN_PKG_DAYS). |
Fairness
Thresholds for the matchup verdict.
| Variable | Default | Meaning |
|---|---|---|
RUGEN_FAIR_RATIO | 1.6 | Power-score ratio above which a matchup is UNBALANCED. |
RUGEN_FAIR_COMMUNITY_GAP | 200 | Community rating gap that is UNBALANCED. |
RUGEN_FAIR_MIN_GAMES | 10 | Verified games before a character’s community rating counts. |
Re-simulation
Only with a server built with --features resim; see Re-simulation.
| Variable | Default | Meaning |
|---|---|---|
RUGEN_RESIM_DATA | – | Engine data/ folder (with common1.cns / fight.def) for re-simulating disputed matches. |
RUGEN_RESIM_MOTIF | RUGEN_RESIM_DATA | Motif for re-simulation. |
Backups
Daily off-site backups to any S3-compatible bucket (AWS S3, Cloudflare R2,
MinIO, Backblaze B2, Wasabi). Off unless RUGEN_BACKUP_S3 is set; see
Backups for what they contain and
how to restore.
| Variable | Default | Meaning |
|---|---|---|
RUGEN_BACKUP_S3 | – | The bucket as one URL, s3://ACCESS_KEY:SECRET_KEY@HOST/BUCKET[/prefix][?region=…]. Secret. |
RUGEN_BACKUP_RETENTION_DAYS | 7 | Days backups are kept: 14, 30, 365… (any whole number ≥ 1). The newest backup is always kept. |
RUGEN_BACKUP_INCLUDE | – | Extras, comma-separated: packages (incremental), signing-key (see the security note). |
One-liners:
# Cloudflare R2
RUGEN_BACKUP_S3=s3://ACCESS_KEY_ID:SECRET_ACCESS_KEY@<accountid>.r2.cloudflarestorage.com/rugen-backups?region=auto
# AWS S3
RUGEN_BACKUP_S3=s3://AKIA...:[email protected]/rugen-backups?region=eu-west-1
# MinIO, plain HTTP, objects under a prefix
RUGEN_BACKUP_S3=s3+http://minio:[email protected]:9000/rugen/play-rugen-dev
s3://(ors3+https://) uses HTTPS,s3+http://plain HTTP.- Everything after the bucket is a key prefix (
/rugen/play-rugen-dev→ bucketrugen, objects underplay-rugen-dev/). It may be left out. Either way the server writes only into its ownbackups/folder under the prefix (see the bucket layout);chars/andstages/next to it are reserved for content uploads later. - Surrounding whitespace and one pair of quotes (
"…"or'…') aroundRUGEN_BACKUP_S3andRUGEN_BACKUP_RETENTION_DAYSare ignored, so a value quoted in an env file still parses. regiondefaults toautofor R2, the region in AWS / B2 / Wasabi host names, elseus-east-1.- Path-style addressing by default; add
style=virtual(?region=x&style=virtual) for stores that only acceptbucket.host. - Percent-encode
/,+,@,:,?and%in the access key or secret:/→%2F,+→%2B,@→%40. AWS secrets often contain/or+.
A backup runs once a day at 03:00 UTC (the time is fixed; there is no
interval setting). A bad value is logged at start with the credentials
redacted and shown as misconfigured on /health; the server runs anyway.
Admin rate limit
| Variable | Default | Meaning |
|---|---|---|
RUGEN_REPLAY_DAYS | 30 | Days a shared replay is kept. |
RUGEN_REPLAY_MB | 256 | Total size of shared replays; the oldest go first above it. |
RUGEN_LIVE_MB | 64 | Memory for the input logs of live matches (all matches together; 15 minutes per match at most). |
RUGEN_RATE_ADMIN | 30 | /v1/admin/* calls per client IP per minute. |
Compose only
| Variable | Default | Meaning |
|---|---|---|
RUGEN_IMAGE | ghcr.io/rugen-dev/rugen-server:latest | Image tag used by the compose file. |
RUGEN_HTTP_PORT | 8080 | Host port for HTTP. |
RUGEN_UDP_PORT | 7001 | Host port for the UDP relay. |
CF_TUNNEL_TOKEN | – | Tunnel token, deploy/cloudflared/ only. |
Command line flags
The binary also takes a few flags; a flag wins over its environment variable.
rugen-server [--bind 0.0.0.0:8080] [--udp-bind 0.0.0.0:7001|off] [--data /data]
[--name NAME] [--healthcheck] [--backup out.db]
rugen-server [--data /data] --reset-password <username>
rugen-server [--data /data] --backup-now | --restore <object key|name|latest>
| Flag | Meaning |
|---|---|
--bind addr | Same as RUGEN_BIND. |
--udp-bind addr | Same as RUGEN_UDP_BIND (off, 0, false or none disable UDP). |
--data dir | Same as RUGEN_DATA. |
--name NAME | Same as RUGEN_NAME. |
--healthcheck | Probe GET /health on the local listener and exit 0 / 1 (used by Docker). |
--backup out.db | Write a consistent copy of the database and exit. |
--backup-now | Upload one backup to RUGEN_BACKUP_S3 now and exit. Works while the server runs. |
--restore which | Download a backup (latest, a backup name or object key), verify it and swap it in as rugen.db; the old database is kept as rugen.db.<time>.bak. The server must be stopped. See Restore. |
--reset-password user | Set a temporary password on a named account, log it out on every device, print the password and exit. Works while the server runs. See Password resets. |
--help, -h | Print usage. |
Something wrong on this page? Edit it on GitHub.