Configuration

Supabase Studio

Enable the Supabase dashboard for managing your database, auth, and storage

Overview

Supabase Studio is a web-based dashboard for managing your database, authentication, storage, and more. It is not enabled by default in Trackr’s Docker Compose setup. Follow the steps below to add it.

Add Services

Add the following two services to your docker-compose.yml:

  meta:
    container_name: supabase-meta
    image: supabase/postgres-meta:v0.89.0
    restart: unless-stopped
    depends_on:
      db:
        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: supabase_admin
      PG_META_DB_PASSWORD: ${POSTGRES_PASSWORD}
      PG_META_CRYPTO_KEY: ${PG_META_CRYPTO_KEY}

  studio:
    container_name: supabase-studio
    image: supabase/studio:2025.01.27-sha-c550777
    restart: unless-stopped
    depends_on:
      meta:
        condition: service_started
    healthcheck:
      test: ["CMD", "node", "-e", "fetch('http://localhost:3000/api/profile').then(r => { if (r.status !== 200) throw new Error(r.status) })"]
      timeout: 5s
      interval: 5s
      retries: 3
    environment:
      STUDIO_PG_META_URL: http://meta:8080
      POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
      DEFAULT_ORGANIZATION_NAME: ${STUDIO_DEFAULT_ORGANIZATION}
      DEFAULT_PROJECT_NAME: ${STUDIO_DEFAULT_PROJECT}
      OPENAI_API_KEY: ${OPENAI_API_KEY}
      SUPABASE_URL: http://kong:8000
      SUPABASE_PUBLIC_URL: ${SUPABASE_PUBLIC_URL}
      SUPABASE_ANON_KEY: ${ANON_KEY}
      SUPABASE_SERVICE_KEY: ${SERVICE_ROLE_KEY}
      AUTH_JWT_SECRET: ${JWT_SECRET}
      LOGFLARE_API_KEY: ${LOGFLARE_PRIVATE_ACCESS_TOKEN}
      LOGFLARE_URL: http://analytics:4000
      NEXT_PUBLIC_ENABLE_LOGS: false
      NEXT_ANALYTICS_BACKEND_PROVIDER: postgres

Add Kong Route

Add the following to your docker/volumes/api/kong.yml to route the dashboard through Kong with basic authentication:

  ## Supabase Studio
  - name: dashboard
    _comment: 'Studio: /* -> http://studio:3000/*'
    url: http://studio:3000/
    routes:
      - name: dashboard-all
        strip_path: true
        paths:
          - /
    plugins:
      - name: cors
      - name: basic-auth
        config:
          hide_credentials: true

Environment Variables

Make sure these variables are set in your .env file:

DASHBOARD_USERNAME=your-username
DASHBOARD_PASSWORD=your-password
PG_META_CRYPTO_KEY=your-encryption-key-32-chars-min
STUDIO_DEFAULT_ORGANIZATION=Default Organization
STUDIO_DEFAULT_PROJECT=Default Project

Custom Domain

To expose Studio on its own subdomain, add a block to your Caddyfile:

studio.example.com {
    reverse_proxy kong:8000
}

Replace example.com with your actual domain. Caddy will automatically provision an SSL certificate. Make sure you also add a DNS record for the subdomain:

TypeNameValue
Astudioyour-server-ip

Access Studio

After adding the services and restarting:

docker compose down && docker compose up -d

Open https://studio.example.com (or http://localhost:8000 for local setups) and log in with your DASHBOARD_USERNAME and DASHBOARD_PASSWORD.

ende