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
Switching Between Modes
DATABASE_URL | Mode |
|---|---|
| Not set | Embedded PostgreSQL |
postgres://...localhost... | Local Docker PostgreSQL |
postgres://...supabase.com... | Hosted Supabase |
packages/db/src/schema/) is the same regardless of mode.