Environment Variables
ThreadLens preserves existing runtime environment variable names even when public docs use the ThreadLens brand. Do not rename these variables as part of documentation updates.
Docker reads values from the repository root .env unless an embedding repository or command overrides the env file. Docker containers can start before credentials are configured, but scouting capabilities depend on the variables available to the runtime.
| Variable | Default | Capability unlocked | Purpose |
|---|---|---|---|
PORT | 4749 | Optional runtime override | Go API HTTP port. |
SCOUT_DB_PATH | ../../scout.db from the API working directory | Optional runtime override | SQLite database path. Docker sets this to /data/scout.db. |
SCOUT_FRONTEND_DIST | ../web/dist from the API working directory | Optional runtime override | Static web build directory served by the Go API. |
ANTHROPIC_API_KEY | Empty | AI scoring, analysis, and reports through Anthropic-backed calls | Anthropic-backed AI workflows. How to get → |
GEMINI_API_KEY | Empty | AI scoring, analysis, and reports through Gemini-compatible calls | Gemini provider path. How to get → |
PARALLEL_API_KEY | Empty | Google scouting through the configured search provider | Parallel.ai Search provider for Google scouting. How to get → |
BLUESKY_HANDLE | Empty | Bluesky scouting | Bluesky API account handle (e.g. yourname.bsky.social). How to get → |
BLUESKY_APP_PASSWORD | Empty | Bluesky scouting | Bluesky App Password (not your login password). How to get → |
SCOUT_ENV_FILE | Empty | Optional Docker env-file override | Docker env-file override for embedding repositories. |
SCOUT_INIT_DEMO | Empty | Optional local demo seed | Seeds demo data when set to 1. |
SCOUT_AI_BRIDGE_MODE | Empty | Optional local host CLI bridge | Set to local to enable local bridge config-file discovery for desktop, Docker development, or self-hosted host-bridge reuse. Leave empty for production if you do not want bridge discovery. |
SCOUT_AI_BRIDGE_URL | Empty | Optional local host CLI bridge | Explicit local bridge URL, usually generated by pnpm run docker:dev as http://host.docker.internal:4761, but also usable by a self-hoster who runs the bridge on the same machine. |
SCOUT_AI_BRIDGE_TOKEN_FILE | Empty | Optional local host CLI bridge | Token file readable by the API process, usually /run/secrets/scout-ai-bridge-token in Docker dev or another local path when self-hosting with a host bridge. |
SCOUT_AI_BRIDGE_HOST_TOKEN_FILE | Empty | Optional Docker dev bridge mount | Host token path used only by Docker dev Compose for the read-only token bind mount. |
SCOUT_AI_BRIDGE_DISABLE | Empty | Optional local host CLI bridge opt-out | Set to 1 to disable bridge discovery, health checks, and generation calls for this runtime. |
THREADLENS_RUNTIME_MODE | self-hosted | Optional runtime mode selection | Selects self-hosted or hosted. |
SCOUT_ONBOARDING_MODE | Empty | Optional Docker onboarding persistence | Set to docker in container environments so the onboarding wizard persists completed configuration to /data/.env. Leave unset for non-containerised installs. |
SCOUT_ONBOARDING_ENV_FILE | /data/.env when onboarding Docker mode is active | Optional Docker onboarding persistence override | Writable env-file path used by the backend onboarding service when SCOUT_ONBOARDING_MODE=docker. |
SCOUT_ONBOARDING_DISABLE | Empty | Optional onboarding skip | Set to 1 to skip the onboarding wizard entirely. Useful for automated or pre-configured deployments where all required env vars are already supplied. |
SCOUT_TELEMETRY_OPT_IN | Empty | Optional anonymous telemetry | Set to 1 to enable anonymous usage telemetry. Telemetry is off by default and requires a separate UI consent choice. See Telemetry for details. |
First-run importance
Section titled “First-run importance”- Configure at least one AI provider path, such as
ANTHROPIC_API_KEY, before expecting useful scoring, analysis, or reports. - Add
PARALLEL_API_KEYonly when you plan to scout Google Search through the configured search provider. - Add both
BLUESKY_HANDLEandBLUESKY_APP_PASSWORDbefore relying on Bluesky scouting. - Leave optional runtime overrides unchanged for the first Docker walkthrough unless you already know you need a custom port, database path, frontend dist path, env file, demo seed, or runtime mode.
Use obviously fake values in docs, examples, and bug reports. Do not commit real provider keys, private URLs, hosted credentials, billing tokens, or customer data.
For step-by-step instructions on obtaining each credential, see Credential Setup. For guided setup, see Configuration Basics. For Docker command behavior, see Docker Commands and Profiles. For advanced host bridge usage, see Local AI Bridge. For support resets, POST /api/onboarding/reset resets onboarding progress without deleting env values, projects, queries, posts, reports, or the database.