Skip to content

Configuration ​

Core ​

VariableDefaultWhat it does
DATABASE_URLsqlite:///sopops.dbPostgres (postgresql://, needs pip install 'sopops-server[postgres]') or SQLite. Alembic migrates on startup.
SOP_BINsop on PATHThe sop binary. Use v0.1.3 or later for explicit step ordering.
HOST, PORT127.0.0.1, 8484Also --host, --port.
SOPOPS_SECRET_KEYunsetFernet key that encrypts platform keys, webhook secrets and GitHub tokens. Required to store them.
SOPOPS_CORS_ORIGINSunsetComma-separated browser origins allowed to call sopops.
SOPOPS_WEB_DIRthe built UIServe the UI from another folder.

Make a SOPOPS_SECRET_KEY:

sh
python -c "from cryptography.fernet import Fernet; print(Fernet.generate_key().decode())"

Models ​

These variables set the deployment's defaults; see Models. Each team can replace any of them with its own keys and models in Settings, under Checks.

VariableDefaultWhat it does
SOPOPS_MODEL_FAST, SOPOPS_MODEL_REASONINGunsetThe two model roles. SOPOPS_MODEL_REASONING=rules tries importing without a model.
SOPOPS_LLM_API_BASE, SOPOPS_LLM_TIMEOUT, SOPOPS_MAX_TOKENSunset, 300, 16000OpenAI-compatible base URL for every call; per-call timeout (s); output limit.
SOPOPS_MODEL_DECISIONunset (the fast model)The model that answers decisions when Jev doesn't. Applies only to teams on the deployment's models.
SOPOPS_LM_URL, SOPOPS_LM_KEYunsetA model gateway (an OpenAI-compatible endpoint) that serves models named sopops/<name>, such as sopops/sopops-fast. When set, teams can pick these as the provider "sopops" in setup and Settings, and never see the models behind them.
TYPESAFE_API_KEY, SOPOPS_JEV, SOPOPS_JEV_MODELunset, auto, jev-1.13.0Jev for decisions. On when the key is set, unless SOPOPS_JEV=off.
SOPOPS_SYSTEM1_URL, SOPOPS_SYSTEM1_MODEL, SOPOPS_SYSTEM1_KEY, SOPOPS_SYSTEM1unset, sopops-system1, SOPOPS_LM_KEY, autoA model gateway's system-1 classifier for decisions (POST <url>/system1, DSPy's System One request), so the classifier's keys stay in the gateway. Used instead of TYPESAFE_API_KEY when both are set, except for a team's own TypeSafe key, which goes to TypeSafe directly. When the gateway's classifier is unavailable, the decision model answers. SOPOPS_SYSTEM1=off ignores it.
SOPOPS_CHECK_MODE, SOPOPS_CHECK_REVIEW, SOPOPS_DECISIONSdecide, on, unsetCheck mode; reviewer on or off; decision thresholds and bands as JSON, e.g. {"never": [0.05, 0.7, 0.7]}.
SOPOPS_MODEL_PRICESunsetPrices for spend estimates, JSON in USD per million tokens, e.g. {"openai/gpt-5-mini": [0.25, 2]}. Adds to or overrides the built-in table (Jev, current Claude models).
SOPOPS_DSPY_CACHE_DIRunsetDisk cache for model responses (transcripts are written there). In memory otherwise.

The spot-check batch size is set per workspace, not by a variable: 25 rule results by default, changed with PUT /v1/workspaces/{ws}/spot-checks/settings (spot checks).

Analysis can be paused per workspace, by an owner or admin (Settings → Checks, or PUT /v1/workspaces/{ws}/analysis with {"paused": true}). Sessions still come in and show their transcripts, but no model runs on them: nothing is routed, checked, clustered, suggested or calibrated, and the daily recluster skips the workspace. Resuming queues the sessions that came in meanwhile to be checked.

Sign-in ​

See Sign in. sopops sends no email: invites, join links and password resets are links to copy. For single sign-on on a self-hosted sopops, put it behind Cloudflare Zero Trust.

