Cube docs Sign in

Configuration

Cube is configured entirely by command-line flags — there's no config file to manage.

Flags

FlagDefaultPurpose
-addr:8080Listen address for the web UI.
-data./dataDirectory for the database and server files.
-securefalseSet the Secure flag on session cookies and enable HSTS. Turn on when served over HTTPS.
-trust-proxyfalseTrust X-Forwarded-For for the client IP. Only enable behind a trusted reverse proxy.

Data directory layout

data/
├── cube.db              # SQLite: servers, accounts, roles, sessions
└── servers/
    └── <id>/            # one working directory per server (jar, world, configs)

Running behind HTTPS

Cube serves plain HTTP and expects to sit behind a TLS-terminating reverse proxy (nginx, Caddy, Traefik, …) in production. Forward traffic to its -addr, and run it with -secure so cookies are only sent over HTTPS. If your proxy sets X-Forwarded-For, add -trust-proxy so rate-limiting and session bookkeeping see the real client IP.

Leaving -secure on while serving plain HTTP will break login, because the browser won't send a Secure cookie back over an insecure connection.