Skip to content

Environment Variables Reference

Complete reference of all environment variables, their types, defaults, and validation rules.

Overview

All environment variables are validated on startup using Zod. Invalid values cause the server to fail with a descriptive error message. None of the variables are strictly required - all have sensible defaults for local development. For Docker deployments, DATA_DIR and UPLOADS_DIR are set automatically in the image.

v2.0.0 Breaking Change

All file-related variables have been renamed with a FILE_ prefix (e.g. MAX_FILE_SIZE -> FILE_MAX_SIZE). Old names are no longer supported. See the migration table below.

Migration from v1.x

Old Name (v1)New Name (v2)
MAX_FILE_SIZEFILE_MAX_SIZE
MAX_FILES_PER_UPLOADFILE_MAX_FILES_PER_UPLOAD
EXPIRE_OPTIONS_SECFILE_EXPIRE_OPTIONS_SEC
DEFAULT_EXPIRE_SECFILE_DEFAULT_EXPIRE_SEC
DOWNLOAD_OPTIONSFILE_DOWNLOAD_OPTIONS
DEFAULT_DOWNLOADFILE_DEFAULT_DOWNLOAD
UPLOAD_QUOTA_BYTESFILE_UPLOAD_QUOTA_BYTES
UPLOAD_QUOTA_WINDOWFILE_UPLOAD_QUOTA_WINDOW

Variables

PORT

PropertyValue
RequiredNo
TypeInteger
Default3000
Range1 - 65535
DescriptionServer listening port

HOST

PropertyValue
RequiredNo
TypeString
Default0.0.0.0
DescriptionServer bind address

BASE_URL

PropertyValue
RequiredYes
TypeURL
Default-
DescriptionPublic URL of the instance. Trailing slashes are stripped automatically.

DATA_DIR

PropertyValue
RequiredNo
TypeString (path)
Default./data
DescriptionDirectory for the database. The SQLite DB is stored at DATA_DIR/db/skysend.db.

UPLOADS_DIR

PropertyValue
RequiredNo
TypeString (path)
DefaultDATA_DIR/uploads
DescriptionDirectory for encrypted upload files. Falls back to DATA_DIR/uploads if not set. In Docker, defaults to /uploads for separate volume mounting.

FILE_MAX_SIZE

PropertyValue
RequiredNo
TypeByte size string
Default2GB
DescriptionMaximum upload size. Supports: B, KB, MB, GB

FILE_MAX_FILES_PER_UPLOAD

PropertyValue
RequiredNo
TypeInteger
Default32
Range>= 1
DescriptionMaximum files per multi-file upload

FILE_EXPIRE_OPTIONS_SEC

PropertyValue
RequiredNo
TypeComma-separated integers
Default300,3600,86400,604800
DescriptionSelectable expiry times in seconds for file uploads

FILE_DEFAULT_EXPIRE_SEC

PropertyValue
RequiredNo
TypeInteger
Default86400
ValidationMust be one of FILE_EXPIRE_OPTIONS_SEC
DescriptionDefault expiry time for file uploads

FILE_DOWNLOAD_OPTIONS

PropertyValue
RequiredNo
TypeComma-separated integers
Default1,2,3,4,5,10,20,50,100
DescriptionSelectable download limits for file uploads

FILE_DEFAULT_DOWNLOAD

PropertyValue
RequiredNo
TypeInteger
Default1
ValidationMust be one of FILE_DOWNLOAD_OPTIONS
DescriptionDefault download limit for file uploads

FILE_UPLOAD_QUOTA_BYTES

PropertyValue
RequiredNo
TypeInteger (bytes) or byte size string
Default0 (disabled)
DescriptionMaximum upload volume per user per window. 0 disables quotas. Supports raw bytes or units: B, KB, MB, GB

FILE_UPLOAD_QUOTA_WINDOW

PropertyValue
RequiredNo
TypeInteger (seconds)
Default86400
DescriptionQuota time window for file upload quotas

FILE_UPLOAD_CONCURRENT_CHUNKS

PropertyValue
RequiredNo
TypeInteger
Default3
Range1 - 20
DescriptionNumber of parallel chunk uploads per session. Increase to improve upload speed in Chromium browsers through HTTP/2 reverse proxies. The value is exposed via /api/config and read by the client upload worker

FILE_UPLOAD_SPEED_LIMIT

PropertyValue
RequiredNo
TypeInteger (bytes/s) or byte size string
Default0 (unlimited)
DescriptionMaximum upload throughput per session. 0 disables the limit. Supports raw bytes or units: B, KB, MB, GB (e.g. 100MB for 100 MB/s). The server delays chunk responses to enforce the limit

