Skip to content

Configuration

What each appsettings.json key does, what it ships as, and which ones you must set before going live.

  • Feature switches are not configuration. They are saved at Platform → Platform Settings and listed with their defaults on Architecture → Feature Flags. A Features:<Name> key still overrides the saved value.
  • Full vs Lite (which containers run, and what appsettings.Lite.json overrides) is in Deployment → Lite.
  • Secrets ship blank or as placeholders. Supply them by environment variable, container secret or dotnet user-secrets, never in a committed file; on a pipeline deploy see Deployment → Application secrets. An environment variable spells : as __ (Security__Setup__Token).
  • What a running deployment uses: Platform → Infrastructure (/Platform/Infrastructure) lists the main keys with their live value, an explanation and the source that set it. Secrets show only whether they are set or still a placeholder. It is the Web app’s view; the worker reads its own configuration.
  • Environment overlays. The full-stack containers run as Production, so the Web app’s, InternalApi’s and BackgroundWorker’s appsettings.Production.json is layered over appsettings.json and wins for every key it sets — editing that key in the base file changes nothing in production. Change the overlay, or set an environment variable (which outranks both). Lite runs as Lite and reads appsettings.Lite.json instead; the DbMigrator has no overlay. The overlays pin:
    • Web — ConnectionStrings:redisCache, Services:InternalApi:Url / ClientId, Services:BackgroundWorker:Url, Caching:DefaultCacheDurationSeconds and both Redis flags, DetailedErrors, Logging:LogLevel.
    • InternalApi — the same Redis and Caching keys, Database (DatabaseType, ConnectionString, PlatformDatabaseName, CommandTimeout, RetryPolicy), Security:WebApp:ClientId, Security:Jwt Issuer / Audience / ExpiryMinutes, DetailedErrors, Logging:LogLevel.
    • BackgroundWorker — ConnectionStrings:redisCache, the same Database keys, BackgroundServices:DataRetention (MaxAgeInDays, MaxRecordCount, CleanupIntervalInMinutes and six Enable*Cleanup switches), BackgroundServices:Email, Logging:LogLevel.

Several hosts read configuration

The Web app, InternalApi and BackgroundWorker each have their own appsettings.json; the DbMigrator has a smaller one (Database, Security:Encryption, Localization). Queued jobs read the worker’s configuration. Shared keys must hold the same value in every host: Database:*, Caching:*, Messaging:*, DataProtection:*, Security:Encryption, Security:WebhookEgress, Security:Audit:*, Storage:*, Push:*, ApiIntegrations:*, ApiClients, Localization, QuestPdf, DomainVerification:* — and any Features:<Name> override.

  • A worker with a different DomainVerification:TxtRecordPrefix demotes every verified domain on its next check.
  • DomainVerification:TokenHmacSecret is needed on every host (it also keys stored client-IP pseudonyms and the shared claim store). Supply it by environment variable (render-deploy-env.sh does): the worker’s file ships it blank and the InternalApi’s omits it, and outside Development a host without it refuses to start.

Database

"Database": {
"DatabaseType": "mongodb", // mongodb (default) | postgresql | sqlserver
"ConnectionString": "mongodb://localhost:27017",
"PlatformDatabaseName": "blazorblueprint-platform",
"TenantDatabasePrefix": "bb-org-",
"UseMigrations": false, // relational only — see below
"MigrateTenantsOnStartup": false, // relational only
"AllowPluginSchemaDropIn": false, // relational only
"SchemaVersionGate": { "Enabled": true }, // relational only
"CommandTimeout": 10,
"RetryPolicy": { "MaxRetries": 3, "DelayMilliseconds": 5000, "ExponentialBackoff": true, "MaxDelayMilliseconds": 15000 }
}

DatabaseType selects the backend (postgres and mssql are accepted aliases). Each organisation’s database is TenantDatabasePrefix + its name (bb-org-acme); on PostgreSQL both names are schemas, lower-cased with hyphens as underscores (bb_org_acme). The DbMigrator ships DatabaseType and ConnectionString blank — give it the same values as the other hosts. Backend differences: Architecture.

  • CommandTimeout (seconds) — MongoDB’s server-selection, connect and socket timeout; EF Core’s command timeout on relational backends. The DbMigrator ships 180.
  • RetryPolicy — transient-fault retries. MaxRetries and MaxDelayMilliseconds apply everywhere; DelayMilliseconds and ExponentialBackoff shape MongoDB’s only. MaxDelayMilliseconds must exceed DelayMilliseconds or the host refuses to start.

Both names are first-deploy decisions — set them once and never change them

  • TenantDatabasePrefix is read only when an organisation is created; changing it later applies only to new organisations.
  • PlatformDatabaseName is read at every startup. Changing it points every host at an empty platform database: every organisation and user disappears from view and /initial-setup opens again to whoever passes the setup gate first. Restoring the old value recovers everything.

Startup checks: the prefix is at most 23 characters, starts with a lowercase letter and uses only a-z, 0-9, - and _; it must not be able to compose the platform database’s name (prefix blazorblueprint-plat plus an organisation form); and on PostgreSQL with UseMigrations on, PlatformDatabaseName must stay at its default, because migrations have the schema name compiled in.

Relational backends. PostgreSQL must be version 16 or later when it also stores the files (the default with no cloud provider; see File Storage). Outside Development (including Staging, Lite and custom names) the host refuses to start unless UseMigrations is true. The other relational keys:

  • MigrateTenantsOnStartup — migrate every existing tenant at startup instead of waiting for the DbMigrator. Acted on by the BackgroundWorker, and by the Web host under Lite (appsettings.Lite.json turns it on).
  • AllowPluginSchemaDropIn — creates a drop-in plugin’s tables without regenerating migrations. Creates tables only; never alters one.
  • SchemaVersionGate:Enabled — shows a maintenance page for a tenant whose schema is behind. Leave it on; off, the first page touching a missing table throws a raw “relation does not exist”.
  • SuppressModelDriftCheck — declares a host’s model deliberately a subset of the committed migrations. No shipped host needs it, and it hides a forgotten migration.

Workflow: Relational Migrations.

All three backends run against real servers in CI, but MongoDB is the default and has the production mileage. If you choose PostgreSQL or SQL Server, load-test it, and choose before go-live: switching later is a data migration.

Redis & Caching

