Configuration
To enable PostgreSQL, set the following environment variables in your deployment:SSL connections
SetDB_POSTGRESDB_SSL=true when your PostgreSQL server requires encrypted connections — for example, managed Postgres services such as AWS RDS, Google Cloud SQL, Azure Database, Supabase, or Neon. Figranium connects with SSL enabled and rejectUnauthorized: false, which allows self-signed certificates commonly used by managed providers.
What’s stored in PostgreSQL
When PostgreSQL is enabled, the following data is stored in the database instead of on disk:- Tasks and execution logs — task definitions, run history, and metadata.
- API keys — Figranium API key, plus provider keys for Gemini, OpenAI, Claude, and Ollama.
- Credentials — saved credentials used by output providers and action blocks.
- AI model configuration — selected models for each provider.
- Proxy configuration — proxy list, default proxy, rotation mode, and rotation settings.
TEXT type, so longer keys (such as service-account tokens) are stored without truncation.
Migration
When you switch to PostgreSQL:- Automatic setup: Figranium creates the necessary tables on first run, and migrates existing API key columns to
TEXTif you are upgrading from an earlier version. - Data persistence: Task metadata, execution logs, settings, credentials, API keys, AI model selections, and proxy configuration are stored in the database.
- Captures: Visual assets (screenshots and recordings) remain on the local file system or mounted volumes; only their metadata is stored in Postgres.
- Fallback: If the database is unreachable at startup, Figranium falls back to file-based storage and logs the failure.
Benefits
- Concurrency: Better handling of simultaneous task executions and UI interactions.
- Reliability: Reduced risk of data corruption compared to plain JSON files.
- Backups: Leverage standard PostgreSQL backup and recovery tools.
- Centralized configuration: Proxies, credentials, and API keys are shared across instances pointed at the same database.