AceDocs
Integrations

Supabase

Connect Supabase so unhealthy services, Supabase health checks, read-only mode and a full disk open incidents, and Ace can fix pool size, disk and read-only mode after approval.

Ace watches Supabase project health and investigates database incidents through the Management API. It never runs SQL and never sees your table data.

CategoryDatabase
Ace readsProject and service health, metrics, logs, advisors, disk, configuration, usage, edge function deploys, migrations, branches
Ace can changePooler pool size, a temporary lift of read-only mode, disk size, project restart. A person always approves.
Opens incidentsYes, for workloads that route Supabase
SetupSettings form

What Ace reads

Ace reads Supabase while it investigates a workload that lists it under Investigation sources or routes its alerts. It reads only the projects you list.

  • Project status and the health of Postgres, logins, the connection pooler, the dedicated pooler, Auth, the Data API, Realtime and Storage. Ace also reads read-only mode, disk use, max_connections and statement_timeout.
  • A current metrics snapshot: Postgres up, CPU per core, memory, disk, I/O, backends, pooler connections and replication lag.
  • One log source at a time over the incident window, for example edge, Postgres, Auth or edge functions.
  • Performance health checks and security advisors, errors first.
  • Request counts per service and edge function invocation stats. Supabase keeps 7 days of these.
  • Edge function deploys, migration versions and branch action runs around the incident.

For the System Map, Ace reads projects, the connection pooler, custom domains and branches.

If the token lacks an optional permission, Ace skips the reads that need it and uses the rest.

What Ace never reads

Ace can send only the Supabase requests listed above. It blocks the SQL endpoint, function code, API keys and every write other than the four actions below before the request leaves Ace. Ace never needs the Database permission, so don't grant it.

What Ace can change

Every Supabase action needs a person's approval and never runs automatically, whatever your policy says. Ace proposes them only after an admin turns on Allow Ace to run approved actions for the connection, and only where the token has Read-write. See Actions and approvals.

ActionWhat it doesPermissionUndo
Pooler pool sizeChanges the connection pooler's default pool size (1 to 3,000), and optionally its pool mode.Connection Pooling: Read-writeYes. Restores the previous settings.
Read-only mode liftLifts read-only mode for 15 minutes after the disk filled, so writes can free space. It ends on its own.Read-only Mode: Read-writeNo
Disk increaseGrows the database disk. A disk can never shrink, and Supabase makes the next disk change wait about 4 hours.Disk Config: Read-writeNo
Project restartRestarts the project. Postgres and its services restart, and every client reconnects.Project Settings: Read-writeNo

Ace doesn't change the pooler's max client connections or restart single services, and it refuses to write to any project outside the connection.

Supabase can't report a token's permissions, so Settings shows that each write permission is checked when the action runs. Pool size is the exception, because if the token can't read the pooler, Ace knows it can't change it either.

Project Settings: Read-write

Read-write on Project Settings lets Ace restart the project, and in Supabase it also allows pausing or deleting it. Ace never sends those requests. Grant read-write only if you want Ace to propose restarts.

What opens an incident

Problems open incidents only on workloads that route this connection (Integration alerts on, Supabase selected). Supabase has no webhook, so Ace checks routed projects on a schedule. An incident opens while a problem is present and resolves when it clears.

ConditionSeverity
Postgres unhealthyCritical
Auth or Data API unhealthyHigh
Realtime unhealthyMedium
Read-only mode onCritical
Disk nearly fullHigh, or critical when the disk is close to full
Supabase advisor health check at level ERROR or WARNDepends on the check. WARN is one step lower.

These advisor health checks open incidents:

  • Critical: database down, database not reachable, database connections failing.
  • High: connection limit reached, an instance alert firing, high Data API or Auth error rate.
  • Medium: high Storage or edge function error rate, project not active.

These add context and never open an incident:

  • Unhealthy Postgres logins, connection pooler, dedicated pooler or Storage.
  • Project status, such as unhealthy, restoring, inactive, or a failed restore or pause.

