Skip to content

Configuration Reference

Complete reference of all environment variables used by Sorcha services. Variables are set in the .env file and distributed to containers via docker-compose.yml.

JWT & Authentication

These variables are shared across all services via the x-jwt-env YAML anchor.

VariableDefaultDescription
INSTALLATION_NAMElocalhostJWT issuer and audience name. Set to your domain in production.
JWT_SIGNING_KEY(dev key)Base64-encoded 256-bit HMAC signing key. All services must share the same key.

Important: The default JWT_SIGNING_KEY in docker-compose.yml is for development only. Generate a unique key for every deployment.

Per-Service Authentication

Each service has its own service-to-service auth credentials:

ServiceClient IDScopes
Blueprintservice-blueprintwallets:sign registers:write blueprints:manage
Walletservice-walletregisters:write
Registerregister-servicewallets:sign validator:write
Tenanttenant-service(wallet, register, validator access)
Validatorvalidator-serviceregisters:write registers:read
Peerservice-peerregisters:write registers:read
VariableExampleDescription
ServiceAuth__ClientIdservice-blueprintOAuth2 client ID for service-to-service auth
ServiceAuth__ClientSecret(secret)OAuth2 client secret
ServiceAuth__Scopeswallets:signSpace-separated list of requested scopes

Tenant Service JWT Settings

VariableDefaultDescription
JwtSettings__InstallationNamelocalhostDerived from INSTALLATION_NAME
JwtSettings__SigningKey(from env)Derived from JWT_SIGNING_KEY
JwtSettings__SigningKeySourceConfigurationWhere to load the signing key from

Databases

PostgreSQL

VariableDefaultDescription
POSTGRES_USERsorchaPostgreSQL superuser name
POSTGRES_PASSWORDsorcha_dev_passwordPostgreSQL password. Change for production.
POSTGRES_DBsorchaDefault database name
POSTGRES_PORT5432Host port mapping for PostgreSQL

Connection Strings

VariableServiceDefault
ConnectionStrings__wallet-dbWalletHost=postgres;Database=sorcha_wallet;Username=sorcha;Password=sorcha_dev_password
ConnectionStrings__TenantDatabaseTenantHost=postgres;Database=sorcha_tenant;Username=sorcha;Password=sorcha_dev_password

MongoDB

VariableDefaultDescription
MONGO_INITDB_ROOT_USERNAMEsorchaMongoDB root username
MONGO_INITDB_ROOT_PASSWORDsorcha_dev_passwordMongoDB root password. Change for production.
MONGODB_PORT27017Host port mapping for MongoDB

Connection Strings

VariableServiceDefault
ConnectionStrings__mongodbBlueprintmongodb://sorcha:sorcha_dev_password@mongodb:27017
ConnectionStrings__MongoDBRegistermongodb://sorcha:sorcha_dev_password@mongodb:27017
MongoDB__ConnectionStringPeermongodb://sorcha:sorcha_dev_password@mongodb:27017
MongoDB__DatabaseNamePeersorcha_system_register

Redis

VariableDefaultDescription
REDIS_PORT16379Host port mapping for Redis
REDIS_PASSWORD(empty)Redis password. Set for production.

Connection Strings

VariableServiceDefault
ConnectionStrings__RedisBlueprint, Wallet, Register, Peer, Validatorredis:6379
Redis__ConnectionStringTenantredis:6379
ConnectionStrings__RedisAPI Gatewayredis:6379

Register Storage (MongoDB)

The Register Service uses a dedicated MongoDB configuration for ledger storage:

VariableDefaultDescription
RegisterStorage__TypeMongoDBStorage backend type
RegisterStorage__MongoDB__ConnectionString(see above)MongoDB connection string
RegisterStorage__MongoDB__DatabaseNamesorcha_register_registryRegistry metadata database
RegisterStorage__MongoDB__DatabaseNamePrefixsorcha_register_Prefix for per-register databases
RegisterStorage__MongoDB__UseDatabasePerRegistertrueIsolate each register in its own database
RegisterStorage__MongoDB__RegisterCollectionNameregistersCollection name for register metadata
RegisterStorage__MongoDB__TransactionCollectionNametransactionsCollection name for transactions
RegisterStorage__MongoDB__DocketCollectionNamedocketsCollection name for dockets
RegisterStorage__MongoDB__CreateIndexesOnStartuptrueAuto-create indexes on service start

The Validator Service uses read-only access to the same MongoDB configuration (with CreateIndexesOnStartup set to false).

Wallet Encryption

VariableDefaultDescription
EncryptionProvider__TypeLinuxSecretServiceEncryption provider backend
EncryptionProvider__DefaultKeyIdwallet-master-key-2025Key identifier for the master encryption key
EncryptionProvider__LinuxSecretService__ServiceNamesorcha-wallet-serviceService name for key storage
EncryptionProvider__LinuxSecretService__FallbackKeyStorePath/var/lib/sorcha/wallet-keysFile-based key fallback path
EncryptionProvider__LinuxSecretService__MachineKeyMaterialsorcha-docker-wallet-stable-key-v1Stable key material for container rebuilds

Important: The MachineKeyMaterial value ensures wallet encryption keys survive container rebuilds. Change this value only if you want to invalidate all existing encrypted keys.

OpenTelemetry & Observability

Shared across all services via the x-otel-env YAML anchor:

