Self-hosted first · MIT everything · Agent-native

The Self-Hosted Supabase Alternative Built for AI Agents

Magic Cloud covers the ground Supabase does — database, generated APIs, auth, RBAC, file handling — as one MIT-licensed system where self-hosting is the primary deployment model, not the community afterthought. It adds what Supabase leaves out — the frontend, generated and hosted on the same cloudlet — and what 2026 demands: a runtime AI agents can safely build on. This page is an honest evaluation, comparison table included — along with the cases where you should stay on Supabase.

MIT-licensed, all of it — no platform flag disabling features when you self-host
SQLite, PostgreSQL, MySQL and SQL Server — not one engine, four
RBAC enforced by the runtime at execution time — not reimplemented per app
Why people search for this

The five reasons teams look beyond Supabase

Self-hosting

The second-class path

Self-hosted Supabase is a docker-compose stack that behaves as a single project, with community-documented gaps in logging, backups, and dashboard features. The hosted platform is the product; self-hosting reflects that honestly.

Feature gating

Not everything ships to your server

Parts of the Supabase experience are only available — or only complete — on the hosted platform. If you need self-hosting for compliance or sovereignty, you are running a reduced version in production.

One engine

Postgres or nothing

Supabase is PostgreSQL, full stop. If your data lives in SQL Server or MySQL — as most enterprise data does — there is no path that does not start with a migration.

Cost at scale

Usage-based pricing grows with you

The hosted platform is priced per usage, and at scale the bill becomes an engineering topic of its own. Self-hosting Magic costs whatever your server costs.

The 2026 reason

Agents writing code against RLS

Supabase security is row-level policies written per app. When an AI agent generates the app, every generation must correctly reimplement that boundary — and probabilistic authors are sometimes wrong. This one gets its own section below.

To be fair

Supabase is a good product

None of the above is a scandal. Supabase is excellent at what it is: a hosted-first Postgres platform with a massive ecosystem. The question this page answers is what to pick when the qualifiers — self-hosted, open, agent-operated — matter to you.

The comparison

Magic Cloud vs Supabase, honestly

Seventeen rows: twelve to Magic, two to Supabase, three too close to call. Ecosystem and Postgres depth go to them, and we say so.

FeatureSupabaseMagic Cloud
LicenseOpen source core; parts of the experience gated to the hosted platformMagic wins — MIT, everything included; self-hosted runs the same code as hosted
Self-hosting storyCommunity-supported docker-compose stack; single project per instance; observability and backup gapsMagic wins — first-class; self-hosted is the primary deployment model
DatabasePostgreSQL onlyMagic wins — SQLite by default; PostgreSQL, MySQL and SQL Server connected
API generationPostgREST over your schemaMagic wins — endpoints generated per table, readable files, customizable after generation
Access controlPostgres row-level security, written per appMagic wins — framework-enforced RBAC, checked by the runtime at execution time
Custom backend logicEdge functions, database functions — written by youMagic wins — described in plain language, generated in seconds, live without a deploy cycle
RealtimeNative Postgres-change subscriptionsSignalR — programmable events published from writes, tasks, or any logic
AuthGoTrue — email, OAuth providersJWT, users, roles, full OIDC and OAuth support
FrontendNot part of the product — Vercel, Netlify or Cloudflare alongsideMagic wins — agent-generated pages, or a compiled React, Angular or Vue build deployed from CI; served as a single-page app or a normal site, one domain, one deploy
Version controlA CLI and migration files in a repository that lives somewhere else — the dashboard is not a Git clientMagic wins — Git and GitHub built into the dashboard: clone, branch, commit, push, pull and create repositories, each one also an MCP tool an agent can call
AI & agent storyClient libraries, vector store, MCP integrationsMagic wins — native MCP server; agents generate new tools for themselves inside runtime-enforced permissions
Pre-built integrationsClient SDKs, and a directory of third-party services that connect to your project from outsideMagic wins — a plugin bazaar installed into the runtime — Stripe, HubSpot, Shopify, WooCommerce, WordPress, Slack, NetSuite, SERP API — each arriving as endpoints, workflow actions and slots
Wrapping an API you do not have a plugin forWrite a client for it yourselfMagic wins — import its OpenAPI specification and get role-gated endpoints, published as MCP tools without extra work
Debugging backend logicLogs and console output from edge functionsMagic wins — Rewind replays a finished execution step by step with the program's entire state at each one, and the statement that threw marked in red
EcosystemSupabase wins — SDKs for every framework, huge community, thousands of tutorialsA smaller community, but a plugin bazaar and OpenAPI import instead of writing each integration yourself — and one architecture to learn rather than many
Postgres depthSupabase wins — if you need Postgres extensions and expertise, their all-in bet is a featurePostgres is one supported engine among four, not the platform's core identity
Managed optionSupabase Cloud — polished, matureAINIRO cloudlets — same code as self-hosted, nothing gated
The row that matters most

