Zentik Logo
Self-hostedAdministration

Server Settings

These settings are stored in the database and can be configured from the admin UI or GraphQL API. All settings can also be initialized from environment variables at startup.

Authentication & JWT

Configuration for JWT tokens and user authentication. These settings control how users log in, register, and how long their sessions last.

JWT Tokens

SettingEnv VariableTypeDefaultDescription
JwtAccessTokenExpirationJWT_ACCESS_TOKEN_EXPIRATIONtext3hDuration for access token validity
JwtRefreshTokenExpirationJWT_REFRESH_TOKEN_EXPIRATIONtext7dDuration for refresh token validity
JwtSecretJWT_SECRETtextauto-generatedSecret key for JWT access tokens
JwtRefreshSecretJWT_REFRESH_SECRETtextauto-generatedSecret key for JWT refresh tokens

JWT secrets are auto-generated as random 64-byte hex strings at first startup if not provided via environment variables. Changing them will invalidate all existing sessions.

Registration & Social Login

SettingEnv VariableTypeDefaultDescription
LocalRegistrationEnabledLOCAL_REGISTRATION_ENABLEDboolfalseEnable local user registration via email/password
SocialLoginEnabledSOCIAL_LOGIN_ENABLEDboolfalseEnable social login functionality. OAuth providers must be configured in the OAuth Providers admin section
SocialRegistrationEnabledSOCIAL_REGISTRATION_ENABLEDboolfalseEnable social registration. If disabled, OAuth providers can only be used for login after a local registration

Push Notifications

Configuration for push notification delivery. Zentik supports Apple Push Notifications (APN), Web Push (VAPID), and a Passthrough mode that relays notifications through the official Zentik cloud server.

Each provider can operate in one of these modes:

  • Off — Push notifications disabled for this provider
  • Onboard — Your server sends push notifications directly using your own credentials
  • Passthrough — Your server relays notifications through the Zentik cloud server

Apple Push Notification (APN)

All Onboard settings require the mobile app to be built locally with the full Apple Developer setup. To use the public server instead: request a passthrough token, wait for confirmation, then as an admin open Server Settings — the token will appear in a selector; select it and set APN Push to Passthrough.

SettingEnv VariableTypeDefaultDescription
ApnPushAPN_PUSHselectOffAPN push mode. Options: Off, Local, Onboard, Passthrough
ApnKeyIdAPN_KEY_IDtextApple Push Notification Key ID (required for Onboard)
ApnTeamIdAPN_TEAM_IDtextApple Team ID (required for Onboard)
ApnPrivateKeyPathAPN_PRIVATE_KEY_PATHtextPath to APN private key file (required for Onboard). Upload the key via Server Files
ApnBundleIdAPN_BUNDLE_IDtextApp bundle identifier (required for Onboard)
ApnProductionAPN_PRODUCTIONbooltrueUse production APN environment

Web Push Notification

Configuration for web push notifications via VAPID protocol.

SettingEnv VariableTypeDefaultDescription
WebPushWEB_PUSHselectOnboardWeb push mode. Options: Off, Local, Onboard, Passthrough
VapidSubjectVAPID_SUBJECTtextmailto:zentik@notifier.comVAPID subject for web push (required for Onboard)

Push Passthrough

Configuration for the push notification passthrough service. This section is visible in the admin UI only when at least one push provider is set to Passthrough mode. To obtain a token: see Self-service passthrough token.

SettingEnv VariableTypeDefaultDescription
PushNotificationsPassthroughServerPUSH_NOTIFICATIONS_PASSTHROUGH_SERVERtexthttps://notifier-api.zentik.app/api/v1Passthrough server URL
PushPassthroughTokenPUSH_PASSTHROUGH_TOKENtextAuthentication token for passthrough service. Can be selected from the system token dropdown in the UI
SystemTokenUsageStatsjson{}System token usage statistics (read-only). Shows monthly calls remaining for the selected token

Email Configuration

Configuration for email notifications. The server can send emails for authentication flows (password reset, email verification) and other events.

Zentik supports two email providers out of the box:

  • SMTP — Any standard SMTP server. Brevo is easy to set up and has a good free tier
  • Resend — HTTP-based email delivery via the Resend API

General

SettingEnv VariableTypeDefaultDescription
EmailEnabledEMAIL_ENABLEDboolfalseEnable email functionality
EmailFromEMAIL_FROMtextSender email address
EmailFromNameEMAIL_FROM_NAMEtextSender display name
EmailTypeEMAIL_TYPEselectSMTPEmail service type. Options: SMTP, Resend

SMTP Settings

Visible when EmailType is set to SMTP.

SettingEnv VariableTypeDefaultDescription
EmailHostEMAIL_HOSTtextSMTP server host
EmailPortEMAIL_PORTnumberSMTP server port
EmailSecureEMAIL_SECUREboolUse secure SMTP connection (TLS)
EmailUserEMAIL_USERtextSMTP username
EmailPassEMAIL_PASStextSMTP password

Resend Settings

Visible when EmailType is set to Resend.

SettingEnv VariableTypeDefaultDescription
ResendApiKeyRESEND_API_KEYtextResend service API key

Storage & Retention

Configuration for file storage, database backups, and automatic cleanup of old data.

Attachments

Configuration for file attachments on messages.

