Configuration

Runtime configuration keys, plus Wrangler bindings, environment variables, and secrets.

Configuration#

Site settings are edited at runtime in Admin → Settings; no redeploy is needed. This page lists the keys behind them, then the Wrangler bindings and variables that are set at deploy time.

Sensitive values (captcha secrets, social client secrets, SMTP/IMAP passwords, the GitHub README token, the Discord bot token) are encrypted at rest when the SECRETS_KEY binding is present, and are never returned by the config API.

General#

Key
Type
Default
Description
site_namestring"Prism"Shown in the browser title and emails
site_descriptionstring"Federated identity platform"Shown on the login page
site_icon_urlstring?nullURL to a favicon / logo
allow_registrationbooleantrueAllow self-registration
invite_onlybooleanfalseRequire an invite token to register
require_email_verificationbooleanfalseBlock sign-in until the email is verified
accent_colorstring"#0078d4"Primary brand color (hex)
custom_cssstring""Injected as a <style> block on every page
show_powered_bybooleantrueShow the “Powered by Prism” source link in the footer
disable_user_create_teambooleanfalseHide “New team” — only admins can create teams
disable_user_create_appbooleanfalseHide “New application” — only admins can create apps
saml_enabledbooleantrueLet apps use SAML. Admins can override it per owner and per app
allow_alt_email_loginbooleantrueLet users sign in with any verified secondary email
security_contactstring""mailto: address or https URL for vulnerability reports
security_policy_urlstring""Link to your disclosure policy

When security_contact is set, Prism serves /.well-known/security.txt.

A Privacy Policy and Terms of Service, written in Markdown, can be published from Admin → Settings → Legal. They’re served without sign-in at /privacy and /terms, with footer links on every page. Each is limited to 256 KiB. Save a document empty to hide both the page and its link.

Avatar proxy#

Avatars and icons from other sites are served through Prism’s image proxy. Responses over the size limit are rejected. An optional cache (off by default, using KV or D1) and its TTL are set in Admin → Avatar Proxy. Raster conversion to WebP is optional and needs an IMAGES Cloudflare Images binding.

Sessions & tokens#

Key
Type
Default
Description
session_ttl_daysnumber30Session lifetime
access_token_ttl_minutesnumber60OAuth access token lifetime
refresh_token_ttl_daysnumber30OAuth refresh token lifetime

An admin can override the access and refresh lifetimes for a single user.

Bot protection (captcha)#

Prism runs an ordered set of providers. The first is the default; the rest are alternates a visitor can switch to if the default fails or is slow. Each provider has its own credentials, so you can configure all of them. Captcha protects registration, sign-in, password change, email-verification resend, team join, invite registration and step-up 2FA.

Key
Type
Default
Description
captcha_providersstring[][]Ordered enabled set. First is the default. [] = off
captcha_switch_timeout_secondsnumber15Delay before “try a different method” appears. 0 = only after a failure
turnstile_site_keystring""Turnstile site key
turnstile_secret_keystring""Turnstile secret
turnstile_endpoint_modestring"global"Which host serves Turnstile (see below)
turnstile_china_site_keystring""Site key of a region: "china" widget
turnstile_china_secret_keystring""Secret for that key
hcaptcha_site_keystring""hCaptcha site key
hcaptcha_secret_keystring""hCaptcha secret
recaptcha_site_keystring""reCAPTCHA v3 site key
recaptcha_secret_keystring""reCAPTCHA v3 secret
geetest_captcha_idstring""GeeTest v4 CAPTCHA ID
geetest_captcha_keystring""GeeTest v4 key
geetest_fail_openbooleanfalseAccept visitors when GeeTest is unreachable. false = reject
cap_modestring"embedded"embedded (runs inside Prism) or external (self-hosted Cap Standalone)
cap_api_endpointstring""Cap Standalone base URL (external mode)
cap_site_keystring""Cap Standalone site key (external mode)
cap_secret_keystring""Cap Standalone secret (external mode)
cap_challenge_countnumber50Puzzles per Cap challenge (embedded mode)
cap_challenge_difficultynumber4Cap difficulty (embedded mode)
cap_instrumentationbooleantrueCap’s anti-automation script (embedded mode)