Access control when the developer is an AI agent

Supabase security is row-level security: SQL policies written per table, per app. When a human writes the app, this works — the human understands the policy and knows which queries respect it. When an AI agent writes the app, every generated endpoint and query must correctly reimplement those assumptions. The security boundary lives inside the generated code, which means every generation is a new opportunity to get it wrong: a service-role key where an anon key belonged, a query that silently sidesteps a policy, a check that a generation simply forgot. The model does not have to be malicious. It has to be wrong once.

Magic inverts this. Hyperlambda is not text that gets executed — it is an AST, and every node must bind to a slot the runtime exposes. Endpoints declare the roles that may invoke them, and whitelisting constrains exactly which capabilities a piece of code can bind to at all. An agent generating code on a Magic backend cannot generate its way out of its permissions — the worst a bad generation can do is fail, structurally, before execution. Security stops being a property of each generated app and becomes a property of the runtime, implemented once, deterministically.

The deep dive is in why secure AI code execution requires runtime whitelisting — and there is a standing $100 bounty on breaking the sandbox. Nobody has, and that same sandbox takes sentences from anyone on the Natural Language API.

A complete carbon-footprint calculator application built on a Magic cloudlet, showing the branded form and computed results
Proof, not claims

From your database to a working app

This carbon calculator is a complete application on a Magic cloudlet — SQLite database, public and role-gated API endpoints, and the frontend itself, all served from one system. An AI agent built it autonomously during a live client meeting: database, endpoints, SPA — deployed and smoke-tested before the call ended.

That is the half of the comparison Supabase does not have a row for. The database, the endpoints and the frontend came out of one conversation and live at one domain — no Vercel project, no CORS configuration, no second deploy. The agent writes plain HTML and JavaScript, which is the right tool for an application this size. When the frontend is a React or Angular project instead, it is built in CI and deployed into the same folder on every push, and the cloudlet serves it as a single-page app.

Bring your own framework

React, Angular and Vue deploy here too

An agent writing plain HTML is the fast path, not the ceiling. When the frontend is a real application, you build it the way you already build it and deploy the output here. Generate a long-lived access token on the cloudlet, keep it as a GitHub secret, and let GitHub Actions check out the repository, run the production build, zip the output and send it to the cloudlet on every commit — the target folder is replaced with the new build. No SSH key, no deploy agent, nothing installed on the server, because the endpoint was already there.

CI is one option, though, not a requirement. Git and GitHub are built into the dashboard: add a GitHub access token to your configuration and you can clone a repository onto the cloudlet, branch, commit, push, pull, and create or delete GitHub repositories without leaving the platform. For a site with no build step that is the entire workflow — clone once, pull to deploy, no workflow file and no runner anywhere. A framework app still needs its build run somewhere, so either a workflow does it or you commit the built output and pull that. And because every one of those Git operations is also an MCP tool, the agent doing the work can handle the version control itself.

The web server handles both shapes of site. A single-page app has its unmatched URLs handed to the client-side router, so deep links and refreshes resolve instead of breaking. A normal multi-page site returns real 404s for URLs that do not exist, which is what a content site needs. Compiled assets are cached for a year while the HTML shell is never cached — the correct policy for hashed bundles, configured out of the box.

And because the same cloudlet serves the API, the app calls its backend on its own origin — no CORS configuration, no second hostname, no third product in the stack. The walkthrough is in deploy to a cloudlet on every git push.

Beyond the table

