Running on Supabase
Use a Supabase project as the application database.
Supabase works well as the application database. Best as a dedicated project:
Hypercube creates its own hypercube schema on first boot, and the auth
tables (user, session, account, verification) in public.
Setup
-
Create a project on supabase.com.
-
Open Connect and copy the Transaction Pooler connection string:
postgresql://postgres.<project-ref>:<password>@aws-1-<region>.pooler.supabase.com:6543/postgres -
Set it as
DATABASE_URLwherever the console runs — locally inapps/console/.env.local, or as an environment variable on your host.
An empty project is all it takes; migrations run on first boot.
Which connection string
Supabase offers three:
- Transaction Pooler (
*.pooler.supabase.com, port 6543) — use this. Many clients share a few backend connections, which is what serverless needs. - Session Pooler (port 5432) — every connected client holds a slot until
it disconnects, capped at the pool's
pool_size; concurrent serverless instances exhaust it (EMAXCONNSESSION). Fine for a single long-lived server. - Direct (
db.<project-ref>.supabase.co) — IPv6-only, unreachable from many hosts and networks; connections fail withENOTFOUND.
The same rules apply to Supabase databases you connect as dynamic resources.