"ConnectionStrings": { "redisCache": "localhost:6379" },
"Caching": {
"UseRedisDistributedCache": true,
"UseRedisSignalRBackplane": true,
"RedisKeyPrefix": "BlazorBlueprint",
"DefaultCacheDurationSeconds": 60, // output-cached pages only (60 if the key is removed)
"Policies": {
"VolatileSeconds": 60, // entitlements, role claims, plugin lookups
"SettingsSeconds": 300, // per-organisation settings documents
"ReferenceSeconds": 3600, // platform-wide reference data
"MaxLocalSeconds": 60, // ceiling on serving from one instance's own memory
"PlatformSettingsRefreshSeconds": 120 // how often each host re-reads the platform settings row
// (platform address + feature switches); floor 10
}
}

In the full stack Redis carries the shared cache and its cross-instance eviction channel; the SignalR backplane; the job streams (Messaging:Transport=Redis); and the shared rate-limit, job-claim and webhook-dedupe stores. The backplane does not make Blazor circuits portable: more than one Web replica needs sticky sessions at the load balancer. It is also how anything sent from the BackgroundWorker reaches a browser live, even with one Web replica: turn UseRedisSignalRBackplane off in the full stack and those updates appear only on the next page load.

Turning both Caching flags off is right for a single instance (Lite does) and wrong for more than one, since everything above falls back to per-process. With them off, Messaging:Transport must be InProcess (with Redis the Web host refuses to start unless UseRedisDistributedCache is on and the connection string set), and without a BackgroundWorker set BackgroundServices:RunInProcess=true — see Background Sweeps.

Server requirements: Redis 6.2+, and the instance carrying the job streams must use maxmemory-policy noeviction — any allkeys-* policy silently evicts queued jobs.

RedisKeyPrefix namespaces everything written to Redis, so two deployments can share one server. Set it once, identically on every host: changing it loses cached entries and queued jobs. It is not isolation — give each deployment its own Redis ACL user if they must not trust each other. Only letters, digits, -, _ and . are allowed; anything else stops the host at startup.

MaxLocalSeconds bounds how stale a value can get if an eviction broadcast is missed; keep it at or below the three durations above it.

Background Messaging

Messaging:Transport decides where background work runs: Redis publishes jobs to streams the BackgroundWorker consumes; InProcess (Lite) runs the handlers in the web process. See Architecture → Background Work & Messaging.

"Messaging": {
"Transport": "Redis", // Redis | InProcess (InProcess if the key is absent)
"MessageSigningKey": "dev-only-change-me-…", // placeholder — REQUIRED under Redis outside Development
"PreviousMessageSigningKey": "", // only while rotating the key: the old one, still accepted
"ConsumerGroup": "workers",
"StreamConsumerConcurrency": 30, // messages a worker processes at once
"LocalExecutorConcurrency": 10, // in-process execution cap
"ClaimIdleMs": 300000, // before another consumer may reclaim an in-flight message
"MaxDeliveryAttempts": 5,
"ReplyTtlSeconds": 300,
"WebhookDedupeTtlSeconds": 604800, // 7 days
"ConsumerHealthTimeoutSeconds": 120,
"MaintenanceIntervalSeconds": 300,
"ConsumerGroupStartId": "0", // 0 drains an existing backlog; $ skips it
"Streams": {
"ApiJobsExpiring": { "Name": "api:jobs:expiring", "MaxLen": 25000, "MaxAgeHours": 24 },
"ApiJobsDurable": { "Name": "api:jobs:durable", "MaxLen": 100000, "MaxAgeHours": 24 },
"WebhookInbound": { "Name": "webhook:inbound", "MaxLen": 100000, "MaxAgeHours": 24 },
"DeadLetter": { "Name": "api:jobs:dead", "MaxLen": 10000, "MaxAgeHours": 720 }
},
"Jobs": {} // per-job-type TimeoutSeconds / MaxAgeMinutes overrides
}
  • MessageSigningKey — HMAC key for every envelope; an envelope carries the organisation id that routes it, so an unsigned stream would let anything that can write to Redis target any tenant. Use 32+ characters of entropy, identical on every host. Under Redis outside Development every host refuses to start without it or with the placeholder; under InProcess it is not read. Each host logs a short fingerprint of the key and its stream names at startup — compare them, because a mismatched key or RedisKeyPrefix gives no error, only jobs that never run.
  • PreviousMessageSigningKey — for rotation only: messages signed with it are still accepted. Set it to the old key and MessageSigningKey to the new one on every host, deploy, and clear it once all hosts run the new key and queues have drained. render-deploy-env.sh does not write it, so pass Messaging__PreviousMessageSigningKey to the web, InternalApi and worker services yourself during a pipeline rotation. A message signed with neither key is retried and dead-lettered after MaxDeliveryAttempts, so a rolling deploy recovers once hosts agree.
  • Jobs is keyed by the job record’s full CLR type name: "Jobs": { "<namespace>.<JobType>": { "TimeoutSeconds": 60, "MaxAgeMinutes": 30 } }. An unknown key is silently ignored; each host logs its durable job types at startup, by short type name. MaxAgeMinutes: 0 means never discard. Each stream also accepts a Concurrency overriding StreamConsumerConcurrency.
  • Startup checks. A job’s timeout must be shorter than its maximum age and, under Redis, than ReplyTtlSeconds and ClaimIdleMs. Under Redis, a fire-and-forget job’s maximum age must also clear the reclaim window — ClaimIdleMs plus two reclaim passes (each half of ClaimIdleMs, at least five seconds), ten minutes as shipped — or an interrupted job would be discarded rather than retried. So raising ClaimIdleMs means raising those jobs’ MaxAgeMinutes (the request pipeline that carries them ships at 15 minutes).
  • Two job streams. api:jobs:expiring carries work pointless once stale (AI generation, status polls); api:jobs:durable work that must never be dropped (charges, refunds, email). The handler declares its stream in code; Jobs changes only timing.
  • WebhookDedupeTtlSeconds — how long an incoming webhook’s delivery id is remembered, so a provider retry is acknowledged without re-running. Hosts refuse to start at three days and ten minutes or less (the window a signed PayPal delivery is accepted). Under InProcess it is in memory and lost on restart.
  • MaxLen is outage insurance, not a memory budget. Finished entries are deleted, so normal depth is the jobs in flight. At MaxLen Redis trims the oldest entries — during a worker outage, the unprocessed ones. Size it for the longest outage you want to survive, within maxmemory.
  • ConsumerGroup and each stream’s Name are set-once, like RedisKeyPrefix: renaming either on a live deployment leaves jobs already queued under the old name unprocessed or runs them again.
  • Dead letters can be counted, not handled, in the app. Under Redis, failed fire-and-forget jobs and unprocessable incoming webhooks go to {RedisKeyPrefix}:api:jobs:dead; Platform → Infrastructure shows the count and the worker logs a Warning with the redis-cli XRANGE command to read them, but there is no page to inspect or replay them. Replay by hand only an entry whose dead-letter-replayable is true, re-publishing its envelope to the stream named in its own dead-letter-from. Entries are deleted after Streams:DeadLetter:MaxAgeHours (720) or beyond its MaxLen (10,000).

