Skip to content

Configuration ​

One page for every option

This page covers every choice of --Persistence, --Auth, --IncludeTests and --Aspire. A label says which options a part is for; the copy in your app's docs/ folder has only yours. ApiHost stands for your app's name.

Every setting ApiHost reads, by section. Set them in appsettings.json, appsettings.Production.json, or environment variables, where : becomes __ (Jwt:SigningKey is Jwt__SigningKey); a list's items are numbered (Accounts:AdminEmails:0). The defaults are the code's, or appsettings.json's where it sets one. Deployment lists the ones to set in production.

With accounts

Accounts ​

SettingTypeDefaultNotes
Accounts:AdminEmails:0IList<string>Accounts with these emails are made admins once their email is confirmed (at startup, and when they log in). Set at least one in production, e.g. Accounts__AdminEmails__0. Removing an email here doesn't take the role away; do that on the admin page. (AccountOptions.cs)
Accounts:AllowRegistrationbooltrueWhen false, only people an admin invites can get an account (the admin page's Invite form). (AccountOptions.cs)
Accounts:AskForProductNewsbooltrueWhen true, sign-up has an unticked "Send me product news" box, and Settings → Preferences a switch for it; the choice is kept in UserPreferences.ProductNews. Turn it off if the app doesn't send product news. (AccountOptions.cs)
Accounts:AuthAttemptsPerMinuteint10Sign-in and account attempts (log in, register, password reset, two-factor codes and the like) allowed per client address per minute; more get 429 Too Many Requests.
Accounts:RejectBreachedPasswordsboolfalseWhen true, new passwords that are known from data breaches are refused, checked with Have I Been Pwned without sending the password (Identity/BreachedPasswords.cs). Off by default, as it calls an outside service. (AccountOptions.cs)
Accounts:RequireTwoFactorForAdminsboolfalseWhen true, the Admin role only works for accounts protected by two-factor authentication (or that sign in only with passkeys): other admins' tokens leave the role out, so the back office refuses them until they set it up in Settings (Identity/TwoFactor.cs). (AccountOptions.cs)
Accounts:TwoFactorIssuerstringApiHostThe name an authenticator app shows next to the account (two-factor authentication). (AccountOptions.cs)

Analytics ​

SettingTypeDefaultNotes
Analytics:ConnectOrigins:0IList<string>Other origins Tag Manager's tags send data to or show tracking pixels from, such as https://.google-analytics.com and https://.google.com for Google Analytics. They're added to the page's Content-Security-Policy (Security/SecurityHeaders.cs) as connect-src and img-src, which otherwise block them. (AnalyticsOptions.cs)
Analytics:ConsentVersionint1Raise this when the cookie policy changes (a new tag that sets cookies, say): everyone is asked again, since what they agreed to was the old policy. (AnalyticsOptions.cs)
Analytics:GoogleTagManagerIdstringThe container's ID, such as GTM-ABC1234. (AnalyticsOptions.cs)
Analytics:ScriptOrigins:0IList<string>Other origins tags load scripts from (Tag Manager's own is always allowed). Kept apart from ConnectOrigins because allowing scripts from a broad origin such as https://*.google.com would let an attacker's injected script load through it. (AnalyticsOptions.cs)

With organisations

ApiKeys ​

SettingTypeDefaultNotes
ApiKeys:AllowedPaths:0string[]["/api/todos", "/mcp"]The API's paths an API key can be used on; everything else (account, organisation, billing and admin endpoints, and the realtime hub) needs a user's login. (ApiKey.cs)
ApiKeys:MaxPerOrganisationint25(ApiKey.cs)
ApiKeys:RequestsPerMinuteint120Requests a minute for each key, after which it gets 429 Too Many Requests. (ApiKey.cs)
ApiKeys:RotationGracePeriodTimeSpan1.00:00:00How long the old key keeps working after a rotation, so programs can switch over. (ApiKey.cs)

App ​

SettingTypeDefaultNotes
App:ClientUrlstringThe app's public address, such as https://app.example.com. Links in emails, passkeys and the sitemap use it; required outside Development with accounts.

Attachments ​

SettingTypeDefaultNotes
Attachments:MaxByteslong26214400 (25 MB)The largest file that may be attached. With Storage:Provider Local, Storage:Local: MaxUploadBytes must be at least this too. (TodoAttachments.cs)
Attachments:MaxPerTodoint10How many files one Todo may have. (TodoAttachments.cs)

With accounts

Authentication ​

SettingTypeDefaultNotes
Authentication:GitHub:ClientIdstringWith ClientSecret: turns on "Continue with GitHub".
Authentication:GitHub:ClientSecretstring
Authentication:Google:ClientIdstringWith ClientSecret: turns on "Continue with Google" (how-to).
Authentication:Google:ClientSecretstring

With organisations

Billing ​

SettingTypeDefaultNotes
Billing:CurrencystringUSDThe currency of prices shown and charged, when the organisation hasn't chosen one. (BillingAccount.cs)
Billing:Stripe:AutomaticTaxboolfalseStripe Tax: Stripe works out and adds sales tax and VAT. Turn it on in the Stripe dashboard first. (Stripe charges for it.) (StripePaymentProvider.cs)
Billing:Stripe:SecretKeystringFrom the Stripe dashboard (Developers > API keys): sk_test_... while testing, sk_live_... in production. (StripePaymentProvider.cs)
Billing:Stripe:WebhookSecretstringThe webhook endpoint's signing secret (whsec_...), from the dashboard or stripe listen. (StripePaymentProvider.cs)
Billing:TrialDaysint14The reverse trial: a new organisation gets TrialPlan for this many days, then the free plan unless it subscribes. 0 turns trials off. (BillingAccount.cs)
Billing:TrialPlanstringPlanCatalogue.Pro(BillingAccount.cs)

ConnectionStrings ​

SettingTypeDefaultNotes
Marten ConnectionStrings:MartenstringHost=localhost;Port=5432;Database=apihost;Username=postgres;Password=postgresThe PostgreSQL database, for Marten and Wolverine.
EF Core ConnectionStrings:PostgresstringHost=localhost;Port=5432;Database=apihost;Username=postgres;Password=postgresThe PostgreSQL database, for EF Core and Wolverine.

With accounts

Email ​

SettingTypeDefaultNotes
Email:Smtp:FromstringThe sender, as an address or "Name <address>". (SmtpEmailSender.cs)
Email:Smtp:Hoststring(SmtpEmailSender.cs)
Email:Smtp:Passwordstring(SmtpEmailSender.cs)
Email:Smtp:Portint587(SmtpEmailSender.cs)
Email:Smtp:SecuritySecureSocketOptionsSecureSocketOptions.AutoAuto (the default) uses TLS when the server offers it; None for a local test server such as Mailpit; SslOnConnect for port 465; StartTls to require TLS on port 587. (SmtpEmailSender.cs)
Email:Smtp:UserNamestring(SmtpEmailSender.cs)

With accounts

Jwt ​

SettingTypeDefaultNotes
Jwt:AccessTokenLifetimeMinutesint15(JwtOptions.cs)
Jwt:AudiencestringApiHost(JwtOptions.cs)
Jwt:IssuerstringApiHost(JwtOptions.cs)
Jwt:RefreshTokenLifetimeDaysint14(JwtOptions.cs)
Jwt:RefreshTokenReuseGraceSecondsint30How long a rotated refresh token is still accepted (see RefreshEndpoint): two tabs refreshing at the same moment, or an app that lost the response to its refresh, aren't taken for a stolen token. 0 turns it off. (JwtOptions.cs)
Jwt:SigningKeystring(JwtOptions.cs)
SettingTypeDefaultNotes
Legal:PrivacyUrlstring(LegalOptions.cs)
Legal:TermsUrlstringWhere the documents are: a page of this app ("/terms") or a full address ("https://example.com/terms"). (LegalOptions.cs)
Legal:Versionint1Raise this when either document changes in a way people should agree to again: everyone is asked to accept the new version when they next use the app. (LegalOptions.cs)

With accounts

Notifications ​

SettingTypeDefaultNotes
Notifications:KeepPerUserint100How many a user keeps: older ones are deleted as new ones arrive. (Notification.cs)

With organisations

Organisations ​

SettingTypeDefaultNotes
Organisations:InvitationsPerHourint20Invitations each user can send an hour, across their organisations; after that they get 429 Too Many Requests. (OrganisationOptions.cs)
Organisations:MaxPendingInvitationsint100Unexpired invitations an organisation can have waiting at once. (OrganisationOptions.cs)

Other ​

SettingTypeDefaultNotes
OTEL_EXPORTER_OTLP_ENDPOINTstringWhere to send traces, metrics and logs (OpenTelemetry over OTLP); unset, they are not exported.

With accounts

Pictures ​

SettingTypeDefaultNotes
Pictures:GravatarboolfalseShow a user's Gravatar (https://gravatar.com) when they haven't uploaded a picture. Off by default: the browser would ask Gravatar for it with a SHA-256 hash of the user's email, which tells a third party the hash and the viewer's IP address, so turn it on only if your privacy policy says so. Without it, the user's initials are shown. (PictureFiles.cs)
Pictures:UploadsPerMinuteint10Picture, logo and Todo attachment uploads allowed per user per minute; more get 429 Too Many Requests. (PictureFiles.cs)

Storage ​

SettingTypeDefaultNotes
Storage:AzureBlob:ConnectionStringstringA connection string with the account key (signed URLs are signed with it). (StorageOptions.cs)
Storage:AzureBlob:Containerstringfiles(StorageOptions.cs)
Storage:Local:MaxUploadByteslong26214400 (25 MB)The largest upload the app accepts through a signed URL. (With S3 and Azure the store takes any size, so features check sizes after the upload; see IFileStorage.) (StorageOptions.cs)
Storage:Local:RootPathstringdata/filesThe folder files are kept in, relative to the app's folder unless absolute. In a container, mount a volume here (deploy/docker-compose.yml does), or files are lost with the container. (StorageOptions.cs)
Storage:ProviderLocal, S3, AzureBlobLocal(StorageOptions.cs)
Storage:S3:AccessKeystringLeave both empty on AWS to use the SDK's usual sources (environment variables, an instance or task role). (StorageOptions.cs)
Storage:S3:Bucketstring(StorageOptions.cs)
Storage:S3:ForcePathStyleboolfalsePuts the bucket in the URL's path (https://host/bucket/key) rather than its host name (https://bucket.host/key). Self-hosted stores usually need this. (StorageOptions.cs)
Storage:S3:Regionstringus-east-1AWS: the bucket's region, such as eu-west-1. Other stores: whatever region they document ("auto" for Cloudflare R2, "us-east-1" for most self-hosted stores). (StorageOptions.cs)
Storage:S3:SecretKeystring(StorageOptions.cs)
Storage:S3:ServiceUrlstringThe store's endpoint, such as https://<account>.r2.cloudflarestorage.com or https://s3.eu-central-003.backblazeb2.com. Leave empty for AWS S3 itself, which uses Region. (StorageOptions.cs)

With organisations

Webhooks ​

SettingTypeDefaultNotes
Webhooks:AllowPrivateNetworksboolfalseLets webhooks go to localhost and private networks, and over plain HTTP. On in Development only: in production a webhook URL could otherwise be used to reach the app's own network. (Webhook.cs)
Webhooks:Incoming:Secrets:<name>IDictionary<string, string>new Dictionary<string, string>(StringComparer.Ordinal)Signing secret ("whsec_...") by source name, such as "chat". (IncomingWebhooks.cs)
Webhooks:KeepDeliveriesForTimeSpan30.00:00:00Deliveries older than this are deleted when new ones are made. (Webhook.cs)
Webhooks:MaxPerOrganisationint10(Webhook.cs)
Webhooks:TimeoutTimeSpan00:00:10How long a receiver has to answer. (Webhook.cs)

Documentation for v0.9.0. Released under the MIT licence.