Skip to Content
Self-HostingSetup Guide

Setup Guide

This guide covers deploying BuildPad DaaS on your own infrastructure. For local development, see the Quick Start.

On the Buildpad Engine backend, you deploy the Engine and the Studio. The Engine owns the database, its migrations and its administrator account. For the Engine side, see Run the Studio on the Buildpad Engine.

Prerequisites

  • A running Buildpad Engine A Supabase project (cloud or self-hosted)
  • Node.js 20+ and pnpm
  • Docker (for containerized deployment)

Clone and configure

git clone <repository-url> cd buildpad-daas cp .env.local.example .env.local

Edit .env.local to point the Studio at the Engine:

DAAS_BACKEND=go DAAS_GO_URL=https://engine.example.com HOST_ORIGIN=https://studio.example.com

Edit .env.local with your Supabase credentials:

NEXT_PUBLIC_SUPABASE_URL=https://your-project.supabase.co NEXT_PUBLIC_SUPABASE_ANON_KEY=your-anon-key SUPABASE_SERVICE_ROLE_KEY=your-service-role-key # Optional: set a different URL for server-to-Supabase connections (e.g. internal Docker hostname) # SUPABASE_INTERNAL_URL=http://supabase-kong:8000

Run database migrations

Skip this step. The Engine applies its own migrations to its own database.

Apply all SQL migrations to your Supabase database.

If your project is linked to Supabase:

supabase link --project-ref <your-project-ref> supabase db push

Or apply them manually via the Supabase SQL editor. Migration files are in supabase/migrations/.

Create the first admin user

Skip this step. The Engine’s seed step creates the Engine’s administrator.

./scripts/create-admin-user.sh admin@example.com your-password

Build and start

pnpm install pnpm build pnpm start

Or with Docker — see Docker.

Row-Level Security (RLS)

The Buildpad Engine does not use PostgreSQL row-level security. It applies roles, permissions and row filters itself, before each request runs, and it keeps each tenant in its own PostgreSQL schema.

RLS policies must be enabled on all tables that store user data. Run the migration that sets up the Generic RLS System to protect new collections automatically.

Enable RLS on a table after migrations using the built-in function:

-- Second argument: true if the table has a user_id column, false otherwise SELECT apply_rls_to_collection('your_table_name', true);

See the Security page for the full RLS setup.

Next Steps

  • Environment Variables — all configuration options
  • CORS — configure allowed origins
  • Docker — containerized deployment
  • AWS — deploy the Buildpad Engine, and the Studio, on EC2 with Docker Compose