Skip to content

Sirloin Environment

Authoritative reference for sirloin configuration. Source of truth is apps/sirloin/internal/app/config/config.go and the SirloinXxx constants under apps/sirloin/internal/pkg/env/. Cross-cuts: deployment-env for staging and Railway, security-model for secret handling, auth-model for token issuers.

All vars are namespaced SIRLOIN_*. Defaults shown match config.go. “Source” indicates where the value typically comes from in production.

Core

VarRequiredDefaultSourcePurpose
SIRLOIN_PORTno:50051Railway / composegRPC + gRPC-Web listen address
SIRLOIN_STAGEyesRailwaydevelopment | sandbox | production; gates dev-only RPCs
SIRLOIN_URLyesRailwayPublic URL of sirloin (used in webhooks, links)
SIRLOIN_GRPC_HOSTn/aNot read by sirloin itself; consumed by clients (e.g. STRIP_SIRLOIN_GRPC_HOST in apps/strip/internal/pkg/env/variables.go:13)
SIRLOIN_GRPC_URLn/aNot read by sirloin itself; consumed by clients pointing at sirloin (see compose env for brisket/round services)
SIRLOIN_TESTER_IDSnoRailwayComma-separated user IDs given test perks
SIRLOIN_NSFW_PROCESSOR_TESTER_IDSno-RailwayComma-separated NSFW processors demo accounts

Database

VarRequiredDefaultSourcePurpose
SIRLOIN_DATABASE_URLyesNeon (prod), local Postgres (rump) in composeBUN ORM Postgres DSN; missing → startup error
SIRLOIN_DATABASE_POOLED_URLnofalls back to SIRLOIN_DATABASE_URLNeonPooled runtime DSN (split read path); when set, used as DatabaseRuntimeURL (apps/sirloin/internal/app/config/config.go:144, :449)

Local compose default: postgres://sirloin:sirloin@rump:5432/rump?sslmode=disable (see docker-compose.yml).

Auth (Clerk)

VarRequiredDefaultSourcePurpose
SIRLOIN_CLERK_API_KEYyessecretVerify Clerk session JWTs (see auth-model)

Brain & Round (gRPC peers)

VarRequiredDefaultSourcePurpose
SIRLOIN_BRAIN_HOSTyesbrain:3000 (compose)RailwaygRPC dial target for brain
SIRLOIN_BRAIN_API_KEYyessecretStatic token for brain
SIRLOIN_ROUND_HOSTyesround:8080 (compose)RailwaygRPC dial target for round

Flank (legacy / being retired)

Under T-Bone the workflow engine and storage moved into brain, which now owns workflows, adapters, secrets, and executions over HTTP; flank is now only the visual workflow editor pointed at brain. The sirloin-hosted FlankStorageService/FlankMCP surfaces these variables configure are superseded. TODO(@law): drop these vars once the legacy flank storage/MCP wiring is removed.

VarRequiredDefaultSourcePurpose
SIRLOIN_FLANK_HOSToptionalRailway(legacy) Flank gRPC host; empty disables flank execution
SIRLOIN_FLANK_SERVICE_TOKENoptionalsecret(legacy) Auth for FlankStorageService and FlankResolveSecrets
FLANK_ENCRYPTION_KEYoptionalsecret(legacy) Encrypts flank secret payloads at rest in sirloin; empty disables FlankStorageService
SIRLOIN_FLANK_MCP_ENABLEDnofalseRailway(legacy) Enables flank MCP route on port 8086
SIRLOIN_FLANK_MCP_BASE_PATHno/flankRailway(legacy) Mount path for flank MCP

Chargebee

VarRequiredDefaultSourcePurpose
SIRLOIN_CHARGEBEE_API_KEYyes (prod)secretChargebee API key
SIRLOIN_CHARGEBEE_SITEyes (prod)RailwayChargebee site name (<site>.chargebee.com)
SIRLOIN_CHARGEBEE_WEBHOOK_USERNAMErecommendedRailwayBasic auth user for webhook intake
SIRLOIN_CHARGEBEE_WEBHOOK_PASSWORDrecommendedsecretBasic auth pw; if either missing, webhooks rejected

Primer

Primer environment is auto-detected from API key prefix.

VarRequiredDefaultSourcePurpose
SIRLOIN_PRIMER_API_KEYoptionalsecretEmpty → Primer checkout disabled
SIRLOIN_PRIMER_WEBHOOK_SECRETrecommendedsecretHMAC secret; empty → Primer webhooks rejected

