1. Embedded PostgreSQL (Default)
Zero config. If you don’t setDATABASE_URL, the server starts an embedded PostgreSQL instance automatically.
- Creates
~/.paperclip/instances/default/db/for storage - Ensures the
paperclipdatabase exists - Runs migrations automatically
- Starts serving requests
rm -rf ~/.paperclip/instances/default/db.
The Docker quickstart also uses embedded PostgreSQL by default.
2. Local PostgreSQL (Docker)
For a full PostgreSQL server locally:localhost:5432. Set the connection string:
3. Hosted PostgreSQL (Supabase)
For production, use a hosted provider like Supabase.- Create a project at database.new
- Copy the connection string from Project Settings > Database
- Set
DATABASE_URLin your.env
DATABASE_POOL_MAX, DATABASE_IDLE_TIMEOUT_SECONDS, DATABASE_CONNECT_TIMEOUT_SECONDS.
Switching Between Modes
The Drizzle schema (
packages/db/src/schema/) is the same regardless of mode.