VariableDefaultWhat it does
SOPOPS_GITHUB_OAUTH_CLIENT_ID, SOPOPS_GITHUB_OAUTH_CLIENT_SECRETunsetSign in with GitHub.
SOPOPS_GOOGLE_CLIENT_ID, SOPOPS_GOOGLE_CLIENT_SECRETunsetSign in with Google.
SOPOPS_AUTH_REQUIREDon when GitHub or Google is set uptrue or false forces sign-in. true with nothing set up: email and password sign-in.
SOPOPS_OPEN_SIGNUPtrueAnyone can sign up (name, email, password, team name) and owns the new team, with no invite link. On wherever passwords are the way in. Set it to 0 for invites only, which a sopops on a public address and this server's model keys may want.
SOPOPS_LOGIN_PROVIDERSunsetComma-separated provider ids (github, google, password, and any a plugin registers): the only ones offered. Unset, every provider that's set up is offered. A list naming none that are set up is ignored, with a warning.
SOPOPS_ALLOWED_EMAIL_DOMAINSunsetComma-separated. Only verified emails at these domains can sign in.
SOPOPS_PUBLIC_URLthe request's own addressWhere people reach the web UI, path included if it has one (https://example.com/sopops). Base of invite, join and password links, and of the pages sign-in sends people back to. Also the base of sign-in callbacks unless SOPOPS_PUBLIC_API_URL is set.
SOPOPS_PUBLIC_API_URLSOPOPS_PUBLIC_URLWhere the browser reaches the API, when that isn't under SOPOPS_PUBLIC_URL (the UI at https://example.com/app, the API at https://example.com/api). Base of sign-in callbacks.

Serving sopops under a path ​

By default the UI is at / and the API at /v1/.... To put sopops under a path behind a reverse proxy, build the UI for it and tell the server where people reach it:

sh
SOPOPS_WEB_BASE=/sopops/ pnpm -C web build    # the UI's base; its API calls go to /sopops/v1/... too
SOPOPS_PUBLIC_URL=https://example.com/sopops   # for links and sign-in callbacks

The UI and the API can have separate prefixes: SOPOPS_WEB_API_BASE=/api at build time, and SOPOPS_PUBLIC_API_URL on the server. The server reads both bases back from the built UI. A proxy can forward with the prefix still on the path, or take it off and say which in X-Forwarded-Prefix; a proxy that takes it off without saying makes a redirect loop. web/wrangler.jsonc builds the UI for Cloudflare Workers instead (pnpm build:cloudflare), for a deployment that serves it from there; nothing in self-hosting uses it.

Platforms and webhooks ​

VariableDefaultWhat it does
SOPOPS_REQUIRE_WEBHOOK_SECRETfalseSet true on a hosted server. Refuses call-start webhooks for any workspace that has no webhook secret or runtime token.
SOPOPS_SESSION_IDLE_MINUTES30A streamed session with no events this long closes as incomplete.
SOPOPS_POSTCALL_GRACE_SECONDS120After ElevenLabs' monitor socket ends, how long to wait for the post-call webhook (if set up) before closing and checking.
SOPOPS_LIVEKIT_ANY_HOSTfalseAllow a self-hosted LiveKit URL, not only LiveKit Cloud.
SOPOPS_MCP_SOURCEsopops[mcp] @ git+https://github.com/sopops-dev/sopops@main#subdirectory=sdks/pythonWhat the onboarding command's uvx --from installs: the client SDK with its mcp extra. From a clone: /path/to/sopops/sdks/python[mcp].

GitHub ​

VariableDefaultWhat it does
SOPOPS_GITHUB_API_URLhttps://api.github.comGitHub Enterprise Server: https://HOST/api/v3. Also set SOPOPS_GITHUB_URL to https://HOST for its install pages.
SOPOPS_GITHUB_APP_ID, SOPOPS_GITHUB_APP_PRIVATE_KEY (or …_PATH), SOPOPS_GITHUB_WEBHOOK_SECRET, SOPOPS_GITHUB_APP_SLUGunsetThe GitHub App sopops signs in as: id, private key (PEM or file), webhook secret, and name in github.com/apps/<slug>. Without them, Settings offers to create one (stored encrypted with SOPOPS_SECRET_KEY).

Hatchet ​

VariableDefaultWhat it does
HATCHET_CLIENT_TOKENunsetRun the pipeline on Hatchet. Needs pip install 'sopops-server[hatchet]' and sopops worker.
SOPOPS_RATE_LIMIT_PER_MINUTE60Model calls per minute per model.
SOPOPS_WORKSPACE_CONCURRENCY4Runs per workspace at once.
SOPOPS_WORKER_SLOTS20Worker slots.
SOPOPS_RECLUSTER_CRON0 6 * * *Daily recluster.
SOPOPS_PR_STATUS_CRON*/15 * * * *Check pull requests and sync connected repositories.

These settings apply only with Hatchet. Without it, run sopops recluster and sopops pr-status from cron.

sopops is open source under Apache-2.0.