Platform address

The platform address (app.example.com, or locally http://localhost:5034) is not configuration: it is entered at initial setup and edited at Platform → Platform Settings. Without one, /health reports Degraded but still 200, so watch the body. See Architecture → Routing modes.

The “Report abuse” link on a preview link’s banner mails DefaultOrganisationSettings:SiteEmail (set from SITE_EMAIL); blank hides it.

Authentication

"Authentication": {
"SessionAbsoluteLifetimeDays": 90,
"Facebook": { "AppId": "YOUR_FACEBOOK_APP_ID", "AppSecret": "YOUR_FACEBOOK_APP_SECRET" },
"Google": { "ClientId": "YOUR_GOOGLE_CLIENT_ID", "ClientSecret": "YOUR_GOOGLE_CLIENT_SECRET" },
"Microsoft": { "ClientId": "YOUR_MICROSOFT_CLIENT_ID", "ClientSecret": "YOUR_MICROSOFT_CLIENT_SECRET" },
"Lockout": { "MaxFailedAttempts": 5, "LockoutMinutes": 15 },
"CacheClaims": true,
"SecurityStampValidationIntervalMinutes": 15,
"ForceHttpsScheme": true,
"AuthRateLimitPerMinute": 60,
"PasskeyRateLimitPerMinute": 30
},
"RateLimiting": { "PermitLimitPerMinute": 100, "CircuitConnectionsPerMinute": 0 },
"TwoFactorAuthentication": { "Issuer": "Your Site" }

The sign-in cookie’s domain is not a setting. While SubdomainOrganisations is on and the platform address is a domain, a sign-in on the platform host or a subdomain is scoped to .{platform address}; otherwise it is host-only. Switching subdomains on or off expires the other copy on the next request. Nobody signs in on a customer hostname.

  • SessionAbsoluteLifetimeDays — the maximum lifetime of one sign-in; the cookie itself slides with every request. 0 or below removes the ceiling.
  • Lockout — per-account lockout after failed password, two-factor or recovery-code attempts, stored on the user so it holds across instances.
  • CacheClaims — caches a user’s per-organisation roles for Caching:Policies:VolatileSeconds (60 s), so a role or membership change can take that long to apply. Set false for immediate revocation at the cost of a database read per request.
  • SecurityStampValidationIntervalMinutes — how quickly a password change or sign-out-everywhere reaches other sessions and open pages. On that interval an open page loses its sign-in if a role was removed, the membership ended or impersonation is no longer allowed; if its organisation was deactivated or deleted, its connection ends and the browser reloads (anonymous pages are checked too).
  • ForceHttpsScheme — treats proxied requests as HTTPS so OAuth redirect URIs use https://. Only for requests with proxy headers, never in Development; leave it on.
  • TwoFactorAuthentication:Issuer — the label in users’ authenticator apps (DefaultIssuer if removed). It is baked in at enrolment, so set it before anyone enrols.

Rate limits. Throttled requests get 429 with Retry-After. “Per IP” counts an IPv6 client by its /64 and an IPv4-mapped client as its IPv4 address.

  • RateLimiting:PermitLimitPerMinute — global per-client budget (IP and User-Agent) for everything except static assets, circuit/SignalR traffic, health probes and the status pages. A backstop, not a substitute for your edge proxy.
  • AuthRateLimitPerMinute — a tighter IP-only budget for the anonymous account pages (login, two-factor and recovery-code sign-in, register, password reset, resend confirmation, passkey). /robots.txt, /sitemap.xml, /manifest.json and /favicon.ico are also limited by IP alone, at the global budget.
  • PasskeyRateLimitPerMinute — per IP, separately for each passkey options endpoint.
  • CircuitConnectionsPerMinute — new connections per client IP per minute per instance to /_blazor and plugin hubs (each page load or reconnect is one; messages on an open connection are not counted). Off (0) by default: turn it on (120 leaves room for several tabs and an office NAT) only once real client addresses reach the app through Security:ForwardedHeaders, or every visitor shares the proxy’s budget. It bounds how many circuits — each able to buffer an upload-sized message — one client holds.
  • Fixed in code, shared across instances: account creation (register and external sign-up) — 10 per client IP and 10 per circuit per 15 minutes, plus one 100-per-15-minutes budget shared by every client whose address cannot be read (behind an untrusted proxy every visitor is the proxy, so all share 10); re-sending an invitation from /Org/Select — 3 an hour per account and invitation; asking about a new address on Manage → Email — 10 different addresses an hour per account.
  • The auth-page and root-file budgets are shared across instances; everything else is per instance. A value of 0 or below is treated as 1, except CircuitConnectionsPerMinute, where 0 is off. Incoming webhooks have their own limits — see Architecture → Built-in Host Services.

External login providers

Create an app with Facebook, Google Cloud Console or Azure Portal → App Registrations, and register your platform domain’s redirect URI:

  • Facebook: https://yourdomain.com/signin-facebook; Data Deletion Request URL https://yourdomain.com/api/Facebook/DeleteUserData
  • Google: https://yourdomain.com/signin-google
  • Microsoft: https://yourdomain.com/signin-microsoft, registered as a Web platform. Uses the common endpoint, so personal and work/school accounts both work.

One redirect URI per provider is enough: subdomains send sign-in through the platform host.

Put the credentials in Authentication:{Provider}:*; a value starting YOUR_ or YOUR- counts as not configured. They seed Platform → External Sign-In (/Platform/ExternalSignIn) at initial setup, and what is saved there wins: an enabled provider with stored credentials uses them, applied at once on every replica; one with nothing stored falls back to configuration. A provider’s button appears only if it is enabled there. Callbacks never change, so neither does the redirect URI. There is one set of provider apps, the deployment’s; the Facebook data-deletion callback is verified against it.

Per-organisation SSO (OIDC)

With the OrganisationSso switch on, an organisation admin connects the organisation’s identity provider at Admin → Single Sign-On (/Admin/Sso); there are no appsettings keys. The admin picks one of four fixed providers and enters which of its tenants to use, plus client ID, secret and scopes. The sign-in address is built in code from the provider’s own host, so it cannot point anywhere else:

Provider The admin enters Sign-in address
Microsoft Entra ID the directory (tenant) ID, a GUID. common, organizations and consumers are refused https://login.microsoftonline.com/{tenant-id}/v2.0
Google Workspace the Workspace domain https://accounts.google.com. Only accounts whose hd claim is that domain can sign in
Okta the org name (acme), and the region from a list: okta.com or okta-emea.com https://{name}.okta.com or https://{name}.okta-emea.com
Auth0 the tenant name (acme), and the region from a list: none, US, EU, AU or JP https://{name}.auth0.com or https://{name}.{region}.auth0.com

There is no generic OIDC option and no custom Okta or Auth0 domains. Adding a provider means an entry in SsoProviderCatalog (Web/BlazorBlueprint.Web/Authentication/) with a fixed host list and a strict tenant pattern. The configuration is stored on the organisation, the secret encrypted.

  • Each organisation gets its own scheme, oidc-org:{organisationId}, with callback /signin-oidc-org-{organisationId} on the platform host, shown on the page. If you extend this, keep one scheme per organisation: the OIDC handler loads provider metadata once, so a shared scheme with per-request options does not work.
  • Only an active member can sign in through it. A first-time SSO sign-in creates an account that joins the organisation (subject to the plan’s seat limit). An address the provider asserts is never recorded as confirmed, and a forgotten-password reset removes the account’s organisation-SSO logins.
  • Discovery and token exchange go through the private-network egress check (see Security headers & outbound URLs).

Email

"DefaultOrganisationSettings": {
"Email": {
"Enabled": false,
"Provider": "MailerSend", // SendGrid | SMTP | MailerSend | Mailgun
"ApiKey": "",
"SenderEmail": "",
"SmtpHost": "", // SMTP only
"SmtpPort": 587, // SMTP only
"SmtpUseSsl": true, // SMTP only
"SmtpUsername": "", // SMTP only
"SmtpPassword": "", // SMTP only
"Domain": "", // Mailgun only
"Region": "" // Mailgun only: us | eu
}
}

These seed the deployment’s email settings at initial setup; afterwards manage them at Platform → Email (/Platform/Email). Every organisation sends with them — there is no per-organisation sender. The API key, SMTP password and every queued message’s subject and body are encrypted at rest.

Email ships disabled

With Enabled false, queued mail is discarded at send time and never retried — not held: a password reset or invitation queued before email is configured never goes out once it is, so request or re-send it. RequireEmailConfirmation refuses to turn on until email can be sent. Sends are never retried at the HTTP layer, because a retry can send a duplicate.

Bounces are not handled. Every send is checked against a suppression list (IEmailSuppressionStore), but nothing fills it: no provider bounce or complaint webhook is wired and there is no admin page. To act on bounces, add a provider webhook that calls IEmailSuppressionStore.SuppressAsync for permanent failures.

AI & Automation Integrations

Four providers ship: OpenAI, OpenRouter, Ollama and n8n (OpenRouter and Ollama use the OpenAI-compatible client, so the whole AI surface can point at a local Ollama). Credentials are shared by every organisation, encrypted at rest and managed at Platform → API Integrations (/Platform/ApiIntegrations).

"ApiIntegrations": {
"OpenAI": {
"BaseUrl": "https://api.openai.com",
"ApiVersion": "v1",
"DefaultIntegration": { "Enabled": true, "ApiKey": "", "OrganizationId": "" }
},
"OpenRouter": { "BaseUrl": "https://openrouter.ai/api" },
"Ollama": { "BaseUrl": "" },
"N8N": { "BaseUrl": "", "ApiPath": "/api/v1" }
}
  • Base URLs come only from ApiIntegrations:{Provider}:BaseUrl — not per integration, not compiled in. Ollama and n8n ship blank; set them to your instance. Point at an OpenAI-compatible gateway here too.
  • A provider with no address cannot be added: the page names the key to set and disables Save, and an existing integration whose address is removed shows Address not configured and fails every call.
  • Only OpenAI seeds itself, at startup, when DefaultIntegration.Enabled is true and an API key and address are set. Add the others on the page. Ollama needs no API key.
  • n8n takes an API key (sent as X-N8N-API-KEY to its API) and an optional webhook secret. With a secret, webhook calls send it as X-Webhook-Secret (check it with Header Auth in the Webhook node) instead of the API key, which n8n would otherwise record in its execution history.
  • Usage is counted, not priced, at Platform → API Usage — see Architecture → Built-in Host Services. Security:Audit:StoreApiUsage=false (on every host) turns the database record off.

Organisation Defaults & Time Zones

DefaultOrganisationSettings (beyond Email) is read at initial setup only, except SiteEmail, which is also read live as the contact address on the preview banner and the site-not-found, domain-not-verified and setup-not-allowed pages:

  • Site name, description, contact details, logo and favicon seed the platform organisation’s own site settings; other organisations never receive them. PWAManifestSettings and LegalPolicies seed the deployment’s PWA and legal-policy rows. The shipped legal text is a starting template, not legal advice.
  • Language, time zone, currency, theme (ThemeSettings:DesignThemeMode / OfficeColor) and an optional MemberLandingTarget seed both the platform organisation and the organisation defaults template (Platform → Organisation Defaults), which also holds whether the launcher is on. An unrecognised TimeZone is logged and replaced with UTC.

Editing these keys later changes nothing that exists. Change a live organisation at Admin → Organisation Settings, and the PWA and legal policies at /Platform/Pwa and /Platform/LegalPolicies.

Analytics

The application’s Google Analytics measurement id is set at Platform → Platform Settings, not in configuration. A new deployment has none (analytics off). It covers the platform host and organisation subdomains, and loads only after a visitor grants the analytics cookie category. A site on a customer hostname uses its own id.

“Default” means two different things

A deployment setting (email, external auth, PWA, cookie consent, legal policies, SMS, inbound email, analytics) has one row, read live by every organisation. The organisation defaults template is copied once into a new organisation.

Account email links use the platform address, never the request’s host, scheme or port: https://{platform address} on the default port, or a saved localhost address with its scheme and port. Without a saved address no account link is sent and invitations are refused. There is no setting for another scheme or port — outside Development the sign-in cookie is Secure, so put TLS in front of the app (a reverse proxy with a certificate, or a tunnel).

Each organisation has its own time zone (default UTC); timestamps are stored in UTC and shown in that zone. Convert to the organisation’s zone in date-bucketed reports and scheduled features — a background sweep has no ambient organisation and would otherwise use the server’s zone.

Custom Domains & Verification

With the CustomDomains switch on, an organisation connects hostnames it owns to a site at Admin → Domains. Lifecycle, limits and routing: Architecture → Custom domains and sites.

"DomainVerification": {
"TxtRecordPrefix": "site-verification=",
"TokenHmacSecret": "REPLACE_BEFORE_PRODUCTION_…" // placeholder — REQUIRED, 32+ characters of entropy
},
"BackgroundServices": {
"DomainVerification": { "Enabled": true, "CheckIntervalInMinutes": 60, "FailThreshold": 9 }
}

The admin publishes {TxtRecordPrefix}{token} as a TXT record at _bb-verify.{hostname}. The token is HMAC-SHA256(TokenHmacSecret, "{organisationId}:{hostname}") (lower-cased), truncated to 24 hex characters, so each organisation gets a different token and a record left by a previous owner verifies for no one else.

  • TxtRecordPrefix appears in your customers’ DNS. Set something of your own at first deploy and leave it: it is matched when records are read back, so changing it invalidates every verified domain. Set it identically on the worker.
  • TokenHmacSecret is required. Outside Development the Web host refuses to start with it blank or still the placeholder, and other hosts with it blank. Tokens are stored on the claim, so set it once; it also keys stored client-IP pseudonyms, which stop matching after a change. Same value on every host.
  • Verification uses public resolvers (Cloudflare and Google), on Verify and on the background schedule. A verified hostname is demoted after FailThreshold consecutive failed checks — nine hourly checks, about nine hours’ tolerance. Change CheckIntervalInMinutes and FailThreshold together.

Cloudflare for SaaS

Configure it at Platform → Cloudflare for SaaS (/Platform/CustomDomains) and each hostname is registered with Cloudflare once its TXT record verifies. Cloudflare then issues the certificate, and the Domains page also shows the CNAME target and any certificate-validation records. Unconfigured, only TXT verification runs and TLS for customer hostnames is up to you. For apex domains see Architecture → Custom domains and sites.

User Deletion

"BackgroundServices": { "UserDeletion": { "GracePeriodDays": 30, "HardDeleteLeaseMinutes": 60 } }

Account deletion is soft: sign-in is blocked at once, the user can cancel at /Account/DeletionStatus during the grace period, and the account is purged when it ends. The Facebook data-deletion callback uses the same path. Every worker replica runs the purge; HardDeleteLeaseMinutes is how long one account’s teardown is held by the replica that started it. A teardown that fails is retried on the next run; one cut off by a crash or shutdown is resumed once the lease has passed. Keep it above the longest teardown of one account. Other retention windows: Privacy → Data Retention.

Initial Setup Access

Who may create the platform organisation and first platform admin on a fresh deployment. No effect once an organisation exists.

"Security": {
"Setup": { "Token": "", "TrustedProxies": [], "TrustedNetworks": [] }
}
  • Token — pins the setup token (/initial-setup?setupToken=…). Blank, a random one is generated per process and logged at Warning on the first refused attempt; pin it with more than one web replica. A pinned value under 32 characters is ignored with an error. A valid token works from any address and hostname.
  • TrustedProxies / TrustedNetworks — peer IPs / CIDR ranges allowed through without a token, when the Host is also localhost, 127.0.0.1 or ::1. Loopback is trusted this way only in Development, since elsewhere a same-host reverse proxy makes every visitor loopback. No shipped compose file sets either, so containers use the token; naming the Docker bridge network (172.16.0.0/12) trusts everyone who can reach the published port until setup is done.

See Security → Initial setup.

Install Reporting

"InstallReporting": { "Endpoint": "https://telemetry.blazorblueprint.net" }

Web host only. Where the one-time install count (sent when initial setup completes) and the platform dashboard’s update check go — only if the operator left Share install and update-check info ticked at setup. Blank turns both off whatever was chosen. Each call has a four-second limit, is never retried and never fails a page. What is sent: Privacy → What a deployment sends to Blazor Blueprint.

InternalApi Credentials

The Web app calls the InternalApi with a client-credentials JWT. The client secret is one shared value set in both hosts; all secrets ship blank.

// Web host — refuses to start without ClientSecret whenever Services:InternalApi:Enabled is true
// (every topology except Lite, which sets it false).
"Services": {
"InternalApi": {
"Enabled": true,
"Url": "https+http://localhost:8081", // leave set even under Lite
"ClientId": "blazorblueprint-web",
"ClientSecret": "" // same value as Security:WebApp:ClientSecret
}
}
// InternalApi host — refuses to start without these.
"Security": {
"WebApp": { "ClientId": "blazorblueprint-web", "ClientSecret": "" },
"Jwt": { "SecretKey": "", "Issuer": "BlazorBlueprint.InternalApi", "Audience": "BlazorBlueprint.Web", "ExpiryMinutes": 60 } // SecretKey: 32+ characters
},
"InternalApi": { "MaxRequestBodyBytes": 1048576 }, // 1 MiB request-body cap
"Swagger": { "Enabled": false } // Swagger UI outside Development

Security:Jwt is validated at startup: SecretKey at least 32 characters, Issuer and Audience set, ExpiryMinutes 1–1440. Under Lite there is no InternalApi; the Web host serves plugin API endpoints and mints their tokens itself, generating a per-process key when SecretKey is unset.

On a pipeline deploy, WEBAPP_CLIENT_SECRET is written by scripts/render-deploy-env.sh to both Services__InternalApi__ClientSecret and Security__WebApp__ClientSecret, so they cannot drift (a mismatch is a 401 on every internal call). Locally, copy init-user-secrets.template.ps1 to the git-ignored init-user-secrets.ps1, which writes both. Token flow: API Reference.

File Storage

"Storage": {
"Provider": "", // LEAVE BLANK unless choosing AzureBlob or S3
"ServeMode": "Proxy", // Proxy | Direct
"MaxFileSizeMb": 25,
"DirectLinkValidityHours": 168, // Direct mode only; default and maximum are 7 days
"AzureBlob": { "ConnectionString": "", "ContainerName": "" },
"S3": { "Bucket": "", "Region": "", "AccessKeyId": "", "SecretAccessKey": "", "ServiceUrl": "" }
}

These seed the platform storage settings on first read; from then on Platform → Storage (/Platform/Storage) is the source of truth. Cloud credentials are encrypted at rest.

Leave Provider blank unless you want cloud storage

Blank follows the database backend: GridFS on MongoDB, bytea on PostgreSQL, varbinary on SQL Server. A value pins it permanently — GridFs on a relational backend makes uploads fail. Set it only to AzureBlob or S3.

  • ServeMode — Proxy streams every file through the app; Direct redirects member-visibility files on a cloud provider to a time-limited signed URL (database storage and public files always stream). /api/files/{id} never expires; DirectLinkValidityHours bounds only a copied signed URL, which keeps the uploaded file name. A plugin may also ask for Proxy or Direct on one upload, which overrides this setting for that file.
  • MaxFileSizeMb — enforced for every upload, streamed ones included. Uploads are held in memory up to this size before they are stored.
  • Public images are stripped of EXIF and other metadata; see Privacy.

Files are encrypted by the app under the Data Protection key ring while Security:Encryption:Enabled is on, on every provider, whenever they stream through the app. A file uploaded to be served Direct (by this setting or by the uploading plugin; Member files on Azure Blob or S3 only) is stored without the app’s encryption, because the browser fetches the stored bytes through the signed URL; it relies on the provider’s own encryption at rest — check what your provider and bucket settings give you. Details: Security → Stored files.

  • Changing ServeMode, the provider or Security:Encryption:Enabled affects new uploads only. Each file keeps the form it was written in: an encrypted file always streams through the app; a plain one may be redirected while Direct applies to it.
  • Public files always stream through the app (decrypted there when encrypted), with public, max-age=86400, so a CDN in front of the app can cache them.
  • Behind a CDN or proxy service, Proxy sends every file download through it. Check its terms for serving files and large media through it; Direct keeps member file downloads off it.
  • PostgreSQL file storage needs PostgreSQL 16 or later (the shipped compose files use 16). Large files are read a slice at a time, so a download holds neither the whole file in memory nor a database connection.

Web Push (VAPID)

"Push": {
"VapidPublicKey": "",
"VapidPrivateKey": "",
"ContactEmail": "" // the VAPID "sub": an address a push service can reach you at
}

One VAPID key pair serves the deployment. You need not set it: one is generated on first use and stored (private key encrypted), managed at Platform → Push Notifications. Set the keys only to bring an existing pair across. When both are set they win outright over the stored pair, must be set on every host that sends push (the worker included), and a non-blank ContactEmail then overrides the page’s. Set both or neither; a single key is ignored with a warning.

Security Headers & Outbound URLs

"Security": {
"Headers": {
"Enabled": true,
"ApplicationContentSecurityPolicy": "default-src 'self'; script-src 'self' 'unsafe-inline' https://www.googletagmanager.com; ... frame-src 'self' https://www.youtube-nocookie.com https://www.youtube.com https://player.vimeo.com https://www.google.com https://open.spotify.com https://w.soundcloud.com; ...",
"CustomerSiteContentSecurityPolicy": "default-src 'self'; script-src 'self' 'unsafe-inline' https:; ... frame-src 'self' https:; frame-ancestors 'self'; object-src 'none'; base-uri 'self'",
"FrameOptions": "SAMEORIGIN",
"ReferrerPolicy": "strict-origin-when-cross-origin",
"EmbedFrameAncestors": "",
"EmbeddableRoutePrefixes": []
},
"WebhookEgress": { "AllowPrivateNetworks": false },
"ForwardedHeaders": { "KnownProxies": [ "127.0.0.1", "::1" ], "KnownNetworks": [ "127.0.0.0/8" ], "AllowedHosts": [] },
"Encryption": { "Enabled": true }
}

Headers is read by the Web host only. Enabled: false drops X-Content-Type-Options, X-Frame-Options, Referrer-Policy, the CSP and the no-store directive that keeps signed-in pages out of the back-forward cache; leave it on.

Encryption:Enabled — true (default) encrypts new values of [Encrypted] fields and new uploaded files at rest; false stores both in plain text (startup warns), so database backups and storage buckets then hold them readable. Sealed values (queued job payloads, the account deletion status link) are encrypted either way. Values and files are read as stored whatever the setting, and nothing already stored is converted. Allowed in every environment; keep it equal on every host, the DbMigrator included. See Security → Turning encryption off.

ApplicationContentSecurityPolicy is the setting you will edit first. It applies to the platform host and organisation subdomains, previews included. It allows 'self', Google Analytics (the gtag loader in script-src; https://*.google-analytics.com, https://*.analytics.google.com and https://*.googletagmanager.com in connect-src; img-src https:), and in frame-src YouTube, Vimeo, Google Maps, Spotify and SoundCloud. Any other third-party script, font, style, API or embed origin — a chat widget, a payment element — is blocked until you add it, and the only symptom is a CSP violation in the browser console.

CustomerSiteContentSecurityPolicy is sent instead on a verified customer hostname (never a preview). A site embeds whatever its owner pastes, so it allows scripts, styles, images, fonts, frames and connections from any HTTPS origin, while keeping no plain HTTP, object-src 'none', base-uri 'self' and frame-ancestors 'self'. A customer hostname is a separate origin with no session, so this loosens nothing on the application.

Embedding is off by default. To let a route be framed elsewhere (a support widget), list its path prefix in EmbeddableRoutePrefixes and the allowed origins in EmbedFrameAncestors as a space-separated CSP source list (https://customer-a.com https://*.customer-b.com). Only matching routes get the relaxed frame-ancestors and lose X-Frame-Options. With CustomDomains on, an embeddable route also admits the verified customer hostnames of the organisation the request resolved to (cached 60 s), so an organisation can frame a widget on its own website without a configuration change.

WebhookEgress:AllowPrivateNetworks is an SSRF control

It guards every outbound address an operator or organisation admin can supply: outgoing webhook subscriptions, the endpoints an SSO provider’s discovery document names, and browser push endpoints. Left false, loopback, link-local and private (RFC 1918) targets are refused. Set it true only in local development. These requests ignore HTTP_PROXY / HTTPS_PROXY — through a proxy the check would see the proxy’s address — so proxied egress is not supported for them.

ForwardedHeaders decides which peers may set X-Forwarded-*; it ships loopback-only, so add your reverse proxy. See Deployment → Reverse proxy and forwarded headers.

ForwardedHeaders:AllowedHosts — extra hosts a trusted proxy may name in X-Forwarded-Host; usually left empty. A forwarded host is kept only when it is the platform address or beneath it, a customer hostname an organisation added (pending ones included), localhost, or an entry here (exact, or *.example.com). Any other is ignored, the request keeps the proxy’s Host, and a warning is logged at most every five minutes. Before initial setup every forwarded host is kept. Read at startup.

Outbound HTTP Policy

"ApiClients": {
"Default": { "TimeoutSeconds": 30, "RetryCount": 3, "RateLimitPerSecond": 20, "CircuitBreaker": true },
"openai": { "TimeoutSeconds": 180, "AttemptTimeoutSeconds": 180, "RateLimitPerSecond": 5 },
"n8n": { "TimeoutSeconds": 180, "AttemptTimeoutSeconds": 180, "RateLimitPerSecond": 5 },
"health": { "TimeoutSeconds": 10, "RetryCount": 0, "CircuitBreaker": false },
"MailerSendEmailProvider": { "BaseUrl": "https://api.mailersend.com/v1/email", "TimeoutSeconds": 45, "AttemptTimeoutSeconds": 30, "RetryCount": 0 }
// …plus SendGridEmailProvider, MailgunEmailProvider, paypal and cloudflare in the shipped file
}

Every outbound provider call goes through timeout, retry, circuit breaker and rate limit. Some values are requirements: AI calls need minutes, the health probe must have no circuit breaker, and email must never retry (a retried send is a duplicate). Apply that rule to anything non-idempotent you add.

  • Resolution: ApiClients:{name} → the registering code’s defaults → ApiClients:Default. BaseUrl never inherits from Default. AttemptTimeoutSeconds (per try) defaults to half the overall timeout, or all of it for a client that does not retry.
  • Compiled RetryCount: 0 for email, OpenAI, n8n, push, outgoing webhooks, the SSO metadata test, twilio and cloudflare (a timed-out create or delete may already have landed). cloudflare is also limited to 4 requests a second in code. A configured entry still overrides these.
  • RateLimitPerSecond is per instance. Excess calls queue for up to 20 seconds’ worth; beyond that, or if the timeout fires while queued, the call fails at once with ApiClientRateLimitRejectedException (an HttpRequestException) — not sent, not retried, not counted by the circuit breaker. Fractional rates work (0.5 is one call every two seconds); a changed rate applies within a couple of minutes without a restart.

Background Sweeps

"BackgroundServices": {
"RunInProcess": false, // true only where there is no BackgroundWorker (Lite)
"Email": { "Enabled": true, "ProcessingIntervalInSeconds": 300, "MaxEmailsPerBatch": 20, ... },
"DomainVerification": { "Enabled": true, "CheckIntervalInMinutes": 60, "FailThreshold": 9, ... },
"AppointmentReminders": { "Enabled": true, "ProcessingIntervalInSeconds": 300, ... },
"WebhookDeliveryRetry": { "Enabled": true, "ProcessingIntervalInSeconds": 300, "StuckRowAgeThresholdMinutes": 15, ... },
"SmsStrandedSends": { "Enabled": true, "ProcessingIntervalInSeconds": 900, "StrandedAfterMinutes": 60, "MaxRowsPerOrgPerTick": 100 },
"PaymentReconciliation": { "Enabled": true, "ProcessingIntervalInSeconds": 900, "MinPendingAgeMinutes": 10, "AbandonedCheckoutDays": 3, ... },
"Subscriptions": { "Enabled": true, "ProcessingIntervalInSeconds": 3600, "GraceDays": 7, "AbandonedCheckoutDays": 3, ... },
"PlatformChargeReconciliation": { "Enabled": true, "ProcessingIntervalInSeconds": 3600, "MinPendingAgeHours": 24, "AbandonedCheckoutDays": 3, "MaxChargesPerTick": 100 },
"DataRetention": { ... }, // see Privacy → Data Retention
"UserDeletion": { "GracePeriodDays": 30, "HardDeleteLeaseMinutes": 60 },
"InfrastructureMonitoring": { "CheckIntervalSeconds": 60 } // Web host only
}

The sweeps run in the BackgroundWorker, so in the full stack the worker’s values are in force. Each has its own interval and Enabled switch (data retention has ten, one per table — the Enable*Cleanup keys); the shipped files carry every key. With RunInProcess: true the Web host runs them from its own file, and refuses to start with RunInProcess: true and Messaging:Transport: Redis.

  • Email is a backstop: a message is sent the moment it is queued, and the sweep picks up what that missed and retries failures. EmptyOrgCacheTtlSeconds (300) skips an organisation whose last pass found nothing pending, so a retry there can wait that much longer; 0 checks every organisation every tick.
  • Email:MaxEmailsPerBatch — per organisation per run, highest priority then oldest first, so a backlog delays the newest mail and a queued password reset is never overtaken indefinitely.
  • SmsStrandedSends — an SMS still sending StrandedAfterMinutes after a worker picked it up belongs to an attempt that never finished (its process stopped or crashed mid-call). It is marked outcome unknown and never sent again, since the provider may already have sent it; a later delivery receipt still records what happened. StrandedAfterMinutes must be at least 15 while the sweep is enabled, or the host refuses to start.
  • PlatformChargeReconciliation — re-asks the provider about up to MaxChargesPerTick app charges on the platform payment account older than MinPendingAgeHours and still awaiting payment, records paid ones, and past AbandonedCheckoutDays expires the checkout and marks it failed once the provider confirms it dead.
  • AbandonedCheckoutDays (in PaymentReconciliation, Subscriptions and PlatformChargeReconciliation) must be at least 2 while its sweep is enabled, or the host refuses to start: a hosted checkout can stay payable for a day. Keep it above the provider’s checkout lifetime.
  • Subscriptions:GraceDays must match in the Web, worker and InternalApi files: the worker expires a past-due subscription after it, and the others use it to end entitlement.
  • InfrastructureMonitoring drives Platform → Infrastructure’s status checks and runs only when Redis is in use; the page reaches the worker at Services:BackgroundWorker:Url (or a list under Services:BackgroundWorkers).

Retention windows: Privacy → Data Retention.

Logging, Telemetry & Audit

"OTEL_EXPORTER_OTLP_ENDPOINT": "",
"Telemetry": { "MaxSeriesPerMetric": 2000, "TraceSampleRatio": 1.0 },
"Logging": {
"LogLevel": { "Default": "Information", "Microsoft.AspNetCore": "Warning", "BlazorBlueprint.Audit": "Information" },
"Console": {
"FormatterName": "simple",
"FormatterOptions": { "SingleLine": true, "IncludeScopes": true, "TimestampFormat": "yyyy-MM-ddTHH:mm:ss.fffZ ", "UseUtcTimestamp": true }
}
},
"Security": {
"Audit": {
"StoreOrganisationAudit": true, "StorePlatformAudit": true, "StoreSecurityEvents": true,
"TenantVisibleImpersonationAudit": true, "StoreApiUsage": true
},
"PlatformAdmin": { "OrgImpersonation": true } // Web app only
}
  • OTEL_EXPORTER_OTLP_ENDPOINT — where logs, metrics and traces go over OpenTelemetry; blank sends nothing. The pipelines point it at the bundled Grafana when GRAFANA_ENABLED=true. OTEL_SERVICE_NAME, OTEL_RESOURCE_ATTRIBUTES and OTEL_EXPORTER_OTLP_HEADERS are honoured. See Deployment → Observability.
  • Telemetry:MaxSeriesPerMetric — tag combinations per application metric (default 2,000); beyond it new ones fold into an overflow series and totals stay right.
  • Telemetry:TraceSampleRatio — share of new traces kept, 0–1 (default 1). Traces continued across the deployment’s hosts follow the first host’s decision. The Web host ignores an incoming traceparent, so outside callers cannot steer sampling. Same value on every host.
  • Logging:Console — one line per event with UTC timestamps and scopes, for line-based shippers. FormatterName: json gives one JSON object per line.
  • Logging:LogLevel:BlazorBlueprint.Audit — the log copy of every audit event (ids only). None stops it; the database trail is unaffected.
  • Security:Audit:* — whether each audit trail is stored (StoreOrganisationAudit, StorePlatformAudit, StoreSecurityEvents) and the API usage totals (StoreApiUsage). false stores no new rows and its page says so; events are still logged and counted. TenantVisibleImpersonationAudit decides whether a platform admin entering an organisation they are not a member of is also recorded in that organisation’s log (the platform log always records it). All three hosts write these, so set the same values on every host. See Security → Audit trail.
  • Security:PlatformAdmin:OrgImpersonation — whether a platform admin may enter and administer an organisation they are not a member of (default true; every visit is audited). Web app only. Configuration rather than a Platform Settings switch, so a platform-admin session cannot enable it for itself; Platform → Infrastructure shows its value.

Remaining Host Settings

"Localization": { "DefaultCulture": "en-GB" },
"Cors": { "AllowedOrigins": [] },
"AllowedHosts": "*",
"DataProtection": {
"KekPath": "/kek",
"Kek": "",
"KeyVault": { "KeyId": "", "TenantId": "", "ClientId": "", "ClientSecret": "", "ManagedIdentityClientId": "" },
"ApplicationDiscriminator": "",
"AllowDiscriminatorChange": false
},
"QuestPdf": { "LicenseType": "Community" }
  • Localization:DefaultCulture — the culture for currency, dates and numbers on every host, independent of the server OS (a Linux container without LANG would otherwise show a generic currency symbol). Blank or unrecognised falls back to en-GB.
  • Cors:AllowedOrigins — empty allows no cross-origin browser caller, which is right for Blazor Server. An origin listed here gets credentialed access to the whole Web app, not just SignalR: the policy applies to every request and allows any method and header with the visitor’s cookies, so a script on that origin can act as whoever is signed in. List only origins you trust as much as this one; * stops the host at startup. (Development allows any origin.)
  • DetailedErrors — sends server exception detail to the browser over the circuit. On in appsettings.Development.json, pinned off by the Production overlays; never set it true anywhere else.
  • AllowedHosts — "*" ships because the app cannot know your hostnames; narrowing it is a cheap defence against Host-header tricks.
  • DataProtection:* — the key-encrypting key (KEK) and the Data Protection key ring. The ring encrypts stored data ([Encrypted] fields, sealed values, files) as well as sign-in, and is stored in the platform database, each key wrapped by the KEK.
    • Kek (DATA_PROTECTION_KEK) supplies the KEK. Blank, it is kek.txt in KekPath (/kek, the KEK volume), generated on first start and shown once at initial setup as the recovery key. Set Kek to that recovery key if the volume is lost or the containers do not share a disk. In Development a blank or /kek KekPath means a per-checkout local folder.
    • KeyVault:KeyId keeps the KEK in an Azure Key Vault key instead (key id without a version; not with Kek). TenantId, ClientId and ClientSecret name a service principal — all three, or none for a managed identity; ManagedIdentityClientId picks a user-assigned one.
    • ApplicationDiscriminator (blank = built-in default) feeds key derivation and must never change after first deploy; the host refuses to start on a mismatch. AllowDiscriminatorChange: true abandons everything protected under the old value, and is also the only way past a key ring with no creator record, or a set-up deployment whose database has no key ring at all. Prefer restoring the key ring from backup; if you must, set it for one start only.
    • Details: Security → Encryption keys.
  • QuestPdf:LicenseType — the QuestPDF licence the renderer declares. Community is free only below QuestPDF’s thresholds (see THIRD-PARTY-NOTICES.md); above them set Professional or Enterprise. Blank means Community; an invalid value stops the host. Same on all three hosts; in containers set QUESTPDF_LICENSE_TYPE (see Deployment → Application secrets).

The “Powered by Blazor Blueprint” footer credit has no setting: it is always shown, as the free licence requires. A commercial licence lets you remove it (see LICENSE) — delete it from Web/BlazorBlueprint.Web/Components/Layout/SiteFooterView.razor.