Local Supabase vs Self-Hosting: What's Free
In this article
Local Supabase is free to use on your own machine, and self-hosting Supabase is also free in terms of software cost, but the two differ in what they save you: local development saves you time and complexity during coding, while self-hosting saves you monthly subscription fees in production but costs you operational effort. In short, local Supabase is free for development, and self-hosting is free for production if you already have infrastructure, but neither is completely free when you factor in time, hardware, and maintenance.
Background: What Supabase Is
Supabase is an open-source backend-as-a-service platform that provides a Postgres database, authentication, real-time subscriptions, storage, and edge functions. It is often described as an open-source alternative to Firebase. The platform is built on a set of open-source tools, including PostgreSQL, GoTrue (for auth), Realtime, and PostgREST. Supabase offers a hosted cloud service with a free tier, but because the core software is open source, you can also run it yourself on your own hardware or a virtual private server.
The key distinction is between local development (running Supabase on your laptop) and self-hosting (running Supabase on a server that serves your production app). Both use the same open-source code, but they serve different purposes and have different cost profiles.
How Local Supabase Works
Local Supabase is a development environment that runs the entire Supabase stack in Docker containers on your machine. You install the Supabase CLI, run supabase init and supabase start, and you get a full working backend with a Postgres database, auth, storage, and realtime—all running locally. This is free, and it is designed to mirror the hosted service so that code you write locally works in production without changes.
What local Supabase saves you is the friction of developing against a remote server. You can iterate quickly, reset the database with a single command, and test edge cases without affecting a shared staging environment. It also saves you from consuming your cloud free tier’s quota during development. For example, if you are building an app that uses realtime subscriptions, you can test with unlimited connections locally without worrying about the hosted free tier’s connection limits.
However, local Supabase does not save you from the cost of your own hardware or the time it takes to install Docker and the CLI. It also does not save you from the learning curve of using Docker and managing local services. For most developers, this is a minor cost compared to the convenience.
What Self-Hosting Actually Costs
Self-hosting Supabase means deploying the same open-source stack to a server you control. The software itself is free—you download the source code or use the official Docker images. What you pay for is the infrastructure and the operational overhead. Here is a breakdown of what self-hosting saves and what it does not:
- Software license: Free. Supabase is open source under the Apache 2.0 license, so there is no licensing fee.
- Server costs: You pay for a VPS or cloud instance. A small app might run on a $5–$20 per month VPS, while a larger app with many users could require a more powerful instance or a managed Postgres service, which costs more.
- Maintenance: You are responsible for updates, backups, security patches, and monitoring. This is time you spend, which has an opportunity cost.
- Scaling: When your app grows, you must handle database connection pooling, read replicas, and load balancing yourself. The hosted service does this for you, but self-hosting requires you to learn and implement these systems.
- Hidden costs: Storage for database backups, bandwidth for realtime traffic, and email sending for auth emails all add up. Some of these are included in the hosted free tier, but you must pay for them when self-hosting.
What Self-Hosting Saves You
The main saving from self-hosting is the monthly subscription fee for the hosted service. Supabase’s hosted free tier is generous for small projects, but once you exceed its limits (for example, 500 MB of database space, 50 MB of storage, or 2 GB of bandwidth), you must upgrade to a paid plan that starts at $25 per month. If you are running a production app with moderate traffic, you might pay $50–$100 per month on the hosted service. Self-hosting on a $20 VPS can save you that money, but only if you are willing to manage the server.
Self-hosting also saves you from vendor lock-in. Because you run the same open-source software, you can migrate to a different provider or back to the hosted service at any time. This flexibility is valuable for some organizations that need to comply with data residency regulations or have strict security requirements.
Common Problems and Misconceptions
A common misconception is that local Supabase and self-hosting are the same thing. They are not. Local Supabase is for development only; it is not designed to serve production traffic. Self-hosting is for production, and it requires a server that is always on, secure, and backed up. Running local Supabase on your laptop and exposing it to the internet is a security risk and not a viable production setup.
Another issue is that self-hosting is not a one-time setup. You must update the components regularly to get security fixes. Supabase releases new versions frequently, and each upgrade can involve database migrations or configuration changes. If you fall behind, you may face compatibility issues or vulnerabilities. The hosted service handles these updates for you, which is a significant time saving.
People also underestimate the complexity of authentication and realtime features when self-hosting. Supabase’s auth system requires proper configuration of email templates, OAuth providers, and security keys. Realtime requires a WebSocket server and connection management. These are all handled by the hosted service, but you must configure them yourself when self-hosting.
How to Choose Between Local, Self-Hosted, and Hosted
The decision depends on your project stage and your skills. Here is a practical guide:
- Use local Supabase for all development, regardless of where you plan to host. It is free, fast, and mirrors the hosted service.
- Use the hosted free tier for small production apps or prototypes that stay within the limits. It is free and requires no maintenance.
- Consider self-hosting when your app outgrows the free tier and you have the DevOps skills to manage a server. It is also a good choice if you need data residency or want to avoid per-user pricing.
- Stay with the hosted paid tier if you prefer to focus on your product rather than infrastructure. The cost is predictable and you get support.
Many teams use a hybrid approach: local Supabase for development, hosted free tier for staging, and self-hosted for production once they have proven the concept. This gives you the best of both worlds.
Cost Comparison: A Concrete Example
Suppose you are building a small app with 1,000 monthly active users. On the hosted free tier, you might hit the 500 MB database limit quickly, so you upgrade to the $25 per month plan. Over a year, that is $300. Self-hosting on a $10 per month VPS costs $120 per year, but you also need to spend time on setup and maintenance. If your time is worth $50 per hour and you spend 10 hours a year on maintenance, that is $500 in opportunity cost, making self-hosting more expensive in total. However, if you are a developer who enjoys DevOps and already have a server, the marginal cost is lower.
For a larger app with 100,000 users, the hosted plan might cost $200–$500 per month. Self-hosting on a $50–$100 per month cluster of servers could save you thousands per year, but the operational complexity increases significantly. You would need to handle database connection pooling, read replicas, and horizontal scaling. This is not a trivial task and requires expertise.
Safety and Security Considerations
Self-hosting puts you in charge of security. You must secure the server itself, configure firewalls, set up SSL certificates, and ensure that the Supabase services are not exposed to the internet insecurely. Supabase’s default configuration is not production-ready; you need to change default keys, set up proper authentication, and restrict access to the Postgres database. The hosted service has a team that handles these security measures, but when self-hosting, you are responsible.
Backups are another critical issue. The hosted service provides automated backups on paid plans. When self-hosting, you must set up your own backup strategy, including off-site backups and point-in-time recovery. Losing your database due to a failed disk or accidental deletion is a real risk if you do not have a solid backup plan.
Frequently Asked Questions
Is local Supabase completely free? Yes, the software is free and runs on your own machine. You only pay for your computer’s electricity and the time it takes to install Docker and the CLI. There are no hidden costs.
Can I use local Supabase in production? No. Local Supabase is designed for development and testing. It runs on your machine, which is not always on and not secure enough for production. You should use the hosted service or self-host on a proper server.
What is the difference between local and self-hosted? Local runs on your laptop for development. Self-hosted runs on a server you control for production. Both use the same code, but self-hosted requires a server that is always on, secure, and maintained.
Is self-hosting Supabase worth it? It depends on your scale and skills. If you have a small app and the hosted free tier is enough, self-hosting is not worth the effort. If you have a large app or need data residency, self-hosting can save money, but only if you can handle the operational burden.
Does self-hosting include all features? Yes, self-hosting gives you access to all Supabase features, including auth, storage, realtime, and edge functions. However, you must configure them yourself, and some features like the dashboard may require additional setup.
How often do I need to update self-hosted Supabase? You should update regularly to get security patches and new features. Supabase releases updates frequently, and it is recommended to check the changelog and update at least monthly. Each update may require database migrations, so plan for downtime.