FILE_UPLOAD_WS

PropertyValue
RequiredNo
TypeBoolean
Defaulttrue
DescriptionEnable the WebSocket upload transport at /api/upload/ws. Clients prefer WebSocket and fall back to HTTP chunked uploads automatically if the handshake fails. Set to false to disable the endpoint entirely

FILE_UPLOAD_WS_MAX_BUFFER

PropertyValue
RequiredNo
TypeByte size string
Default16MB
Minimum1MB
DescriptionMaximum bytes the server buffers in memory per WebSocket upload session before aborting it with close code 1009. Only relevant when the storage backend falls behind the incoming frame rate

NOTE_MAX_SIZE

PropertyValue
RequiredNo
TypeByte size string
Default1MB
DescriptionMaximum plaintext note size before encryption. Supports: B, KB, MB, GB

NOTE_EXPIRE_OPTIONS_SEC

PropertyValue
RequiredNo
TypeComma-separated integers
Default300,3600,86400,604800
DescriptionSelectable expiry times in seconds for notes

NOTE_DEFAULT_EXPIRE_SEC

PropertyValue
RequiredNo
TypeInteger
Default86400
ValidationMust be one of NOTE_EXPIRE_OPTIONS_SEC
DescriptionDefault expiry time for notes

NOTE_VIEW_OPTIONS

PropertyValue
RequiredNo
TypeComma-separated integers
Default0,1,2,3,5,10,20,50,100
DescriptionSelectable view limits for notes. 0 means unlimited views (the note expires only by time).

NOTE_DEFAULT_VIEWS

PropertyValue
RequiredNo
TypeInteger
Default0
ValidationMust be one of NOTE_VIEW_OPTIONS
DescriptionDefault view limit for notes. 0 means unlimited views (expires only by time). 1 means burn-after-reading.

ENABLED_SERVICES

PropertyValue
RequiredNo
TypeComma-separated list
Defaultfile,note
Allowed valuesfile, note
ValidationAt least one service must be enabled
DescriptionControls which services are available. Set to file for file sharing only, note for notes only, or file,note for both. Disabled services return HTTP 403 and their UI tabs are hidden.

CLEANUP_INTERVAL

PropertyValue
RequiredNo
TypeInteger (seconds)
Default60
DescriptionInterval for the automatic cleanup job

CUSTOM_TITLE

PropertyValue
RequiredNo
TypeString
DefaultSkySend
DescriptionDisplayed site title

RATE_LIMIT_WINDOW

PropertyValue
RequiredNo
TypeInteger (milliseconds)
Default60000
DescriptionRate limit sliding window size

RATE_LIMIT_MAX

PropertyValue
RequiredNo
TypeInteger
Default60
DescriptionMaximum requests per window per IP

TRUST_PROXY

PropertyValue
RequiredNo
TypeBoolean
Defaultfalse
DescriptionTrust X-Forwarded-For / X-Real-IP headers from reverse proxy

CUSTOM_COLOR