Storage (S3-compatible)

VarRequiredDefaultSourcePurpose
SIRLOIN_S3_ENDPOINTyesRailwayS3 endpoint (Cloudflare R2 in prod)
SIRLOIN_S3_ACCESS_KEYyessecret
SIRLOIN_S3_SECRET_KEYyessecret
SIRLOIN_S3_BUCKETyesRailwayObject bucket
SIRLOIN_S3_HMAC_KEYyessecretSigned-URL HMAC
SIRLOIN_S3_PUBLIC_URLyesRailwayPublic CDN base
SIRLOIN_IMAGE_CGI_URLoptionalRailwayOn-the-fly image transform endpoint

KYC (Ondato)

All optional; required only when KYC is enabled.

VarRequiredDefaultSourcePurpose
SIRLOIN_ONDATO_CLIENT_IDconditionalsecretOAuth client id
SIRLOIN_ONDATO_CLIENT_SECRETconditionalsecretOAuth secret
SIRLOIN_ONDATO_CLIENT_SETUP_IDconditionalRailwaySetup id
SIRLOIN_ONDATO_AUTH_URLconditionalRailwayOAuth token endpoint
SIRLOIN_ONDATO_KYC_BASE_URLconditionalRailwayKYC API
SIRLOIN_ONDATO_IDV_API_BASE_URLconditionalRailwayIDV API
SIRLOIN_ONDATO_REDIRECT_BASE_URLconditionalRailwayUser-facing redirect target
SIRLOIN_ONDATO_SCOPESconditionalRailwaySpace-separated scopes
SIRLOIN_ONDATO_WEBHOOK_SECRETconditionalsecretShared secret for /webhooks/ondato/verification-status

Email

VarRequiredDefaultSourcePurpose
SIRLOIN_EMAIL_HOSTyesRailwaySMTP host
SIRLOIN_EMAIL_PORTyesRailwaySMTP port
SIRLOIN_EMAIL_USERyessecretSMTP user
SIRLOIN_EMAIL_PASSWORDyessecretSMTP password
SIRLOIN_EMAIL_SENDERyesRailwayFrom header

Analytics & Marketing

VarRequiredDefaultSourcePurpose
SIRLOIN_POSTHOG_API_KEYrecommendedsecretServer-side PostHog
SIRLOIN_KLAVIYO_API_KEYoptionalsecretKlaviyo events
SIRLOIN_CINDER_API_KEYoptionalsecretCinder fraud signals
SIRLOIN_GOOGLE_CREDENTIALSoptionalsecretGoogle services creds

Observability

OpenTelemetry is enabled when SIRLOIN_AXIOM_TOKEN is set. See observability.

VarRequiredDefaultSourcePurpose
SIRLOIN_AXIOM_TOKENrecommendedsecretAxiom API token; enables OTLP export
SIRLOIN_AXIOM_DATASETyes if token setRailwayTraces + logs dataset (axiom:events:v1)
SIRLOIN_AXIOM_METRICS_DATASETyes if token setRailwayMetrics dataset (otel:metrics:v1)
SIRLOIN_SENTRY_ENABLEDnofalseRailwayToggle Sentry init; only TRUE (case-insensitive) enables it (apps/sirloin/internal/pkg/env/env.go:30, apps/sirloin/internal/app/config/config.go:206)

Slack Notifications

VarRequiredDefaultSourcePurpose
SIRLOIN_SLACK_WEBHOOK_URL_PAYMENTSoptionalsecretPayment notifications
SIRLOIN_SLACK_WEBHOOK_URL_SUBSCRIPTIONSoptionalsecretSubscription notifications
SIRLOIN_SLACK_WEBHOOK_URL_NEW_CHARACTERSoptionalsecretCharacter-creation feed
SIRLOIN_SLACK_WEBHOOK_URL_CS_REPORTSoptionalsecretCS-team reports
SIRLOIN_SLACK_WEBHOOK_URL_ITEAM_ALERTSoptionalsecretInternal-team alerts

Monitor Probe

VarRequiredDefaultSourcePurpose
SIRLOIN_MONITOR_ENABLEDnofalseRailwaySynthetic generation probe
SIRLOIN_MONITOR_GENERATION_INTERVALno2mRailwayProbe trigger cadence
SIRLOIN_MONITOR_CHECK_INTERVALno30sRailwayProbe poll cadence
SIRLOIN_MONITOR_MAX_PENDING_AGEno10mRailwayPending-job age threshold

