Operations
Application configuration
Map configuration files and environment variables to the settings the running hosts actually use.
Know which process reads the setting
The API loads its base appsettings.json and environment-specific settings, with environment variables able to override nested values. DbMigrator links the API's settings files into its output and reapplies environment variables after loading them. It uses the same database configuration but runs a smaller set of runtime services.
AppHost has its own configuration and injects selected values into child services. A setting in AppHost's file is not automatically an API setting. Likewise, Vite development variables and deployed frontend /config.json belong to different stages of the client setup.
Use the supported configuration keys
| Setting | Environment variable | Purpose |
|---|---|---|
DatabaseOptions:ConnectionString |
DatabaseOptions__ConnectionString |
PostgreSQL target |
DatabaseOptions:MigrationsAssembly |
DatabaseOptions__MigrationsAssembly |
Assembly containing EF migrations |
CachingOptions:Redis |
CachingOptions__Redis |
Cache, key storage and related Redis services |
CachingOptions:KeyPrefix |
CachingOptions__KeyPrefix |
Namespace for a shared Redis deployment |
JwtOptions:SigningKey |
JwtOptions__SigningKey |
Token-signing secret |
FrontendOptions:DefaultOrigin |
FrontendOptions__DefaultOrigin |
Dashboard origin used to build email links |
CorsOptions:AllowedOrigins:0 |
CorsOptions__AllowedOrigins__0 |
First permitted browser origin |
HangfireOptions:Password |
HangfireOptions__Password |
Jobs dashboard credential |
Storage:Provider |
Storage__Provider |
local or the configured storage implementation |
Double underscores represent configuration nesting. Array indices are numeric segments. For example, Bash can set a non-secret frontend origin before running the API:
export FrontendOptions__DefaultOrigin='https://app.example.com'
export CorsOptions__AllowedOrigins__0='https://app.example.com'
These two settings alone are not a complete production configuration.
Understand production validation
Production startup requires a database connection, Redis connection, JWT signing key and an absolute HTTP(S) default frontend origin. JWT validation and Hangfire options add their own checks. Missing values deliberately stop startup instead of silently choosing development credentials.
FrontendOptions:AllowedOrigins governs links produced by identity flows; CorsOptions:AllowedOrigins governs browser cross-origin access. Configure both for your actual web origins. Setting one list does not replace the other. Production disables OpenAPI by default and enables rate limiting; review production preparation before changing either behavior.
Configure local resource isolation
For a separate development dataset, set LocalResources__Prefix on the AppHost process. The prefix namespaces its data volumes. LocalResources__Lifetime=Session selects session-lifetime containers; the default is persistent.
DevelopmentTools__PgAdmin=true and DevelopmentTools__RedisInsight=true opt into local administration tools only during a Development run. The cache itself does not require RedisInsight. Changing a resource prefix does not move existing records; see migrations.
Verify effective settings safely
In Compose, the shipped public interface still uses variables such as FSH_API_URL, FSH_ADMIN_URL and FSH_DASHBOARD_URL. Keep those exact names: the compose file maps them to API and frontend settings. Renaming them cosmetically breaks the mapping.
Validate Compose syntax with docker compose config --quiet, inspect frontend /config.json for its public API origin, and verify health and sign-in. Avoid printing full resolved container configuration into shared logs because it can include secrets. A setting change is complete only after the affected process is recreated or restarted and its behavior is checked.
Sources and related guides
Base API settings, Production settings, startup requirements, AppHost and Compose mappings. Continue with mailing, caching or deployment.