Provider names: turnstile, hcaptcha, recaptcha, geetest and cap (Cap).

Turnstile and Mainland China#

Cloudflare serves Turnstile from a global host and a Mainland-China host (challenges.cloudflare-cn.com). A widget only works on the host matching the region it was created with, so using the China host means a second widget created with region: "china" (this needs a Cloudflare China Network entitlement). Put its keys in turnstile_china_site_key and turnstile_china_secret_key.

turnstile_endpoint_mode picks which pair a visitor gets:

  • global — always the global host.

  • china — always the China host.

  • client_language — China when the browser language is Chinese.

  • server_region — China when the request comes from CN.

  • client_region — China when the browser timezone is in Mainland China.

If turnstile_china_site_key is empty, every mode behaves as global, so picking a China mode without the entitlement costs nothing. Prism also checks a China key before using it and falls back to global if it doesn’t work.

Two-factor / step-up#

Key
Type
Default
Description
sudo_mode_ttl_minutesnumber5After a successful step-up, further challenges from the same app skip the prompt for this long. 0 disables
require_captcha_for_2fabooleanfalseEvery step-up confirmation must solve the captcha

Public profiles#

Profiles are off until a user (or team owner) opts in. Site defaults only apply to fields the user hasn’t set themselves, and never make a private profile public.

Key
Default
Description
enable_public_profilestrueMaster switch. false = all profile pages 404
default_profile_show_display_nametrue
default_profile_show_avatartrue
default_profile_show_emailfalse
default_profile_show_joined_attrue
default_profile_show_gpg_keystrue
default_profile_show_authorized_appsfalse
default_profile_show_owned_appstrue
default_profile_show_domainstrue
default_profile_show_joined_teamsfalseAlso controls appearing in a team’s public member list
default_profile_show_readmetrue
profile_readme_max_bytes65536Maximum README size
default_team_profile_show_descriptiontrueTeam profile defaults
default_team_profile_show_avatartrue
default_team_profile_show_ownerfalse
default_team_profile_show_member_counttrue
default_team_profile_show_appstrue
default_team_profile_show_domainstrue
default_team_profile_show_membersfalse
default_team_profile_show_sub_teamstrue

Teams#

Key
Type
Default
Description
enable_sub_teamsbooleantrueMaster switch for sub-teams
max_team_depthinteger5Maximum nesting depth (1–20)
inherit_team_membershipbooleantrueMembers of a team have at least the same role on its sub-teams
inherit_team_domainsbooleantrueSub-teams see and auto-verify against ancestors’ domains
default_team_require_2fabooleanfalseEvery team requires a TOTP authenticator or passkey
default_team_require_verified_emailbooleanfalseEvery team requires a verified primary email
default_team_role_permissionsobject{}Default group permissions for team admins, e.g. {"admin":{"groups:manage":true}}

Turning on the two default_team_require_* floors applies to existing members immediately; tell them first.

Whether a team may use invite-link registration is a per-team grant from a site admin. Nothing creates accounts while allow_registration is false.

Key
Default
Description
team_invite_registration_max_uses_cap1000Highest max_uses an invite that creates accounts may have
team_invite_registration_rate_per_hour200Registrations per hour per invite
restricted_user_capabilities{}Features granted to restricted accounts, e.g. {"app:create": true}. Empty = all denied
restricted_pending_ttl_hours72How long an unfinished registration survives
restricted_dissolve_grace_hours168Delay between deactivating and deleting accounts when a team is dissolved

Capability keys: team:create, app:create, domain:create, pat:create, profile:public, gpg:manage, self:convert.

GitHub README sync#

Users can sync their profile README from a GitHub repo.

Key
Default
Description
github_readme_token""GitHub token for README fetches. Empty = unauthenticated (60 requests/hour per IP)
github_readme_cache_ttl_seconds3600How long a fetched README is served before re-checking

GPG login#

Key
Default
Description
gpg_challenge_prefix""Extra text in the challenge users sign, so they can recognise it as coming from your site

Third-party notifications#

Key
Default
Description
tg_notify_source_slug""Telegram OAuth source whose bot sends notifications. Empty disables Telegram
discord_notify_source_slug""Discord OAuth source used to find users for DMs. Empty disables Discord
discord_bot_token""Discord bot token used to send the DMs