Foxy360 MCP Runtime

Disabled by default. Required only when SIRLOIN_FOXY360_ENABLED=true.

VarDefaultPurpose
SIRLOIN_FOXY360_ENABLEDfalseMaster switch
SIRLOIN_FOXY360_HTTP_PORT:8086MCP HTTP listen
SIRLOIN_FOXY360_BASE_PATH/foxy360Mount path
SIRLOIN_FOXY360_CLERK_API_KEYClerk verification for MCP
SIRLOIN_FOXY360_ANTHROPIC_API_KEYLLM provider
SIRLOIN_FOXY360_OPENAI_API_KEYLLM provider
SIRLOIN_FOXY360_GEMINI_API_KEYLLM provider
SIRLOIN_FOXY360_GOOGLE_CREDENTIALS_JSONGoogle services creds
SIRLOIN_FOXY360_AXIOM_API_TOKENFoxy360-scoped Axiom token
SIRLOIN_FOXY360_AXIOM_DATASETFoxy360 dataset
SIRLOIN_FOXY360_PRIMER_API_KEYPrimer connector
SIRLOIN_FOXY360_META_ADS_ACCESS_TOKENMeta Ads connector
SIRLOIN_FOXY360_META_AD_ACCOUNT_IDSComma-separated ad accounts
SIRLOIN_FOXY360_MCP_AXIOM_URLMCP connector URL
SIRLOIN_FOXY360_MCP_AXIOM_AUTH_HEADERFull Authorization header value
SIRLOIN_FOXY360_MCP_CHARGEBEE_DATA_URLMCP connector URL
SIRLOIN_FOXY360_MCP_CHARGEBEE_DATA_BEARER_TOKENRaw token (no Bearer prefix)
SIRLOIN_FOXY360_MCP_CHARGEBEE_KB_URLMCP connector URL
SIRLOIN_FOXY360_MCP_INTERCOM_URLMCP connector URL
SIRLOIN_FOXY360_MCP_INTERCOM_BEARER_TOKEN
SIRLOIN_FOXY360_MCP_POSTHOG_URLMCP connector URL
SIRLOIN_FOXY360_MCP_POSTHOG_AUTH_HEADERFull Authorization header value
SIRLOIN_FOXY360_MCP_SENTRY_URLMCP connector URL
SIRLOIN_FOXY360_MCP_SENTRY_COMMANDstdio command (alternate transport)
SIRLOIN_FOXY360_MCP_DB_DSNRead-only DB DSN

Resolved

  • SIRLOIN_DATABASE_RUNTIME_URL does not exist as a sirloin env var. The runtime-only DSN comes from optional SIRLOIN_DATABASE_POOLED_URL; when unset, sirloin reuses SIRLOIN_DATABASE_URL (apps/sirloin/internal/app/config/config.go:144, :449, apps/sirloin/internal/pkg/env/variables.go:10).
  • SIRLOIN_SENTRY_ENABLED defaults to false. Config.SentryEnabled is set via IsTrue() which only matches case-insensitive "TRUE", so any other value (including unset) disables Sentry across stages (apps/sirloin/internal/app/config/config.go:206, apps/sirloin/internal/pkg/env/env.go:30).
  • Ondato required-when-enabled vars (those that block ondato.NewClient): SIRLOIN_ONDATO_CLIENT_ID, SIRLOIN_ONDATO_CLIENT_SECRET, SIRLOIN_ONDATO_CLIENT_SETUP_ID, SIRLOIN_ONDATO_AUTH_URL, SIRLOIN_ONDATO_IDV_API_BASE_URL, SIRLOIN_ONDATO_KYC_BASE_URL. The rest (SCOPES, REDIRECT_BASE_URL, WEBHOOK_SECRET) are optional but the webhook secret is required to accept Ondato webhooks (apps/sirloin/internal/pkg/ondato/client.go:43-:62, apps/sirloin/internal/app/config/config.go:289-:302).
  • SIRLOIN_GRPC_HOST and SIRLOIN_GRPC_URL are not read by sirloin — see Core table notes. They are client-side conventions used by other services to dial sirloin.

TODO(@zen)

  • None outstanding for env in this pass.