If Ace loses read access to a project, its open problems expire after a while, so a lost permission can't hold an incident open.

Edge function deploys, migrations and branch action runs (migrate and deploy steps) join the change ledger whether or not a workload routes the connection, and they never open incidents. Supabase doesn't report when a migration was applied, so Ace dates it when it first sees it.

Before you start

  • The admin role in Ace.
  • A scoped personal access token (sbp_fc…). Ace refuses Classic (Legacy) tokens, which carry your whole account.
  • The Project ID of each project Ace should read. It's the 20-letter ID under Project Settings > General > Project ID, and also the part after /project/ in the dashboard URL.

Credentials and permissions

Ace uses one scoped access token, limited to the projects you list. Don't use the Read-only preset, which also grants Database and secret reads.

PermissionNeeded forWhy Ace needs it
Project Settings: ReadNeededProject status and service health.
Logs: ReadNeededLogs and metrics.
Advisors: ReadNeededPerformance health checks and security advisors.
Disk Config: ReadNeededDisk use.
Read-only Mode: ReadNeededRead-only mode.
Usage Analytics, Action Runs, Migrations, Database Config, Connection Pooling, Edge Functions, Development Branches: ReadOptionalTraffic, recent changes, configuration and the System Map. Edge Functions: Read also allows reading function code, which Ace never requests.
Connection Pooling: Read-writeOnly for actionsChange the pool size.
Read-only Mode: Read-writeOnly for actionsLift read-only mode after a full disk.
Disk Config: Read-writeOnly for actionsGrow the disk.
Project Settings: Read-writeOnly for actionsRestart the project. Also allows pausing or deleting it.
DatabaseNeverAce never queries your data.

Set up

1. Create a scoped access token in Supabase

  1. Open Account > Access Tokens and choose Generate new token. Don't use Create legacy token.
  2. Name it Ace and set Expires in (90 days, or a custom date up to a year).
  3. Under Resource access, choose Project, then the organization, then the projects Ace should read.
  4. Under Permissions, keep Preset at No access. Set Read on Project Settings, Logs, Advisors, Read-only Mode and Disk Config. Optionally set Read on Usage Analytics, Action Runs, Migrations, Database Config, Connection Pooling, Edge Functions and Development Branches. Leave every other row at None, especially Database.
  5. Only for approved changes, set Read-write on Connection Pooling, Read-only Mode and Disk Config. Set it on Project Settings only if Ace may restart the project. Leave Database at None.
  6. Review access, select Create token, and copy the sbp_fc… token.

2. Connect Supabase in Ace

  1. Open Settings > Data sources and choose Supabase.

  2. Fill in the form:

    FieldWhat to enter
    Scoped access tokenThe sbp_fc… token.
    Project IDsA comma-separated list of the Project IDs Ace reads. Ace reads no other project.
  3. Select Connect Supabase. Ace checks the token before it saves, and it never sends a classic token to Supabase.

3. Route alerts to a workload

Open the workload in Ace, turn on Integration alerts, and select Supabase as a source.

4. Optional: allow actions

Turn on Allow Ace to run approved actions.

Confirm it's working

The connection runs the checks scoped_token, project_settings_read, logs_read, advisors_read, disk_config_read and read_only_mode_read. Re-validate reruns them. These failures come up most often:

  • A classic token: "This is a classic (Legacy) token with access to your whole account. Create a scoped token (sbp_fc…) limited to these projects."
  • A listed project the token can't see, which the check names before asking you to scope the token to it with Project Settings: Read.
  • No readable project: "No Supabase project could be read."

Disconnect

  1. In Ace, open the Supabase connection under Settings > Data sources and select Disconnect. To stop actions and keep the connection, turn off Allow Ace to run approved actions instead.
  2. In Supabase, delete the Ace token under Account > Access Tokens. Ace creates nothing in Supabase.

Next steps

On this page