Skip to content

At a glance

Audience
Operators
Type
Reference
Status
current

At a glance

Audience
Operators
Type
Reference
Status
current

Environment variables ​

Every environment variable the Stratos service reads. Stratos reads them once, at startup. An invalid value stops the service and prints the variable name. Only STRATOS_SERVICE_DID has no default.

Configuration explains how the settings fit together. The feed generator has its own variables. They are listed in Run the feed generator.

73 of 73 shown

VariableDefaultDescription
STRATOS_SERVICE_DIDrequiredIdentity and network—Service DID
STRATOS_PUBLIC_URLIdentity and networkhttp://localhost:3100Public base URL. Set it in every real deployment
STRATOS_PORTIdentity and network3100HTTP listen port
STRATOS_SERVICE_FRAGMENTIdentity and networkatproto_pnsFragment of the service key entry in the DID document
PLC_DIRECTORYIdentity and networkhttps://plc.directoryPLC directory origin
PLC_DIRECTORY_PRIVATE_CIDRSIdentity and network—Comma-separated private CIDRs allowed for the PLC origin only
IDENTITY_PRIVATE_ORIGINSIdentity and network—Comma-separated origins trusted for private identity requests
IDENTITY_PRIVATE_CIDRSIdentity and network—Comma-separated private CIDRs allowed for those origins
STRATOS_REPO_URLIdentity and networkhttp://localhost:3100Source link shown on / and sent in the outbound User-Agent
STRATOS_OPERATOR_CONTACTIdentity and network—Contact sent in the outbound User-Agent
STRATOS_ENROLLMENT_MODEEnrollment and boundariesallowlistopen or allowlist
STRATOS_ALLOWED_DIDSEnrollment and boundaries—Comma-separated DIDs allowed to enroll
STRATOS_ALLOWED_PDS_ENDPOINTSEnrollment and boundaries—Comma-separated PDS URLs whose users may enroll
STRATOS_ALLOW_LIST_URIEnrollment and boundaries—URL of an external allow list
STRATOS_ALLOW_LIST_BOOTSTRAP_NAMEEnrollment and boundaries—Bootstrap name for the external allow list
STRATOS_RESERVED_DOMAINEnrollment and boundariesgeneralBare name of the all-members boundary
STRATOS_ALLOWED_DOMAINSEnrollment and boundaries—Bare boundary names. Seeds the database on first start only
STRATOS_AUTO_ENROLL_DOMAINSEnrollment and boundaries—Automatic-enrollment seed. First start only
STRATOS_ROOM_CATALOG_FILEEnrollment and boundaries—YAML or JSON room details. First start only
STRATOS_SPACE_APP_ACCESSEnrollment and boundaries—JSON array of per-space application rules. First start only
STRATOS_SPACE_APP_ACCESS_FILEEnrollment and boundaries—File with the same shape, merged with the inline value
STRATOS_SERVICE_ENROLLMENTSEnrollment and boundaries—JSON array of service identities
STRATOS_SERVICE_ENROLLMENTS_FILEEnrollment and boundaries—File with the same shape, merged with the inline value
STRATOS_ADMIN_DIDSAdmin and OAuth—Comma-separated admin DIDs that cannot be revoked
STRATOS_MODERATION_SERVICE_DIDSAdmin and OAuth—Comma-separated moderation service DIDs
STRATOS_OAUTH_CLIENT_IDAdmin and OAuth{publicUrl}/client-metadata.jsonOAuth client ID
STRATOS_OAUTH_CLIENT_SECRETAdmin and OAuth—PEM private key for a confidential client
STRATOS_OAUTH_CLIENT_NAMEAdmin and OAuthStratos ServiceConsent screen name
STRATOS_OAUTH_LOGO_URIAdmin and OAuth—Consent screen logo
STRATOS_OAUTH_TOS_URIAdmin and OAuth—Terms of service link
STRATOS_OAUTH_POLICY_URIAdmin and OAuth—Privacy policy link
STRATOS_ALLOWED_REDIRECT_ORIGINSAdmin and OAuth—Comma-separated origins for enrollment redirects
STRATOS_DEV_MODEAdmin and OAuthfalsetrue or false. Never true in production
STRATOS_DATA_DIRStorage./dataData directory. Used by both backends
STORAGE_BACKENDStoragesqlitesqlite or postgres
STRATOS_POSTGRES_URLStorage—Full PostgreSQL URL. Wins over STRATOS_PG_*
STRATOS_PG_HOSTStorage—PostgreSQL host. Setting it builds the URL
STRATOS_PG_PORTStorage5432PostgreSQL port
STRATOS_PG_USERNAMEStoragestratosPostgreSQL user
STRATOS_PG_PASSWORDStorage—PostgreSQL password
STRATOS_PG_DBNAMEStoragestratosPostgreSQL database
STRATOS_PG_SSLMODEStoragerequiredisable, allow, prefer, require, verify-ca, or verify-full
STRATOS_PG_ACTOR_POOL_SIZEStorage200Connections for member transactions
STRATOS_PG_ADMIN_POOL_SIZEStorage3Connections for schema work
STRATOS_BLOCK_CACHE_SIZEStorage50000Repository block cache entries (postgres backend)
STRATOS_BLOB_STORAGEStoragelocallocal or s3
STRATOS_S3_BUCKETrequired with s3Storage—Bucket name
STRATOS_S3_REGIONStorage—Bucket region
STRATOS_S3_ENDPOINTStorage—Endpoint for an S3-compatible service
STRATOS_S3_ACCESS_KEYStorage—Static access key
STRATOS_S3_SECRET_KEYStorage—Static secret key
STRATOS_VALKEY_URLStorage—Valkey or Redis URL for the replay store and cache
STRATOS_WRITE_RATE_MAX_WRITESLimits and credentials300Writes allowed per DID in the window
STRATOS_WRITE_RATE_WINDOW_MSLimits and credentials60000Rate limit window
STRATOS_WRITE_RATE_COOLDOWN_MSLimits and credentials10000Cooldown after the limit
STRATOS_WRITE_RATE_COOLDOWN_JITTER_MSLimits and credentials1000Random addition to the cooldown
STRATOS_SPACE_HTTP_CREDENTIAL_TTL_SECONDSLimits and credentials600Standard space credential lifetime. Maximum 3600
STRATOS_SPACE_CREDENTIAL_TTL_SECONDSLimits and credentials7200Legacy DPoP space credential lifetime
STRATOS_CLIENT_JWKS_CACHE_TTL_MSLimits and credentials300000Cache lifetime for client keys in client attestation
STRATOS_PDS_SYNC_TICK_MSPDS sync queue30000Worker interval
STRATOS_PDS_SYNC_CLAIM_LIMITPDS sync queue10Jobs claimed per run
STRATOS_PDS_SYNC_ATTEMPT_TIMEOUT_MSPDS sync queue30000Timeout for one attempt
STRATOS_PDS_SYNC_BACKOFF_BASE_MSPDS sync queue30000First retry delay
STRATOS_PDS_SYNC_BACKOFF_CAP_MSPDS sync queue3600000Longest retry delay
STRATOS_PDS_SYNC_MAX_ATTEMPTSPDS sync queue12Attempts before a job is failed
LOG_LEVELLogging and telemetryinfoLog verbosity
OTEL_EXPORTER_OTLP_METRICS_ENDPOINTLogging and telemetry—OTLP metrics URL. Enables metric export
OTEL_METRIC_EXPORT_INTERVALLogging and telemetry15000Export interval in milliseconds
OTEL_RESOURCE_ATTRIBUTESLogging and telemetry—Comma-separated key=value attributes
SENTRY_DSNLogging and telemetry—Sentry DSN. Enables error reporting
SENTRY_ENVIRONMENTLogging and telemetrydevelopmentSentry environment name
SENTRY_RELEASELogging and telemetry—Sentry release name
SENTRY_TRACES_SAMPLE_RATELogging and telemetry—Trace sample rate from 0 to 1

Variables that do nothing ​

Stratos accepts these variables but no code reads them. Setting them has no effect.

VariableNote
STRATOS_SIGNING_KEY_HEXThe service key lives in the signing identity file
STRATOS_RETENTION_DAYSNo retention sweep uses it
STRATOS_IMPORT_MAX_BYTESThe service does not register a repository import
STRATOS_DPOP_REQUIRE_NONCENonce handling does not consult it
REDIS_HOST, REDIS_PORT, REDIS_PASSWORDUse STRATOS_VALKEY_URL

These names appear in older guides and do not exist: STRATOS_OAUTH_REDIRECT_URI, STRATOS_ALLOWED_APPVIEWS, STRATOS_LOG_LEVEL, and STRATOS_PLC_URL. STRATOS_SYNC_TOKEN and BSKY_DB_POSTGRES_URL belong to the deprecated standalone indexer, not to the Stratos service.