docs/deploy/local-development.md
Run Paperclip locally with zero external dependencies.
pnpm install
pnpm dev
This starts:
http://localhost:3100No Docker or external database required. Paperclip uses embedded PostgreSQL automatically.
For a first-time install:
pnpm paperclipai run
This does:
paperclipai doctor with repair enabledDefault pnpm dev stays in local_trusted with loopback-only binding.
To open Paperclip to a private network with login enabled:
pnpm dev --bind lan
For Tailscale-only binding on a detected tailnet address:
pnpm dev --bind tailnet
Legacy aliases still work and map to the older broad private-network behavior:
pnpm dev --tailscale-auth
pnpm dev --authenticated-private
Allow additional private hostnames:
pnpm paperclipai allowed-hostname dotta-macbook-pro
For full setup and troubleshooting, see Tailscale Private Access.
curl http://localhost:3100/api/health
# -> {"status":"ok"}
curl http://localhost:3100/api/companies
# -> []
For safer parallel local experiments, initialize a dedicated worktree instance instead of reusing your main checkout:
pnpm paperclipai worktree:make local-lab --seed-mode minimal
cd ~/paperclip-local-lab
pnpm paperclipai worktree env # inspect generated env exports
eval "$(pnpm paperclipai worktree env)" # bash/zsh
pnpm paperclipai run
pnpm paperclipai doctor
If the experiment gets noisy, repair or reseed the worktree without touching the main branch:
pnpm paperclipai worktree repair --branch paperclip-local-lab
pnpm paperclipai worktree reseed --from . --to paperclip-local-lab
When done, shut it down and remove the isolated state explicitly:
pnpm paperclipai worktree:cleanup local-lab --force
To wipe local data and start fresh:
rm -rf ~/.paperclip/instances/default/db
pnpm dev
| Data | Path |
|---|---|
| Config | ~/.paperclip/instances/default/config.json |
| Database | ~/.paperclip/instances/default/db |
| Storage | ~/.paperclip/instances/default/data/storage |
| Secrets key | ~/.paperclip/instances/default/secrets/master.key |
| Logs | ~/.paperclip/instances/default/logs |
Override with environment variables:
PAPERCLIP_HOME=/custom/path PAPERCLIP_INSTANCE_ID=dev pnpm paperclipai run