Skip to main content

Server Options

Complete reference for yopass-server. All flags can also be set via environment variable.

Configuration methods

Flags take precedence. Environment variables are the flag name uppercased with dashes replaced by underscores (e.g. --max-lengthMAX_LENGTH).


Core

FlagEnv varDefaultDescription
--addressADDRESS0.0.0.0Listen address
--portPORT1337Listen port
--log-levelLOG_LEVELinfoLog level: debug, info, warn, error
--metrics-portMETRICS_PORT-1Port for the Prometheus metrics server. Disabled when -1
--health-checkHEALTH_CHECKfalseCheck database connectivity and exit
--asset-pathASSET_PATHpublicPath to the built frontend assets directory

Database

FlagEnv varDefaultDescription
--databaseDATABASEmemcachedStorage backend: memcached or redis
--memcachedMEMCACHEDlocalhost:11211Memcached address (host:port)
--redisREDISredis://localhost:6379/0Redis connection URL

Secrets

FlagEnv varDefaultDescription
--max-lengthMAX_LENGTH10000Maximum encrypted secret size in bytes
--default-expiryDEFAULT_EXPIRY1hDefault expiration pre-selected in the UI: 1h, 1d, or 1w
--force-onetime-secretsFORCE_ONETIME_SECRETSfalseReject secrets that are not set to one-time viewing
--prefetch-secretPREFETCH_SECRETtrueShow a warning that the secret may be one-time use before revealing it

File Storage

FlagEnv varDefaultDescription
--max-file-sizeMAX_FILE_SIZE512KBMaximum file upload size (e.g. 10KB, 512KB, 1MB). Capped at 1 MB without a license key
--disable-uploadDISABLE_UPLOADfalseDisable the /create/file upload endpoint entirely
--file-storeFILE_STORE(database)File storage backend: disk, s3, or empty to use the database
--file-store-pathFILE_STORE_PATH/tmp/yopass-filesBase directory for the disk file store
--file-store-s3-bucketFILE_STORE_S3_BUCKETS3 bucket name (required for S3 storage)
--file-store-s3-prefixFILE_STORE_S3_PREFIXyopass/Key prefix for objects stored in S3
--file-store-s3-endpointFILE_STORE_S3_ENDPOINTS3-compatible endpoint URL (e.g. MinIO at http://minio:9000)
--file-store-s3-regionFILE_STORE_S3_REGIONus-east-1S3 region
--cleanup-intervalCLEANUP_INTERVAL60How often (seconds) the built-in file cleanup runs
--disable-file-cleanupDISABLE_FILE_CLEANUPfalseDisable the built-in cleanup goroutine (use when relying on S3 lifecycle rules instead)

See File Storage for backend setup and S3 lifecycle rule examples.


TLS

FlagEnv varDefaultDescription
--tls-certTLS_CERTPath to the TLS certificate file
--tls-keyTLS_KEYPath to the TLS private key file

See TLS / HTTPS for built-in TLS setup and reverse proxy examples.


Security & Networking

FlagEnv varDefaultDescription
--cors-allow-originCORS_ALLOW_ORIGIN*Value for the Access-Control-Allow-Origin response header
--trusted-proxiesTRUSTED_PROXIESComma-separated IP addresses or CIDR ranges whose X-Forwarded-For headers are trusted (e.g. 192.168.1.0/24,10.0.0.0/8)

Frontend / UI

FlagEnv varDefaultDescription
--read-onlyREAD_ONLYfalseDisable secret creation endpoints. Retrieval and deletion remain active
--disable-featuresDISABLE_FEATURESfalseHide the features section on the homepage
--no-language-switcherNO_LANGUAGE_SWITCHERfalseHide the language switcher in the navigation bar
--privacy-notice-urlPRIVACY_NOTICE_URLURL linked from the privacy notice in the footer
--imprint-urlIMPRINT_URLURL linked from the imprint / legal notice in the footer
--public-urlPUBLIC_URLBase URL of the public read-only instance. Secret links generated by the creation instance will use this URL

See Read-Only Mode for split-instance deployments.


License

FlagEnv varDefaultDescription
--license-keyLICENSE_KEYLicense key that unlocks OIDC authentication, theming, audit logging, and file sizes above 1 MB

Authentication (requires license key)

FlagEnv varDefaultDescription
--oidc-issuerOIDC_ISSUEROIDC provider URL (e.g. https://accounts.google.com)
--oidc-client-idOIDC_CLIENT_IDOAuth 2.0 client ID
--oidc-client-secretOIDC_CLIENT_SECRETOAuth 2.0 client secret
--oidc-redirect-urlOIDC_REDIRECT_URLCallback URL registered with your OIDC provider (e.g. https://yopass.example.com/auth/callback)
--require-authREQUIRE_AUTHfalseRequire users to be authenticated before they can create secrets
--oidc-allowed-domainsOIDC_ALLOWED_DOMAINSComma-separated email domains allowed to log in (e.g. corp.example.com,example.com)
--oidc-session-keyOIDC_SESSION_KEY64-byte hex-encoded session key for sharing sessions across multiple instances. Generate with openssl rand -hex 64
--frontend-urlFRONTEND_URLFrontend base URL for post-login redirect in split-origin (OIDC + separate frontend) deployments

See OpenID Connect for provider-specific setup and multi-instance configuration.


Branding (requires license key)

FlagEnv varDefaultDescription
--app-nameAPP_NAMECustom application name shown in the UI (default: Yopass)
--logo-urlLOGO_URLURL to a custom logo image (e.g. /mylogo.svg for a file in the public/ directory, or an external CDN URL)
--theme-lightTHEME_LIGHTemeraldDaisyUI theme name for light mode
--theme-darkTHEME_DARKdimDaisyUI theme name for dark mode
--theme-custom-lightTHEME_CUSTOM_LIGHTJSON object of CSS variables for a fully custom light theme (keys must start with --color-)
--theme-custom-darkTHEME_CUSTOM_DARKJSON object of CSS variables for a fully custom dark theme (keys must start with --color-)

See Theming & Branding for available theme names and CSS variable examples.


Audit Logging (requires license key)

FlagEnv varDefaultDescription
--audit-logAUDIT_LOGfalseEnable structured NDJSON audit logging
--audit-log-fileAUDIT_LOG_FILE(stdout)File path for audit log output

See Audit Logging for log format, event types, and log rotation.