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
| Variable | Default | Description |
|---|---|---|
STRATOS_SERVICE_DIDrequiredIdentity and network | — | Service DID |
STRATOS_PUBLIC_URLIdentity and network | http://localhost:3100 | Public base URL. Set it in every real deployment |
STRATOS_PORTIdentity and network | 3100 | HTTP listen port |
STRATOS_SERVICE_FRAGMENTIdentity and network | atproto_pns | Fragment of the service key entry in the DID document |
PLC_DIRECTORYIdentity and network | https://plc.directory | PLC 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 network | http://localhost:3100 | Source 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 boundaries | allowlist | open 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 boundaries | general | Bare 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.json | OAuth client ID |
STRATOS_OAUTH_CLIENT_SECRETAdmin and OAuth | — | PEM private key for a confidential client |
STRATOS_OAUTH_CLIENT_NAMEAdmin and OAuth | Stratos Service | Consent 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 OAuth | false | true or false. Never true in production |
STRATOS_DATA_DIRStorage | ./data | Data directory. Used by both backends |
STORAGE_BACKENDStorage | sqlite | sqlite or postgres |
STRATOS_POSTGRES_URLStorage | — | Full PostgreSQL URL. Wins over STRATOS_PG_* |
STRATOS_PG_HOSTStorage | — | PostgreSQL host. Setting it builds the URL |
STRATOS_PG_PORTStorage | 5432 | PostgreSQL port |
STRATOS_PG_USERNAMEStorage | stratos | PostgreSQL user |
STRATOS_PG_PASSWORDStorage | — | PostgreSQL password |
STRATOS_PG_DBNAMEStorage | stratos | PostgreSQL database |
STRATOS_PG_SSLMODEStorage | require | disable, allow, prefer, require, verify-ca, or verify-full |
STRATOS_PG_ACTOR_POOL_SIZEStorage | 200 | Connections for member transactions |
STRATOS_PG_ADMIN_POOL_SIZEStorage | 3 | Connections for schema work |
STRATOS_BLOCK_CACHE_SIZEStorage | 50000 | Repository block cache entries (postgres backend) |
STRATOS_BLOB_STORAGEStorage | local | local 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 credentials | 300 | Writes allowed per DID in the window |
STRATOS_WRITE_RATE_WINDOW_MSLimits and credentials | 60000 | Rate limit window |
STRATOS_WRITE_RATE_COOLDOWN_MSLimits and credentials | 10000 | Cooldown after the limit |
STRATOS_WRITE_RATE_COOLDOWN_JITTER_MSLimits and credentials | 1000 | Random addition to the cooldown |
STRATOS_SPACE_HTTP_CREDENTIAL_TTL_SECONDSLimits and credentials | 600 | Standard space credential lifetime. Maximum 3600 |
STRATOS_SPACE_CREDENTIAL_TTL_SECONDSLimits and credentials | 7200 | Legacy DPoP space credential lifetime |
STRATOS_CLIENT_JWKS_CACHE_TTL_MSLimits and credentials | 300000 | Cache lifetime for client keys in client attestation |
STRATOS_PDS_SYNC_TICK_MSPDS sync queue | 30000 | Worker interval |
STRATOS_PDS_SYNC_CLAIM_LIMITPDS sync queue | 10 | Jobs claimed per run |
STRATOS_PDS_SYNC_ATTEMPT_TIMEOUT_MSPDS sync queue | 30000 | Timeout for one attempt |
STRATOS_PDS_SYNC_BACKOFF_BASE_MSPDS sync queue | 30000 | First retry delay |
STRATOS_PDS_SYNC_BACKOFF_CAP_MSPDS sync queue | 3600000 | Longest retry delay |
STRATOS_PDS_SYNC_MAX_ATTEMPTSPDS sync queue | 12 | Attempts before a job is failed |
LOG_LEVELLogging and telemetry | info | Log verbosity |
OTEL_EXPORTER_OTLP_METRICS_ENDPOINTLogging and telemetry | — | OTLP metrics URL. Enables metric export |
OTEL_METRIC_EXPORT_INTERVALLogging and telemetry | 15000 | Export 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 telemetry | development | Sentry 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.
| Variable | Note |
|---|---|
STRATOS_SIGNING_KEY_HEX | The service key lives in the signing identity file |
STRATOS_RETENTION_DAYS | No retention sweep uses it |
STRATOS_IMPORT_MAX_BYTES | The service does not register a repository import |
STRATOS_DPOP_REQUIRE_NONCE | Nonce handling does not consult it |
REDIS_HOST, REDIS_PORT, REDIS_PASSWORD | Use 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.