Skip to main content
This page documents all environment variables supported by Zipline, organized by category.

Core Settings

Fundamental server and database configuration.
number
default:"3000"
Port number for the HTTP server.
string
default:"0.0.0.0"
Hostname or IP address to bind the server to.
string
required
Secret key for session encryption and security. Must be at least 32 characters long.
Never use the default value changethis. Generate a secure random string:
boolean
default:"false"
Enable trust for proxy headers (X-Forwarded-For, X-Forwarded-Proto). Required when behind a reverse proxy.
boolean
default:"false"
Return HTTPS URLs instead of HTTP when generating file links.
string
default:"null"
Default domain to use for generating URLs. If not set, uses the request hostname.
string
default:"/tmp/zipline"
Directory for temporary files during processing.

Database Configuration

string
required
PostgreSQL connection string. Required unless using individual database variables.
You can use either DATABASE_URL or the individual database variables below. If both are provided, DATABASE_URL takes precedence.
string
Database username (alternative to DATABASE_URL).
string
Database password (alternative to DATABASE_URL).
string
Database host (alternative to DATABASE_URL).
number
Database port (alternative to DATABASE_URL).
string
Database name (alternative to DATABASE_URL).
When using individual database variables, ALL five must be provided (username, password, host, port, name).

Datasource Configuration

string
default:"local"
Storage backend type. Options: local, s3.

Local Datasource

string
default:"./uploads"
Directory path for storing uploaded files when using local datasource.

S3 Datasource

string
AWS access key ID or S3-compatible access key.
string
AWS secret access key or S3-compatible secret key.
string
AWS region for S3 bucket.
string
S3 bucket name for file storage.
string
default:"null"
Custom S3 endpoint for S3-compatible services (MinIO, DigitalOcean Spaces, etc.).
boolean
default:"false"
Use path-style URLs instead of virtual-hosted-style. Required for some S3-compatible services.
string
default:"null"
Subdirectory within the bucket to store files.
When DATASOURCE_TYPE=s3, all required S3 credentials must be provided (access key, secret key, region, bucket).

Chunked Uploads

boolean
default:"true"
Enable chunked/multipart uploads for large files.
string
default:"95mb"
Maximum size for chunked uploads.
string
default:"25mb"
Size of each chunk in multipart uploads.

Background Tasks

Interval settings for background maintenance tasks.
All interval values use the ms format: 30s, 5m, 1h, 1d, etc. Maximum value is 2147483647ms (~24.8 days).
string
default:"30m"
Interval for checking and deleting expired files.
string
default:"30m"
Interval for clearing expired invites.
string
default:"30m"
Interval for checking files that have reached maximum view count.
string
default:"30m"
Interval for generating thumbnails for new uploads.
string
default:"30m"
Interval for collecting and aggregating metrics.
string
default:"1d"
Interval for cleaning up orphaned thumbnails.

File Upload Settings

string
default:"/u"
URL route prefix for uploaded files.
number
default:"6"
Length of randomly generated file names.
string
default:"random"
Default naming format for uploaded files. Options: random, date, uuid, name, gfycat, random-words.
string[]
default:"[]"
Comma-separated list of file extensions to block.
string
default:"100mb"
Maximum file size for uploads.
string
default:"null"
Default expiration time for uploaded files.
string
default:"null"
Maximum allowed expiration time users can set.
boolean
default:"false"
Assume MIME types from file extensions instead of detecting.
string
default:"YYYY-MM-DD_HH:mm:ss"
Date format for date naming format.
boolean
default:"false"
Automatically strip GPS metadata from uploaded images.
number
default:"2"
Number of adjectives in random-words naming format.
string
default:"-"
Separator character for random-words naming format.
string
default:"jpg"
Default image format for compression. Options: jpg, png, webp.

URL Shortener Settings

string
default:"/go"
URL route prefix for shortened URLs.
number
default:"6"
Length of randomly generated short URL codes.

Feature Toggles

boolean
default:"true"
Enable image compression features.
boolean
default:"true"
Serve a robots.txt file.
boolean
default:"true"
Enable the /api/healthcheck endpoint.
boolean
default:"false"
Allow new user registration.
boolean
default:"false"
Allow registration via OAuth providers.
boolean
default:"true"
Automatically delete files when they reach maximum view count.
boolean
default:"true"
Check for new Zipline versions.
string
default:"https://zipline-version.diced.sh"
API endpoint for version checking.

Thumbnail Settings

boolean
default:"true"
Enable automatic thumbnail generation.
number
default:"4"
Number of worker threads for thumbnail generation.
string
default:"jpg"
Output format for thumbnails. Options: jpg, png, webp.

Metrics Settings

boolean
default:"true"
Enable metrics collection and analytics.
boolean
default:"false"
Restrict metrics viewing to administrators only.
boolean
default:"true"
Show user-specific metrics to individual users.

Domain Configuration

string[]
default:"[]"
Comma-separated list of additional domains for multi-domain support.

Invite System

boolean
default:"true"
Enable the invite system for user registration.
number
default:"6"
Length of generated invite codes.

Next Steps

Datasource Configuration

Detailed S3 and local storage setup

Authentication

OAuth providers and MFA configuration