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.

File

VariableRequiredDefaultDescription
FILE_MAX_SIZE2GBMaximum file upload size. Supports units: B, KB, MB, GB.
FILE_MAX_FILES_PER_UPLOAD32Maximum number of files per multi-file upload.
FILE_EXPIRE_OPTIONS_SEC300,3600,86400,604800Comma-separated list of selectable expiry times in seconds.
FILE_DEFAULT_EXPIRE_SEC86400Default expiry time (must be one of FILE_EXPIRE_OPTIONS_SEC).
FILE_DOWNLOAD_OPTIONS1,2,3,4,5,10,20,50,100Comma-separated list of selectable download limits.
FILE_DEFAULT_DOWNLOAD1Default download limit (must be one of FILE_DOWNLOAD_OPTIONS).
FILE_UPLOAD_QUOTA_BYTES0 (unlimited)Maximum file upload volume per user per window. 0 disables the quota. Supports units: B, KB, MB, GB.
FILE_UPLOAD_QUOTA_WINDOW86400Quota time window in seconds (default: 24 hours).
FILE_UPLOAD_CONCURRENT_CHUNKS3Number of parallel chunk uploads per session (1-20). Increase to improve upload speed in Chromium browsers (Chrome, Edge, Brave) through HTTP/2 reverse proxies.
FILE_UPLOAD_SPEED_LIMIT0 (unlimited)Maximum upload speed per session in bytes per second. 0 disables the limit. Supports units: B, KB, MB, GB (e.g. 100MB for 100 MB/s).
FILE_UPLOAD_WStrueEnable the WebSocket upload transport. Uploads are streamed over a single persistent connection, bypassing HTTP/2 multiplexing bottlenecks in reverse proxies (Traefik, Nginx) and significantly improving upload speed in Chromium browsers. Clients automatically fall back to HTTP chunked uploads when the WebSocket handshake fails. Set to false in environments where WebSockets are blocked or terminated.
FILE_UPLOAD_WS_MAX_BUFFER16MBMaximum bytes the server may buffer per WebSocket upload session before aborting it. Only relevant when the storage backend cannot keep up with the incoming frame rate. Supports units: B, KB, MB, GB. Minimum 1MB.

The default expiry options translate to:

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

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.

Notes

VariableRequiredDefaultDescription
NOTE_MAX_SIZE1MBMaximum note content size. Supports units: B, KB, MB, GB.
NOTE_EXPIRE_OPTIONS_SEC300,3600,86400,604800Comma-separated list of selectable expiry times for notes in seconds.
NOTE_DEFAULT_EXPIRE_SEC86400Default note expiry time (must be one of NOTE_EXPIRE_OPTIONS_SEC).
NOTE_VIEW_OPTIONS1,2,3,5,10,20,50,100Comma-separated list of selectable view limits for notes. Include 0 for an "Unlimited" option.
NOTE_DEFAULT_VIEWS1Default view limit for notes (must be one of NOTE_VIEW_OPTIONS). 1 means burn-after-reading. 0 means unlimited.

Services

VariableRequiredDefaultDescription
ENABLED_SERVICESfile,noteComma-separated list of enabled services. 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

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.

Password Lockout

VariableRequiredDefaultDescription
PASSWORD_MAX_ATTEMPTS10Failed password attempts before a specific IP is locked out from a specific upload or note.
PASSWORD_LOCKOUT_MS900000Lockout duration in milliseconds (default: 15 minutes).

Storage Backend

VariableRequiredDefaultDescription
STORAGE_BACKENDfilesystemStorage backend to use. filesystem stores files locally, s3 uses S3-compatible object storage.
S3_BUCKET⚠️-S3 bucket name. Required when STORAGE_BACKEND=s3.
S3_REGION⚠️-S3 region (e.g. eu-central-1). Required when STORAGE_BACKEND=s3.
S3_ENDPOINT(none)Custom S3 endpoint URL. Required for non-AWS providers (R2, Hetzner, MinIO, etc.). Leave empty for AWS S3.
S3_ACCESS_KEY⚠️-S3 access key ID. Required when STORAGE_BACKEND=s3.
S3_SECRET_KEY⚠️-S3 secret access key. Required when STORAGE_BACKEND=s3.
S3_FORCE_PATH_STYLEfalseUse path-style URLs instead of virtual-hosted-style. Required for MinIO, Garage, and some self-hosted providers.
S3_PRESIGNED_EXPIRY300Presigned download URL expiry in seconds.
S3_PART_SIZE25MBSize of each S3 multipart upload part. Larger values reduce round-trips but use more memory. Minimum is 5MB (S3 requirement).
S3_CONCURRENCY4Number of S3 parts uploaded in parallel. Higher values improve throughput but use more memory and bandwidth. Range: 1-16.