Four capabilities Supabase has no answer for

Rewind, a debugger that works backwards. Run a file with Debug rather than Invoke and you get the entire execution recorded: every operation in order, the time each took, and your program’s whole state at every single step. When it throws, the failing statement is marked and everything built up before it is still sitting there to inspect. A stack trace tells you the last thing that happened; this tells you everything that led to it. Nothing is written to disk and nothing records unless you ask, so there is no performance question and no secrets left lying around. The full write-up is here.

The Hyperlambda Generator. Describe an endpoint in a sentence and get a verified, saved, live endpoint in about three seconds — role-gated, readable afterwards, and immediately a tool your agents can call. Not a snippet pasted into your editor for you to wire up: a running part of your backend. The overview is here.

OpenAPI import. Point a cloudlet at any OpenAPI specification and the operations in it become endpoints on your own backend, role-gated and published as MCP tools. The integration you were going to spend a week writing a client for is a URL you paste.

A plugin bazaar that installs into the runtime. Stripe, HubSpot, Shopify, WooCommerce, WordPress, Slack, NetSuite, SERP API, and LLM providers from OpenAI to a local Ollama model. These are not services phoning your project from outside — they land inside it as endpoints, workflow actions and slots, which is why your agents can use them the moment they are installed.

The honest section

When you should stay on Supabase

You need PostgreSQL specifically. If you depend on Postgres extensions, replication topology, or a DBA team that knows it deeply, Supabase’s all-in bet on Postgres is a feature. Magic supports Postgres as one engine among four; it is not a Postgres-native platform.

You rely on the ecosystem. Client SDKs for every framework, auth helpers, community extensions, an enormous volume of examples. That gravity is real, and if your team’s velocity comes from it, do not give it up lightly.

You want a managed service with a huge community. Supabase Cloud is genuinely good. The pain described on this page is specifically the self-hosted path — if you were never going to self-host, most of this comparison does not apply to you.

No migration required

Already on Supabase? You don’t have to leave it

Magic connects to external PostgreSQL databases — including the one under your Supabase project. Point a cloudlet at it, and Magic generates endpoints, agents, and tools on top of your existing schema without moving a byte. Evaluation does not require migration, and neither does coexistence: plenty of sensible architectures run Supabase for what it does well and Magic for the agent layer. The step-by-step is in how to run AI agents on your existing Supabase database, and the same approach works for SQL Server and MySQL — see AI agents over your existing SQL database.

Frequently asked questions
Is Magic Cloud really open source?

Yes. The entire platform is MIT-licensed — database layer, CRUD generation, auth, RBAC, AI features, and the dashboard. There is no enterprise edition holding features back and no platform flag disabling functionality when you self-host.

Can I self-host Magic Cloud completely?

Yes, and self-hosting is the primary deployment model, not a community afterthought. One Docker command brings up the full stack, and the self-hosted version is the same code the hosted cloudlets run — nothing gated.

Does Magic Cloud work with PostgreSQL?

Yes. SQLite is built in, and you can connect PostgreSQL, MySQL, and Microsoft SQL Server. Once connected, the platform treats an external database like a local one for querying, design, and code generation — including a Supabase project’s underlying Postgres.

Can Magic Cloud replace Supabase auth and row-level security?

For most applications, yes, with a different model. Magic ships JWT authentication, full OIDC and OAuth support, and role-based access control enforced by the runtime at execution time. Where Supabase expresses row-level rules in per-app SQL policies, Magic expresses access rules as endpoint and slot-level constraints — and row-shaped filters are implemented in the generated endpoint, enforced server-side.

Does Magic Cloud work with Claude, MCP, and AI agents?

Yes, natively. Magic includes an MCP server, so Claude and any MCP-capable agent can connect directly and use the platform’s tools — creating databases, generating endpoints, managing files, scheduling tasks — inside the RBAC boundaries of the authenticated user. Agents can also generate new tools for themselves through the Hyperlambda Generator.

Can Magic Cloud host my frontend as well as my backend?

Yes. Static sites and single-page apps are served straight from the same cloudlet that holds your database, API and auth, at the same domain — so there are no CORS hoops and no separate deploy pipeline. Supabase has no frontend hosting at all, so a Supabase application needs a third product alongside it, usually Vercel, Netlify or Cloudflare Pages.

