# Usage # Start: docker compose up -d # Stop: docker compose down # Dev mode: docker compose -f docker-compose.yml -f ./dev/docker-compose.dev.yml up -d # Reset everything: sh reset.sh # # Notes: # - Nested variable interpolation (${A:-${B}}) requires podman-compose >= 1.6.0 # name: supabase services: studio: container_name: supabase-studio image: supabase/studio:2026.08.03-sha-022b374 restart: unless-stopped healthcheck: test: [ "CMD-SHELL", "node -e \"fetch('http://localhost:3000/api/platform/profile').then((r) => {if (r.status !== 200) throw new Error(r.status)})\"" ] timeout: 10s interval: 5s retries: 3 start_period: 20s environment: # Listen on all IPv4 interfaces HOSTNAME: "0.0.0.0" STUDIO_PG_META_URL: http://meta:8080 POSTGRES_PORT: ${POSTGRES_PORT} POSTGRES_HOST: ${POSTGRES_HOST} POSTGRES_DB: ${POSTGRES_DB} POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} # See: https://supabase.com/docs/guides/self-hosting/remove-superuser-access POSTGRES_USER_READ_WRITE: postgres PG_META_CRYPTO_KEY: ${PG_META_CRYPTO_KEY} PGRST_DB_SCHEMAS: ${PGRST_DB_SCHEMAS} PGRST_DB_MAX_ROWS: ${PGRST_DB_MAX_ROWS:-1000} PGRST_DB_EXTRA_SEARCH_PATH: ${PGRST_DB_EXTRA_SEARCH_PATH:-public} DEFAULT_ORGANIZATION_NAME: ${STUDIO_DEFAULT_ORGANIZATION} DEFAULT_PROJECT_NAME: ${STUDIO_DEFAULT_PROJECT} OPENAI_API_KEY: ${OPENAI_API_KEY} SUPABASE_URL: http://api-gw:8000 SUPABASE_PUBLIC_URL: ${SUPABASE_PUBLIC_URL} SUPABASE_ANON_KEY: ${ANON_KEY} SUPABASE_SERVICE_KEY: ${SERVICE_ROLE_KEY} AUTH_JWT_SECRET: ${JWT_SECRET} SUPABASE_PUBLISHABLE_KEY: ${SUPABASE_PUBLISHABLE_KEY} SUPABASE_SECRET_KEY: ${SUPABASE_SECRET_KEY} # See: docker-compose.logs.yml ENABLED_FEATURES_LOGS_ALL: "false" SNIPPETS_MANAGEMENT_FOLDER: /app/snippets EDGE_FUNCTIONS_MANAGEMENT_FOLDER: /app/edge-functions volumes: - ./volumes/snippets:/app/snippets:z - ./volumes/functions:/app/edge-functions:ro,z # Envoy is the default API gateway # See: https://github.com/orgs/supabase/discussions/48048 api-gw: container_name: supabase-envoy image: envoyproxy/envoy:v1.39.0 restart: unless-stopped networks: default: # Expose `envoy` and `kong` as network aliases, so internal configs # that reference either hostname resolve to whichever gateway is active. aliases: - envoy - kong healthcheck: # Using a TCP port check because this image does not include curl or wget. test: ["CMD-SHELL", "timeout 1 bash -c '" # GOTRUE_HOOK_MFA_VERIFICATION_ATTEMPT_ENABLED: "true" # GOTRUE_HOOK_MFA_VERIFICATION_ATTEMPT_URI: "pg-functions://postgres/public/mfa_verification_attempt" # GOTRUE_HOOK_PASSWORD_VERIFICATION_ATTEMPT_ENABLED: "true" # GOTRUE_HOOK_PASSWORD_VERIFICATION_ATTEMPT_URI: "pg-functions://postgres/public/password_verification_attempt" # GOTRUE_HOOK_SEND_SMS_ENABLED: "false" # GOTRUE_HOOK_SEND_SMS_URI: "pg-functions://postgres/public/custom_access_token_hook" # GOTRUE_HOOK_SEND_SMS_SECRETS: "v1,whsec_VGhpcyBpcyBhbiBleGFtcGxlIG9mIGEgc2hvcnRlciBCYXNlNjQgc3RyaW5n" # GOTRUE_HOOK_SEND_EMAIL_ENABLED: "false" # GOTRUE_HOOK_SEND_EMAIL_URI: "http://host.docker.internal:54321/functions/v1/email_sender" # GOTRUE_HOOK_SEND_EMAIL_SECRETS: "v1,whsec_VGhpcyBpcyBhbiBleGFtcGxlIG9mIGEgc2hvcnRlciBCYXNlNjQgc3RyaW5n" rest: container_name: supabase-rest image: postgrest/postgrest:v14.12 restart: unless-stopped depends_on: db: # Disable this if you are using an external Postgres database condition: service_healthy healthcheck: test: [ "CMD", "postgrest", "--ready" ] interval: 5s timeout: 5s retries: 3 environment: PGRST_DB_URI: postgres://authenticator:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB} PGRST_DB_SCHEMAS: ${PGRST_DB_SCHEMAS} PGRST_DB_MAX_ROWS: ${PGRST_DB_MAX_ROWS:-1000} PGRST_DB_EXTRA_SEARCH_PATH: ${PGRST_DB_EXTRA_SEARCH_PATH:-public} PGRST_DB_ANON_ROLE: anon PGRST_ADMIN_SERVER_PORT: 3001 PGRST_ADMIN_SERVER_HOST: localhost # PostgREST accepts a plain-text symmetric secret, a single JWK, or a JWKS. # For Podman, use either PGRST_JWT_SECRET: ${JWT_SECRET} or # PGRST_JWT_SECRET: ${JWT_JWKS} PGRST_JWT_SECRET: ${JWT_JWKS:-${JWT_SECRET}} PGRST_DB_USE_LEGACY_GUCS: "false" PGRST_APP_SETTINGS_JWT_SECRET: ${JWT_SECRET} PGRST_APP_SETTINGS_JWT_EXP: ${JWT_EXPIRY} command: [ "postgrest" ] realtime: # This container name looks inconsistent but is correct because realtime constructs tenant id by parsing the subdomain container_name: realtime-dev.supabase-realtime image: supabase/realtime:v2.102.3 restart: unless-stopped depends_on: db: # Disable this if you are using an external Postgres database condition: service_healthy healthcheck: test: [ "CMD-SHELL", "curl -sSfL --head -o /dev/null -H \"Authorization: Bearer ${ANON_KEY}\" http://localhost:4000/api/tenants/realtime-dev/health" ] timeout: 5s interval: 30s retries: 3 start_period: 10s environment: PORT: 4000 DB_HOST: ${POSTGRES_HOST} DB_PORT: ${POSTGRES_PORT} DB_USER: supabase_admin DB_PASSWORD: ${POSTGRES_PASSWORD} DB_NAME: ${POSTGRES_DB} DB_AFTER_CONNECT_QUERY: 'SET search_path TO _realtime' DB_ENC_KEY: ${REALTIME_DB_ENC_KEY:-supabaserealtime} # Legacy symmetric HS256 key API_JWT_SECRET: ${JWT_SECRET} # JWKS for token verification (EC public + legacy symmetric). # For Podman, use: API_JWT_JWKS: ${JWT_JWKS} #API_JWT_JWKS: ${JWT_JWKS:-{"keys":[]}} SECRET_KEY_BASE: ${SECRET_KEY_BASE} METRICS_JWT_SECRET: ${JWT_SECRET} ERL_AFLAGS: -proto_dist inet_tcp DNS_NODES: "''" RLIMIT_NOFILE: "10000" APP_NAME: realtime SEED_SELF_HOST: "true" RUN_JANITOR: "true" DISABLE_HEALTHCHECK_LOGGING: "true" # To use S3 backed storage: docker compose -f docker-compose.yml -f docker-compose.s3.yml up storage: container_name: supabase-storage image: supabase/storage-api:v1.60.4 restart: unless-stopped depends_on: db: # Disable this if you are using an external Postgres database condition: service_healthy rest: condition: service_started imgproxy: condition: service_started healthcheck: test: [ "CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://storage:5000/status" ] timeout: 5s interval: 5s retries: 3 start_period: 10s environment: ANON_KEY: ${ANON_KEY} SERVICE_KEY: ${SERVICE_ROLE_KEY} POSTGREST_URL: http://rest:3000 # Legacy symmetric HS256 key AUTH_JWT_SECRET: ${JWT_SECRET} # JWKS for token verification (EC public + legacy symmetric). # For Podman, use: JWT_JWKS: ${JWT_JWKS} #JWT_JWKS: ${JWT_JWKS:-{"keys":[]}} DATABASE_URL: postgres://supabase_storage_admin:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB} STORAGE_PUBLIC_URL: ${SUPABASE_PUBLIC_URL} REQUEST_ALLOW_X_FORWARDED_PATH: "true" FILE_SIZE_LIMIT: 52428800 STORAGE_BACKEND: file # S3 bucket when using S3 backend, directory name when using 'file' GLOBAL_S3_BUCKET: ${GLOBAL_S3_BUCKET} # S3 Backend configuration #GLOBAL_S3_ENDPOINT: https://your-s3-endpoint #GLOBAL_S3_PROTOCOL: https #GLOBAL_S3_FORCE_PATH_STYLE: "true" #AWS_ACCESS_KEY_ID: your-access-key-id #AWS_SECRET_ACCESS_KEY: your-secret-access-key FILE_STORAGE_BACKEND_PATH: /var/lib/storage TENANT_ID: ${STORAGE_TENANT_ID} # TODO: https://github.com/supabase/storage-api/issues/55 REGION: ${REGION} ENABLE_IMAGE_TRANSFORMATION: "true" IMGPROXY_URL: http://imgproxy:5001 # S3 protocol endpoint configuration S3_PROTOCOL_ACCESS_KEY_ID: ${S3_PROTOCOL_ACCESS_KEY_ID} S3_PROTOCOL_ACCESS_KEY_SECRET: ${S3_PROTOCOL_ACCESS_KEY_SECRET} volumes: - ./volumes/storage:/var/lib/storage:z imgproxy: container_name: supabase-imgproxy image: darthsim/imgproxy:v3.30.1 restart: unless-stopped volumes: - ./volumes/storage:/var/lib/storage:z healthcheck: test: [ "CMD", "imgproxy", "health" ] timeout: 5s interval: 5s retries: 3 environment: IMGPROXY_BIND: ":5001" IMGPROXY_LOCAL_FILESYSTEM_ROOT: / IMGPROXY_USE_ETAG: "true" IMGPROXY_AUTO_WEBP: ${IMGPROXY_AUTO_WEBP} IMGPROXY_MAX_SRC_RESOLUTION: 16.8 meta: container_name: supabase-meta image: supabase/postgres-meta:v0.96.6 restart: unless-stopped depends_on: db: # Disable this if you are using an external Postgres database condition: service_healthy environment: PG_META_PORT: 8080 PG_META_DB_HOST: ${POSTGRES_HOST} PG_META_DB_PORT: ${POSTGRES_PORT} PG_META_DB_NAME: ${POSTGRES_DB} PG_META_DB_USER: postgres PG_META_DB_PASSWORD: ${POSTGRES_PASSWORD} CRYPTO_KEY: ${PG_META_CRYPTO_KEY} functions: container_name: supabase-edge-functions image: supabase/edge-runtime:v1.74.0 restart: unless-stopped volumes: - ./volumes/functions:/home/deno/functions:z - deno-cache:/root/.cache/deno depends_on: api-gw: condition: service_healthy healthcheck: test: ["CMD-SHELL", "timeout 1 bash -c '