Skip to content

Configuration

This page is the canonical lookup for every Fleans configuration key, what it does, and which environment variable equivalent operators set on a container or systemd unit. If you’re trying to figure out why Persistence__Provider isn’t taking effect on a production silo, or whether Authentication__ClientId belongs on the API or the Web host, this is the right page.

Fleans configuration uses two notations that map onto each other via .NET’s standard configuration provider:

  • A:B:C — colon-separated, used in appsettings.json and CLI args. Example: Fleans:Streaming:Provider.
  • A__B__C — double-underscore-separated, used in environment variables. Example: Fleans__Streaming__Provider.

The mapping is mechanical: each : in a config key becomes __ (double underscore) when the value is supplied as an environment variable. This is the behavior of EnvironmentVariablesConfigurationProvider — the same convention every ASP.NET Core / .NET host uses, not a Fleans invention.

Terminal window
# These three are equivalent:
appsettings.json: "Fleans": { "Role": "Worker" }
CLI: dotnet run -- --Fleans:Role Worker
env var: Fleans__Role=Worker dotnet run

For all keys below, the column “Env var” shows the double-underscore form; the column “Config key” shows the canonical colon form you’d put in appsettings.json.

These are the keys every production silo reads at startup.

Env varConfig keyRead atDefault
Fleans__RoleFleans:RoleFleans.Api, Fleans.WorkerHost, Fleans.CustomWorkerHost"Combined" (Api), "Worker" (WorkerHost / CustomWorkerHost — defaulted at startup if absent)

Allowed values: Core, Worker, Combined (case-insensitive). Invalid values throw at startup. The role is stamped into the Orleans SiloName as {role}-{machine}-{guid}, visible in the Orleans Dashboard’s silo membership page.

Env varConfig keyRead atDefault
Persistence__ProviderPersistence:ProviderFleans.ServiceDefaults"Sqlite" (case-insensitive; accepts Sqlite or Postgres)
Persistence__MaxEventsPerLoadPersistence:MaxEventsPerLoadFleans.Persistence1000

The provider toggle. Postgres runs MigrateAsync() at startup; Sqlite runs EnsureCreated(). SQLite is dev-only and ignored in container/k8s deployments. Any other value (typo like PostgreSQL, empty string, whitespace) throws ArgumentException at silo startup so misconfigured deployments fail fast instead of silently falling back to an in-pod SQLite file.

Env varConfig keyRead atDefault
Fleans__Streaming__ProviderFleans:Streaming:ProviderFleans.ServiceDefaults"memory" (case-insensitive; accepts memory or kafka)
Fleans__Streaming__Kafka__BrokersFleans:Streaming:Kafka:BrokersFleans.ServiceDefaults (binding)
Fleans__Streaming__Kafka__ConsumerGroupFleans:Streaming:Kafka:ConsumerGroup(binding)"fleans"
Fleans__Streaming__Kafka__TopicPrefixFleans:Streaming:Kafka:TopicPrefix(binding)"fleans-"

memory is single-silo only — it silently drops cross-silo events. Use kafka for any deployment with more than one silo. See Streaming for at-least-once semantics.

Auth keys are per-host — the API and the Web admin UI use different OIDC flows (JWT-bearer vs OIDC code-flow), so the keys split cleanly between hosts. Setting an API-only key on the Web silo (or vice-versa) has no effect.

Env varConfig keyRead atApplies to
Authentication__AuthorityAuthentication:AuthorityFleans.Api, Fleans.WebBoth hosts. OIDC issuer URL. Setting this enables JWT enforcement on /Workflow/* (API) and OIDC sign-in on the admin UI. Auth disabled when missing.
Authentication__AudienceAuthentication:AudienceFleans.ApiAPI only. JWT aud claim the API requires. Default: "fleans-api". Setting on the Web silo has no effect.
Authentication__ClientIdAuthentication:ClientIdFleans.WebWeb only. OIDC client identifier for the Blazor Server admin UI. Setting on the API has no effect.
Authentication__ClientSecretAuthentication:ClientSecretFleans.WebWeb only. OIDC client secret. Source from a Secret/Key Vault, not appsettings, in production.

See Authentication for the full role-claim plan and reverse-proxy guidance.

Env varConfig keyRead atNotes
ConnectionStrings__fleansConnectionStrings:fleansFleans.ServiceDefaultsRequired when Persistence:Provider=Postgres. Workflow command-side database (event store + write model). Throws at startup if missing.
ConnectionStrings__fleans-queryConnectionStrings:fleans-queryFleans.ServiceDefaultsOptional read-replica for the query-side projection. Falls back to the fleans write connection when unset.
ConnectionStrings__orleans-redisConnectionStrings:orleans-redisFleans.Api, Fleans.WorkerHost, Fleans.CustomWorkerHostRequired for multi-silo clustering. Drives UseRedisClustering(...) and AddRedisGrainStorage("PubSubStore", ...). Note the name — it’s orleans-redis, not bare redis.

These are standard ASP.NET Core / .NET runtime keys, not Fleans-specific — listed here for completeness because every operator sets them.

Env varEffect
ASPNETCORE_URLSKestrel binding URL(s). Overrides launchSettings.json and applicationUrl.
ASPNETCORE_HTTP_PORTSNewer alternative to ASPNETCORE_URLS for plain-port binding (e.g. 8080).
DOTNET_PRINT_TELEMETRY_MESSAGESet false to suppress the .NET CLI telemetry banner at process startup.
Orleans__ClusterIdOrleans cluster identifier. Default dev; set explicitly per environment (e.g. fleans-production). See Deployment / Update strategy for rolling-restart constraints.
Orleans__ServiceIdOrleans service identifier. Stable per logical service.
  • Deployment — full docker-compose / k8s / systemd examples that consume these keys end-to-end.
  • Persistence — provider-specific connection-string semantics and migration behavior.
  • Streaming — Kafka topic naming, at-least-once semantics, and the memory-vs-kafka decision.
  • Authentication — full IdP setup walkthrough that consumes the four Authentication:* keys.