Configuration

Updated

None. Crowsnest runs with no settings, and every API key is optional. Put keys in a file named .env in the Crowsnest folder, or hand a file to crowsnest start with --env-file. Without keys, Crowsnest uses cached data and fixed rules.

Crowsnest needs no settings to run. Every API key is optional. Put keys in a file named .env in the Crowsnest folder, or hand a file to crowsnest start with --env-file. Without keys, Crowsnest uses cached data.

Which API keys can I add?

All of these are optional.

KeyWhat it addsWhat is sent when you set it
ANTHROPIC_API_KEYAI-assisted analysis and explanations. Without it, Crowsnest uses fixed rules. Other providers work too: see Choose your AI model.Details of your scan go to your chosen model provider (Anthropic's API by default): the project folder path, the kind of project, the time of the last scan, any recent campaign names and your GitHub organisation name. For each check that finds something, up to 20 matching results (package names, versions and related details) are sent too.
GITHUB_TOKENRepository details from GitHub, with higher rate limits.Repository and maintainer lookups go to GitHub.
GITHUB_ORGYour GitHub organisation name, for repository lookups.The organisation name goes to GitHub.
SOCKET_API_KEYLive threat alerts from Socket.Package names (up to 50 npm packages per scan) go to Socket.
NPM_TOKENSigned-in requests to the npm registry.Sent to the npm registry with package lookups.

Without any key, a scan still sends package names to public services: the registries your packages come from (npm, PyPI, crates.io, Packagist, RubyGems and the Go module proxy; up to 500 packages per kind per scan), and the OSV malicious-package list, which is asked about every package name and exact version in your lockfiles. Crowsnest sends no usage data to its authors.

Which Slack keys do I need?

Only if you run the bot: SLACK_BOT_TOKEN, SLACK_APP_TOKEN, CROWSNEST_ALERT_CHANNEL (default #security) and CROWSNEST_DASHBOARD_URL (default http://localhost:3000). See the Slack bot page.

Which addresses and files can I set?

SettingDefaultUsed by
CROWSNEST_API_URLhttp://localhost:8000Terminal command, Slack bot
NEXT_PUBLIC_API_URLhttp://localhost:8000Dashboard. Fixed when the dashboard is built, so the Docker setup uses the default
CROWSNEST_API_HOST127.0.0.1Crowsnest, when started by its own entry point. The Docker image listens on all addresses inside the container, and Docker publishes it on this machine only
CROWSNEST_API_PORT8000Crowsnest, when started by its own entry point
CROWSNEST_PROJECTSnoneDocker Compose. The folder on your machine that holds your projects, shared read only so the scan dialog can list them. Put it in .env
CROWSNEST_IMAGEghcr.io/devampatel03/crowsnest-apiDocker Compose and crowsnest start. The backend image to run, if you want another
CROWSNEST_CORS_ORIGINShttp://localhost:3000,http://127.0.0.1:3000Crowsnest. The dashboard addresses the browser may call it from. Add yours if you move the dashboard off port 3000
CROWSNEST_CONSOLEoff, except in the Docker Compose fileDashboard. on lets it answer requests that do not look local, needed behind Docker Desktop
CROWSNEST_DB_PATH./crowsnest.duckdbWhere Crowsnest keeps its data file (Docker: /data/crowsnest.duckdb)
CROWSNEST_SNAPSHOT_DIR./snapshotsWhere saved snapshots go (Docker: /data/snapshots)
CROWSNEST_MIN_RELEASE_AGE_DAYS2Crowsnest. Days a package version must have been public before crowsnest install and crowsnest check allow it. 0 turns it off
CROWSNEST_LIVE_LOOKUPStrueCrowsnest. Set to false to stop install and pull request checks from calling registries and the malicious-package list, for offline use
crowsnest.apiUrl, crowsnest.enabled, crowsnest.riskThresholdSee the VS Code pageThe VS Code extension

How do I save settings in the terminal command?

bash
crowsnest config set apiUrl http://localhost:8000
crowsnest config get

A value saved this way beats the matching environment variable. config get shows secrets as ***set*** or (not set).

Only apiUrl changes anything today. config set also accepts githubToken, npmToken, socketApiKey and anthropicApiKey, but the terminal command does not pass them to Crowsnest, so saving one has no effect. To give a backend started with crowsnest start a key, put it in a file and run crowsnest start --env-file <file>. With Docker Compose, put it in .env.

What happens when a key is missing?

Nothing breaks. Crowsnest falls back to cached data and fixed rules, so you see fewer live details and no error. Do not treat a quiet scan with no keys as a clean bill of health. It reflects only what Crowsnest could see.

What this does not do

  • It does not let you change the 0.6 install stop.
  • It does not store keys securely. .env is a plain text file, and the terminal command keeps saved values in a local file. Keep both out of version control.
  • It does not check your keys when it starts. A wrong key shows up as missing live details.
  • It does not validate other settings. A mistyped address shows up as Offline or "unreachable" messages.

If something does not behave, see Troubleshooting. To set up the pieces that use these keys, see Installation and CLI usage.

Nib's tip: start with no keys.