Skip to content

Environment Variables Reference

This is the complete reference for all environment variables you can configure on a Broch server deployment.

Required — The application will not start without these.

VariableDescriptionDefaultSecret
ASPNETCORE_ENVIRONMENTASP.NET Core environment nameProductionNo
ASPNETCORE_URLSHTTP listener binding (TLS terminated at ingress)http://+:8080No
BROCH_LICENSELicense key issued by BrochYes
Broch__AdminEmailAdministrator email addressNo
API__WILDCARDHOSTNAMEWildcard hostname for tunnel subdomains (e.g., tunnels.company.com)No

Required — The application will not start without a database connection.

VariableDescriptionDefaultSecret
DATABASE__PROVIDERDatabase provider (only PostgreSQL is supported)PostgreSQLNo
ConnectionStrings__DefaultConnectionPostgreSQL connection stringYes

Example: Host=localhost;Database=broch;Username=postgres;Password=secret

Required — The application will not start without authentication configuration.

VariableDescriptionDefaultSecret
AUTHENTICATION__PROVIDERIdentity provider type: AzureAd, EntraExternalId, Auth0, OktaNo
AUTHENTICATION__CLIENTIDOAuth client ID from your IdPNo
AUTHENTICATION__CLIENTSECRETOAuth client secret from your IdPYes
AUTHENTICATION__ADMINROLESComma-separated role names that grant admin accessNo

Azure Entra ID:

VariableDescriptionDefault
AUTHENTICATION__TENANTIDAzure tenant ID
AUTHENTICATION__INSTANCEAzure login endpointhttps://login.microsoftonline.com/

Auth0:

VariableDescriptionDefault
AUTHENTICATION__DOMAINAuth0 domain (e.g., contoso.auth0.com)
AUTHENTICATION__AUDIENCEOAuth audience identifierFalls back to Client ID
AUTHENTICATION__SCOPESOAuth scopes (e.g., openid,profile,email)

Okta:

VariableDescriptionDefault
AUTHENTICATION__DOMAINOkta organization domain (e.g., contoso.okta.com)
AUTHENTICATION__AUDIENCEOAuth audience identifierFalls back to Client ID
AUTHENTICATION__SCOPESOAuth scopes (e.g., openid,profile,email)
VariableDescriptionDefaultRequired
API__URLSEPARATORSeparator between tunnel name and hostname: . (dot) or - (hyphen).No
VariableDescriptionDefaultRequired
SSH__PORTSSH server port for tunnel connections2222No
SSH__HOSTKEYPATHDirectory path for SSH host keys/app/ssh_keysNo
VariableDescriptionDefaultRequired
CENTRALSERVER__ENABLELICENSEVALIDATIONEnable license validation against central servertrueNo
CENTRALSERVER__VALIDATIONTIMEOUTSECONDSTimeout for license validation requests (seconds)10No
BROCH_LICENSE_FILEPath to pre-generated license file (air-gapped mode)Conditional
BROCH_LICENSE_PUBLIC_KEY_FILEPath to RSA public key PEM file (air-gapped mode)Conditional

Air-gapped mode: If your deployment cannot reach Broch’s central server, provide BROCH_LICENSE_FILE and BROCH_LICENSE_PUBLIC_KEY_FILE to validate licenses locally. Contact Broch for the public key.

Application Performance Monitoring (APM) and distributed tracing.

VariableDescriptionDefaultRequired
BROCHTELEMETRY__PROVIDERTelemetry provider: (disabled), ApplicationInsights, DataDog No
BROCHTELEMETRY__APPLICATIONINSIGHTSCONNECTIONSTRINGApplication Insights connection stringConditional
OTEL_SERVICE_NAMEOpenTelemetry service name for tracingbroch-apiNo

Structured log routing to external services.

VariableDescriptionDefaultRequired
BROCHLOGGING__PROVIDERLogging provider: (console only), DataDog, Seq No
BROCHLOGGING__MINIMUMLEVELMinimum log level: Verbose, Debug, Information, Warning, Error, FatalInformationNo
BROCHLOGGING__ENABLECONSOLELOGGINGEnable console logging alongside external providerfalseNo
VariableDescriptionDefault
BROCHLOGGING__DATADOG__APIKEYDataDog API key
BROCHLOGGING__DATADOG__SERVICENAMEDataDog service name tagbroch-server
BROCHLOGGING__DATADOG__ENVIRONMENTDataDog environment tagproduction
BROCHLOGGING__DATADOG__SITEDataDog site: datadoghq.com (US) or datadoghq.eu (EU)datadoghq.com
VariableDescriptionDefault
BROCHLOGGING__SEQ__SERVERURLSeq server URLhttp://localhost:5341

Use these endpoints to monitor server health and readiness in your deployment:

EndpointPurposeReturns
GET /healthzLiveness probe — is the process running?Always 200 if running
GET /health/readyReadiness probe — is the server ready to accept traffic?200 when auth + license are valid, 503 otherwise
GET /api/configurationClient version policy (for CLI/app version compatibility)JSON with version requirements

Use /health/ready for load balancer health checks. The server delays accepting traffic until authentication configuration has loaded from the central server.

Minimal Docker Compose (Embedded Database)

Section titled “Minimal Docker Compose (Embedded Database)”
ASPNETCORE_ENVIRONMENT=Production
ASPNETCORE_URLS=http://+:8080
BROCH_LICENSE=<your-license-key>
API__WILDCARDHOSTNAME=tunnels.company.com
DATABASE__PROVIDER=PostgreSQL
ConnectionStrings__DefaultConnection=Host=postgres;Database=broch;Username=postgres;Password=<secure-password>
AUTHENTICATION__PROVIDER=AzureAd
AUTHENTICATION__CLIENTID=<your-client-id>
AUTHENTICATION__CLIENTSECRET=<your-client-secret>
AUTHENTICATION__TENANTID=<your-tenant-id>
AUTHENTICATION__INSTANCE=https://login.microsoftonline.com/
AUTHENTICATION__ADMINROLES=Admin
# Core
ASPNETCORE_ENVIRONMENT=Production
ASPNETCORE_URLS=http://+:8080
BROCH_LICENSE=<your-license-key>
API__WILDCARDHOSTNAME=tunnels.company.com
# Database (Managed)
DATABASE__PROVIDER=PostgreSQL
ConnectionStrings__DefaultConnection=postgres://user:pass@rds-endpoint:5432/broch
# Auth
AUTHENTICATION__PROVIDER=Okta
AUTHENTICATION__DOMAIN=company.okta.com
AUTHENTICATION__CLIENTID=<your-client-id>
AUTHENTICATION__CLIENTSECRET=<your-client-secret>
AUTHENTICATION__ADMINROLES=broch_admin
# Logging
BROCHLOGGING__PROVIDER=DataDog
BROCHLOGGING__DATADOG__APIKEY=<your-api-key>
BROCHLOGGING__DATADOG__SERVICENAME=broch-prod
BROCHLOGGING__DATADOG__ENVIRONMENT=production
# Telemetry
BROCHTELEMETRY__PROVIDER=DataDog

Never commit secrets (license keys, client secrets, connection strings, API keys) to version control. Use your platform’s secure secret storage:

  • Docker: Docker secrets or environment files excluded from git
  • Kubernetes: Kubernetes secrets
  • Azure: Azure Key Vault
  • AWS: AWS Secrets Manager
  • DigitalOcean: App Platform encrypted environment variables

Contact Broch at [email protected] for configuration questions or deployment guidance.


Copyright (c) 2026 Broch. All rights reserved.