Security
This page explains what OpenFlare protects, what it deliberately does not, and what you are responsible for when you run it on your own host.
Trust model
Section titled “Trust model”OpenFlare is a single trusted owner platform. It is not a hostile multi-tenant boundary. Run one control plane per trust domain, and keep its management surface on a private network.
Within that model the platform enforces these properties:
| Property | How it works |
|---|---|
| Cells only talk to their own channel | Every cell endpoint (/api/internal/clusters/<cellId>/*) needs that cell’s own bearer token, compared in constant time. Only the SHA-256 of the token is stored, so a leaked database does not leak cell credentials |
| Cell credentials cannot become management credentials | The management API (/api/v1) needs a separate PLANE_ADMIN_TOKEN of at least 32 characters. It never falls back to a cell token |
| The console has its own login | The installation administrator signs in with HTTP Basic as admin and CONSOLE_AUTH_PASSWORD (at least 16 characters). Administrators can issue personal member credentials (shaped ofm_ followed by 64 hex characters) in Settings, and members only see the teams they belong to. The console health check is public |
| Console mutations resist cross-site requests | Mutations authenticated with Basic credentials need the X-OpenFlare-Console-Request: 1 header |
| Desired state is signed | Snapshots are Ed25519-signed over canonical JSON. Cells check signature, scope, revision fence, digest and expiry, and reject replayed, tampered, mis-scoped or expired documents |
| Secrets never travel in the signed document | The document holds references only. Values reach the cell through the authenticated render-inputs endpoint |
| No existence oracle for bundles | Bundle bytes are served only for digests referenced by a retained publication, and are size-capped |
| The plane is not on the request path | If the plane is down, cells keep serving the last accepted snapshot for up to 24 hours, then fail closed |
The reference plane has no per-tenant rate limiting and no end-user authentication beyond what is described above, by design.
Network isolation in the Docker stack
Section titled “Network isolation in the Docker stack”The all-in-one Compose stack uses separate networks so that a compromised tenant cannot reach the control plane.
| Network | Members | Purpose |
|---|---|---|
backend (internal, no outbound traffic) |
postgres, plane, console, cell-init |
Control-plane persistence. The cell data plane cannot reach Postgres, so a tenant that escapes into the host container still cannot touch the database |
default (pinned subnet VRT_NET_SUBNET, default 172.31.42.0/24) |
Traefik, the cell services, Redis, Silo | The data plane. Traefik is pinned to VRT_TRAEFIK_IP (default 172.31.42.250), and VRT_TRUSTED_CIDR (default 172.31.42.250/32) limits who may set forwarded-for headers |
updatectl |
console, updater |
The only path to the updater. No tenant container joins it |
gitdeploy |
plane, git-runner |
The only path to the git runner. No tenant container joins it |
Other containment decisions:
- Postgres credentials are required. There is no default user and password.
- Redis requires a password (
REDIS_PASSWORD), because every tenant KV namespace lives there. Allowed characters are letters, digits and.,_,~,-. - Traefik is configured from files only. It never has access to the Docker socket, directly or through a socket proxy.
- Published host ports bind to loopback by default:
VRT_BINDandVRT_PORT(127.0.0.1:8080),CONSOLE_BIND(127.0.0.1:8788),PLANE_BIND(127.0.0.1:8787). Only Traefik’sVRT_TLS_BINDports 80 and 443 face the network. Setting any*_BINDto0.0.0.0is an explicit opt-out.
Transport security
Section titled “Transport security”The plane and console speak plain HTTP internally. The render-inputs channel carries worker secrets in cleartext by design, because cells must inject them as bindings. So:
- Loopback and Compose-internal hops are fine without TLS.
- Any hop that leaves the host must be TLS-terminated: a reverse proxy, ingress or service mesh in front of it. Never expose a bearer- or Basic-authenticated endpoint over plain HTTP to a shared network.
Edge containment of the API surface
Section titled “Edge containment of the API surface”Public traffic enters through Traefik on ports 80 and 443 with certificates issued over ACME DNS-01. See TLS certificates.
- The console is served at your console host over HTTPS.
- The management API (
/api/v1) is not published at the edge. The installer checks that/api/v1returns 404 publicly. Reach it over loopback (PLANE_BIND, for example through an SSH tunnel) or behind your own allowlist or mTLS proxy. - For remote cells you can opt in to publishing the cell channel with
OPENFLARE_API_HOST. That route exposes only/api/internal/*and never/api/v1. - The installer’s TLS post-checks verify console HTTPS, a probe worker, the unknown-host behavior and that the API is not public. See Troubleshooting if one of them fails.
Secrets handling
Section titled “Secrets handling”Master secrets
Section titled “Master secrets”| Secret | Purpose | Minimum |
|---|---|---|
PLANE_ADMIN_TOKEN |
Management API credential | 32 characters |
PLANE_SIGNING_SECRET |
Derives the Ed25519 snapshot-signing key | 32 characters |
PLANE_SECRETS_KEY |
AES-256-GCM key for secrets at rest | 32 characters |
CONSOLE_AUTH_PASSWORD |
Console administrator password | 16 characters |
OPENFLARE_UPDATER_TOKEN |
Console to updater bearer token (only with the update profile) |
n/a |
POSTGRES_PASSWORD, REDIS_PASSWORD |
Database and KV passwords | n/a |
VRT_R2_ACCESS_KEY, VRT_R2_SECRET_KEY |
Silo root credentials | n/a |
The installer generates all of these. They are mounted into containers as files through Compose secrets (the <NAME>_FILE convention), not as environment variables, so they do not appear in docker inspect output or in /proc/1/environ. A missing value fails closed at startup.
On disk:
- The authoritative env file is
/var/lib/openflare/.env, mode 0600. - Secret files live under
/var/lib/openflare/secrets/, mode 0600. The database URL file is owned by uid 1000 because the plane runs as that user. Cloudflare tokens aresecrets/cloudflare_zone_api_tokenandsecrets/cloudflare_dns_api_token, read by Traefik throughCF_ZONE_API_TOKEN_FILEandCF_DNS_API_TOKEN_FILE. - Redis and Postgres receive their passwords as environment variables, which is the accepted tradeoff of their upstream images.
/proc/<pid>/environis readable only by the owner.
Do not commit the env file or the secrets directory anywhere. Do not paste them into tickets or chat. Installer failure diagnostics redact secrets, but your own copies do not.
Secrets at rest
Section titled “Secrets at rest”Worker secrets, Secrets Store values, Hyperdrive passwords and Postgres tenant tokens are encrypted in the database with AES-256-GCM under PLANE_SECRETS_KEY. Consequences:
- The database backup contains ciphertext and is protected by that key. Back the key up separately. See Backups.
- The key is independent of the signing secret. Rotating the signing key does not affect stored secrets.
- Do not simply change
PLANE_SECRETS_KEY. Existing values become unreadable and the cell channel’s render-inputs call fails closed with a 500. Rotating it requires re-encrypting every encrypted value first, so the practical approach is to restore the old key, or re-enter every secret.
Cell tokens
Section titled “Cell tokens”Issue or rotate a cell token with the management API (POST /api/v1/cells/:cellId/token). A rotation takes effect immediately on the plane. A cell that still holds the old token receives 401 until it is updated. In the Docker stack cell-init stores the issued token for the cell in its run volume and only requests a new one when none is usable.
Cloudflare tokens
Section titled “Cloudflare tokens”Use the narrowest tokens that work: one with Zone Read and one with DNS Edit, scoped to the zone you use. Certificates are issued with DNS-01 only. See DNS and Cloudflare.
Signing key
Section titled “Signing key”The Ed25519 key is derived from PLANE_SIGNING_SECRET with HKDF. The plane prints the key id and public key at startup. Every cell must trust that public key. In the Docker stack the cell-init one-shot container derives the public key from the same secret and renders it into the cell’s configuration each time it runs.
Operational rules:
- Never remove a key that signed a snapshot a cell may still hold. A cell accepts only the keys in its own configuration, and an unknown key fails closed.
- Changing
PLANE_SIGNING_SECRETchanges the public key. Cells must learn the new key before they can verify new snapshots. The overlap procedure in the upstream operations guide is written for Kubernetes ConfigMaps (add the new key to the trusted set, roll the cells, switch the secret, publish, then remove the old key). - On the single-host Docker stack the trusted key is rendered by
cell-initfrom the current secret, so a rotation needs a plan that rerenders the cell configuration and restarts the cell services. Do this in a maintenance window, rehearse it on a throwaway install first, and keep a backup of the previous secret until the new revision is acknowledged by the cell.
Isolation of git deploy and builds
Section titled “Isolation of git deploy and builds”Git-push deployment is an opt-in profile (gitdeploy). Its design keeps builds away from your credentials:
- The
git-runnerhas no published port. It sits on the privategitdeploynetwork with the plane. It holds the Docker socket and is resource-limited (1 CPU, 512 MB of memory, 256 processes). - The plane authenticates the runner with a scoped runner token (
PLANE_GIT_RUNNER_TOKEN_FILE) rather than the admin token. The GitHub webhook secret and the GitHub App private key are mounted as files. - Each build runs in an ephemeral builder container that has no Docker socket and no plane or GitHub credentials, a read-only root filesystem, and internal-only network egress by default.
- Builder limits are configurable:
GIT_BUILDER_EGRESS(default internal),GIT_BUILDER_CPUS(default 1),GIT_BUILDER_MEMORY(default 512m),GIT_BUILDER_PIDS_LIMIT(default 128),GIT_BUILDER_TIMEOUT_MS(default 600000). - The runner workspace is under
/var/lib/openflare-gitrunner/workspace, mode 0700. - At the edge, the webhook host accepts only POST to one exact path.
Allowing builders outbound network access (a non-default GIT_BUILDER_EGRESS) lets build scripts reach the internet, which is useful for package installs and risky for untrusted repositories. Only grant it for repositories you trust. See Git push deploy.
The updater and the Docker socket
Section titled “The updater and the Docker socket”Anything holding /var/run/docker.sock can control the host. OpenFlare confines that power:
- Only two optional services ever mount the socket: the
updater(theupdateprofile) and thegit-runner(thegitdeployprofile). Each profile is independent, and enabling one does not enable the other. Neither is on by default. - Neither is internet-facing. The updater is never published on a host port, listens on its own
updatectlnetwork and accepts a fixed API with no endpoint that runs a command or takes an arbitrary image or Compose file. - The console, which is internet-facing, never has the socket. It proxies four updater endpoints with a server-side token that the browser never sees.
- The updater only upgrades to stable tags that exist on every release image and fails closed on a dirty checkout or a non-default registry.
If you do not want any component with socket access, leave both profiles off and upgrade manually. See Upgrades.
Supply chain
Section titled “Supply chain”Release images are published to ghcr.io/becoolme and pinned by tag. Each stable release also publishes image-digests.txt so you can compare digests, and the installer writes the digest list it pulled to /var/lib/openflare/image-digests.txt. The checksum file next to install.sh detects corruption or a mismatched download, but it is not a supply-chain signature. See Release images.
Reporting vulnerabilities
Section titled “Reporting vulnerabilities”Report vulnerabilities privately through GitHub Security Advisories on the project repository. Do not open a public issue. Include:
- The affected version or commit.
- A minimal reproduction: route, input, observed and expected behavior.
- Whether a cell token or the signing secret is required to exploit it.
Do not include real tenant data, tokens or signing keys. The target is to acknowledge within 72 hours.
Hardening summary
Section titled “Hardening summary”- Management API not reachable from the internet (404 at the public host)
- Console password long and unique, member credentials issued per person
- All
*_BINDvalues left on loopback unless a TLS terminator is in front - Env file and secrets directory mode 0600, never copied to shared locations
-
PLANE_SECRETS_KEYandPLANE_SIGNING_SECRETbacked up separately from the database - Updater and git-runner profiles enabled only if you need them
- Cloudflare tokens scoped to one zone
- Host firewall allows only 80 and 443 inbound
Continue with the Production checklist.