VariableDefaultDescription
OTEL_EXPORTER_OTLP_ENDPOINThttp://aspire-dashboard:18889OTLP collector endpoint (gRPC)
OTEL_SERVICE_NAME(per service)Service name in traces/metrics
OTEL_RESOURCE_ATTRIBUTESdeployment.environment=dockerAdditional resource attributes

Aspire Dashboard

VariableDefaultDescription
ASPIRE_UI_PORT18888Host port for the Aspire Dashboard UI
OTLP_GRPC_PORT4317Host port for OTLP gRPC collector
OTLP_HTTP_PORT4318Host port for OTLP HTTP collector
DOTNET_DASHBOARD_UNSECURED_ALLOW_ANONYMOUStrueAllow anonymous access to dashboard
DASHBOARD__OTLP__AUTHMODEUnsecuredOTLP authentication mode

ASP.NET Core

VariableDefaultDescription
ASPNETCORE_ENVIRONMENTDevelopmentRuntime environment (Development, Docker, Production)
ASPNETCORE_URLShttp://+:8080Listening URLs inside containers

Feature Flags

VariableDefaultDescription
OPENAPI_REQUIRE_AUTHtrueRequire JWT authentication for /openapi endpoints

Note: SORCHA_SEED_SYSTEM_REGISTER was removed in Feature 057. The system register now bootstraps automatically on startup.

Service URLs (Internal)

These configure how services discover each other inside the Docker network. Typically only changed for custom deployments.

API Gateway Upstream Routes

VariableDefaultDescription
Services__Blueprint__Urlhttp://blueprint-service:8080Blueprint service upstream
Services__Wallet__Urlhttp://wallet-service:8080Wallet service upstream
Services__Register__Urlhttp://register-service:8080Register service upstream
Services__Tenant__Urlhttp://tenant-service:8080Tenant service upstream
Services__Peer__Urlhttp://peer-service:8080Peer service upstream
Services__Validator__Urlhttp://validator-service:8080Validator service upstream
Services__UI__Urlhttp://sorcha-ui-web:8080UI web application upstream

API Gateway Additional Settings

VariableDefaultDescription
OpenApi__RequireAuthtrueRequire auth for OpenAPI documentation
Dashboard__AspireDashboardUrlhttp://localhost:18888URL for proxied dashboard access

Inter-Service Client Configuration

Each service configures clients for the services it calls:

Variable PatternExampleDescription
ServiceClients__<Service>__Addresshttp://wallet-service:8080Base URL for service client
ServiceClients__<Service>__UseGrpcfalseUse gRPC instead of HTTP

Peer Network

VariableDefaultDescription
PEER_NODE_IDlocal-peer.sorcha.devUnique node identifier
PEER_PUBLIC_ADDRESS(empty)Public address for incoming connections
PEER_GRPC_PORT50051Host port for gRPC peer connections
PeerService__Port5000Internal gRPC listen port
PeerService__EnableTlsfalseEnable TLS for gRPC

Seed Nodes

VariableDefaultDescription
PeerService__SeedNodes__SeedNodes__0__NodeIdn0.sorcha.devSeed node identifier
PeerService__SeedNodes__SeedNodes__0__Hostnamen0.sorcha.devSeed node hostname
PeerService__SeedNodes__SeedNodes__0__Port443Seed node port
PeerService__SeedNodes__SeedNodes__0__EnableTlstrueUse TLS for seed connection

Additional seed nodes follow the same pattern with incrementing index (__1__, __2__, etc.).

Validator

VariableDefaultDescription
Validator__ValidatorIddocker-validator-1Unique validator node identifier
Validator__SystemWalletAddress(empty)System wallet address (auto-created if empty)
VALIDATOR_HTTP_PORT5800Host port for HTTP REST API
VALIDATOR_GRPC_PORT5801Host port for gRPC endpoint

AI Provider (Optional)

VariableDefaultDescription
ANTHROPIC_API_KEY(empty)Anthropic Claude API key for AI features in Blueprint Service
AIProvider__Modelclaude-sonnet-4-5-20250929AI model identifier

Host Port Overrides

All published ports can be overridden via environment variables:

VariableDefaultMaps To
GATEWAY_HTTP_PORT80API Gateway HTTP
GATEWAY_HTTPS_PORT443API Gateway HTTPS
BLUEPRINT_PORT5000Blueprint Service
REGISTER_PORT5380Register Service
TENANT_PORT5450Tenant Service
VALIDATOR_HTTP_PORT5800Validator HTTP
VALIDATOR_GRPC_PORT5801Validator gRPC
PEER_GRPC_PORT50051Peer Service gRPC
UI_HTTP_PORT5400UI Web HTTP
UI_HTTPS_PORT5401UI Web HTTPS
REDIS_PORT16379Redis
POSTGRES_PORT5432PostgreSQL
MONGODB_PORT27017MongoDB
ASPIRE_UI_PORT18888Aspire Dashboard

Docker Volumes

VolumePurposeBackup Priority
postgres-dataPostgreSQL data (wallets, tenants)Critical
mongodb-dataMongoDB data (registers, blueprints)Critical
redis-dataRedis persistenceLow (cache)
wallet-encryption-keysWallet master encryption keysCritical
dataprotection-keysASP.NET Data Protection keysImportant

Released under the MIT License.