src/server/constants.js.
Core Variables
Ports, sessions, IP restrictions, and proxy trust settings.
Execution
Host-aware concurrency, queueing, and execution timeouts.
Rate Limiting
Login and data request rate limits.
VNC / Headful
noVNC port for headful browser debugging.
Feature Flags
Session cookie security and other toggles.
Browser Engine
CloakBrowser stealth engine configuration.
CAPTCHA Solving
Remote provider, local model, and Apple companion settings.
PostgreSQL
Postgres connection and SSL options.
Core Variables
Execution
Host-aware resource protection
Starting in v0.19, Figranium protects the host from running too many Chromium processes at once. It reads available memory (including Docker cgroup limits) and CPU count, then picks a conservative concurrency limit automatically:
Executions beyond the limit wait in a first-in, first-out queue. When free memory drops below the reserve or CPU load reaches
RESOURCE_CPU_THRESHOLD, the queue pauses until pressure eases. If the queue is full or an execution waits longer than EXECUTION_QUEUE_TIMEOUT_MS, the request returns 503 with RESOURCE_CAPACITY_EXCEEDED and a Retry-After header. On shutdown, queued executions are released cleanly.
Set MAX_CONCURRENT_EXECUTIONS to a positive integer to replace the automatic limit. You can check the current limit, pressure, and queue length from GET /api/health. For an in-depth explanation and tuning examples, see Resource Protection.
Rate Limiting
VNC / Headful Debugging
Feature Flags
By default, Figranium caches 1Password Login-item metadata and password lookups on the server to reduce repeated requests. The persistent cache is encrypted with AES-256-GCM. If
PASSWORD_CACHE_KEY is unset, Figranium creates or reuses a random key in data/password_cache.key; the cache file and key are stored together in data/ by default. For more control, set PASSWORD_CACHE_KEY to a secret managed separately from that directory.
Secret encryption is opt-in for new file-backed credentials. Configure MASTER_KEY to enable authenticated envelope encryption, and use MASTER_KEY_FILE when you need to control the local key-file path. Without an explicitly configured master key, new file-backed secret writes use plaintext JSON. Existing encrypted files remain accessible with their original key and migrate to plaintext only after successful decryption when encryption is disabled. Figranium refuses to overwrite encrypted data when its original key is unavailable.
Set PASSWORD_CACHE_ENABLED=false in your environment or Docker Compose environment section to bypass the cache and retrieve values directly from 1Password. Password management can continue if the optional encrypted local cache cannot be written. See Passwords for file protection and cache expiry details.
Browser Engine
CAPTCHA Solving
Database (PostgreSQL)
Figranium also accepts the shorter
DB_PROTOCOL, DB_HOST, DB_PORT, DB_USERNAME, DB_PASSWORD, DB_DATABASE, and DB_SSL names, plus their lowercase forms (for example, db_host). PostgreSQL connection details can only be set with environment variables, not from the Settings page. See Alternative variable names.
Example .env File
Notes
- Allow Private Networks: By default,
ALLOW_PRIVATE_NETWORKSisfalse, meaning Figranium blocks requests to private and internal network addresses. If you need to scrape services on your local network (e.g., during development), set this totrue. - Session Secret: If
SESSION_SECRETis not provided, Figranium will generate a random one on startup (or read fromdata/session_secret.txtif available). However, for consistent sessions across restarts, set a static secret. - Allowed IPs: If you expose Figranium to the internet, always restrict access using
ALLOWED_IPSor authentication.