→ See S3 Storage for provider examples and CORS configuration.

Branding & Customization

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).
DEFAULT_THEMEsystemDefault theme for users who have not set a preference. One of dark, light, or system. Users can still override this in the UI.
DEFAULT_TABfileDefault upload tab shown when opening the app. One of file, text, password, code, or sshkey. Falls back to the first available tab if the configured tab is not enabled via ENABLED_SERVICES.
FORCE_FILE_PASSWORDfalseWhen true, all file uploads must be password-protected. The password toggle is hidden and the field is always visible. Enforced on both frontend and server.
FORCE_NOTE_PASSWORDfalseWhen true, all note uploads (text, password, code, SSH key) must be password-protected. Enforced on both frontend and server.

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.

SSO / OIDC Authentication

When OIDC_ISSUER, OIDC_CLIENT_ID, and OIDC_CLIENT_SECRET are all set, OIDC authentication is activated. Downloads are always public - authentication only gates the upload action.

→ See OIDC Authentication for provider setup guides and examples.

VariableRequiredDefaultDescription
OIDC_PROVIDERgenericProvider preset. One of generic, pocketid, authentik, keycloak. Controls which token claims are used for the display name.
OIDC_ISSUER⚠️-Issuer URL of your OIDC provider. Required to activate OIDC. All endpoints are discovered automatically from this URL.
OIDC_CLIENT_ID⚠️-Client ID of the application registered at your provider.
OIDC_CLIENT_SECRET⚠️-Client secret of the application registered at your provider.
OIDC_SESSION_SECRETautoSecret used to sign session JWT cookies. If not set, a random 48-byte secret is generated at startup - sessions will be invalidated on every server restart. Set this to a fixed value (minimum 32 characters, generate with openssl rand -base64 48) to persist sessions across restarts.
OIDC_PROTECT_FILEStrueRequire login to upload files. Set to false to allow anonymous file uploads while OIDC is active.
OIDC_PROTECT_NOTEStrueRequire login to create notes. Set to false to allow anonymous note creation while OIDC is active.
OIDC_REDIRECT_URI{BASE_URL}/auth/callbackOverride the OAuth2 redirect/callback URI. Only needed if SkySend is served under a sub-path or behind a proxy that changes the origin.
OIDC_SCOPESopenid profile emailSpace-separated list of OIDC scopes to request.
OIDC_SESSION_DURATION86400Session cookie lifetime in seconds (default: 24 hours).

⚠️ The three variables marked ⚠️ (OIDC_ISSUER, OIDC_CLIENT_ID, OIDC_CLIENT_SECRET) must all be set together. Setting any one of them without the others will cause SkySend to refuse to start.

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:

  • FILE_DEFAULT_EXPIRE_SEC must be one of the values in FILE_EXPIRE_OPTIONS_SEC
  • FILE_DEFAULT_DOWNLOAD must be one of the values in FILE_DOWNLOAD_OPTIONS
  • NOTE_DEFAULT_EXPIRE_SEC must be one of the values in NOTE_EXPIRE_OPTIONS_SEC
  • NOTE_DEFAULT_VIEWS must be one of the values in NOTE_VIEW_OPTIONS
  • ENABLED_SERVICES must contain at least one of file or note
  • PORT must be between 1 and 65535
  • FILE_MAX_SIZE must be a valid byte size string
  • NOTE_MAX_SIZE must be a valid byte size string
  • BASE_URL must be a valid URL (trailing slashes are stripped automatically)
  • 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
  • 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
  • When any OIDC variable is set, OIDC_ISSUER, OIDC_CLIENT_ID, and OIDC_CLIENT_SECRET must all be present
  • If OIDC_SESSION_SECRET is set, it must be at least 32 characters
  • OIDC_ISSUER and OIDC_REDIRECT_URI must be valid URLs when set

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