Social login#

Social providers are configured as OAuth sources in Admin → OAuth Sources, not here. See Social Login Setup.

Email#

Key
Default
Description
email_provider"none"none, resend, mailchannels or smtp
email_api_key""API key for Resend or Mailchannels
email_from"noreply@example.com"From address
smtp_host""SMTP server
smtp_port587SMTP port
smtp_securefalsetrue = implicit TLS, false = STARTTLS
smtp_user""SMTP username
smtp_password""SMTP password

Receiving#

Key
Default
Description
email_verify_methods"both"link, send (user emails Prism) or both
email_receive_provider"cloudflare"cloudflare (Email Workers), imap, or none
email_receive_host""Domain for verify-<code>@<host> (Cloudflare only). Blank = the APP_URL host
imap_host""IMAP server
imap_port993IMAP port
imap_securetrueImplicit TLS (port 993) or STARTTLS (port 143)
imap_user""IMAP username; also shown to users as the address to email
imap_password""IMAP password
social_verify_ttl_days0Days an email verified through a social provider stays trusted. 0 = no expiry

Domain verification#

Domains can be verified by DNS TXT record, HTML meta tag or a .well-known file, and are re-checked on a schedule.

Key
Default
Description
domain_reverify_days30Days between automatic re-verifications

Diagnostics & rate limiting#

Key
Default
Description
login_error_retention_days30How long failed-sign-in records are kept
login_dos_rate_limit / _window_seconds120 / 60Login POSTs per IP
login_ip_rate_limit / _window_seconds60 / 60Captcha-cleared login attempts per IP
login_identifier_rate_limit / _window_seconds30 / 300Login attempts per email or username
login_totp_rate_limit / _window_seconds15 / 300TOTP submissions per user
ipv6_rate_limit_prefix64Bits of an IPv6 address that share one rate-limit bucket

Limits are integers from 1 to 86400. The password step and the TOTP step are separate requests, and both count.

Wrangler bindings & variables#

These are set in wrangler.jsonc, not in the admin panel.

Variables#

Variable
Required
Description
APP_URLYesFull origin of the deployment, e.g. https://auth.example.com
LOCKDOWN_USERSNoUsernames that nobody, admins included, can delete. Separate with commas, semicolons or spaces
LOCKDOWN_TEAMSNoTeam names that nobody can delete. Same format
ENABLE_RESETNo"true" shows the Site reset button in the Danger zone. Hidden otherwise
NO_RESET_COOLDOWNNo"true" skips the 30-minute wait before a reset can be confirmed. 2FA is still required
D1_CONSOLENoAvailability of Admin → Database: unset/off (default), read-only, or full. See Admin → Database
KV_CONSOLENoSame for the key–value browser. Follows D1_CONSOLE when unset

Bindings#

Binding
Kind
Required
Notes
DBD1 databaseYesPersistent state
KV_SESSIONSKV namespaceYesSession secrets and signing keys
KV_CACHEKV namespaceYesCaches and short-lived state
ASSETSWorkers AssetsYesThe built web app
SECRETS_KEYSecrets Store secretStrongly recommendedMaster key used to encrypt secrets at rest

SECRETS_KEY setup#

Generate a 32-byte key:

bash
node -e "console.log(require('crypto').randomBytes(32).toString('base64url'))"

Create a Secrets Store, save the key under the name prism-secrets-key, and add the secrets_store_secrets binding shown in wrangler.jsonc. After redeploying, run Admin → Maintenance → Danger zone → Migrate secrets to Secrets Store and Migrate D1 secrets once to protect existing data.

Without the binding, Prism works with plaintext storage, and you can add it later.

Cron trigger#

jsonc
"triggers": { "crons": ["0 */6 * * *"] }

Every six hours Prism re-verifies domains, polls the IMAP mailbox (when used) and cleans up expired data. You can also run these on demand from Admin → Settings → Maintenance jobs.

Deletion lockdown#

Users and teams that must never be deleted (service accounts, bot identities, critical teams) can be listed in LOCKDOWN_USERS and LOCKDOWN_TEAMS. Attempts to delete them through the API return 403.