Supabase vs Postgres on a VPS: The Real Cost Comparison
Supabase costs $200/month at scale. A VPS with Postgres costs $6.50. Here's the full comparison with pricing, features, and migration paths.
Choosing between Supabase (a managed Backend-as-a-Service platform) and self-hosted PostgreSQL on a VPS is one of the most consequential infrastructure decisions a startup can make. Both run on Postgres under the hood, but they represent fundamentally different philosophies: managed convenience versus self-hosted control.
This guide compares Supabase vs Postgres on a VPS across pricing, features, operational complexity, vendor lock-in, and real-world use cases — so you can make the right call for your project.
What Is Supabase?
Supabase is an open-source Backend-as-a-Service (BaaS) built on top of PostgreSQL. It bundles a managed Postgres database with:
- Auth — user authentication and row-level security policies
- Realtime — WebSocket subscriptions for live data
- Edge Functions — serverless Deno functions
- Storage — S3-compatible file storage
- Auto-generated REST API — via PostgREST
- Dashboard — a web-based management UI
Supabase is not a database — it is a platform that wraps Postgres with developer-friendly tooling. The database underneath is standard PostgreSQL, but Supabase layers its own ORM-like patterns, auth integrations, and SDK conventions on top.
What Is Self-Hosted Postgres on a VPS?
Self-hosted Postgres means you rent a virtual private server (VPS) from a provider like Hetzner, DigitalOcean, Vultr, or AWS EC2, and install PostgreSQL yourself. You manage:
- Installation and configuration of Postgres
- Backups and replication
- Security and firewalls
- SSL certificates
- Monitoring and alerting
You may also install companion tools on the same VPS (PostgREST, pgAdmin, Docker Compose stacks, etc.), but every layer of the stack is under your direct control.
Supabase vs Postgres: Pricing Breakdown
Cost is often the deciding factor. Here is a direct comparison based on published pricing as of 2025.
Supabase Pricing
| Plan | Monthly Cost | Database Size | Bandwidth | Compute |
|---|---|---|---|---|
| Free | $0 | 500 MB | 1 GB | Shared CPU |
| Pro | $25/mo | 8 GB | 100 GB | 2 vCPU, 1 GB RAM |
| Team | $599/mo | 100 GB | 250 GB | 4 vCPU, 8 GB RAM |
| Enterprise | Custom | Custom | Custom | Custom |
Self-Hosted Postgres on a VPS (Hetzner Example)
| Plan | Monthly Cost | vCPU | RAM | Storage | Bandwidth |
|---|---|---|---|---|---|
| CX21 | $6.50/mo | 2 | 4 GB | 40 GB SSD | 20 TB |
| CX31 | $8.50/mo | 2 | 8 GB | 80 GB SSD | 20 TB |
| CX41 | $15/mo | 4 | 16 GB | 160 GB SSD | 20 TB |
| CPX31 | $18/mo | 4 | 8 GB | 160 GB NVMe | 20 TB |
Side-by-Side Cost Comparison
| Scenario | Supabase | Hetzner VPS + Postgres |
|---|---|---|
| Hobby project | Free (500 MB limit) | $6.50/mo (4 GB RAM) |
| Small SaaS, 100 users | $25/mo (8 GB DB) | $6.50–$8.50/mo |
| Growing SaaS, 1000 users | $25 + $100 compute = $125/mo | $15–$18/mo |
| Production at scale | $225+/mo | $18–$50/mo |
The cost gap widens dramatically at scale. A Supabase XL compute instance costs $200+/mo. The equivalent specs (8 vCPU, 32 GB RAM) on Hetzner run approximately $45–$65/mo — a 3–4x savings.
Real-world sentiment: As one Hacker News user noted: "I'm paying $25/mo for Supabase Pro and hitting limits on a side project. For $6.50/mo I could get a Hetzner box with more RAM and no artificial caps." Another wrote: "The Supabase free tier is generous for MVPs, but the jump from free to the compute you actually need is steep."Features Comparison
What Supabase Gives You Out of the Box
Supabase's real value is not the database — it is the surrounding tooling:
- Row-Level Security (RLS): Declarative auth policies built into Postgres via the Supabase dashboard
- Realtime subscriptions: Listen to database changes over WebSocket without custom infrastructure
- Auth providers: Google, GitHub, Apple, email/password, magic links — all pre-wired
- Edge Functions: Deploy serverless functions with
supabase functions deploy - Storage: Managed S3-compatible object storage with image transformation
- Auto-generated APIs: PostgREST endpoints generated from your schema
- Dashboard: Visual query editor, table editor, auth user management
- Client libraries: JS, Dart, Python, Swift, Kotlin SDKs
What You Get with Self-Hosted Postgres
A self-hosted VPS gives you raw power and flexibility:
- Full Postgres control: Extensions, configurations, tuning parameters — nothing is locked down
- Any extension: PostGIS, pg_vector, pg_cron, TimescaleDB, pglogical — install anything
- Any tooling: Run PostgREST, Hasura, Grafana, Prometheus, pgAdmin — your stack, your rules
- No artificial limits: No row limits, no bandwidth caps, no storage quotas
- Docker ecosystem: Deploy any container alongside your database
- Custom auth: Build exactly the auth flow you need (or use a library like Lucia)
- Direct access: SSH, psql, pg_dump — full administrative access
Feature Comparison Table
| Feature | Supabase | Self-Hosted Postgres |
|---|---|---|
| PostgreSQL database | ✅ Managed | ✅ Full control |
| REST API (PostgREST) | ✅ Auto-generated | ⚙️ Manual setup |
| Realtime (WebSocket) | ✅ Built-in | ⚙️ Build with PostgREST + trigger or use Hasura |
| Auth (OAuth, email) | ✅ Built-in | ⚙️ Build with Lucia, Passport.js, or similar |
| File storage | ✅ Built-in | ⚙️ Use MinIO, S3, or local filesystem |
| Serverless functions | ✅ Edge Functions (Deno) | ⚙️ Run your own (Docker, Node, etc.) |
| Dashboard/UI | ✅ Web dashboard | ⚙️ pgAdmin, adminer, or custom |
| Database extensions | ⚠️ Limited to Supabase-supported | ✅ Any extension |
| Full SSH access | ❌ No | ✅ Yes |
| Custom Postgres config | ⚠️ Limited tuning params | ✅ Full postgresql.conf control |
| Point-in-time recovery | ✅ (Pro plan) | ⚙️ Configure with WAL archiving |
| Monitoring | ⚠️ Basic dashboard | ✅ Prometheus + Grafana, full observability |
| SSL/TLS | ✅ Automatic | ⚙️ Set up with Let's Encrypt or certbot |
Complexity and Operational Overhead
Supabase Complexity: Low
Supabase is designed for speed-to-market. You can go from zero to a working database with auth, realtime, and a REST API in under 30 minutes. There is:
- No server provisioning
- No Postgres version management
- No backup configuration
- No firewall rules to set up
- No SSL certificate management
The tradeoff is opacity. You cannot SSH into your database. You cannot install arbitrary extensions. You cannot tune Postgres memory settings beyond the compute tier you pay for.
Self-Hosted Postgres Complexity: Medium to High
Running Postgres on a VPS requires operational knowledge:
- Initial setup: Install Postgres, configure authentication, set up SSL
- Security: Configure
pg_hba.conf, UFW/iptables firewall rules, SSH key auth - Backups: Set up
pg_dumpcron jobs, or WAL-based continuous archiving - Monitoring: Deploy Prometheus + Grafana, or use simpler tools like pg_stat_statements
- Updates: Apply Postgres minor versions, manage OS security patches
- High availability: Set up streaming replication, connection pooling (PgBouncer)
Vendor Lock-In: The Hidden Cost
Supabase Lock-In
Supabase is open-source, which reduces lock-in at the database level. However, significant lock-in exists at the platform level:
- Auth: Supabase Auth stores users in
auth.users. Your RLS policies referenceauth.uid(). Migrating to a different auth provider requires rewriting every policy. - Realtime: Uses Supabase's proprietary Realtime server, not a standard protocol you can replicate elsewhere.
- Client SDKs: The
@supabase/supabase-jsSDK is tightly coupled to Supabase's API layer. Swapping to raw Postgres clients requires significant refactoring. - Storage: Supabase Storage uses its own metadata layer on top of S3. Moving files out requires additional tooling.
- Edge Functions: Deno-based functions with Supabase-specific import paths.
Self-Hosted Postgres Lock-In
With a VPS, your only lock-in is to PostgreSQL itself (which is trivially portable across any host) and to any custom tooling you build. You can:
pg_dumpyour entire database and restore it anywhere- Migrate to a different VPS provider in under an hour
- Switch to a managed Postgres service (AWS RDS, Google Cloud SQL, Supabase) with minimal changes
- Run the same stack locally, on-premises, or in any cloud
When to Use Supabase
Supabase is the better choice when:
- You are validating an idea — The free tier and rapid setup let you ship an MVP in a weekend
- You need auth + realtime + storage fast — Building these from scratch on a VPS takes days
- You are a solo developer or small team — You don't have DevOps expertise
- Your project is read-heavy with simple auth — RLS policies handle most multi-tenant patterns
- You want managed infrastructure — No desire to handle backups, updates, or scaling
When to Use Self-Hosted Postgres on a VPS
Self-hosted Postgres is the better choice when:
- You need to control costs at scale — 3–4x savings compared to Supabase compute tiers
- You need specific Postgres extensions — PostGIS, pg_vector, TimescaleDB, or custom extensions
- You want full observability — Direct access to logs, metrics, and query performance data
- You have DevOps knowledge — You or your team can manage server infrastructure
- You need to avoid vendor lock-in — Clean Postgres that can move anywhere
- Your workload is write-heavy or compute-intensive — No bandwidth or compute throttling
Migration Considerations: Supabase to VPS
If you start on Supabase and later decide to migrate to a VPS, here is what to expect:
| Task | Effort | Notes |
|---|---|---|
| Export database | Low | pg_dump works seamlessly |
| Recreate RLS policies | Medium | Policies reference auth.uid() — replace with your own auth |
| Replace Supabase Auth | High | Rewrite user management, session handling, JWT validation |
| Replace Realtime | Medium | Use PostgREST websockets, Hasura, or custom WebSocket server |
| Replace Supabase Storage | Low | Switch to MinIO or S3-compatible storage |
| Update client code | High | Replace @supabase/supabase-js with direct Postgres/REST clients |
Frequently Asked Questions
Is Supabase just Postgres?
Supabase uses PostgreSQL as its database, but it is a full BaaS platform that adds auth, realtime, storage, edge functions, and a dashboard on top of Postgres. The database is standard Postgres, but the surrounding services are Supabase-specific.
Can I self-host Supabase on my own VPS?
Yes. Supabase is open-source and offers self-hosting via Docker Compose. However, self-hosted Supabase is significantly more complex to maintain than raw Postgres — you are running 8+ containers (GoTrue, PostgREST, Realtime, Storage, Kong, etc.).
Is Supabase free?
Supabase offers a free tier with 500 MB database storage, 1 GB bandwidth, and shared CPU. It is sufficient for hobby projects and MVPs but not production workloads. The Pro plan starts at $25/mo.
How much does a VPS cost compared to Supabase?
A Hetzner CX21 VPS costs $6.50/mo with 2 vCPU and 4 GB RAM — compared to Supabase Pro at $25/mo with 2 vCPU and 1 GB RAM. At scale, a VPS can be 3–4x cheaper than equivalent Supabase compute tiers.
Is Supabase production-ready?
Yes. Supabase Pro and Team plans include automated backups, point-in-time recovery, and SLA-backed uptime. Many production applications run on Supabase. However, you are dependent on Supabase's infrastructure and pricing decisions.
What are the best alternatives to Supabase?
Top alternatives include: self-hosted Postgres on a VPS, Firebase, PlanetScale (MySQL), Neon (serverless Postgres), CockroachDB, and Appwrite. For teams wanting Supabase-like features without the vendor, self-hosting Postgres with PostgREST, Hasura, or Directus provides similar capabilities.
Does Supabase use standard PostgreSQL?
Yes. Supabase runs standard PostgreSQL. You can connect to a Supabase database using any Postgres client (psql, pgAdmin, DBeaver). The data is fully portable via pg_dump.
What is the catch with Supabase free tier?
The free tier is limited to 500 MB storage, 1 GB bandwidth, 50,000 monthly active users for auth, and shared compute. Projects pause after 7 days of inactivity. It is designed for evaluation, not production.
Making Your Decision: A Quick Framework
Ask yourself these five questions:
There is no wrong answer. Many successful projects start on Supabase and migrate to self-hosted Postgres as they grow. The key is making the decision consciously — not by default.
Clean Up Your Stack with Mitrix
Whether you are starting on Supabase or migrating to a VPS, your codebase matters. Mitrix is a vibe-coding cleanup service that helps startup teams clean up AI-generated code, reduce technical debt, and optimize their infrastructure before it becomes unmanageable.
If you built fast with AI tools and your Supabase integration is starting to feel tangled — we can help. Our team specializes in refactoring vibe-coded projects into production-grade applications. Get a free code audit →Need help with your vibe-coded codebase?
Get a free assessment. We'll tell you exactly what needs fixing and in what order.