Can an AI agent generate the frontend too, or only the backend?

Both. The agent writes the HTML, CSS and JavaScript, saves it to the cloudlet’s web root, and it is live at a URL immediately — in the same conversation that created the database and endpoints. What the agent writes is plain HTML and JavaScript; it does not write React components, and there is no visual editor. That is a limit on what the agent generates, not on what the cloudlet serves — a compiled React, Angular, Vue or Svelte bundle is deployed and served exactly the same way. See the next two questions.

Can I deploy a React or Angular app to a cloudlet?

Yes, and it is the normal way to do it once the frontend is a real application. Generate a long-lived access token on the cloudlet, store it as a GitHub secret, and let GitHub Actions do the rest: check out the repository, run your framework’s production build, zip the build output, and send it to the cloudlet, which replaces the target folder with the new build. Nothing is installed on the server — no SSH key, no deploy agent, no runner — because file management is already part of the platform. The step-by-step is in deploy to a cloudlet on every git push; the only difference for React or Angular is that you zip the build output instead of the repository.

Do I need GitHub Actions to deploy to a cloudlet?

No. Git and GitHub ship with the dashboard: once a GitHub access token is in your configuration you can clone a repository onto the cloudlet, create and check out branches, commit, push, pull, and create or delete GitHub repositories, all from the platform itself. For a site with no build step, cloning once and pulling on each change is the deployment — no workflow file, no runner, no third-party CI. A framework app still needs its build run somewhere, so either a workflow builds and deploys it, or you commit the build output and pull that onto the cloudlet. Every one of those Git operations is also exposed as an MCP tool, so an AI agent can branch, commit and push on your behalf.

Can the cloudlet serve a single-page app, or only normal websites?

Either, and it is a setting rather than a rebuild. In single-page-app mode, a URL matching no file is handed to your application, so React Router, the Angular router or any client-side router resolves it — deep links and refreshes work instead of breaking. In normal-website mode, a URL matching no file returns a genuine 404, which is what a content site wants, where a wrong link should be reported rather than swallowed. Either way the same cloudlet serves your API, so the app calls its backend on its own origin with no CORS configuration.

How do I debug backend logic on a cloudlet?

With Rewind, a post-execution step debugger built into the dashboard. Run any file with Debug instead of Invoke and you get a recording of the whole execution: every operation in order, how long each one took, and your program’s entire state at every step. When something throws, the failing statement is marked in red and everything that had already happened is still there to inspect — which is exactly what a stack trace cannot give you. Recording only happens when you press Debug, lives in memory, and is never written to disk, so normal traffic is unaffected and there are no log files to clean up afterwards.

Does Magic Cloud have pre-built integrations?

Yes, through a plugin bazaar you install from the dashboard. Stripe, HubSpot, Shopify, WooCommerce, WordPress, Slack, NetSuite and SERP API are all there, alongside LLM providers including OpenAI, Ollama, HuggingFace and Together AI. The difference from an integrations directory is where the plugin lands: it installs into your runtime, so what you get is endpoints, workflow actions and slots that your own code and your agents call directly — and everything installed is published through the MCP server, role-gated, without extra work. Anything with no plugin can be imported from its OpenAPI specification and becomes secured endpoints the same way.

Is there a managed option like Supabase Cloud?

Yes. AINIRO runs hosted cloudlets with the same codebase as the self-hosted version — no feature differences, because there is nothing gated to gate.

Do I have to migrate off Supabase to use Magic?

No. Magic can connect to a Supabase project’s underlying PostgreSQL database and generate agents, endpoints, and tools on top of it without moving anything. Many teams run both while they evaluate.

Try the alternative

Five minutes to a running cloudlet

The whole platform — database, generated APIs, auth, frontend hosting, and the MCP server — on your own hardware, MIT-licensed. Still evaluating? The n8n, Lovable and PocketBase comparisons, and the open source AI app builders roundup, are written the same honest way as this page.

terminal
# When it’s up: log in at http://localhost:5555 with root/root.
$ curl -fsSL https://hyperlambda.dev/docker-compose.yaml | docker compose -f - up