PropertyValue
RequiredNo
TypeHex color code
Default- (uses default theme)
ValidationMust match 6 hex digits, e.g. 46c89d (the # prefix is optional)
DescriptionPrimary brand color for the web UI. Overrides the default primary color on buttons, links, icons, and other accented elements.
PropertyValue
RequiredNo
TypeURL or absolute path
Default- (uses built-in SkySend logo)
ValidationMust be a URL (https://...) or an absolute path (/...)
DescriptionURL or path to a custom logo image displayed in the web app header and as favicon. For local files, place them in the public/ directory (e.g. public/custom-logo.svg) and reference as /custom-logo.svg.

CUSTOM_PRIVACY

PropertyValue
RequiredNo
TypeURL
Default- (not shown in footer)
ValidationMust be a valid URL (https://...)
DescriptionURL to your privacy policy page. When set, a "Privacy Policy" link is displayed in the footer.
PropertyValue
RequiredNo
TypeURL
Default- (not shown in footer)
ValidationMust be a valid URL (https://...)
DescriptionURL to your legal notice / impressum page. When set, a "Legal Notice" link is displayed in the footer.
PropertyValue
RequiredNo
TypeURL
Default- (not shown in footer)
ValidationMust be a valid URL (https://...)
DescriptionURL for a custom footer link. Must be used together with CUSTOM_LINK_NAME.
PropertyValue
RequiredNo
TypeString
Default-
ValidationMax 50 characters
DescriptionDisplay text for the custom footer link defined by CUSTOM_LINK_URL. Both variables must be set for the link to appear.

STORAGE_BACKEND

PropertyValue
RequiredNo
TypeEnum
Defaultfilesystem
Allowed valuesfilesystem, s3
DescriptionStorage backend for encrypted upload files. filesystem stores files on the local disk. s3 uses S3-compatible object storage with presigned download URLs.

S3_BUCKET

PropertyValue
RequiredWhen STORAGE_BACKEND=s3
TypeString
Default-
DescriptionS3 bucket name for upload storage

S3_REGION

PropertyValue
RequiredWhen STORAGE_BACKEND=s3
TypeString
Default-
DescriptionS3 region (e.g. eu-central-1, auto for R2)

S3_ENDPOINT

PropertyValue
RequiredNo (required for non-AWS providers)
TypeURL
Default- (uses AWS S3 default)
ValidationMust be a valid URL
DescriptionCustom S3 endpoint for non-AWS providers. Examples: https://<id>.r2.cloudflarestorage.com (R2), https://fsn1.your-objectstorage.com (Hetzner), https://minio.example.com:9000 (MinIO)

S3_ACCESS_KEY

PropertyValue
RequiredWhen STORAGE_BACKEND=s3
TypeString
Default-
DescriptionS3 access key ID

S3_SECRET_KEY

PropertyValue
RequiredWhen STORAGE_BACKEND=s3
TypeString
Default-
DescriptionS3 secret access key

S3_FORCE_PATH_STYLE

PropertyValue
RequiredNo
TypeBoolean
Defaultfalse
DescriptionUse path-style URLs (https://endpoint/bucket/key) instead of virtual-hosted-style (https://bucket.endpoint/key). Required for MinIO, Garage, and some self-hosted S3 providers.

S3_PRESIGNED_EXPIRY

PropertyValue
RequiredNo
TypeInteger (seconds)
Default300
DescriptionTTL for presigned download URLs. S3 validates the signature only at the start of the download - a download that starts within the TTL will complete even if it takes longer.

S3_PART_SIZE

PropertyValue
RequiredNo
TypeByte size (e.g. 25MB, 50MB)
Default25MB
Minimum5MB
Maximum5GB
DescriptionSize of each S3 multipart upload part. Larger values reduce the number of API round-trips but increase memory usage per upload. The S3 protocol requires at least 5MB per part (except the final part). Increase this if you have high bandwidth and want faster uploads.

S3_CONCURRENCY

PropertyValue
RequiredNo
TypeInteger
Default4
Range1-16
DescriptionNumber of S3 multipart upload parts uploaded in parallel. Higher values improve throughput by overlapping network transfers, but increase memory and bandwidth usage. Good starting values: 4 for most setups, 8 for high-bandwidth connections.

PUID

PropertyValue
RequiredNo
TypeInteger
Default1001
Docker onlyYes
DescriptionUser ID the container process runs as. Handled by the entrypoint script.

PGID

PropertyValue
RequiredNo
TypeInteger
Default1001
Docker onlyYes
DescriptionGroup ID the container process runs as. Handled by the entrypoint script.

Validation Rules

  • ENABLED_SERVICES must contain at least one of file or note
  • FILE_DEFAULT_EXPIRE_SEC must be included in FILE_EXPIRE_OPTIONS_SEC (only validated when file service is enabled)
  • FILE_DEFAULT_DOWNLOAD must be included in FILE_DOWNLOAD_OPTIONS (only validated when file service is enabled)
  • NOTE_DEFAULT_EXPIRE_SEC must be included in NOTE_EXPIRE_OPTIONS_SEC (only validated when note service is enabled)
  • NOTE_DEFAULT_VIEWS must be included in NOTE_VIEW_OPTIONS (only validated when note service is enabled)
  • When STORAGE_BACKEND=s3, S3_BUCKET, S3_REGION, S3_ACCESS_KEY, and S3_SECRET_KEY are required
  • S3_ENDPOINT must be a valid URL when set
  • PORT must be between 1 and 65535
  • FILE_MAX_SIZE must be a valid byte size string with a recognized unit
  • NOTE_MAX_SIZE must be a valid byte size string with a recognized unit
  • BASE_URL must be a valid URL
  • CUSTOM_COLOR must be a 6-digit hex color code (with or without # prefix)
  • CUSTOM_LOGO must be a URL or an absolute path starting with /
  • CUSTOM_PRIVACY must be a valid URL
  • CUSTOM_LEGAL must be a valid URL
  • CUSTOM_LINK_URL must be a valid URL
  • CUSTOM_LINK_NAME must be at most 50 characters