Scope Environment Variables
Scope reads the following environment variables at startup. Set them in your shell,.env file, or cloud provider’s configuration panel. The HF_TOKEN can also be set directly in the Scope UI via Settings > API Keys - see HuggingFace Auth for details.
Authentication
| Variable | Default | Description |
|---|---|---|
HF_TOKEN | - | HuggingFace access token for downloading gated models and obtaining Cloudflare TURN credentials for WebRTC. Can also be set via Settings > API Keys in the Scope UI. See HuggingFace Auth for setup instructions. |
TURN Server Credentials
Scope uses TURN servers for WebRTC connections behind firewalls. By default, it obtains credentials from Cloudflare using yourHF_TOKEN. You can override this with direct Cloudflare or Twilio credentials.
| Variable | Default | Description |
|---|---|---|
CLOUDFLARE_TURN_KEY_ID | - | Cloudflare TURN key ID for direct TURN configuration (alternative to HF_TOKEN) |
CLOUDFLARE_TURN_KEY_API_TOKEN | - | Cloudflare TURN key API token for direct TURN configuration (alternative to HF_TOKEN) |
TWILIO_ACCOUNT_SID | - | Twilio account SID for TURN server credentials |
TWILIO_AUTH_TOKEN | - | Twilio auth token for TURN server credentials |
Recording
| Variable | Default | Description |
|---|---|---|
RECORDING_ENABLED | false | Enable recording as a fallback when no recording parameter is provided via the UI. The UI recording toggle takes precedence. |
RECORDING_MAX_LENGTH | 1h | Maximum total recording length (sum of all segments). Supports 1h, 30m, 120s, or plain seconds (e.g. 3600). |
RECORDING_STARTUP_CLEANUP_ENABLED | true | Clean up recording files from previous sessions at startup. |
Directory Overrides
By default, Scope stores data in~/.daydream-scope/. Use these variables to override specific directories.
| Variable | Default | Description |
|---|---|---|
DAYDREAM_SCOPE_MODELS_DIR | ~/.daydream-scope/models | Directory for downloaded model weights |
DAYDREAM_SCOPE_LOGS_DIR | ~/.daydream-scope/logs | Directory for application logs |
DAYDREAM_SCOPE_PLUGINS_DIR | ~/.daydream-scope/plugins | Directory for plugin data and state |
Debugging
| Variable | Default | Description |
|---|---|---|
PIPELINE | - | Force-load a specific pipeline at startup (for testing) |
VERBOSE_LOGGING | - | Enable verbose logging for uvicorn, FastAPI, and aiortc |