Configuration

s3BEAR is configured through environment variables. The full list lives in .env.example; the most important ones are below. Runtime settings such as auth toggles, auto-provisioning, and quotas can also be changed from Settings in the UI without a redeploy.

Core

VariableDefaultPurpose
SECRET_KEYJWT signing key (min 32 chars, required)
APP_NAMEs3BEARApplication name
DEBUGfalseDebug mode
ALLOWED_ORIGINS["http://localhost:3000"]CORS allow-list for the frontend origin(s)
DATABASE_URL / DATABASE_URL_SYNClocalhostAsync / sync (Alembic) database connections
AWS_ACCESS_KEY_ID / AWS_SECRET_ACCESS_KEY""Credentials for the default S3 connection
AWS_REGIONus-east-1S3 region
AWS_ENDPOINT_URL""S3 endpoint (for MinIO / compatible backends)

JWT & sessions

VariableDefaultPurpose
JWT_ALGORITHMHS256JWT signing algorithm
ACCESS_TOKEN_EXPIRE_MINUTES30Access-token lifetime
REFRESH_TOKEN_EXPIRE_DAYS7Refresh-token lifetime
DEFAULT_ADMIN_EMAIL[email protected]Seeded admin on first run
DEFAULT_ADMIN_PASSWORDgeneratedSeeded admin password (random if unset — check the backend log)

Uploads & presigned URLs

VariableDefaultPurpose
PRESIGNED_URL_BASE""External URL the browser uses to reach S3 (critical for multipart)
MULTIPART_PART_SIZE_MB10Multipart part size
PRESIGNED_URL_EXPIRY_SECONDS1800Presigned URL lifetime

PRESIGNED_URL_BASE must point to the S3-compatible host the browser can reach. A mismatch causes 403 SignatureDoesNotMatch. See Uploading Objects and Troubleshooting.

Image transforms

VariableDefaultPurpose
MAX_IMAGE_TRANSFORM_MB25Source-size cap for on-the-fly image transforms (413 on breach)

See Image Serving & Transforms.

Webhooks

VariableDefaultPurpose
WEBHOOKS_ENABLEDtrueEnable webhook enqueue + dispatch
WEBHOOK_MAX_ATTEMPTS4Delivery attempts before a webhook is marked failed
WEBHOOK_TIMEOUT_SECONDS10Per-delivery HTTP timeout
WEBHOOK_DELIVERY_RETENTION_DAYS30How long delivery records are kept

See Webhooks.

Auth (Azure Entra)

VariableDefaultPurpose
AZURE_TENANT_ID / AZURE_CLIENT_ID / AZURE_CLIENT_SECRET""Entra SSO credentials
AZURE_REDIRECT_URI.../auth/callbackOIDC redirect target
AZURE_AUTHORITYderivedOverrides the authority URL (defaults to login.microsoftonline.com/<tenant>)

See Authentication.

Audit logging

VariableDefaultPurpose
AUDIT_LOG_ENABLED / AUDIT_LOG_FILE_ENABLEDtrueAudit logging (database / file)
AUDIT_LOG_PATH/var/log/s3bear/auditDirectory for the flat-file audit mirror
AUDIT_LOG_RETENTION_DAYS90File audit retention

See Audit Log.


Related: Deployment · CORS Setup