Skip to content

Settings & env

Tripwire reads configuration from two places that overlap by design:

  • App configTRIPWIRE_-prefixed environment variables (pydantic-settings).
  • Integration credentials — tracker tokens, the Anthropic key, the driver, and the log backend. Set them as environment variables (best for CI/headless), or via the dashboard's Settings page / the /settings API, which stores them in the database encrypted at rest and secret-masked on read.

Copy .env.example to .env to get started (docker compose auto-loads .env).

Claude / Anthropic (required)

Set one org-wide key as the admin — every engineer's run uses it, they don't bring their own. Use a dedicated Tripwire/CI key from your Anthropic workspace so spend and limits are attributed to Tripwire, not a person.

VariablePurpose
ANTHROPIC_API_KEYThe key Claude uses to drive the browser and adjudicate checks. Required for any run.
ANTHROPIC_AUTH_TOKENOptional auth-token override for gateway setups. Usually unset.

App config (TRIPWIRE_ prefix)

VariableDefaultPurpose
TRIPWIRE_DATA_DIRbackend/data (/app/data in compose)Where the default SQLite DB and run artifacts (screenshots) live.
TRIPWIRE_LOG_LEVELINFODEBUG / INFO / WARNING / ERROR.
TRIPWIRE_CORS_ORIGINSlocalhost :3400 / :5173JSON list of allowed dashboard origins.
TRIPWIRE_DRIVERplaywrightExecution driver: playwright (cross-platform, default) or desktop (legacy macOS).
TRIPWIRE_HEADLESS1Run headless. Set 0 to watch the browser.
TRIPWIRE_CDPunsetOn the legacy desktop path, 1 enables CDP-based network/trace capture.

Database

Structured data — suites, runs, issues, plans, settings, users, and API tokens — lives in a SQL database via SQLAlchemy. The default is a zero-setup SQLite file under TRIPWIRE_DATA_DIR; point at Postgres for production. Tables are created automatically on startup, and on first boot any pre-existing file-based data under TRIPWIRE_DATA_DIR is imported once. Run artifacts (screenshots) stay on the filesystem.

VariableDefaultPurpose
TRIPWIRE_DATABASE_URLsqlite:///{data_dir}/tripwire.dbSQLAlchemy URL. For Postgres: postgresql+psycopg://user:pass@host:5432/tripwire (install the postgres extra).
TRIPWIRE_DB_POOL_SIZE10Postgres connection-pool size (ignored for SQLite).
TRIPWIRE_DB_MAX_OVERFLOW20Extra Postgres connections allowed above the pool size under burst.
TRIPWIRE_DB_POOL_TIMEOUT30Seconds to wait for a free Postgres connection before erroring.

Postgres is the compose default. docker compose up runs a bundled Postgres (no manual install) and applies Alembic migrations before the API starts — see Deploying. Host-native make dev-api uses a zero-setup SQLite file; that's great for a quick local loop, but SQLite serializes all writes, so don't run a shared/production instance on it. Tripwire runs as a single process — scale runs with TRIPWIRE_MAX_CONCURRENT_RUNS, not by running multiple API replicas.

Deployment edition

VariableDefaultPurpose
TRIPWIRE_DEPLOYMENT_MODEcloudcloud (open signup, many orgs) or selfhosted (one org created at first run, signup closed). See Editions & orgs.
TRIPWIRE_BASE_URLdashboard originPublic URL of this instance, used to build invitation links. Set to your real domain in production.

Auth & secrets

The API requires authentication (see Authentication). On a fresh instance the dashboard shows a "Create your admin account" screen; alternatively, set both variables below to pre-seed the admin on first boot (headless / Docker / CI) and skip that screen.

VariableDefaultPurpose
TRIPWIRE_ADMIN_EMAILunsetFirst-run admin email (used only when TRIPWIRE_ADMIN_PASSWORD is also set).
TRIPWIRE_ADMIN_PASSWORDunsetFirst-run admin password. If either var is unset, use the dashboard setup screen instead.
TRIPWIRE_JWT_SECRETauto-generated + persistedHMAC secret for session JWTs. Set in production so sessions survive a restart / move.
TRIPWIRE_JWT_TTL_SECONDS604800 (7 days)Session lifetime.
TRIPWIRE_SECRET_KEYauto-generated + persistedKey that encrypts secret settings at rest (Fernet). Set in production so encrypted secrets survive a DB move / restore.

Execution scaling & cost control

