<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Supabase &#8211; Aveshost Blog</title>
	<atom:link href="https://blog.aveshost.com/tag/supabase/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.aveshost.com</link>
	<description>Your Blueprint for Online Success</description>
	<lastBuildDate>Wed, 04 Nov 2026 19:13:55 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1.4</generator>

<image>
	<url>https://blog.aveshost.com/wp-content/uploads/2026/01/logo-150x150.png</url>
	<title>Supabase &#8211; Aveshost Blog</title>
	<link>https://blog.aveshost.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Supabase Alternatives: Compare Managed and Self-Hosted Backends</title>
		<link>https://blog.aveshost.com/supabase-alternatives/</link>
					<comments>https://blog.aveshost.com/supabase-alternatives/#respond</comments>
		
		<dc:creator><![CDATA[James Wilson]]></dc:creator>
		<pubDate>Wed, 04 Nov 2026 19:13:53 +0000</pubDate>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Appwrite]]></category>
		<category><![CDATA[BaaS]]></category>
		<category><![CDATA[PocketBase]]></category>
		<category><![CDATA[PostgreSQL]]></category>
		<category><![CDATA[self-hosting]]></category>
		<category><![CDATA[Supabase]]></category>
		<category><![CDATA[vps]]></category>
		<guid isPermaLink="false">https://blog.aveshost.com/?p=5745</guid>

					<description><![CDATA[Looking for the right Supabase alternative? Compare the top managed cloud and self-hosted open-source backends—including Appwrite, PocketBase, Nhost, Convex, Neon, Directus, and Firebase—by database engine, licensing, VPS RAM requirements, and cost structure.]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">Choosing the right <strong>Supabase alternatives</strong> comes down to two architectural questions: do you want a fully managed cloud platform that abstracts away server administration, or an open-source backend you can self-host on your own Linux VPS for predictable flat-rate pricing and complete data ownership? While <a href="https://supabase.com/docs" target="_blank" rel="noopener">Supabase</a> has become the default PostgreSQL Backend-as-a-Service (BaaS) for many web and mobile teams, its multi-container Docker footprint and usage-based cloud tiers are not always the right fit for every workload.</p>



<p class="wp-block-paragraph">If you need a single-binary backend that runs on a compact 1 GB RAM VPS, <strong>PocketBase</strong> is purpose-built for speed and simplicity. If you want a batteries-included Docker BaaS with native mobile SDKs, built-in push notifications, and 30+ serverless function runtimes, <strong>Appwrite</strong> is the strongest all-in-one contender. And if your team prefers end-to-end reactive TypeScript queries over writing SQL and Row-Level Security (RLS) policies, <strong>Convex</strong> offers a modern managed experience. In this guide, we compare the seven best managed and self-hosted backends so you can match your database model, licensing rules, and hosting budget to the right stack.</p>



<div class="wp-block-rank-math-toc-block" id="rank-math-toc"><h2>Table of Contents</h2><nav><div><div class=""><a href="#why-developers-look-for-supabase-alternatives">Why Developers Look for Supabase Alternatives</a></div><div class=""><a href="#quick-comparison-top-7-supabase-alternatives">Quick Comparison: Top 7 Supabase Alternatives</a></div><div class=""><a href="#managed-cloud-baas-vs-self-hosted-vps-backends">Managed Cloud BaaS vs Self-Hosted VPS Backends</a></div><div class=""><a href="#best-self-hosted-open-source-supabase-alternatives">Best Self-Hosted Open-Source Supabase Alternatives</a></div><div class=""><a href="#best-managed-cloud-composable-supabase-alternatives">Best Managed Cloud &amp; Composable Supabase Alternatives</a></div><div class=""><a href="#vps-sizing-resource-requirements-for-self-hosted-backends">VPS Sizing &amp; Resource Requirements for Self-Hosted Backends</a></div><div class=""><a href="#how-to-choose-and-deploy-your-backend-architecture">How to Choose and Deploy Your Backend Architecture</a></div><div class=""><a href="#frequently-asked-questions">Frequently Asked Questions</a></div></div></nav></div>



<h2 id="why-developers-look-for-supabase-alternatives" class="wp-block-heading">Why Developers Look for Supabase Alternatives</h2>



<p class="wp-block-paragraph">Supabase combines PostgreSQL with PostgREST, GoTrue authentication, Realtime WebSockets, S3-compatible storage, and Deno Edge Functions. As we covered in our step-by-step tutorial on <a href="https://blog.aveshost.com/self-host-supabase-on-a-vps/">how to self-host Supabase on a VPS with Docker and HTTPS</a>, that modular design is powerful—but it also introduces trade-offs that prompt engineering teams to evaluate <strong>Supabase alternatives</strong>:</p>



<ul class="wp-block-list">
<li><strong>Multi-container self-hosting overhead:</strong> Because Supabase stitches together more than a dozen distinct microservices behind a Kong API gateway, self-hosting it requires at least 4 GB of RAM (and 8 GB for production workloads). Teams building lightweight SaaS micro-tools or internal dashboards often prefer a single binary or a leaner container stack.</li>



<li><strong>Per-project cloud pricing and pausing limits:</strong> On managed Supabase Cloud, free-tier projects pause after seven days of inactivity, and running multiple isolated staging, preview, and production environments on paid plans requires per-instance compute add-ons plus usage billing for Monthly Active Users (MAUs) and egress bandwidth.</li>



<li><strong>SQL and Row-Level Security (RLS) complexity:</strong> Exposing PostgreSQL tables directly to client browsers via PostgREST means your application security depends on writing airtight SQL RLS policies. Some teams prefer enforcing authorization inside server-side TypeScript functions or unified SDK middleware rather than database policies.</li>



<li><strong>GraphQL or non-PostgreSQL requirements:</strong> While Supabase offers the <code>pg_graphql</code> extension, teams building complex Apollo or Relay frontends frequently want a native Hasura GraphQL workflow with server-side event triggers, or an abstraction layer that works over existing MySQL, MariaDB, or SQLite databases.</li>
</ul>



<h2 id="quick-comparison-top-7-supabase-alternatives" class="wp-block-heading">Quick Comparison: Top 7 Supabase Alternatives</h2>



<p class="wp-block-paragraph">Before diving into individual architectures, use the comparison matrix below to see how the leading managed and self-hosted <strong>Supabase alternatives</strong> differ by underlying database engine, open-source license, and primary strength.</p>



<figure class="wp-block-table"><table><thead><tr><th>Platform</th><th>Core Database</th><th>License</th><th>Self-Hosted Support</th><th>Primary Strength</th></tr></thead><tbody><tr><td>Appwrite</td><td>MariaDB (Document/Relational Abstraction)</td><td>BSD 3-Clause</td><td>Yes (Docker Compose + Traefik)</td><td>All-in-one BaaS with Auth, DB, Storage, Messaging &amp; 30+ Function runtimes</td></tr><tr><td>PocketBase</td><td>SQLite (Embedded WAL Mode)</td><td>MIT</td><td>Yes (Single Go Executable Binary)</td><td>Ultra-lightweight single-file backend with Realtime SSE &amp; Admin UI</td></tr><tr><td>Nhost</td><td>PostgreSQL + Hasura GraphQL</td><td>MIT</td><td>Yes (Docker Compose / CLI)</td><td>Instant real-time GraphQL APIs, event triggers &amp; role-based permissions</td></tr><tr><td>Directus</td><td>Any SQL DB (Postgres, MySQL, SQLite, MSSQL)</td><td>BSL 1.1</td><td>Yes (Docker / Node.js)</td><td>Turns new or existing SQL databases into REST/GraphQL APIs + Data Studio</td></tr><tr><td>Convex</td><td>Convex Reactive Document-Relational DB</td><td>FSL 1.1 (Converts to Apache 2.0)</td><td>Yes (Cloud-first + Open-Source Backend)</td><td>End-to-end TypeScript queries, automatic reactivity &amp; ACID transactions</td></tr><tr><td>Neon + Auth</td><td>Serverless PostgreSQL (Decoupled Storage)</td><td>Apache 2.0 (Core Storage)</td><td>Managed-first (Open-Source Engine)</td><td>Instant copy-on-write database branching for Git PRs &amp; scale-to-zero compute</td></tr><tr><td>Google Firebase</td><td>Cloud Firestore / Realtime DB (NoSQL)</td><td>Proprietary</td><td>No (Google Cloud Only)</td><td>Native iOS/Android offline sync, FCM push notifications &amp; Crashlytics</td></tr></tbody></table></figure>



<h2 id="managed-cloud-baas-vs-self-hosted-vps-backends" class="wp-block-heading">Managed Cloud BaaS vs Self-Hosted VPS Backends</h2>



<p class="wp-block-paragraph">When evaluating backend platforms, the most consequential decision is not whether your API speaks REST or GraphQL—it is where your data lives and how your infrastructure scales financially. Backend platforms fall into two operational models: <strong>vendor-managed cloud services</strong> and <strong>self-hosted open-source backends running on a VPS</strong>.</p>



<figure class="wp-block-image size-large"><img fetchpriority="high" decoding="async" width="1536" height="1024" src="https://blog.aveshost.com/wp-content/uploads/2026/11/managed-vs-self-hosted-backend-architecture.webp" alt="Comparison diagram contrasting Managed Cloud BaaS (Firebase, Convex, Neon, Supabase Cloud) with Self-Hosted BaaS on a VPS (Appwrite, PocketBase, Directus, Supabase Docker) across hosting, pricing model, database access, and operations." class="wp-image-5747" srcset="https://blog.aveshost.com/wp-content/uploads/2026/11/managed-vs-self-hosted-backend-architecture.webp 1536w, https://blog.aveshost.com/wp-content/uploads/2026/11/managed-vs-self-hosted-backend-architecture-300x200.webp 300w, https://blog.aveshost.com/wp-content/uploads/2026/11/managed-vs-self-hosted-backend-architecture-1024x683.webp 1024w, https://blog.aveshost.com/wp-content/uploads/2026/11/managed-vs-self-hosted-backend-architecture-768x512.webp 768w" sizes="(max-width: 1536px) 100vw, 1536px" /><figcaption class="wp-element-caption">How managed cloud BaaS platforms compare with self-hosted open-source backends deployed on a dedicated Linux VPS.</figcaption></figure>



<p class="wp-block-paragraph"><strong>Managed cloud backends</strong> (such as Firebase, Convex Cloud, and Neon) handle operating system patching, multi-region replication, and automated point-in-time backups. They are ideal when your engineering team wants zero infrastructure maintenance during rapid prototyping. However, managed clouds meter every dimension of growth—charging per Monthly Active User (MAU), per million document reads or function invocations, per gigabyte of storage, and per gigabyte of outbound bandwidth.</p>



<p class="wp-block-paragraph"><strong>Self-hosted open-source backends</strong> (such as Appwrite, PocketBase, Directus, Nhost, and self-hosted Supabase) run on your own virtual private server. Instead of paying per user or per API call, you pay a flat, predictable monthly fee for CPU cores, RAM, and NVMe/SSD storage on a <a href="https://www.aveshost.com/self-managed-vps-hosting" rel="noopener">self-managed Linux VPS</a> or a <a href="https://www.aveshost.com/vds-ghana" rel="noopener">Ghana Virtual Dedicated Server (VDS)</a>. Whether your application serves 500 registered users or 250,000 users, your software licensing cost remains zero and your data stays under your direct jurisdiction.</p>



<h2 id="best-self-hosted-open-source-supabase-alternatives" class="wp-block-heading">Best Self-Hosted Open-Source Supabase Alternatives</h2>



<p class="wp-block-paragraph">If your priority is full infrastructure control, data residency compliance, and predictable hosting bills on a Linux VPS, these four open-source platforms are the strongest <strong>Supabase alternatives</strong> available today.</p>



<h3 class="wp-block-heading">1. Appwrite: Best All-in-One Docker BaaS</h3>



<p class="wp-block-paragraph"><a href="https://appwrite.io/docs" target="_blank" rel="noopener">Appwrite</a> (licensed under BSD 3-Clause) is the most comprehensive open-source alternative to both Supabase and Firebase. Rather than exposing raw SQL tables directly to client browsers, Appwrite provides a clean, unified abstraction layer with official SDKs for Web, Flutter, iOS/macOS, Android, React Native, Node.js, Python, PHP, Go, and .NET.</p>



<ul class="wp-block-list">
<li><strong>Why choose Appwrite over Supabase:</strong> Appwrite includes native <strong>Messaging</strong> (email, SMS, and push notifications via APNs and FCM) and supports <strong>more than 30 serverless function runtimes</strong> (Node.js, Bun, Python, Dart, Go, PHP, Ruby, Rust, and .NET), whereas Supabase Edge Functions are limited to the Deno TypeScript/JavaScript runtime.</li>



<li><strong>Self-hosting experience:</strong> Appwrite ships with an interactive single-command Docker installer (<code>docker run -it --rm ... appwrite/appwrite</code>) that provisions MariaDB, Redis, background workers, and a built-in Traefik reverse proxy with automatic Let’s Encrypt SSL certificates.</li>



<li><strong>Trade-offs:</strong> Because Appwrite abstracts its underlying MariaDB storage behind a document-and-collection API, you cannot run arbitrary raw SQL joins or install custom PostgreSQL extensions like <code>pgvector</code> directly inside Appwrite’s primary database.</li>
</ul>



<h3 class="wp-block-heading">2. PocketBase: Best Lightweight Single-Binary Backend</h3>



<p class="wp-block-paragraph"><a href="https://pocketbase.io/docs/" target="_blank" rel="noopener">PocketBase</a> (MIT license) takes the opposite architectural approach to heavy multi-container stacks. Written in Go, the entire backend—including an embedded SQLite database running in Write-Ahead Logging (WAL) mode, user authentication, file storage, real-time Server-Sent Events (SSE), and a responsive Admin Dashboard UI—compiles into a <strong>single standalone executable file</strong>.</p>



<ul class="wp-block-list">
<li><strong>Why choose PocketBase over Supabase:</strong> You can deploy PocketBase on an entry-level 1 vCPU, 1 GB or 2 GB RAM VPS without even installing Docker. A single binary idling at under 40 MB of RAM can handle over 10,000 concurrent real-time SSE connections. You can also extend PocketBase using built-in JavaScript hooks (<code>pb_hooks</code>) or import it as a Go library to compile your own custom binary.</li>



<li><strong>Self-hosting experience:</strong> Upload the binary to your Ubuntu VPS, create a 15-line <code>systemd</code> unit file, and either let PocketBase manage its own Let’s Encrypt TLS certificate on port 443 or proxy it behind Caddy. Backups are as simple as snapshotting the <code>pb_data/</code> directory or using PocketBase’s built-in S3 backup scheduler.</li>



<li><strong>Trade-offs:</strong> Because SQLite is an embedded file database, PocketBase scales vertically on a single server rather than horizontally across multi-node read replicas.</li>
</ul>



<h3 class="wp-block-heading">3. Nhost: Best GraphQL-First PostgreSQL Alternative</h3>



<p class="wp-block-paragraph"><a href="https://docs.nhost.io/" target="_blank" rel="noopener">Nhost</a> (MIT license) is the closest architectural cousin to Supabase, built directly on standard PostgreSQL. The key difference is the API layer: while Supabase centers on PostgREST for RESTful table queries, Nhost pairs PostgreSQL with the <strong>Hasura GraphQL Engine</strong>, alongside Hasura Auth, S3-backed Hasura Storage, and Node.js serverless functions.</p>



<ul class="wp-block-list">
<li><strong>Why choose Nhost over Supabase:</strong> If your frontend team uses GraphQL clients (Apollo, urql, or Relay), Nhost gives you instant real-time GraphQL queries, mutations, and subscriptions, plus Hasura’s visual role-based permission builder and webhook event triggers on database inserts/updates—eliminating the need to write raw SQL Row-Level Security policies by hand.</li>



<li><strong>Trade-offs:</strong> Hasura’s metadata engine consumes substantial memory, so self-hosting Nhost via Docker Compose requires at least 4 GB of RAM.</li>
</ul>



<h3 class="wp-block-heading">4. Directus: Best SQL-to-API Data Platform &amp; Headless Studio</h3>



<p class="wp-block-paragraph"><a href="https://docs.directus.io/" target="_blank" rel="noopener">Directus</a> (BSL 1.1, free to self-host for most small and mid-sized businesses) is an open-source data platform that wraps any new or existing SQL database—including PostgreSQL, MySQL, MariaDB, SQLite, CockroachDB, and MS SQL Server—with instant REST and GraphQL APIs plus a polished, non-technical Data Studio dashboard.</p>



<ul class="wp-block-list">
<li><strong>Why choose Directus over Supabase:</strong> Supabase Studio is designed for developers, not content editors or operations staff. Directus provides a customizable, role-based back-office UI, visual automation Flows (webhooks, cron triggers, email notifications), and real-time WebSockets without modifying your existing SQL schema.</li>



<li><strong>Trade-offs:</strong> Directus is focused on data management, authentication, file transformations, and workflow automation rather than hosting arbitrary serverless edge compute.</li>
</ul>



<h2 id="best-managed-cloud-composable-supabase-alternatives" class="wp-block-heading">Best Managed Cloud &amp; Composable Supabase Alternatives</h2>



<p class="wp-block-paragraph">If your team prefers a managed cloud workflow or wants to compose a modular stack using best-of-breed serverless tools, these three platforms lead the market.</p>



<h3 class="wp-block-heading">5. Convex: Best Reactive TypeScript Backend</h3>



<p class="wp-block-paragraph"><a href="https://docs.convex.dev/" target="_blank" rel="noopener">Convex</a> rethinks the backend by replacing SQL tables, ORMs, and manual WebSocket channels with a reactive document-relational database controlled entirely through server-side TypeScript functions. When you write a Convex query function in TypeScript, the platform automatically tracks its data dependencies and pushes live updates to your React, Next.js, Vue, or mobile client whenever the underlying records change.</p>



<ul class="wp-block-list">
<li><strong>Why choose Convex over Supabase:</strong> Zero SQL migrations, zero RLS debugging, and automatic end-to-end TypeScript type safety. Every Convex mutation runs as a deterministic, serializable ACID transaction, and built-in primitives cover cron jobs, scheduled background functions, vector search, and file storage. While Convex is primarily used as a managed cloud service, its Rust/TypeScript backend engine is also open-source under FSL 1.1 for self-hosting on a VPS.</li>
</ul>



<h3 class="wp-block-heading">6. Neon + Dedicated Auth: Best Serverless Branching PostgreSQL</h3>



<p class="wp-block-paragraph">Many teams use Supabase strictly for managed PostgreSQL and authentication, ignoring PostgREST and Realtime in favor of server-side ORMs like Drizzle or Prisma inside Next.js, Remix, or Astro. For that architecture, <a href="https://neon.tech/docs" target="_blank" rel="noopener">Neon</a> paired with <strong>Better Auth</strong>, <strong>Auth.js</strong>, or <strong>Clerk</strong> is often a cleaner fit.</p>



<ul class="wp-block-list">
<li><strong>Why choose Neon over Supabase:</strong> Neon decouples PostgreSQL compute from storage, enabling <strong>instant copy-on-write database branching</strong>. Whenever a developer opens a GitHub pull request, your CI/CD pipeline can spin up an isolated branch containing a full copy of your production schema and data in less than a second, and scale compute down to zero when idle.</li>
</ul>



<h3 class="wp-block-heading">7. Google Firebase: Best for Offline-First Native Mobile Apps</h3>



<p class="wp-block-paragraph"><a href="https://firebase.google.com/docs" target="_blank" rel="noopener">Google Firebase</a> remains the benchmark for native iOS, Android, and Flutter mobile apps that require seamless offline-first local caching and automatic background synchronization when a device regains connectivity. Combined with Firebase Cloud Messaging (FCM), Crashlytics, and Remote Config, it offers mobile lifecycle tooling that no PostgreSQL BaaS matches out of the box—at the cost of proprietary NoSQL vendor lock-in and zero self-hosting support.</p>



<h2 id="vps-sizing-resource-requirements-for-self-hosted-backends" class="wp-block-heading">VPS Sizing &amp; Resource Requirements for Self-Hosted Backends</h2>



<p class="wp-block-paragraph">If you decide to self-host an open-source backend on a Linux server, resource consumption varies dramatically depending on whether the platform runs as a compiled Go binary, a single Node.js container, or a 12-container orchestration stack. Use the sizing table below when selecting your server plan.</p>



<figure class="wp-block-table"><table><thead><tr><th>Self-Hosted Platform</th><th>Deployment Method</th><th>Minimum VPS RAM</th><th>Recommended Production VPS</th><th>Built-In Reverse Proxy / TLS</th></tr></thead><tbody><tr><td>PocketBase</td><td>Single Go Binary (systemd) or Docker</td><td>1 GB RAM (1 vCPU)</td><td>2 GB RAM / 2 vCPU + SSD/NVMe</td><td>Yes (Built-in Let’s Encrypt TLS or Caddy)</td></tr><tr><td>Directus (+ Postgres)</td><td>Docker Compose (2–3 Containers)</td><td>2 GB RAM (1–2 vCPU)</td><td>4 GB RAM / 2 vCPU + SSD/NVMe</td><td>External (Caddy, Nginx, or Traefik)</td></tr><tr><td>Appwrite</td><td>Docker Compose (20 Lightweight Containers)</td><td>4 GB RAM (2 vCPU)</td><td>8 GB RAM / 4 vCPU + SSD/NVMe</td><td>Yes (Bundled Traefik + Let’s Encrypt)</td></tr><tr><td>Nhost</td><td>Docker Compose (Postgres + Hasura + Auth)</td><td>4 GB RAM (2 vCPU)</td><td>8 GB RAM / 4 vCPU + SSD/NVMe</td><td>Yes (Bundled Traefik in Nhost Stack)</td></tr><tr><td>Self-Hosted Supabase</td><td>Docker Compose (12+ Microservices)</td><td>4 GB RAM (2 vCPU + Swap)</td><td>8 GB RAM / 4 vCPU + NVMe Storage</td><td>External (Caddy or Nginx over Kong :8000)</td></tr></tbody></table></figure>



<h2 id="how-to-choose-and-deploy-your-backend-architecture" class="wp-block-heading">How to Choose and Deploy Your Backend Architecture</h2>



<p class="wp-block-paragraph">To avoid costly mid-project migrations, match your backend choice to your team’s primary query model and operational capacity using this decision framework:</p>



<figure class="wp-block-image size-large"><img decoding="async" width="1536" height="1024" src="https://blog.aveshost.com/wp-content/uploads/2026/11/choose-supabase-alternative-decision-tree.webp" alt="Decision matrix diagram showing how to choose the right Supabase alternative across Appwrite, PocketBase, Nhost, Convex, Neon + Auth, and Directus." class="wp-image-5748" srcset="https://blog.aveshost.com/wp-content/uploads/2026/11/choose-supabase-alternative-decision-tree.webp 1536w, https://blog.aveshost.com/wp-content/uploads/2026/11/choose-supabase-alternative-decision-tree-300x200.webp 300w, https://blog.aveshost.com/wp-content/uploads/2026/11/choose-supabase-alternative-decision-tree-1024x683.webp 1024w, https://blog.aveshost.com/wp-content/uploads/2026/11/choose-supabase-alternative-decision-tree-768x512.webp 768w" sizes="(max-width: 1536px) 100vw, 1536px" /><figcaption class="wp-element-caption">Matching your application architecture to the best managed or self-hosted Supabase alternative.</figcaption></figure>



<ol class="wp-block-list">
<li><strong>Need a fast, low-cost MVP, internal tool, or mobile backend on a small VPS?</strong> Deploy <strong>PocketBase</strong> as a <code>systemd</code> service behind Caddy. You get instant auth, real-time subscriptions, file uploads, and an admin UI using a fraction of the RAM required by Docker stacks.</li>



<li><strong>Need an all-in-one self-hosted cloud replacement with mobile SDKs, push notifications, and multi-language functions?</strong> Provision a 4 GB to 8 GB RAM VPS and run the official <strong>Appwrite</strong> Docker installer.</li>



<li><strong>Need full PostgreSQL power, extensions (<code>pgvector</code>, PostGIS), and compatibility with existing Supabase SDKs?</strong> Keep Supabase, but move off usage-metered cloud tiers by following our guide to <a href="https://blog.aveshost.com/self-host-supabase-on-a-vps/">self-hosting Supabase on a VPS with Docker and HTTPS</a>.</li>



<li><strong>Need an instant back-office dashboard and API over a clean SQL schema?</strong> Deploy <strong>Directus</strong> alongside PostgreSQL or MariaDB in Docker Compose.</li>



<li><strong>Building an AI agent or automated customer support workflow?</strong> Pair your self-hosted PostgreSQL or PocketBase backend with an AI orchestration platform—see our tutorial on <a href="https://blog.aveshost.com/build-an-ai-help-desk-with-openclaw/">how to build an AI help desk with OpenClaw</a> for a complete production blueprint.</li>
</ol>



<p class="wp-block-paragraph">If you are ready to deploy PocketBase, Appwrite, Directus, or a self-hosted PostgreSQL stack with predictable monthly pricing, explore our <a href="https://www.aveshost.com/self-managed-vps-hosting" rel="noopener">self-managed Linux VPS hosting</a> for full root SSH access and high-speed SSD storage, or our <a href="https://www.aveshost.com/vds-ghana" rel="noopener">Ghana VDS plans</a> for dedicated CPU cores and local Accra NVMe storage. If you want help sizing your server or migrating an existing cloud database, <a href="https://www.aveshost.com/support" rel="noopener">contact the Aveshost team</a>.</p>



<h2 id="frequently-asked-questions" class="wp-block-heading">Frequently Asked Questions</h2>


<div id="rank-math-faq" class="rank-math-block">
<div class="rank-math-list ">
<div id="faq-sb-alt-1" class="rank-math-list-item">
<h3 class="rank-math-question ">What is the closest open-source alternative to Supabase?</h3>
<div class="rank-math-answer ">

<p><strong>Appwrite</strong> and <strong>Nhost</strong> are the closest full-featured open-source alternatives. Choose <strong>Nhost</strong> if you want to stay on PostgreSQL with instant Hasura GraphQL APIs, or choose <strong>Appwrite</strong> if you want a unified Docker BaaS with official web/mobile SDKs, built-in push/email/SMS messaging, and 30+ serverless function runtimes.</p>

</div>
</div>
<div id="faq-sb-alt-2" class="rank-math-list-item">
<h3 class="rank-math-question ">Can PocketBase replace Supabase for production applications?</h3>
<div class="rank-math-answer ">

<p>Yes, for small-to-medium SaaS products, mobile apps, and internal tools that fit on a single vertical server. Because PocketBase runs embedded SQLite in Write-Ahead Logging (WAL) mode inside a compiled Go binary, it can serve over 10,000 concurrent real-time connections on a modest 2 GB RAM VPS. However, if you require multi-node horizontal database clustering or PostgreSQL-specific extensions like PostGIS, a PostgreSQL-based stack is a better fit.</p>

</div>
</div>
<div id="faq-sb-alt-3" class="rank-math-list-item">
<h3 class="rank-math-question ">Is it cheaper to self-host Appwrite or Supabase on a VPS than using managed cloud tiers?</h3>
<div class="rank-math-answer ">

<p>For growing applications or agencies running multiple projects, self-hosting on a Linux VPS is significantly more predictable. Instead of paying per Monthly Active User (MAU), per project instance, or per gigabyte of database egress, you pay a flat monthly fee for your VPS resources while running unlimited projects and users within your server’s CPU, RAM, and disk capacity.</p>

</div>
</div>
<div id="faq-sb-alt-4" class="rank-math-list-item">
<h3 class="rank-math-question ">Which Supabase alternative is best for Next.js and TypeScript developers?</h3>
<div class="rank-math-answer ">

<p>If you prefer a managed reactive backend with zero SQL boilerplate, <strong>Convex</strong> provides end-to-end TypeScript queries and automatic real-time UI updates. If you prefer writing type-safe SQL with Drizzle ORM or Prisma in Next.js Server Actions, pairing <strong>Neon</strong> (for serverless branching PostgreSQL) or a self-hosted PostgreSQL VPS with <strong>Better Auth</strong> is an excellent composable alternative.</p>

</div>
</div>
<div id="faq-sb-alt-5" class="rank-math-list-item">
<h3 class="rank-math-question ">Can I migrate my data from Supabase to another backend without downtime?</h3>
<div class="rank-math-answer ">

<p>Because Supabase uses standard PostgreSQL, migrating to another PostgreSQL-based platform (such as Nhost, Neon, Directus on Postgres, or a self-hosted PostgreSQL VPS) is straightforward using <code>pg_dump</code> and <code>pg_restore</code> or logical replication. Moving to non-PostgreSQL platforms like Appwrite, PocketBase, or Convex requires exporting your tables and user password hashes (bcrypt/scrypt) via a migration script.</p>

</div>
</div>
</div>
</div>]]></content:encoded>
					
					<wfw:commentRss>https://blog.aveshost.com/supabase-alternatives/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to Self-Host Supabase on a VPS with Docker and HTTPS</title>
		<link>https://blog.aveshost.com/self-host-supabase-on-a-vps/</link>
					<comments>https://blog.aveshost.com/self-host-supabase-on-a-vps/#respond</comments>
		
		<dc:creator><![CDATA[James Wilson]]></dc:creator>
		<pubDate>Wed, 04 Nov 2026 16:31:21 +0000</pubDate>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Web Hosting]]></category>
		<category><![CDATA[Docker]]></category>
		<category><![CDATA[HTTPS]]></category>
		<category><![CDATA[PostgreSQL]]></category>
		<category><![CDATA[self-hosting]]></category>
		<category><![CDATA[Supabase]]></category>
		<category><![CDATA[vps]]></category>
		<guid isPermaLink="false">https://blog.aveshost.com/?p=5739</guid>

					<description><![CDATA[To self-host Supabase on a VPS with Docker and HTTPS, provision an Ubuntu server with at least 4 GB of RAM and 2 vCPU cores, install Docker Engine and the Docker Compose plugin, clone the official supabase/docker directory, replace every default secret inside the .env file (POSTGRES_PASSWORD, JWT_SECRET, ANON_KEY, SERVICE_ROLE_KEY, and DASHBOARD_PASSWORD), bind Kong’s HTTP [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">To <strong>self-host Supabase on a VPS</strong> with Docker and HTTPS, provision an Ubuntu server with at least 4 GB of RAM and 2 vCPU cores, install Docker Engine and the Docker Compose plugin, clone the official <code>supabase/docker</code> directory, replace every default secret inside the <code>.env</code> file (<code>POSTGRES_PASSWORD</code>, <code>JWT_SECRET</code>, <code>ANON_KEY</code>, <code>SERVICE_ROLE_KEY</code>, and <code>DASHBOARD_PASSWORD</code>), bind Kong’s HTTP gateway port to <code>127.0.0.1:8000</code>, and place a reverse proxy such as Caddy or Nginx with Let’s Encrypt TLS in front of port <code>8000</code>.</p>



<p class="wp-block-paragraph">Self-hosting Supabase gives you full ownership of your PostgreSQL 15 database, predictable monthly server costs, unrestricted database size up to your VPS disk capacity, and complete control over data residency—without losing the developer experience of Supabase Studio, GoTrue authentication, PostgREST auto-generated APIs, Realtime WebSockets, or S3-compatible Storage.</p>



<h2 id="key-takeaways" class="wp-block-heading">Key Takeaways</h2>



<ul class="wp-block-list">
<li><strong>Size your VPS for a 12-container stack:</strong> A production self-hosted Supabase instance runs PostgreSQL, Kong, GoTrue, PostgREST, Realtime, Storage, Supavisor, and Supabase Studio simultaneously—start with at least <strong>4 GB RAM and 2 vCPU cores</strong> (8 GB RAM recommended for active production workloads).</li>



<li><strong>Never deploy with default <code>.env.example</code> keys:</strong> Every default JWT secret and database password in the public repository is publicly known. Always generate fresh cryptographic keys before starting the containers.</li>



<li><strong>Keep port 8000 bound to localhost:</strong> Docker’s port publishing bypasses standard UFW rules if bound to <code>0.0.0.0</code>. Bind Kong to <code>127.0.0.1:8000:8000</code> and route all external traffic through an HTTPS reverse proxy on port <code>443</code>.</li>



<li><strong>Enable WebSocket upgrades on your reverse proxy:</strong> Supabase Realtime requires HTTP/1.1 <code>Upgrade</code> and <code>Connection</code> headers so live database subscriptions work over <code>wss://</code>.</li>
</ul>



<div class="wp-block-rank-math-toc-block" id="rank-math-toc"><h2>Table of Contents</h2><nav><div><div><a href="#key-takeaways">Key Takeaways</a></div><div><a href="#how-to-self-host-supabase-on-a-vps-docker-architecture-overview">How to Self-Host Supabase on a VPS: Docker Architecture Overview</a></div><div><a href="#vps-hardware-requirements-and-sizing-matrix">VPS Hardware Requirements and Sizing Matrix</a></div><div><a href="#step-1-provision-your-ubuntu-vps-dns-and-firewall">Step 1: Provision Your Ubuntu VPS, DNS, and Firewall</a></div><div><a href="#step-2-install-docker-engine-and-docker-compose-v2">Step 2: Install Docker Engine and Docker Compose v2</a></div><div><a href="#step-3-clone-the-official-supabase-docker-stack">Step 3: Clone the Official Supabase Docker Stack</a></div><div><a href="#step-4-generate-cryptographic-secrets-and-configure-env">Step 4: Generate Cryptographic Secrets and Configure .env</a></div><div><a href="#step-5-lock-down-local-ports-and-launch-the-containers">Step 5: Lock Down Local Ports and Launch the Containers</a></div><div><a href="#step-6-enable-automated-https-with-caddy-or-nginx">Step 6: Enable Automated HTTPS with Caddy or Nginx</a></div><div><a href="#production-hardening-backups-and-safe-upgrades">Production Hardening, Backups, and Safe Upgrades</a></div><div><a href="#frequently-asked-questions">Frequently Asked Questions</a></div></div></nav></div>



<h2 id="how-to-self-host-supabase-on-a-vps-docker-architecture-overview" class="wp-block-heading">How to Self-Host Supabase on a VPS: Docker Architecture Overview</h2>



<p class="wp-block-paragraph">Unlike a standalone database container, <a href="https://supabase.com/docs/guides/self-hosting/docker" target="_blank" rel="noopener noreferrer">Supabase’s official Docker setup</a> is a complete backend-as-a-service platform built around PostgreSQL. When you <strong>self-host Supabase on a VPS</strong>, you do not expose seven different microservice ports to the internet. Instead, every external client SDK request and Studio dashboard session enters through a single reverse proxy on port <code>443</code>, which forwards traffic to the internal <strong>Kong API Gateway</strong> (<code>:8000</code>).</p>



<figure class="wp-block-image size-large"><img decoding="async" width="1536" height="1024" src="https://blog.aveshost.com/wp-content/uploads/2026/11/self-hosted-supabase-docker-architecture-aveshost.webp" alt="Self-Hosted Supabase VPS Architecture diagram showing HTTPS client traffic routed through Caddy or Nginx and Kong API Gateway to PostgreSQL 15, GoTrue, PostgREST, Realtime, Storage, Supavisor, and Supabase Studio." class="wp-image-5742" srcset="https://blog.aveshost.com/wp-content/uploads/2026/11/self-hosted-supabase-docker-architecture-aveshost.webp 1536w, https://blog.aveshost.com/wp-content/uploads/2026/11/self-hosted-supabase-docker-architecture-aveshost-300x200.webp 300w, https://blog.aveshost.com/wp-content/uploads/2026/11/self-hosted-supabase-docker-architecture-aveshost-1024x683.webp 1024w, https://blog.aveshost.com/wp-content/uploads/2026/11/self-hosted-supabase-docker-architecture-aveshost-768x512.webp 768w" sizes="(max-width: 1536px) 100vw, 1536px" /><figcaption class="wp-element-caption">How HTTPS client and dashboard traffic flows through Caddy/Nginx and Kong into the self-hosted Supabase Docker Compose network.</figcaption></figure>



<p class="wp-block-paragraph">Inside the private Docker bridge network, Kong routes each path to its dedicated container:</p>



<ul class="wp-block-list">
<li><strong><code>/rest/v1/</code> → PostgREST:</strong> Introspects your PostgreSQL schema and exposes instant, Row-Level-Security (RLS) enforced REST endpoints.</li>



<li><strong><code>/auth/v1/</code> → GoTrue:</strong> Manages user sign-ups, JWT issuance, magic links, and OAuth logins.</li>



<li><strong><code>/realtime/v1/</code> → Supabase Realtime:</strong> Broadcasts PostgreSQL logical replication changes, presence, and broadcast messages over WebSockets.</li>



<li><strong><code>/storage/v1/</code> → Storage API &amp; imgproxy:</strong> Handles file uploads, access control policies, and on-the-fly image resizing.</li>



<li><strong><code>/</code> (Root) → Supabase Studio (<code>:3000</code>):</strong> Serves the web-based visual table editor, SQL workbench, and policy manager, protected by Kong Basic Auth.</li>
</ul>



<h2 id="vps-hardware-requirements-and-sizing-matrix" class="wp-block-heading">VPS Hardware Requirements and Sizing Matrix</h2>



<p class="wp-block-paragraph">Because the Docker Compose bundle launches PostgreSQL, an Elixir virtual machine for Realtime, Kong, Vector log aggregation, Logflare analytics, Supavisor connection pooling, and the Node.js Studio interface, running on a 1 GB or 2 GB server will trigger Linux out-of-memory (OOM) kills. Use the sizing table below to select the right server tier on <a href="https://www.aveshost.com/self-managed-vps-hosting" rel="noopener">Aveshost Self-Managed VPS Hosting</a> or <a href="https://www.aveshost.com/vds-ghana" rel="noopener">Aveshost Ghana VDS</a>:</p>



<figure class="wp-block-table"><table><thead><tr><th>Deployment Profile</th><th>Minimum vCPU</th><th>Minimum RAM</th><th>Recommended Storage</th><th>Best Fit Use Case</th></tr></thead><tbody><tr><td>Staging / Internal Tools</td><td>2 vCPU Cores</td><td>4 GB RAM (+ 4 GB Swap)</td><td>40 GB SSD / NVMe</td><td>MVPs, internal dashboards, dev/staging backends</td></tr><tr><td>Standard Production SaaS</td><td>4 vCPU Cores</td><td>8 GB RAM</td><td>80–120 GB SSD / NVMe</td><td>Production web &amp; mobile apps, Realtime subscriptions, Auth</td></tr><tr><td>AI / Vector &amp; High-Throughput</td><td>6–8+ vCPU Cores</td><td>16 GB+ RAM</td><td>200 GB+ NVMe</td><td><code>pgvector</code> embeddings (e.g., <a href="https://blog.aveshost.com/build-an-ai-help-desk-with-openclaw/">AI help desks</a>), heavy concurrent writes</td></tr></tbody></table></figure>



<h2 id="step-1-provision-your-ubuntu-vps-dns-and-firewall" class="wp-block-heading">Step 1: Provision Your Ubuntu VPS, DNS, and Firewall</h2>



<p class="wp-block-paragraph">Deploy a clean <strong>Ubuntu 22.04 LTS or 24.04 LTS</strong> server and point a dedicated subdomain—such as <code>supabase.yourdomain.com</code> or <code>api.yourdomain.com</code>—to your VPS public IPv4 address using an <code>A</code> record in your DNS manager (if you need a domain, register one via <a href="https://www.aveshost.com/domains" rel="noopener">Aveshost Domains</a>). If you proxy the subdomain through Cloudflare, set SSL/TLS encryption mode to <strong>Full (Strict)</strong> after completing Step 6, and make sure security rules do not inadvertently <a href="https://blog.aveshost.com/unblock-challenges-cloudflare-com/">block verification challenges</a> on your API endpoints.</p>



<p class="wp-block-paragraph">Connect to your VPS over SSH, update system packages, create a 4 GB swap file (for resilience during container startup spikes), and configure UFW so only SSH (<code>22</code>), HTTP (<code>80</code>), and HTTPS (<code>443</code>) are open publicly:</p>



<pre class="wp-block-code"><code>sudo apt update &amp;&amp; sudo apt upgrade -y
sudo apt install -y curl git ufw openssl ca-certificates

# Create a 4 GB swap file if none exists
sudo fallocate -l 4G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab

# Configure UFW firewall
sudo ufw default deny incoming
sudo ufw default allow outgoing
sudo ufw allow OpenSSH
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
sudo ufw --force enable</code></pre>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1536" height="1024" src="https://blog.aveshost.com/wp-content/uploads/2026/11/deploy-supabase-vps-docker-https-steps-aveshost.webp" alt="Six-step workflow to self-host Supabase on a VPS with Docker and HTTPS: provision VPS and firewall, install Docker and Compose, clone Supabase Docker, generate secret keys, start Docker stack, and enable HTTPS proxy." class="wp-image-5743" srcset="https://blog.aveshost.com/wp-content/uploads/2026/11/deploy-supabase-vps-docker-https-steps-aveshost.webp 1536w, https://blog.aveshost.com/wp-content/uploads/2026/11/deploy-supabase-vps-docker-https-steps-aveshost-300x200.webp 300w, https://blog.aveshost.com/wp-content/uploads/2026/11/deploy-supabase-vps-docker-https-steps-aveshost-1024x683.webp 1024w, https://blog.aveshost.com/wp-content/uploads/2026/11/deploy-supabase-vps-docker-https-steps-aveshost-768x512.webp 768w" sizes="(max-width: 1536px) 100vw, 1536px" /><figcaption class="wp-element-caption">The complete six-step workflow to self-host Supabase on an Ubuntu VPS with Docker Compose and automated HTTPS.</figcaption></figure>



<h2 id="step-2-install-docker-engine-and-docker-compose-v2" class="wp-block-heading">Step 2: Install Docker Engine and Docker Compose v2</h2>



<p class="wp-block-paragraph">Install the official Docker Engine and Docker Compose v2 plugin directly from Docker’s APT repository rather than Ubuntu’s older distribution packages:</p>



<pre class="wp-block-code"><code>curl -fsSL https://get.docker.com | sudo sh
sudo systemctl enable --now docker

# Verify Docker and Docker Compose v2
docker --version
docker compose version</code></pre>



<h2 id="step-3-clone-the-official-supabase-docker-stack" class="wp-block-heading">Step 3: Clone the Official Supabase Docker Stack</h2>



<p class="wp-block-paragraph">The main Supabase monorepo is large, so use a shallow clone to download only the latest commit, copy the <code>docker/</code> deployment folder to <code>/opt/supabase</code>, and create your working <code>.env</code> file from <code>.env.example</code>:</p>



<pre class="wp-block-code"><code>sudo mkdir -p /opt/supabase
cd /opt
sudo git clone --depth 1 https://github.com/supabase/supabase.git supabase-repo
sudo cp -rf /opt/supabase-repo/docker/* /opt/supabase/
sudo cp /opt/supabase-repo/docker/.env.example /opt/supabase/.env
sudo rm -rf /opt/supabase-repo
cd /opt/supabase</code></pre>



<h2 id="step-4-generate-cryptographic-secrets-and-configure-env" class="wp-block-heading">Step 4: Generate Cryptographic Secrets and Configure .env</h2>



<p class="wp-block-paragraph">Before starting the containers, you must replace the placeholder credentials in <code>/opt/supabase/.env</code>. Every service in the cluster relies on these core variables:</p>



<figure class="wp-block-table"><table><thead><tr><th>Environment Variable</th><th>Purpose</th><th>Security Requirement</th></tr></thead><tbody><tr><td><code>POSTGRES_PASSWORD</code></td><td>Master password for the PostgreSQL database</td><td>32+ character alphanumeric string (avoid <code>@</code>, <code>:</code>, or <code>/</code> to prevent URI parsing errors)</td></tr><tr><td><code>JWT_SECRET</code></td><td>HMAC-SHA256 signing secret used by GoTrue, Kong, and PostgREST</td><td>At least 32–64 random characters</td></tr><tr><td><code>ANON_KEY</code></td><td>Public client JWT (<code>role: "anon"</code>) signed with your <code>JWT_SECRET</code></td><td>Safe for frontend SDKs; strictly enforces PostgreSQL Row Level Security (RLS)</td></tr><tr><td><code>SERVICE_ROLE_KEY</code></td><td>Admin server JWT (<code>role: "service_role"</code>) signed with your <code>JWT_SECRET</code></td><td>Bypasses RLS completely; keep strictly on backend servers, never in browser code</td></tr><tr><td><code>DASHBOARD_PASSWORD</code></td><td>Password for Supabase Studio basic authentication</td><td>Strong unique password paired with a custom <code>DASHBOARD_USERNAME</code></td></tr><tr><td><code>SECRET_KEY_BASE</code> &amp; <code>VAULT_ENC_KEY</code></td><td>Encryption keys for Realtime and Supabase Vault</td><td>64-character secret base and exact 32-character Vault key</td></tr></tbody></table></figure>



<p class="wp-block-paragraph">Run the official key-generation helper included in <code>/opt/supabase</code> (or generate secrets with OpenSSL):</p>



<pre class="wp-block-code"><code>cd /opt/supabase
# Option A: Run Supabase's built-in secret generator script
sudo bash ./utils/generate-keys.sh

# Option B: Generate clean alphanumeric secrets manually if needed
openssl rand -hex 24   # Use for POSTGRES_PASSWORD and DASHBOARD_PASSWORD
openssl rand -hex 32   # Use for JWT_SECRET and SECRET_KEY_BASE
openssl rand -hex 16   # Use for VAULT_ENC_KEY (32 hex chars)</code></pre>



<p class="wp-block-paragraph">Next, open <code>/opt/supabase/.env</code> (<code>sudo nano /opt/supabase/.env</code>) and set your public HTTPS domain and transactional email settings (if you need a free transactional relay for testing auth emails, see our guide on <a href="https://blog.aveshost.com/use-gmail-smtp-server/">how to use the Gmail SMTP server</a>):</p>



<pre class="wp-block-code"><code>SITE_URL=https://app.yourdomain.com
API_EXTERNAL_URL=https://supabase.yourdomain.com
SUPABASE_PUBLIC_URL=https://supabase.yourdomain.com

DASHBOARD_USERNAME=avesadmin
DASHBOARD_PASSWORD=YourStrongDashboardPasswordHere

SMTP_ADMIN_EMAIL=admin@yourdomain.com
SMTP_HOST=smtp.yourdomain.com
SMTP_PORT=587
SMTP_USER=smtp-user@yourdomain.com
SMTP_PASS=YourSmtpPassword
SMTP_SENDER_NAME=YourApp</code></pre>



<h2 id="step-5-lock-down-local-ports-and-launch-the-containers" class="wp-block-heading">Step 5: Lock Down Local Ports and Launch the Containers</h2>



<p class="wp-block-paragraph">By default, Docker’s port mapping (<code>8000:8000</code>) binds to <code>0.0.0.0</code> and manipulates <code>iptables</code> directly, which exposes unencrypted HTTP port <code>8000</code> to the public internet even when UFW is enabled. To prevent anyone from bypassing your HTTPS reverse proxy, bind Kong’s ports to <code>127.0.0.1</code> inside <code>/opt/supabase/docker-compose.yml</code>:</p>



<pre class="wp-block-code"><code># Inside /opt/supabase/docker-compose.yml under the kong service:
    ports:
      - 127.0.0.1:8000:8000/tcp
      - 127.0.0.1:8443:8443/tcp</code></pre>



<p class="wp-block-paragraph">Now pull the container images and launch the stack in detached mode:</p>



<pre class="wp-block-code"><code>cd /opt/supabase
sudo docker compose pull
sudo docker compose up -d

# Check that all services report "healthy"
sudo docker compose ps</code></pre>



<p class="wp-block-paragraph">Verify locally that Kong responds on port <code>8000</code> by running <code>curl -I http://127.0.0.1:8000</code> (it should return an HTTP <code>401 Unauthorized</code> prompt from Kong’s Basic Auth gate protecting Studio).</p>



<h2 id="step-6-enable-automated-https-with-caddy-or-nginx" class="wp-block-heading">Step 6: Enable Automated HTTPS with Caddy or Nginx</h2>



<p class="wp-block-paragraph">To serve your Supabase Studio dashboard and client APIs (<code>https://supabase.yourdomain.com</code>) over TLS with automatic certificate renewal and full WebSocket (<code>wss://</code>) support, install <strong>Caddy</strong> (the simplest single-file option) or <strong>Nginx + Certbot</strong>.</p>



<h3 id="option-a-caddy-reverse-proxy-automatic-lets-encrypt-ssl" class="wp-block-heading">Option A: Caddy Reverse Proxy (Automatic Let’s Encrypt SSL)</h3>



<pre class="wp-block-code"><code>sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-stable.list
sudo apt update &amp;&amp; sudo apt install -y caddy</code></pre>



<p class="wp-block-paragraph">Replace <code>/etc/caddy/Caddyfile</code> with the following configuration (replace <code>supabase.yourdomain.com</code> with your actual subdomain):</p>



<pre class="wp-block-code"><code>supabase.yourdomain.com {
    encode zstd gzip
    reverse_proxy 127.0.0.1:8000
}</code></pre>



<p class="wp-block-paragraph">Reload Caddy (<code>sudo systemctl reload caddy</code>). Caddy automatically provisions a Let’s Encrypt TLS certificate, redirects HTTP to HTTPS, and forwards WebSocket upgrades to Kong (<code>127.0.0.1:8000</code>).</p>



<h3 id="option-b-nginx-certbot-with-websocket-upgrade-headers" class="wp-block-heading">Option B: Nginx + Certbot (With WebSocket Upgrade Headers)</h3>



<p class="wp-block-paragraph">If your server already runs Nginx, make sure your server block includes <code>Upgrade</code> and <code>Connection</code> headers so Supabase Realtime WebSockets work properly, then run <code>sudo certbot --nginx -d supabase.yourdomain.com</code>:</p>



<pre class="wp-block-code"><code>map $http_upgrade $connection_upgrade {
    default upgrade;
    ''      close;
}

server {
    server_name supabase.yourdomain.com;
    client_max_body_size 50M;

    location / {
        proxy_pass http://127.0.0.1:8000;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection $connection_upgrade;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_read_timeout 86400;
    }
}</code></pre>



<p class="wp-block-paragraph">You can now open <code>https://supabase.yourdomain.com</code> in your browser, sign in with your <code>DASHBOARD_USERNAME</code> and <code>DASHBOARD_PASSWORD</code>, and connect your frontend or backend apps using:</p>



<pre class="wp-block-code"><code>import { createClient } from '@supabase/supabase-js'

const supabase = createClient(
  'https://supabase.yourdomain.com',
  process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY
)</code></pre>



<h2 id="production-hardening-backups-and-safe-upgrades" class="wp-block-heading">Production Hardening, Backups, and Safe Upgrades</h2>



<ul class="wp-block-list">
<li><strong>Automate Nightly PostgreSQL Backups:</strong> Schedule a cron job that runs <code>docker exec supabase-db pg_dumpall -U postgres | gzip &gt; /backups/supabase.sql.gz</code> and syncs encrypted archives to off-site object storage.</li>



<li><strong>Enable Row Level Security (RLS) on Every Public Table:</strong> Because the <code>ANON_KEY</code> is embedded in browser and mobile apps, any table in the <code>public</code> schema without RLS enabled is readable and writable by anyone with your URL and anon key.</li>



<li><strong>Restrict Studio Access by IP (Optional):</strong> For high-security environments, restrict the Studio dashboard path in Caddy or Nginx to your office VPN IP while leaving <code>/rest/v1/</code>, <code>/auth/v1/</code>, <code>/realtime/v1/</code>, and <code>/storage/v1/</code> open to public client apps.</li>
</ul>



<p class="wp-block-paragraph">Ready to deploy your own high-performance Supabase cluster? Launch an Ubuntu server on <a href="https://www.aveshost.com/self-managed-vps-hosting" rel="noopener">Aveshost Self-Managed VPS Hosting</a> for full root control, choose <a href="https://www.aveshost.com/vds-ghana" rel="noopener">Aveshost Ghana VDS</a> for dedicated local NVMe performance, or select <a href="https://www.aveshost.com/fully-managed-vps-hosting" rel="noopener">Aveshost Fully Managed VPS Hosting</a> if you want our engineering team to handle server administration, firewall hardening, and monitoring for you.</p>



<h2 id="frequently-asked-questions" class="wp-block-heading">Frequently Asked Questions</h2>


<div id="rank-math-faq" class="rank-math-block">
<div class="rank-math-list ">
<div id="faq-question-sb-1" class="rank-math-list-item">
<h3 class="rank-math-question ">How much RAM do I need to self-host Supabase on a VPS?</h3>
<div class="rank-math-answer ">

<p>You need at least <strong>4 GB of RAM and 2 vCPU cores</strong> (plus a 4 GB swap file) to run the complete self-hosted Supabase Docker Compose stack reliably. For production applications with active users, Realtime WebSockets, or <code>pgvector</code> queries, <strong>8 GB of RAM and 4 vCPU cores</strong> is recommended.</p>

</div>
</div>
<div id="faq-question-sb-2" class="rank-math-list-item">
<h3 class="rank-math-question ">Is self-hosting Supabase free?</h3>
<div class="rank-math-answer ">

<p>Yes. Supabase is 100% open-source under OSI-approved licenses (primarily Apache 2.0 and MIT). There are no software licensing fees to self-host Supabase; you only pay for your underlying VPS infrastructure, domain name, and optional off-site backup storage.</p>

</div>
</div>
<div id="faq-question-sb-3" class="rank-math-list-item">
<h3 class="rank-math-question ">Can I host multiple Supabase projects on a single VPS?</h3>
<div class="rank-math-answer ">

<p>A single self-hosted Supabase Docker Compose stack is designed around one PostgreSQL cluster and one Studio project. You can either isolate multiple apps inside the same cluster using separate PostgreSQL schemas and Row Level Security policies, or run separate Docker Compose stacks on a larger VPS (16+ GB RAM) by assigning distinct container names and Kong ports in each stack’s <code>.env</code> file.</p>

</div>
</div>
<div id="faq-question-sb-4" class="rank-math-list-item">
<h3 class="rank-math-question ">How do I update a self-hosted Supabase Docker instance safely?</h3>
<div class="rank-math-answer ">

<p>First, take a full database backup using <code>pg_dumpall</code> and back up your <code>/opt/supabase/.env</code> and <code>volumes/</code> directory. Then pull the updated <code>docker-compose.yml</code> from the official repository, run <code>sudo docker compose pull</code>, and restart the stack with <code>sudo docker compose up -d</code>.</p>

</div>
</div>
<div id="faq-question-sb-5" class="rank-math-list-item">
<h3 class="rank-math-question ">Does self-hosted Supabase include Edge Functions and Storage?</h3>
<div class="rank-math-answer ">

<p>Yes. The official <code>supabase/docker</code> Compose stack includes the local <code>supabase/edge-runtime</code> container for Deno Edge Functions (loaded from <code>volumes/functions/</code>) as well as the S3-compatible <code>supabase/storage-api</code> and <code>imgproxy</code> containers for file uploads and image transformations.</p>

</div>
</div>
</div>
</div>]]></content:encoded>
					
					<wfw:commentRss>https://blog.aveshost.com/self-host-supabase-on-a-vps/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
