Configuration Methods
Zipline supports two primary configuration methods:- Environment Variables - Used for core system settings, datasource configuration, and initial setup
- Database Settings - Used for runtime configuration that can be modified through the web interface
Environment Variables
Environment variables are loaded when Zipline starts and control fundamental aspects of the system. These include:- Server settings (port, hostname)
- Database connection
- Datasource configuration (local or S3)
- Security settings (secret key, trust proxy)
Database Settings
Many configuration options are stored in the database in theZipline model. These settings can be modified through:
- The web interface (Admin panel)
- Direct database updates
- Environment variables (which override database values)
Configuration Priority
When a setting can be configured both via environment variable and database:- Environment variables take highest priority
- Database values are used if no environment variable is set
- Default values are used if neither is configured
Required Configuration
At minimum, Zipline requires:A secure secret key for session encryption and security. Must be at least 32 characters long.
PostgreSQL connection string for the database.
Without
CORE_SECRET, Zipline will refuse to start. This is a critical security requirement.Configuration Files
Zipline looks for environment variables in the following locations:.envfile in the working directory- System environment variables
- Docker/container environment
Docker Compose Example
Using Secret Files
Zipline supports reading sensitive values from files by appending_FILE to any environment variable name. This is useful for Docker secrets:
_FILE variant is set, Zipline will read the file contents and use that as the value.
Configuration Validation
Zipline validates all configuration on startup using Zod schemas. If configuration is invalid:- Clear error messages indicate what’s wrong
- The server will refuse to start
- Check logs for detailed validation errors
CORE_SECRETtoo short (must be ≥32 characters)- Invalid URL formats
- Missing required S3 credentials when
DATASOURCE_TYPE=s3 - Invalid interval values (must be ≤2147483647ms)
Configuration Categories
Zipline configuration is organized into logical groups:Core Settings
Server, database, and fundamental system configuration
Datasource
File storage backend configuration (local or S3)
Authentication
OAuth providers, MFA, and authentication options
Security
Rate limiting, proxy settings, and security features
Customization
Website branding, themes, and user-facing options
Next Steps
Environment Variables Reference
Complete reference of all environment variables