####################################### # Server ####################################### SERVER_HOST=0.0.0.0 SERVER_PORT=5000 SERVER_ADMIN_PORT=5001 SERVER_KEEP_ALIVE_TIMEOUT=61 SERVER_HEADERS_TIMEOUT=65 SERVER_REGION=local # Cluster discovery (ECS/EKS): deadline for startup and each poll, including retries. # Startup failure exits the process. Increase this deadline for slow initial listings. # CLUSTER_DISCOVERY_TIMEOUT_MS=30000 # Base polling interval for ECS and EKS; polls run serially with jitter and back off on failure. # CLUSTER_DISCOVERY_POLL_INTERVAL_MS=20000 # Target ECS ListTasks requests/second across this task family and WORKERS_NUM workers. # Split this budget between task families and other readers. Startup calls and retries can exceed it. # CLUSTER_DISCOVERY_ECS_MAX_RPS=10 # ECS ListTasks defaults to 10 total attempts per page. AWS_MAX_ATTEMPTS takes # precedence over shared AWS profile max_attempts; both override this default. ####################################### # Request / Response ####################################### REQUEST_TRACE_HEADER=trace-id REQUEST_ETAG_HEADERS=if-none-match RESPONSE_S_MAXAGE=0 RESPONSE_STALE_WHILE_REVALIDATE=0 RESPONSE_STALE_IF_ERROR=0 ####################################### # Auth ####################################### AUTH_JWT_SECRET=f023d3db-39dc-4ac9-87b2-b2be72e9162b AUTH_JWT_ALGORITHM=HS256 ####################################### # Multi Tenancy # uncomment MULTI_TENANT=true to enable multi tenancy ####################################### # MULTI_TENANT=true DATABASE_MULTITENANT_URL=postgresql://postgres:postgres@127.0.0.1:5433/postgres DATABASE_MULTITENANT_POOL_URL=postgresql://postgres:postgres@127.0.0.1:6454/postgres REQUEST_X_FORWARDED_HOST_REGEXP=^([a-z]{20}).local.(?:com|dev)$ SERVER_ADMIN_API_KEYS=apikey # When set to false, GET /tenants endpoints omit decrypted secrets (database urls, jwt secret, service key, anon key, jwks). Defaults to true. # ADMIN_RETURN_TENANT_SENSITIVE_DATA=true AUTH_ENCRYPTION_KEY=encryptionkey ####################################### # Database ####################################### DATABASE_URL=postgresql://postgres:postgres@127.0.0.1/postgres DATABASE_POOL_URL=postgresql://postgres:postgres@127.0.0.1:6453/postgres DATABASE_CONNECTION_TIMEOUT=3000 # Enable pg query pipelining for tenant and multitenant pools. Defaults to false. DATABASE_ENABLE_PIPELINING=false # Set to true to run healthchecks without the scoped transaction path. DATABASE_HEALTHCHECK_UNSCOPED=false DATABASE_SEARCH_PATH= DATABASE_APPLICATION_NAME="Supabase Storage API" ## When DATABASE_POOL_URL is set, these params still control ## the local pg.Pool that Storage keeps open to the pooler. DATABASE_MAX_CONNECTIONS=20 DATABASE_FREE_POOL_AFTER_INACTIVITY=60000 DATABASE_POOL_DRAIN_TIMEOUT=30000 ####################################### # Database - Migrations ####################################### DB_INSTALL_ROLES=true DB_ANON_ROLE=anon DB_SERVICE_ROLE=service_role DB_AUTHENTICATED_ROLE=authenticated DB_SUPER_USER=postgres DB_ALLOW_MIGRATION_REFRESH=true ####################################### # Uploads ####################################### UPLOAD_FILE_SIZE_LIMIT=524288000 UPLOAD_FILE_SIZE_LIMIT_STANDARD=52428800 UPLOAD_SIGNED_URL_EXPIRATION_TIME=60 ####################################### # TUS Protocol ####################################### TUS_URL_PATH=/upload/resumable TUS_URL_EXPIRY_MS=3600000 TUS_PART_SIZE=50 ####################################### # S3 Protocol ####################################### S3_PROTOCOL_ACCESS_KEY_ID=b585f311d839730f8a980a3457be2787 S3_PROTOCOL_ACCESS_KEY_SECRET=67d161a7a8a46a24a17a75b26e7724f11d56b8d49a119227c66b13b6595601fb ####################################### # Storage Backend Driver # values: s3 | file ####################################### STORAGE_BACKEND=s3 # Enable the REST and S3 bucket lifecycle configuration APIs. STORAGE_LIFECYCLE_ENABLED=false # Enable object versioning STORAGE_VERSIONING_ENABLED=false ####################################### # S3 Backend ####################################### STORAGE_S3_BUCKET=supa-storage-bucket STORAGE_S3_MAX_SOCKETS=200 # S3 socket inactivity timeout in milliseconds # unset defaults to 60000 for TUS and 0 elsewhere. # Setting this overrides both defaults. # 0 disables it. Silent operations can time out and retry. # STORAGE_S3_CLIENT_TIMEOUT=60000 STORAGE_S3_ENDPOINT=http://127.0.0.1:9000 STORAGE_S3_FORCE_PATH_STYLE=true STORAGE_S3_REGION=us-east-1 # Checksum behavior values: WHEN_SUPPORTED | WHEN_REQUIRED. # STORAGE_S3_REQUEST_CHECKSUM_CALCULATION=WHEN_SUPPORTED # STORAGE_S3_RESPONSE_CHECKSUM_VALIDATION=WHEN_REQUIRED # Optional endpoint used only when signing private source URLs # for internal consumers like imgproxy. # For local Docker imgproxy + RustFS acceptance runs, use http://rustfs:9000. STORAGE_S3_PRIVATE_ASSET_ENDPOINT=http://rustfs:9000 AWS_ACCESS_KEY_ID=supa-storage AWS_SECRET_ACCESS_KEY=secret1234 ####################################### # File Backend ####################################### STORAGE_FILE_BACKEND_PATH=./data STORAGE_FILE_ETAG_ALGORITHM=md5 ####################################### # Image Transformation ####################################### IMAGE_TRANSFORMATION_ENABLED=true IMAGE_TRANSFORMATION_LIMIT_MIN_SIZE=0 IMAGE_TRANSFORMATION_LIMIT_MAX_SIZE=2000 IMGPROXY_URL=http://localhost:5020 IMGPROXY_REQUEST_TIMEOUT=15 IMGPROXY_HTTP_MAX_SOCKETS=500 ####################################### # Image Transformation - Rate Limiter # values: redis | memory ####################################### RATE_LIMITER_ENABLED=false RATE_LIMITER_DRIVER=redis RATE_LIMITER_REDIS_URL=localhost:6379 RATE_LIMITER_REDIS_CONNECT_TIMEOUT=5 RATE_LIMITER_RENDER_PATH_MAX_REQ_SEC=5 RATE_LIMITER_REDIS_COMMAND_TIMEOUT=2 ####################################### # Queue # When PG_QUEUE_CONNECTION_URL is not SET it will use the DATABASE_URL # or DB ####################################### PG_QUEUE_ENABLE=false PG_QUEUE_DELETE_AFTER_DAYS=2 PG_QUEUE_ARCHIVE_COMPLETED_AFTER_SECONDS=7200 PG_QUEUE_RETENTION_DAYS=2 PG_QUEUE_CONNECTION_URL= ####################################### # Webhooks ####################################### WEBHOOK_URL= WEBHOOK_API_KEY= ####################################### # Monitoring ####################################### LOG_LEVEL=info SERVICE_NAME=storage_api OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://localhost:4317 OTEL_EXPORTER_OTLP_METRICS_ENDPOINT=http://localhost:4317 OTEL_METRICS_EXPORT_INTERVAL_MS=5000 OTEL_METRICS_ENABLED=true PROMETHEUS_METRICS_ENABLED=true LOGFLARE_ENABLED=false LOGFLARE_API_KEY=api_key LOGFLARE_SOURCE_TOKEN=source_token