Skip to main content
Set environment variables in a .env file at the root of your deployment, or pass them directly to your container or process manager.

Variables reference

VariableDefaultDescription
ENVdevRuntime mode: dev, prod, or test
DEBUGtrueEnable verbose debug output
API_V1_PREFIX/api/v1URL prefix for all API routes
CORS_ORIGINS["*"]Allowed CORS origins
REDIS_URLredis://localhost:6379/0Redis connection URL
REDIS_SOCKET_TIMEOUTRedis socket timeout in seconds
REDIS_SOCKET_CONNECT_TIMEOUTRedis connection timeout in seconds
STORAGE_TYPElocalStorage backend: local or s3
LOCAL_STORAGE_PATH./storagePath for local file storage
MAX_FILE_SIZE_MB1000Maximum upload size in MB
PROCESSING_TIMEOUT_SECONDS3600Maximum job duration before timeout
MAX_CONCURRENT_JOBS5Maximum jobs processed simultaneously
LOG_LEVELINFOLog verbosity: DEBUG, INFO, WARNING, ERROR

Variable details

ENV

Controls the runtime mode. In dev mode, detailed error messages are returned in API responses. In prod mode, errors are sanitized before they reach the client.
Set ENV=prod and DEBUG=false before exposing the API to the internet. Debug mode logs sensitive request data and exposes internal stack traces.

CORS_ORIGINS

A JSON array of allowed origins. In development the default ["*"] is permissive, but in production you should restrict this to your application’s domain.
CORS_ORIGINS=["https://app.example.com","https://admin.example.com"]

REDIS_URL

Clipzy uses Redis as the job queue and result store. The URL must point to a reachable Redis instance.
# Local Redis
REDIS_URL=redis://localhost:6379/0

# Redis with authentication
REDIS_URL=redis://:yourpassword@redis.internal:6379/0

# Redis Cluster via Sentinel
REDIS_URL=redis://sentinel-host:26379/0
Set REDIS_SOCKET_TIMEOUT and REDIS_SOCKET_CONNECT_TIMEOUT when your Redis instance is on a remote host or subject to network latency. Values are in seconds.
REDIS_SOCKET_TIMEOUT=10
REDIS_SOCKET_CONNECT_TIMEOUT=5

MAX_FILE_SIZE_MB

Requests that exceed this limit are rejected before processing begins. Increase this value if you need to process long-form video files.
Very large uploads also require adjusting your reverse proxy or load balancer’s client body size limit (e.g. client_max_body_size in nginx).

PROCESSING_TIMEOUT_SECONDS

If a job runs longer than this threshold, it is marked as failed with a JOB_TIMEOUT error. The default of 3600 seconds (1 hour) is sufficient for most videos. Reduce this value if you want faster failure detection for hung jobs.

MAX_CONCURRENT_JOBS

Limits how many jobs each worker processes at the same time. Set this based on available CPU or GPU resources. Running too many concurrent jobs on an underpowered machine increases total processing time for each job.

LOG_LEVEL

Set to DEBUG when diagnosing issues. Switch to WARNING or ERROR in production to reduce log volume.

Example configurations

ENV=dev
DEBUG=true
API_V1_PREFIX=/api/v1
CORS_ORIGINS=["*"]

REDIS_URL=redis://localhost:6379/0

STORAGE_TYPE=local
LOCAL_STORAGE_PATH=./storage

MAX_FILE_SIZE_MB=500
PROCESSING_TIMEOUT_SECONDS=3600
MAX_CONCURRENT_JOBS=2

LOG_LEVEL=DEBUG
Use a secrets manager (AWS Secrets Manager, HashiCorp Vault, etc.) to inject credentials like REDIS_URL at runtime rather than storing them in a .env file on disk.