SettingEnv VariableTypeDefaultDescription
AttachmentsEnabledATTACHMENTS_ENABLEDboolfalseEnable attachment functionality
IconUploaderEnabledICON_UPLOADER_ENABLEDbooltrueEnable icon upload feature for buckets
AttachmentsStoragePathATTACHMENTS_STORAGE_PATHtext/attachmentsFile storage path for attachments
AttachmentsMaxFileSizeATTACHMENTS_MAX_FILE_SIZEnumber10485760Maximum file size in bytes (default ~10 MB)
AttachmentsAllowedMimeTypesATTACHMENTS_ALLOWED_MIME_TYPEStextComma-separated list of allowed MIME types
AttachmentsDeleteJobEnabledATTACHMENTS_DELETE_JOB_ENABLEDbooltrueEnable automatic cleanup of old attachments
AttachmentsMaxAgeATTACHMENTS_MAX_AGEtext7dMaximum age for attachments before cleanup (visible when delete job is enabled)

Database Backup

Configuration for automated database backups. Backups can be managed from the Backup Management admin section.

SettingEnv VariableTypeDefaultDescription
BackupEnabledBACKUP_ENABLEDboolfalseEnable automatic database backups
BackupExecuteOnStartBACKUP_EXECUTE_ON_STARTbooltrueExecute a backup on server startup
BackupStoragePathBACKUP_STORAGE_PATHtext/backupsDirectory for backup files
BackupMaxToKeepBACKUP_MAX_TO_KEEPnumber10Maximum number of backup files to retain
BackupCronJobBACKUP_CRON_JOBtext0 */12 * * *Cron expression for backup schedule (default: every 12 hours)

Server Files

Configuration for server file storage. Used to manage files stored on the backend, such as APN keys for push notification providers.

SettingEnv VariableTypeDefaultDescription
ServerFilesDirectorySERVER_FILES_DIRtext/dataDirectory for server files

Changelog

Configuration for fetching changelog entries from a remote Zentik backend.

SettingEnv VariableTypeDefaultDescription
ChangelogRemoteServerCHANGELOG_REMOTE_SERVERtexthttps://notifier-api.zentik.appBase URL of the remote backend for changelogs. When set, the local /changelogs endpoints proxy to that remote server and fall back to the local database if unavailable

Messages Retention

Configuration for automatic message cleanup.

SettingEnv VariableTypeDefaultDescription
MessagesDeleteJobEnabledMESSAGES_DELETE_JOB_ENABLEDbooltrueEnable automatic message cleanup
MessagesMaxAgeMESSAGES_MAX_AGEtext7dMaximum age for messages before cleanup (visible when delete job is enabled)

Security & Network

Configuration for rate limiting, CORS, and external notification systems.

Rate Limiting

Configuration for API rate limiting. Required when the server runs behind a reverse proxy to correctly identify clients by their real IP instead of the proxy IP.

SettingEnv VariableTypeDefaultDescription
RateLimitTrustProxyEnabledRATE_LIMIT_TRUST_PROXYboolfalseTrust proxy headers for client IP detection
RateLimitForwardHeaderRATE_LIMIT_FORWARD_HEADERtextx-forwarded-forHeader to use for forwarded IP addresses
RateLimitTtlMsRATE_LIMIT_TTL_MSnumber60000Rate limit window duration in milliseconds (default: 1 minute)
RateLimitLimitRATE_LIMIT_LIMITnumber100Maximum requests per window
RateLimitBlockMsRATE_LIMIT_BLOCK_MSnumber10000Block duration after limit exceeded in milliseconds (default: 10 seconds)
RateLimitMessagesRpsRATE_LIMIT_MESSAGES_RPSnumber10Messages endpoint requests per second limit
RateLimitMessagesTtlMsRATE_LIMIT_MESSAGES_TTL_MSnumber1000Messages rate limit window in milliseconds (default: 1 second)

CORS

Configuration for Cross-Origin Resource Sharing.

SettingEnv VariableTypeDefaultDescription
CorsOriginCORS_ORIGINtext*Allowed CORS origins (comma-separated)
CorsCredentialsCORS_CREDENTIALSbooltrueAllow credentials in CORS requests

External Notify Systems

Configuration for external notification systems (e.g. Ntfy, Gotify). When enabled, the server listens for incoming events via SSE from configured external sources.

SettingEnv VariableTypeDefaultDescription
ExternalNotifySystemsEnabledEXTERNAL_NOTIFY_SYSTEMS_ENABLEDbooltrueEnable external notify systems

Monitoring

Configuration for application logging, metrics collection, and system access tokens.

Logging

Configuration for application logging and log file storage. When filesystem logging is enabled, logs can be browsed from the Server Logs admin section.

SettingEnv VariableTypeDefaultDescription
StoreLogsOnFsSTORE_LOGS_ON_FSboolfalseEnable log storage to filesystem
LogLevelLOG_LEVELselectinfoLogging level. Options: error, warn, info, debug, verbose (visible when log storage is enabled)
LogRetentionDaysLOG_RETENTION_DAYSnumber3Number of days to retain log files (visible when log storage is enabled)
LogStorageDirectoryLOG_STORAGE_DIRECTORYtext/logsDirectory for log files (visible when log storage is enabled)

Prometheus Metrics

Configuration for metrics collection. Exposes a /metrics endpoint. Create a system access token with the prometheus scope to authorize scraping.

SettingEnv VariableTypeDefaultDescription
PrometheusEnabledPROMETHEUS_ENABLEDboolfalseEnable Prometheus metrics endpoint

System Access Tokens

Configuration for system-level access tokens. When enabled, users can request system tokens from the self-service panel.

SettingEnv VariableTypeDefaultDescription
EnableSystemTokenRequestsENABLE_SYSTEM_TOKEN_REQUESTSboolfalseEnable system token request functionality