Docs/Deployment/Self-Hosting LaterBox (100% Private)
3 min readv1.0.68

Self-Hosting LaterBox (100% Private)

Complete guide to hosting your own private LaterBox vault with Docker Compose and custom PostgreSQL.

Self-Hosting Philosophy#

LaterBox is designed to give you 100% data sovereignty. You do not need to rely on any hosted cloud service. You can run your own private Supabase instance on a VPS, Raspberry Pi, or home server.


Docker Compose Architecture#

Run the official Supabase self-hosted Docker stack:

bash
# Clone official self-hosted Supabase Docker configuration
git clone --depth 1 https://github.com/supabase/supabase
cd supabase/docker

# Copy environment template
cp .env.example .env

# Generate secure secrets
# (Set POSTGRES_PASSWORD, JWT_SECRET, ANON_KEY, SERVICE_ROLE_KEY in .env)

# Launch the entire backend stack
docker compose up -d

Services started:

  • PostgreSQL Database (Port 5432)
  • Supabase Studio UI (Port 8000 or 3000)
  • GoTrue Auth Service (Port 9999)
  • Realtime Server (Port 4000)
  • Storage Server (Port 5000)
  • Kong API Gateway (Port 8000)

Initializing Database Schema#

Apply the LaterBox database migrations to your self-hosted PostgreSQL:

bash
cd /path/to/laterbox
supabase db push --db-url "postgresql://postgres:your_password@localhost:5432/postgres"

This creates the items, collections, tags, and item_collections tables, along with all security policies and indexes.


Connecting Desktop & Mobile Apps#

In your self-hosted setup, configure your client apps:

  1. Web Dashboard: Set NEXT_PUBLIC_SUPABASE_URL=https://supabase.yourdomain.com and your self-hosted NEXT_PUBLIC_SUPABASE_ANON_KEY.
  2. Desktop & Mobile Apps: Pass your self-hosted URL and Anon Key via --dart-define during build or update settings in the app.
  3. Browser Extensions: Set your custom domain in extension/.env.

Backup & Vault Exports#

  • Database Dumps:
bash
  docker exec -t supabase-db pg_dump -U postgres postgres > laterbox_backup.sql
  • 1-Click Vault Export: Inside the LaterBox Web or Desktop App, go to Settings > Export Vault to download your complete data as a single JSON or Markdown archive.
Questions or suggestions for this documentation?