VariableDefaultPurpose
TRIPWIRE_MAX_CONCURRENT_RUNS2How many runs execute in parallel (each is a browser + LLM calls).
TRIPWIRE_RUN_COST_CAP_USD0 (off)Abort a run once its model cost exceeds this (USD).
TRIPWIRE_DAILY_COST_CAP_USD0 (off)Block new runs once rolling 24h model spend exceeds this (USD).
TRIPWIRE_LLM_TIMEOUT120Per-request model timeout (seconds).
TRIPWIRE_LLM_RETRIES4Automatic retries (with backoff) on transient model errors (429 / 5xx / connection).

Run isolation (cloud)

Recommended when running the multi-tenant cloud edition; self-hosted can leave the defaults. See Editions & orgs.

VariableDefaultPurpose
TRIPWIRE_RUN_EXECUTORthreadthread (in-process) or subprocess (killable child with no DB access — per-run isolation).
TRIPWIRE_RUN_TIMEOUT_S1800Hard wall-clock timeout per run; the run is killed if it exceeds this.
TRIPWIRE_RUN_MEM_MB0 (off)Per-run memory cap (subprocess executor).
TRIPWIRE_RUN_CPU_S0 (off)Per-run CPU-time cap (subprocess executor).
TRIPWIRE_RUN_EGRESSopenrestricted blocks runs from reaching loopback / link-local / cloud-metadata / private addresses (SSRF guard).
TRIPWIRE_RUN_EGRESS_ALLOWunsetComma-separated extra hosts/IPs allowed when egress is restricted.

Issue trackers

Set the names for the providers you use (also writable via Settings). A provider with missing credentials is simply skipped.

Use a dedicated Tripwire service account for these tokens — set once by an admin, not a personal token. See Use a dedicated Tripwire account.

VariableProviderPurpose
GITHUB_TOKENGitHubService-account PAT with repo scope (or fine-grained: Issues read/write).
GITHUB_REPOGitHubowner/repo.
GITLAB_TOKENGitLabService-account / project-access token with api scope.
GITLAB_PROJECTGitLabNumeric id or url-encoded group%2Fproject.
GITLAB_URLGitLabSelf-managed base URL (optional; default https://gitlab.com).
JIRA_BASEJirahttps://your-org.atlassian.net.
JIRA_EMAILJiraThe service account's Atlassian email.
JIRA_TOKENJiraJira API token (created as that account).
JIRA_PROJECTJiraProject key (e.g. ENG).
FILE_ISSUESExternal tracker(s) to also mirror to (e.g. github); the in-app Tripwire board is always written. Comma-separate for several.

See Filing issues for behavior and dedup.

Server-log backend (root cause)

Connect one backend so a failing request's trace_id resolves to the backend error. Set LOG_BACKEND and the matching config:

LOG_BACKENDRequiredOptional
lokiLOKI_URLLOKI_SELECTOR
datadogDATADOG_API_KEY, DATADOG_APP_KEYDATADOG_SITE
elasticsearchELASTIC_URL, ELASTIC_API_KEYELASTIC_INDEX
httpLOG_HTTP_URLLOG_HTTP_TOKEN
fileLOG_FILE_PATH

Full details and examples: Connecting server logs.

Notifications

Alert Slack or Teams when a run finishes (great for scheduled regression plans). Also configurable from the dashboard Settings page.

VariableDefaultPurpose
NOTIFY_ONfailuresWhen to notify: off / failures (only when a run has failures or broken cases) / always.
SLACK_WEBHOOK_URLunsetSlack Incoming Webhook URL.
TEAMS_WEBHOOK_URLunsetMicrosoft Teams Incoming Webhook URL.

Frontend

VariablePurpose
VITE_API_BASEBase URL the dashboard uses to reach the API (compose / prod). In dev, Vite proxies /apihttp://127.0.0.1:8400, so it's usually left unset locally.

Precedence & secrets

  • Environment variables are ideal for CI and headless runs; the issue trackers and log adapters read directly from os.environ. Env always wins — a value present in the process environment takes precedence over the stored setting.
  • The dashboard's Settings (stored in the database, encrypted at rest) are applied to the environment at run time for runs started through the API.
  • Secrets are masked on read — tokens you store are never echoed back in plaintext, and they are encrypted in the database with TRIPWIRE_SECRET_KEY. Keep real secrets in env or a secret manager, never in git (.env is git-ignored).

Related: Authentication · Getting Started · REST API · CLI

Tripwire — AI-native, self-healing E2E testing. Terms · Privacy · Legal Notice