Skip to content

Environment Variables

The application can be configured using environment variables. Set them when starting the Docker container or in your docker-compose.yml when using Docker Compose.

VariableDescriptionDefault
ORIGINPublic hostname of your application.Required for cookies to work correctly.http://localhost:3000
TZTimezone for the application.UTC
PORTPort the application listens on.3000
VariableDescriptionDefault
USER_ALLOW_REGISTRATIONAllow new users to register.When disabled, only existing users can log in unless an SSO provider overrides it.true
USER_APPROVAL_REQUIREDRequire admin approval before a user can sign in.true
USER_ALLOW_GUEST_UPLOADSAllow unauthenticated users to upload images without an account.false
USER_ALLOW_UNAUTHENTICATED_ACCESSAllow unauthenticated users to access public routes such as the explore page.true
USER_REQUIRE_AUTH_FOR_MEDIA_SHARESRequire visitors to be signed in to open shared images.false
USER_REQUIRE_AUTH_FOR_COLLECTION_SHARESRequire visitors to be signed in to open shared collections.false
USER_PASSWORD_MIN_LENGTHMinimum password length for user accounts.6
USER_PASSWORD_REQUIREMENTSBitmask of password requirements: 1 (numbers), 2 (lowercase), 4 (uppercase), 8 (special characters).Sum the values to combine.15
VariableDescriptionDefault
IMAGE_MAX_SIZEMaximum upload size.Use a k or M suffix15M
IMAGE_CHUNK_SIZEChunk size for chunked uploads.Use a k or M suffix, between 1M and 25M2M
IMAGE_STRIP_EXIF_METADATAStrip EXIF metadata from uploaded images.true
IMAGE_ALLOW_ONLY_PUBLIC_IMAGESForce all uploaded images to public.Visibility cannot be changed.false
IMAGE_COMPRESSION_QUALITYJPEG compression quality for uploaded images.1 to 100, where higher is better quality80
IMAGE_ENABLE_DEDUPLICATIONDetect and handle duplicate images during upload.true
IMAGE_FORCE_FORMAT_CONVERSIONConvert all uploaded images to a single format.Uses the format set in IMAGE_TARGET_FORMAT.false
IMAGE_TARGET_FORMATTarget format for conversion: webp, avif, jpeg.Applies when IMAGE_FORCE_FORMAT_CONVERSION is enabled.webp
IMAGE_CONVERT_ANIMATED_IMAGESAlso convert animated images (GIFs) to the target format.Applies when format conversion is enabled.false
VariableDescriptionDefault
SHARE_ENABLE_URL_SHORTENINGGenerate short URLs for shared images.true
SHARE_SHORT_URL_LENGTHNumber of characters in generated short codes.Clamped between 4 and 32.8

See the Storage Providers reference for full setup details.

VariableDescriptionDefault
STORAGE_PROVIDERStorage backend to use: local, smb, s3.local
VariableDescriptionDefault
SMB_HOSTSMB host to connect to.Required for SMB.null
SMB_SHARESMB share to use.Required for SMB.null
SMB_WORKGROUPSMB workgroup.workgroup
SMB_USERNAMESMB username.Required for SMB.null
SMB_PASSWORDSMB password.Required for SMB.null
VariableDescriptionDefault
AMAZON_S3_REGIONAWS region of your bucket.Required for Amazon S3, optional for custom providers (defaults to auto)null
AMAZON_S3_BUCKETName of your S3 bucket.Required for S3.null
AMAZON_S3_ACCESS_KEY_IDAWS access key ID.Required unless IAM role is used.null
AMAZON_S3_SECRET_ACCESS_KEYAWS secret access key.Required unless IAM role is used.null
AMAZON_S3_USE_IAM_ROLEAuthenticate with the instance’s IAM role instead of static keys.Amazon S3 only, ignored when a custom endpoint is setfalse
AMAZON_S3_ENDPOINTCustom endpoint URL for S3-compatible services.Optional, enables custom-provider mode when setnull
AMAZON_S3_USE_CUSTOM_PROVIDEREnable for S3-compatible services.false
AMAZON_S3_FORCE_PATH_STYLEForce path-style URLs.For S3-compatible services.false
VariableDescriptionDefault
REQUIRE_SSLRequire SSL/HTTPS connections.Affects authentication when enabled.false
OAUTH_VERIFY_SSLVerify SSL certificates for OAuth/OIDC provider endpoints.Set to false for development with self-signed certs.true

These variables create the first admin user automatically on initial startup. See First User Setup for details.

VariableDescriptionDefault
ADMIN_USERNAMEUsername for the first admin user.Used only when ADMIN_EMAIL is set.admin
ADMIN_EMAILEmail for the first admin user.Triggers admin creation on first startup.null
ADMIN_PASSWORDPassword for the first admin user.Required when ADMIN_EMAIL is set.null