Supabase
The open-source Firebase alternative — Postgres + Auth + Realtime + Storage.
Supabase is an open-source backend-as-a-service built on PostgreSQL. It bundles authentication, instant REST + GraphQL APIs from your schema, realtime subscriptions, file storage, edge functions, and pgvector — all running on Postgres extensions. Pier deploys the full stack as a single one-click service.
Deploy with Pier
- 1 Open the Pier dashboard and click Add service.
- 2 Pick Supabase from the template list.
- 3 Choose the version, set a service name, and Pier provisions the container, storage, and ports automatically.
- 4 Attach a domain if you want HTTPS. Traefik auto-provisions the Let's Encrypt certificate.
What is Supabase?
Supabase is “the open-source Firebase alternative” — a backend-as-a-service
that bundles authentication, an auto-generated REST + GraphQL API, realtime
subscriptions, file storage, edge functions, and vector search on top of
PostgreSQL. Where Firebase locks your data into Google’s proprietary
Firestore, Supabase keeps everything in plain Postgres — you can pg_dump
your database at any time and walk away.
Architecturally it’s a Docker Compose stack: Postgres in the middle, PostgREST + pg_graphql exposing the schema as APIs, GoTrue handling auth, Realtime broadcasting changes over WebSockets, and Storage API wrapping S3-compatible buckets. Kong sits in front as the gateway. Supabase Studio gives you a web UI to browse tables, edit RLS policies, and inspect logs.
How Pier deploys it
Pier deploys Supabase as a multi-container Docker Compose template. All the sidecars — Postgres, PostgREST, GoTrue, Realtime, Storage, Kong, Studio — come up together with sensible defaults and a generated JWT secret. The service exposes ports 8000 (API) and 3000 (Studio) internally.
For HTTPS, attach a domain — Traefik handles cert issuance. The standard
Supabase env vars (SUPABASE_URL, ANON_KEY, SERVICE_ROLE_KEY) are
shown in the Pier service page so you can plug them straight into your
client SDK.
When NOT to use Supabase
For pure storage or pure auth, the bundled stack is overkill — use plain PostgreSQL + a single auth library. For mobile-only apps with no web side, PocketBase is lighter. For deep enterprise SSO and RBAC needs out of the box, look at Keycloak. Supabase wins when you want a Firebase-level developer experience without giving up Postgres or self-hosting freedom.
Key features
PostgreSQL at the core
Every Supabase feature is a Postgres extension or sidecar. Your data lives in plain Postgres — no proprietary database, no lock-in. pg_dump exports work.
Auto-generated REST + GraphQL
PostgREST exposes every table and view as a REST endpoint with row-level security. pg_graphql adds GraphQL on top — no resolvers to write.
Auth out of the box
Email/password, magic links, OAuth (Google, GitHub, Apple, Discord, 30+ providers), MFA, anonymous sign-ins. JWT tokens enforced via Postgres RLS policies.
Realtime subscriptions
Subscribe to INSERT/UPDATE/DELETE on any table over WebSockets. Built on Postgres logical replication — same mechanism as cross-region replication.
Object storage
S3-compatible storage with per-bucket RLS policies. Image transformations, signed URLs, large file uploads — all without leaving Supabase.
Vector search (pgvector)
First-class support for AI embeddings. Store, index, and query 1536-dim vectors with HNSW indexes. RAG and semantic search without a separate vector DB.
Use cases
SaaS app backend
Replace Firebase + Stripe + Algolia + S3 with one self-hosted stack. Auth, database, file storage, search, vector — all in one Postgres.
Internal tools backend
PostgREST + auth gives you a full API in minutes. Combine with Retool, Tooljet, or Pier's Directus template for the UI.
Mobile app backend
Supabase JS/Swift/Kotlin/Flutter SDKs handle auth, realtime, storage. Offline-first with PowerSync or Watermelon overlays.
AI / RAG backend
pgvector for embeddings + storage for source docs + auth for multi-tenant access. The de-facto OSS stack for RAG products.
Realtime collaboration (Notion-style)
Realtime subscriptions on Postgres tables sync state across users. Pair with Yjs or Liveblocks for OT/CRDT in the editor layer.
Code examples
import { createClient } from "@supabase/supabase-js";
const supabase = createClient(
"https://your-supabase.example.com",
"<anon key>"
);
const { data, error } = await supabase
.from("posts")
.select("id, title, author:profiles(name)")
.eq("published", true)
.order("created_at", { ascending: false })
.limit(10); const channel = supabase
.channel("posts-changes")
.on(
"postgres_changes",
{ event: "INSERT", schema: "public", table: "posts" },
(payload) => console.log("New post:", payload.new)
)
.subscribe(); ALTER TABLE projects ENABLE ROW LEVEL SECURITY;
CREATE POLICY "Users see only their own projects"
ON projects FOR ALL
USING (owner_id = auth.uid()); SELECT id, title, content
FROM documents
ORDER BY embedding <-> '[0.1, 0.2, ...]'::vector
LIMIT 5; How it compares
| vs Firebase | Firebase is closed-source and Google-locked-in. Supabase is OSS, self-hostable, Postgres-based. Equivalent feature set; portable away the moment you want to leave. |
| vs PocketBase | PocketBase is a single-binary SQLite-based Firebase-alike. Lighter, simpler, lower ceiling. Pick PocketBase for hobby projects; Supabase for production multi-tenant SaaS. |
| vs Hasura | Hasura generates GraphQL from any Postgres. Supabase generates REST + GraphQL and bundles auth/storage/realtime/edge functions. Hasura is the GraphQL layer; Supabase is the full stack. |
| vs Postgres + handwritten API | You can build everything yourself on raw Postgres — but you re-invent auth, RLS plumbing, realtime websockets, and storage. Supabase saves months of plumbing. |
Frequently asked questions
Is Supabase really 100% open source?
How does Pier deploy it?
Default ports?
How do I access Supabase Studio?
Can I migrate from hosted Supabase to self-hosted on Pier?
Postgres extensions available?
Backups?
Related services
Deploy on your VPS
Supabase is an open-source backend-as-a-service built on PostgreSQL. It bundles authentication, instant REST + GraphQL APIs from your schema, realtime subscriptions, file storage, edge functions, and pgvector — all running on Postgres extensions. Pier deploys the full stack as a single one-click service.
Deploy this service →