Self-Hosted BaaS in a Single Binary
Supabase is a popular open-source Backend-as-a-Service built on PostgreSQL. HeliosDB Nano delivers the same developer experience — auth, REST API, realtime, vector search — in a self-hosted 47 MB binary with zero cloud dependency.
| Feature | Supabase | HeliosDB Nano |
|---|---|---|
| Hosting | Cloud (or self-hosted) | Self-hosted (single binary) |
| Database | PostgreSQL 15 | PostgreSQL-compatible + MySQL |
| Auth | GoTrue (email, OAuth, magic links) | Built-in (email, OAuth, JWT) |
| REST API | PostgREST (auto-generated) | PostgREST-compatible (19 operators) |
| Realtime | WebSocket (postgres_changes) | WebSocket (same protocol) |
| Storage | S3-backed bucket API | In-memory (disk persistence planned) |
| Vector Search | pgvector extension | Native HNSW (no extension) |
| Branching | Branching add-on ($$$) | Built-in (zero-cost, COW) |
| Time Travel | N/A | Built-in (AS OF TIMESTAMP) |
| Encryption | Optional | AES-256-GCM TDE built-in |
| MySQL Protocol | N/A | Native MySQL wire protocol |
| WordPress | N/A | Drop-in MySQL replacement |
| Binary Size | N/A (cloud service) | 47 MB single binary |
| Pricing | Free tier + usage-based | Free forever (self-hosted) |
HeliosDB Nano exposes a Supabase-compatible JS client. Your existing Supabase code works with minimal changes — just point to your own server:
// Supabase
import { createClient } from '@supabase/supabase-js'
const supabase = createClient('https://xyz.supabase.co', 'your-anon-key')
// HeliosDB Nano -- same API, self-hosted
import { createClient } from '@heliosdb/client'
const db = createClient('http://localhost:8080', 'your-anon-key')
// Works identically on both platforms
const { data, error } = await db
.from('users')
.select('id, name, email')
.eq('active', true)
.order('created_at', { ascending: false })
.limit(10)
const { data, error } = await db
.from('posts')
.insert({
title: 'Hello World',
body: 'My first post',
author_id: user.id
})
.select()
// Subscribe to changes -- same API
const channel = db
.channel('messages')
.on('postgres_changes',
{ event: 'INSERT', schema: 'public', table: 'messages' },
(payload) => {
console.log('New message:', payload.new)
}
)
.subscribe()
// Sign up -- same flow
const { data, error } = await db.auth.signUp({
email: 'user@example.com',
password: 'securepassword'
})
// Sign in with OAuth
const { data, error } = await db.auth.signInWithOAuth({
provider: 'github'
})
Supabase offers branching as a paid add-on. HeliosDB Nano includes zero-cost copy-on-write branching at the storage layer:
-- Create an isolated branch for testing
CREATE BRANCH staging FROM main;
USE BRANCH staging;
-- Run migrations, test schema changes
ALTER TABLE users ADD COLUMN preferences JSONB DEFAULT '{}';
-- Merge when ready, or discard
MERGE BRANCH staging INTO main;
DROP BRANCH staging;
Query any historical state of your database without restoring backups:
-- What did the orders table look like yesterday?
SELECT * FROM orders
AS OF TIMESTAMP '2026-04-14 09:00:00'
WHERE status = 'pending';
-- Compare current vs historical
SELECT
c.balance AS current_balance,
h.balance AS yesterday_balance,
c.balance - h.balance AS change
FROM accounts c
JOIN accounts AS OF TIMESTAMP '2026-04-14' h
ON c.id = h.id;
Supabase relies on the pgvector extension. HeliosDB has native HNSW indexing with 384x compression:
-- Native vector type, no CREATE EXTENSION needed
CREATE TABLE documents (
id SERIAL PRIMARY KEY,
content TEXT,
embedding VECTOR(768)
);
-- HNSW index with Product Quantization
CREATE INDEX ON documents USING hnsw (embedding vector_cosine_ops);
-- Semantic search
SELECT content, embedding <=> $1 AS distance
FROM documents
ORDER BY distance
LIMIT 10;
Supabase is PostgreSQL-only. HeliosDB Nano speaks both PostgreSQL and MySQL wire protocols natively, making it a drop-in replacement for WordPress, Laravel, and any MySQL application:
# Connect via PostgreSQL
psql -h localhost -p 5432 -U admin mydb
# Connect via MySQL -- same database, same data
mysql -h localhost -P 3306 -u admin mydb
Transparent Data Encryption is built into the storage engine. No configuration, no extension, always on:
-- Encryption is automatic and transparent
-- Your queries work exactly the same
SELECT * FROM sensitive_data WHERE user_id = 42;
-- Data at rest is always AES-256-GCM encrypted
-- Zero performance impact from hardware acceleration
Self-hosting Supabase requires orchestrating multiple services:
| Component | Supabase Self-Hosted | HeliosDB Nano |
|---|---|---|
| Database | PostgreSQL container | Single 47 MB binary |
| REST API | PostgREST container | |
| Auth | GoTrue container | |
| Realtime | Realtime container | |
| Storage | Storage API + S3 | |
| Edge Functions | Deno container | |
| Dashboard | Studio container | |
| Total RAM | ~2 GB minimum | ~30 MB |
| Startup Time | 30-60 seconds | 10 milliseconds |
| Disk Space | ~3 GB (images) | 47 MB |
# Supabase self-hosted: docker-compose.yml (simplified)
services:
postgres:
image: supabase/postgres:15
gotrue:
image: supabase/gotrue
postgrest:
image: postgrest/postgrest
realtime:
image: supabase/realtime
storage:
image: supabase/storage-api
studio:
image: supabase/studio
# ... plus kong, meta, imgproxy, etc.
# HeliosDB Nano: that's it
./heliosdb-nano --data-dir ./data --port 8080
Supabase might be a better fit if you need:
# Export from Supabase
supabase db dump --schema public > schema.sql
# Import to HeliosDB Nano
psql -h localhost -p 5432 -U admin mydb < schema.sql
// Before: Supabase cloud
import { createClient } from '@supabase/supabase-js'
const db = createClient('https://xyz.supabase.co', 'your-anon-key')
// After: HeliosDB Nano (same API surface)
import { createClient } from '@heliosdb/client'
const db = createClient('http://localhost:8080', 'your-anon-key')
// All your existing queries work unchanged
const { data } = await db.from('users').select('*').eq('active', true)
-- Supabase RLS policies work in HeliosDB Nano
ALTER TABLE posts ENABLE ROW LEVEL SECURITY;
CREATE POLICY "Users can view own posts"
ON posts FOR SELECT
USING (auth.uid() = author_id);
CREATE POLICY "Users can insert own posts"
ON posts FOR INSERT
WITH CHECK (auth.uid() = author_id);
Get started with HeliosDB in minutes. Open source, free to use.