Dokumentation

Environment variables

The environment variables obop reads: database URL, agent token, marketplace URL, and the settings of the control plane and Sliplane provisioner.

Den här sidan är inte översatt ännu. Du läser den engelska texten. Gå till den engelska sidan

obop reads a small number of environment variables. Command line flags win over variables.

Instance and CLI ​

VariableMeaningDefault
OBOP_DATABASE_URLWhere the data lives: sqlite://obop.db, sqlite:///abs/path.db, postgres://user:pass@host/db or memory:. Same as --db. For PostgreSQL add ?sslmode=require (or verify-full with &sslrootcert=/path/ca.pem) to encrypt the connection; see Self-hosting.sqlite://obop.db
OBOP_TOKENBearer token for obop mcp, obop call and obop commands. Same as --token.none
OBOP_UPDATE_URL, OBOP_UPDATE_TOKENManaged instances: the control plane's address and the instance's update token (set by the provisioner; the token is sealed into the database at start).
OBOP_UPDATE_FEEDThe release feed read when an administrator checks for updates. Default <OBOP_UPDATE_URL>/api/releases, else https://obop.dev/api/releases; off disables.
OBOP_BACKUP_DIRWhere the backup taken before an update from inside the instance is written.
OBOP_MARKETPLACE_URLAn extra marketplace: a host serving index.json and packages/<id>.toml. Shown after the bundled catalog.none
OBOP_BLOB_DIRDirectory for uploaded pictures and files (images on products, pages, posts, documents). Default: next to the SQLite file; PostgreSQL and memory instances keep them in the database.beside the db
OBOP_DEMO_PAYMENTS1 offers the demo payment provider (fake) to the web shop. For trials and tests only; never set it where real buyers pay.off
OBOP_PUBLIC_URLExternal URL of an instance behind a proxy (https://acme.example.com), used in the MCP discovery documents, in the 401 challenge of /mcp and as the origin and relying party id of passkeys, which work only at this address.from the request
OBOP_ALLOWED_ORIGINSComma-separated exact browser origins (https://app.example.com, or http://localhost:5173 for development) allowed to call /api and /mcp from another origin. Wildcards and other invalid values stop the server at start. Bearer tokens only; credentials are never allowed.none (same origin only)
OBOP_METRICS_TOKENOpens /metrics (Prometheus text) to a scraper that sends this bearer token; at least 16 characters. Without it /metrics is served only on a loopback bind, to direct loopback callers; otherwise it answers 404. /healthz and /readyz are always open.closed
OBOP_ALLOWED_ORIGINSComma-separated browser origins allowed to call /mcp (DNS-rebinding protection). Clients that are not browsers send no origin.none
OBOP_BULK_PER_MINUTEbulk_create calls (and obop import) one person may start per minute, dry runs included; 0 turns the limit off.12
OBOP_MCP_RATE_PER_MINUTERequests per token per minute on /mcp; 0 turns the limit off.600
OBOP_SECRET_KEYThe current server key: 32 random bytes as 64 hex digits (openssl rand -hex 32). Seals two-factor secrets, connection credentials, OAuth tokens and pseudonym keys of Connectors (docs/CONNECTORS.md), and the sessions, vaults and approval plans kept in the database. Set it as a secret. Without it a key is generated and stored in the database.none
OBOP_SECRET_KEY_PREVIOUSEarlier keys, comma separated, that may still protect stored values. Needed between a key change and the end of obop secrets rotate.none
OBOP_AUTO_MIGRATE1 lets a starting server run pending schema steps itself; 0 makes it refuse and print obop migrate run. --auto-migrate and --no-auto-migrate override it.on for SQLite, off for PostgreSQL
OBOP_REQUIRE_MFA_FOR_ADMINS0 makes "require two-factor for administrators" off until an administrator stores a value; the default is on.on
OBOP_DEV_INSECURE_KEY1 uses a public key for two-factor secrets and logs a warning. Development only.off
OBOP_CONNECTORS_ALLOW_LOOPBACK1 lets connections reach loopback addresses over plain http. For tests and local development only; the compliance checklist flags it.off

Control plane ​

Used by obop platform serve.

VariableMeaning
OBOP_DATA_DIRWhere the local provisioner keeps instance data. Default obop-instances.
OBOP_IMAGE or OBOP_REPO (with OBOP_BRANCH, default main)Where instance services come from with the sliplane provisioner. An image (ghcr.io/spacecorps/obop:<commit>) needs no build and wins when both are set; a repository means Sliplane builds each instance.
OBOP_REGISTRY_CREDENTIALA Sliplane registry credential id (sliplane credentials create ...), for a private image.
OBOP_UPGRADE_SETTLE_SECSSeconds to let a redeploy settle before asking whether the service is live, in obop platform upgrade-instances (default 30).
OBOP_PLATFORM_ADMINS, OBOP_STATUS_INTERVAL_SECSStaff emails for the forum and status console; how often the status checks run (default 60; one process per interval runs them).
OBOP_MARKETPLACE_URLOptional extra catalog for every instance.

Sliplane provisioner ​

--provisioner sliplane needs:

VariableMeaning
SLIPLANE_ACCOUNTAccount name the bundled Sliplane CLI is registered under.
SLIPLANE_API_KEYA Sliplane API key with write access. The container entrypoint registers it with the CLI and removes it from the environment. Set it as a secret.
OBOP_SLIPLANE_PROJECT, OBOP_SLIPLANE_SERVERWhere instance services go.
OBOP_CELL_ADMIN_URLpostgres:// superuser URL of the shared PostgreSQL server, as the control plane reaches it.
OBOP_CELL_INSTANCE_HOSThost:port that instances use to reach that server, for example obop-postgres.internal:5432.

Build time (the website) ​

VariableMeaning
OBOP_SITE_URLPublic origin used for canonical links, the sitemap and social cards when building this website. Default: https://obop.dev.

Tests ​

OBOP_TEST_POSTGRES_URL adds PostgreSQL to cargo test. OBOP_BIN points the end-to-end suite at a built binary.