Skip to content

Environment Variables

Complete reference of all environment variables supported by SkySend.

Server

VariableRequiredDefaultDescription
PORT3000Server port (1-65535).
HOST0.0.0.0Server bind address.
BASE_URL-Public URL of the instance (used for CORS and generated links).
DATA_DIR./dataDirectory for the database (DATA_DIR/db/skysend.db).
UPLOADS_DIR{DATA_DIR}/uploadsDirectory for encrypted upload files. In Docker, defaults to /uploads.
TRUST_PROXYfalseTrust X-Forwarded-For and X-Real-IP headers. Enable when behind a reverse proxy.
CORS_ORIGINS(empty)Additional CORS origins, comma-separated.

Upload Limits

VariableRequiredDefaultDescription
MAX_FILE_SIZE2GBMaximum upload size. Supports units: B, KB, MB, GB.
MAX_FILES_PER_UPLOAD32Maximum number of files per multi-file upload.

Expiry Options

VariableRequiredDefaultDescription
EXPIRE_OPTIONS_SEC300,3600,86400,604800Comma-separated list of selectable expiry times in seconds.
DEFAULT_EXPIRE_SEC86400Default expiry time (must be one of EXPIRE_OPTIONS_SEC).

The default options translate to:

  • 5 minutes (300)
  • 1 hour (3600)
  • 1 day (86400) - default
  • 7 days (604800)

Download Limits

VariableRequiredDefaultDescription
DOWNLOAD_OPTIONS1,2,3,4,5,10,20,50,100Comma-separated list of selectable download limits.
DEFAULT_DOWNLOAD1Default download limit (must be one of DOWNLOAD_OPTIONS).

Cleanup

VariableRequiredDefaultDescription
CLEANUP_INTERVAL60Interval for the automatic cleanup job in seconds.

Rate Limiting

VariableRequiredDefaultDescription
RATE_LIMIT_WINDOW60000Rate limit window in milliseconds.
RATE_LIMIT_MAX60Maximum requests per window per IP.

Upload Quota

VariableRequiredDefaultDescription
UPLOAD_QUOTA_BYTES0 (unlimited)Maximum upload volume per user per window. 0 disables the quota. Supports units: B, KB, MB, GB.
UPLOAD_QUOTA_WINDOW86400Quota time window in seconds (default: 24 hours).

Privacy-Preserving Quotas

Upload quotas use HMAC-SHA256 hashed IPs with a daily rotating key. No plaintext IP addresses are stored. The hash key rotates every 24 hours, making it impossible to correlate users across days.

Branding

VariableRequiredDefaultDescription
CUSTOM_TITLESkySendDisplayed site title in the UI.
CUSTOM_COLOR(none)Primary brand color as 6-digit hex code (e.g. 46c89d). The # prefix is optional.
CUSTOM_LOGO(none)URL or absolute path to a custom logo (e.g. https://example.com/logo.svg or /custom-logo.svg).
CUSTOM_PRIVACY(none)URL to your privacy policy page. Shown as a link in the footer if set.
CUSTOM_LEGAL(none)URL to your legal notice / impressum page. Shown as a link in the footer if set.
CUSTOM_LINK_URL(none)URL for a custom footer link. Must be used together with CUSTOM_LINK_NAME.
CUSTOM_LINK_NAME(none)Display text for the custom footer link (max 50 characters).

Example

yaml
# docker-compose.yml
environment:
  CUSTOM_TITLE: MyShare
  CUSTOM_COLOR: ff6b35
  CUSTOM_LOGO: "https://example.com/my-logo.svg"
  CUSTOM_PRIVACY: "https://example.com/privacy"
  CUSTOM_LEGAL: "https://example.com/impressum"
  CUSTOM_LINK_URL: "https://example.com"
  CUSTOM_LINK_NAME: "My Website"

TIP

The # prefix is optional for CUSTOM_COLOR. Both ff6b35 and #ff6b35 are valid. Omitting the # avoids quoting issues in .env files.

Docker

VariableRequiredDefaultDescription
PUID1001User ID the container runs as.
PGID1001Group ID the container runs as.
SKIP_CHOWNfalseSkip chown of /data and /uploads on startup. Required for NFS mounts or read-only filesystems where chown is not permitted. You must ensure correct permissions yourself.

Validation

SkySend validates all environment variables on startup using Zod:

  • DEFAULT_EXPIRE_SEC must be one of the values in EXPIRE_OPTIONS_SEC
  • DEFAULT_DOWNLOAD must be one of the values in DOWNLOAD_OPTIONS
  • PORT must be between 1 and 65535
  • MAX_FILE_SIZE must be a valid byte size string
  • BASE_URL must be a valid URL (trailing slashes are stripped automatically)
  • CUSTOM_COLOR must be a valid 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

If any variable is invalid, the server will fail to start with a descriptive error message.