sbarbase
Contents

Supabase Studio for an environment

Each environment can open the original Supabase Studio: the table editor, the SQL editor, users, and Storage buckets, all on that environment alone. Studio runs only while someone needs it, behind the console login, so it costs nothing when it is closed.

Open it

  1. Sign in and create a project. Sbarbase creates production and opens a waiting tab from your Create action.
  2. Production is provisioned, then Studio is started and opened automatically in that tab. The console stays open. Stay in console, or closing the waiting tab, cancels the automatic dashboard opening.
  3. An existing project shows Open Supabase dashboard. Press it once to start Studio when needed and enter its original full page on the environment's own Studio address, using your console sign-in. No custom bar or iframe is added to native Studio.
  4. Connection details opens environment settings. Database connection includes Stop dashboard and direct database controls. Sign-in settings configures the self-hosted Auth service; native user management remains in Studio.

If the browser blocks the waiting tab, the dashboard is prepared and the console offers the normal Open button. If startup fails, the temporary tab closes and a retryable error stays in the console. Retry dashboard status recovers a failed status request. If provisioning fails, use Retry in the environment row. These retries do not create another project. The default production name does not certify deployment readiness.

Only owners and admins of the client can start, open or stop Studio. Viewers do not see it.

Open it from anywhere

By default Studio's address is <id>.studio.localhost, which every browser sends to its own machine. So it works on your computer, or on a server through an SSH tunnel (ssh -N -L 8790:127.0.0.1:8790 you@your-server, then open http://localhost:8790), as the Docker guide shows. From the console's public address, the console says this instead of opening a tab the browser cannot reach.

To open Studio from the public address, set up one domain once. Every project and environment you create afterwards gets its own Studio address under it, with no DNS or certificate work per project.

  1. Pick a domain that holds no other site. The wildcard record in the next step answers every name under the domain that has no record of its own, so use a domain meant for this, not one that already serves other sites. Named records you already have keep working either way; any other name reaches Sbarbase, which refuses it.
  2. See what to provide. On the server run /usr/bin/python3 lab/studio_address.py plan example.com. It prints the address pattern (studio-{id}.example.com) and the two things you provide: a wildcard DNS record (*.example.com, proxied if you use Cloudflare) and a certificate that covers *.example.com. With Cloudflare, create an Origin CA certificate for *.example.com and example.com, generate the key on the server and paste only the request into Cloudflare, then install it on the TLS proxy.
  3. Apply it. Run sudo /usr/bin/python3 lab/studio_address.py apply example.com. It writes SBARBASE_STUDIO_HOST as a systemd drop-in for the console (sbarbase) and the TLS proxy (sbarbase-proxy, or the unit --proxy-service names), which both read it, and restarts them. It refuses when the proxy already passes a different --studio-host.
  4. Check it. Run /usr/bin/python3 lab/studio_address.py verify example.com. It says which step is missing: DNS that does not resolve, a certificate that does not cover the name, or a server that refuses the address.

Each environment then opens Studio on its own address, such as studio-<24 hex>.example.com. The proxy passes only names that match the pattern and refuses every other name with 421, so the wildcard never shows the console under another name. To undo it, delete the two drop-ins named studio-host.conf (under sbarbase.service.d and sbarbase-proxy.service.d), restart both services and delete the DNS record.

Good to know:

On Supabase's cloud the dashboard is Studio itself, built for many projects. The Studio image a server runs serves one project at the root of its own address, which is why each environment has its own Studio address and opens in its own tab.

What it can do

Page Works on
Table editor and SQL editor The environment's own database, with the rights of its developer login
Authentication users The environment's own Auth
Storage buckets and files The environment's own files
Saved SQL snippets A folder inside this Studio session; they are gone when Studio closes, so keep lasting SQL in migrations
Edge Functions list and code A copy of each function's deployed code, taken when Studio opens; deploy from the console or the CLI

Studio works as the environment's developer login, as Studio on Supabase works as the project's postgres user: it sees every row, including rows hidden by row security, and it can change the tables, policies and schemas that migrations made. What it creates belongs to the same owner, so later migrations can change it. It cannot create roles, act as a superuser, or reach another environment's database.

Studio's Logs and Realtime pages expect Supabase's own platform services and stay empty or hidden. Use the console for those: logs and metrics and Realtime. On a server with a firewall, Studio's Storage and users pages need the route described in server deployment.

How it is kept safe

Memory

A running Studio uses up to 768 MiB (Studio 512 MiB and postgres-meta 256 MiB). If the server lacks the room, Start fails with a message and nothing else is touched. Stop Studio when you are done.

CI starts Studio on a clean machine with every change, uses the table list, SQL, users and buckets through it, checks every refusal above, and stops it (evidence).

Edit on GitHub