Skip to content

Environment Variables

Complete reference for all Blacklake environment variables.

S3/Object Storage

Variable Default Description
S3_ENDPOINT - S3 endpoint URL
S3_BUCKET - S3 bucket name
S3_REGION us-east-1 AWS region
S3_ACCESS_KEY - Access key
S3_SECRET_KEY - Secret key
S3_USE_SSL true Use HTTPS
S3_SIGNATURE_VERSION s3v4 Signature version

Database

Variable Default Description
DATABASE_URL - PostgreSQL connection string
DB_POOL_SIZE 10 Connection pool size
DB_MAX_OVERFLOW 20 Max overflow connections
DB_POOL_TIMEOUT 30 Pool timeout (seconds)
DB_POOL_RECYCLE 3600 Pool recycle time (seconds)

Solr

Variable Default Description
SOLR_URL - Solr base URL
SOLR_TIMEOUT 30 Request timeout (seconds)
SOLR_MAX_RETRIES 3 Max retry attempts
SOLR_BATCH_SIZE 100 Batch size for indexing

Server

Variable Default Description
BLACKLAKE_HOST 0.0.0.0 Server host
BLACKLAKE_PORT 8000 Server port
BLACKLAKE_WORKERS 4 Number of workers
BLACKLAKE_LOG_LEVEL INFO Log level
BLACKLAKE_LOG_FORMAT json Log format

Metadata

Variable Default Description
BLACKLAKE_VALIDATION true Enable SHACL validation
BLACKLAKE_SHACL_SHAPES true Use SHACL shapes
BLACKLAKE_EXPORT_FORMATS jsonld,ttl Export formats

Authentication

Variable Default Description
JWT_SECRET - JWT secret key
JWT_ALGORITHM HS256 JWT algorithm
JWT_EXPIRY 3600 Token expiry (seconds)
API_KEY - API key for authentication

Security

Variable Default Description
CORS_ORIGINS * CORS allowed origins
RATE_LIMIT 100 Rate limit (requests/minute)
ENABLE_SSL false Enable SSL/TLS
SSL_CERT - SSL certificate file
SSL_KEY - SSL private key file

Development

Variable Default Description
BLACKLAKE_ENV production Environment name
DEBUG false Enable debug mode
RELOAD false Enable auto-reload
TESTING false Testing mode

Example .env File

# S3 Configuration
S3_ENDPOINT=https://s3.amazonaws.com
S3_BUCKET=blacklake-data
S3_REGION=us-west-2
S3_ACCESS_KEY=your-access-key
S3_SECRET_KEY=your-secret-key

# Database Configuration
DATABASE_URL=postgresql://blacklake:blacklake@localhost:5432/blacklake

# Solr Configuration
SOLR_URL=http://localhost:8983/solr/blacklake

# Server Configuration
BLACKLAKE_HOST=0.0.0.0
BLACKLAKE_PORT=8000
BLACKLAKE_WORKERS=4

# Authentication
JWT_SECRET=your-jwt-secret
API_KEY=your-api-key

# Security
CORS_ORIGINS=https://app.company.com
RATE_LIMIT=1000
ENABLE_SSL=true

Next Steps