Skip to main content

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

VariableDefaultDescription
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 your HF_TOKEN. You can override this with direct Cloudflare or Twilio credentials.
VariableDefaultDescription
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

VariableDefaultDescription
RECORDING_ENABLEDfalseEnable recording as a fallback when no recording parameter is provided via the UI. The UI recording toggle takes precedence.
RECORDING_MAX_LENGTH1hMaximum total recording length (sum of all segments). Supports 1h, 30m, 120s, or plain seconds (e.g. 3600).
RECORDING_STARTUP_CLEANUP_ENABLEDtrueClean 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.
VariableDefaultDescription
DAYDREAM_SCOPE_MODELS_DIR~/.daydream-scope/modelsDirectory for downloaded model weights
DAYDREAM_SCOPE_LOGS_DIR~/.daydream-scope/logsDirectory for application logs
DAYDREAM_SCOPE_PLUGINS_DIR~/.daydream-scope/pluginsDirectory for plugin data and state

Debugging

VariableDefaultDescription
PIPELINE-Force-load a specific pipeline at startup (for testing)
VERBOSE_LOGGING-Enable verbose logging for uvicorn, FastAPI, and aiortc

See Also