Configuration
With Docker Compose, all production settings live in one private environment file, based on deploy/compose.prod.env.example. Keep it outside the repository checkout with mode 0600, and preserve its passwords, keys and identity settings across upgrades. Changing a key later can invalidate stored state.
Images#
Variable | Purpose |
|---|---|
| Optional. Defaults to |
| The full commit SHA of the release for the API, migrator, collaboration and worker images |
| The full commit SHA for the web image |
| Optional. A different worker image, for a worker-only fix |
The release script exports the tags in the shell, which takes precedence over the file, so you do not edit the file per release.
Database#
Variable | Purpose |
|---|---|
| The PostgreSQL superuser password |
| The |
| Core migrations, as |
| Core at runtime, as |
| Collaboration at runtime, as |
| Document migrations, as |
NIX_CORE_DATABASE_URL=Host=postgres;Port=5432;Database=nix;Username=nix_app;Password=<app-password>
NIX_COLLAB_DATABASE_URL=postgresql://nix_collab:<collab-password>@postgres:5432/nix
Internal secrets#
Variable | Purpose |
|---|---|
| Authenticates internal calls between services |
| Signs interactive form links |
Generate each with a strong random value, for example openssl rand -base64 48.
RabbitMQ#
Each component has its own broker credential. Use URL-safe values, because Compose builds connection URLs from them.
NIX_RABBITMQ_API_PASSWORD, NIX_RABBITMQ_IMPORT_PASSWORD, NIX_RABBITMQ_EXPORT_PASSWORD, NIX_RABBITMQ_PLUGIN_PASSWORD, NIX_RABBITMQ_CALENDAR_PASSWORD, NIX_RABBITMQ_NOTIFY_PASSWORD, and NIX_RABBITMQ_SITES_PASSWORD when Sites is enabled
To use an external TLS broker instead of the bundled one, set a full amqps:// URL for every role: NIX_RABBITMQ_API_URL, NIX_RABBITMQ_IMPORT_URL, NIX_RABBITMQ_EXPORT_URL, NIX_RABBITMQ_PLUGIN_URL, NIX_RABBITMQ_CALENDAR_URL and NIX_RABBITMQ_NOTIFY_URL.
Object storage#
Variable | Purpose |
|---|---|
| The S3 endpoint Core and the workers use |
| The origin browsers use for signed links |
| Defaults to |
| The bucket name |
| Storage credentials |
With the bundled store, set both the endpoint and the public origin to https://<your-domain>; the web container routes the bucket path to the store. The bucket must not be called w, workspaces or launch, because the installed app treats those paths as its own pages.
Sign-in#
Variable | Purpose |
|---|---|
|
|
| Your identity provider's issuer URL |
| The OIDC client ID for Nix |
| Optional. The provider's self-service account page. Defaults to the Zitadel console |
Access tokens#
Nix issues its own short-lived access tokens to browsers, nixctl and personal access tokens.
Variable | Purpose |
|---|---|
| Usually |
| Usually |
| A name for the signing key, such as |
| Absolute path to the P-256 private key |
openssl ecparam -name prime256v1 -genkey -noout -out core-access-token.pem
Generate the key once and keep it.
Push notifications#
Variable | Purpose |
|---|---|
| The VAPID private key: 32 raw bytes, base64url, no padding |
| The matching public key: an uncompressed P-256 point, base64url |
| A |
Generate one key pair for the lifetime of the deployment. Changing it means every device has to subscribe again.
Calendar sync#
Optional. A provider without a client ID and secret is shown as unavailable.
Variable | Purpose |
|---|---|
| Google OAuth application |
| Microsoft OAuth application |
| Defaults to |
Register these redirect URIs with the provider:
https://<your-domain>/auth/calendar/callback/google
https://<your-domain>/auth/calendar/callback/microsoft
Core keeps calendar refresh tokens encrypted with its data-protection keys, which live in the nix-api-data-protection volume. Back that volume up separately from the database. If it is lost, every calendar connection has to be made again.
Tunnel#
Variable | Purpose |
|---|---|
| The token for the optional tunnel connector. Set a placeholder if you use your own reverse proxy |
Sites#
Optional. Leave these unset and nothing about Sites runs.
Variable | Purpose |
|---|---|
| Set to |
| The domain sites are served under, as |
| The bucket built sites are written to. Defaults to |
| The sites worker's own broker password |
| The serving process's storage credential. Use a key that can only read the sites bucket where your store supports it |
| Optional. A label suffix for this instance's default hostnames, as |
| Optional. Lets Nix create DNS records and tunnel routes for site hostnames. Needs Zone:Read, DNS:Edit and Cloudflare Tunnel:Edit |
| The account and tunnel those routes are added to |
| The zone for this instance's default hostnames when a label suffix is set. Never used for custom hostnames |
Kubernetes#
The Kubernetes manifests read the same settings from Secrets and ConfigMaps instead of an environment file. deploy/k8s/create-secrets.sh creates the Secrets and lists them as it goes; see Kubernetes. The settings passed to deploy/k8s/deploy.sh are:
Variable | Purpose |
|---|---|
| Must be |
| Where the images are and the full commit SHA to run |
| The app's domain, also used for |
| The Nix application's client ID at the identity provider |
| Optional. Defaults to |
|
|
| Defaults to |
| Defaults to |
| Defaults to |
The inputs to create-secrets.sh include DOMAIN, the NIX_OBJECT_STORE_* and NIX_CALENDAR_* values, NIX_SITES_BUCKET and NIX_SITES_READ_*, the optional NIX_SITES_CLOUDFLARE_* values, NIX_PUSH_VAPID_*, NIX_ORIGIN_TLS_CERT_FILE, NIX_ORIGIN_TLS_KEY_FILE, and NIX_ZITADEL_ADMIN_USERNAME and NIX_ZITADEL_ADMIN_PASSWORD. Passwords for the database, broker, internal secret and signing keys are generated.