doc/DEPLOYMENT-MODES.md
Status: Canonical deployment and auth mode model
Date: 2026-02-23
Paperclip supports two runtime modes:
local_trustedauthenticatedauthenticated supports two exposure policies:
privatepublicThis keeps one authenticated auth stack while still separating low-friction private-network defaults from internet-facing hardening requirements.
Paperclip now treats bind as a separate concern from auth:
local_trusted vs authenticated, plus private/publicserver.bind = loopback | lan | tailnet | custom| Runtime Mode | Exposure | Human auth | Primary use |
|---|---|---|---|
local_trusted | n/a | No login required | Single-operator local machine workflow |
authenticated | private | Login required | Private-network access (for example Tailscale/VPN/LAN) |
authenticated | public | Login required | Internet-facing/cloud deployment |
| Bind | Meaning | Typical use |
|---|---|---|
loopback | Listen on localhost only | default local usage, reverse-proxy deployments |
lan | Listen on all interfaces (0.0.0.0) | LAN/VPN/private-network access |
tailnet | Listen on a detected Tailscale IP | Tailscale-only access |
custom | Listen on an explicit host/IP | advanced interface-specific setups |
local_trustedauthenticated + privateauto base URL mode)loopback, lan, tailnet, or customauthenticated + publicloopback behind a reverse proxy; direct lan/custom is advancedDefault onboarding remains interactive and flagless:
pnpm paperclipai onboard
Server prompt behavior:
--yes defaults to server.bind=loopback and therefore local_trusted/privateTrusted local → bind=loopback, local_trusted/privatePrivate network → bind=lan, authenticated/privateTailnet → bind=tailnet, authenticated/privateCustom → manual mode/exposure/host entryCustom pathauthenticated + publicExamples:
pnpm paperclipai onboard --yes
pnpm paperclipai onboard --yes --bind lan
pnpm paperclipai run --bind tailnet
configure --section server follows the same interactive behavior.
Default doctor remains flagless:
pnpm paperclipai doctor
Doctor reads configured mode/exposure and applies mode-aware checks. Optional override flags are secondary.
Board identity must be represented by a real DB user principal for user-based features to work consistently.
Required integration points:
authUsers for Board identityinstance_user_roles entry for Board admin authoritycompany_memberships integration for user-level task assignment and accessThis is required because user assignment paths validate active membership for assigneeUserId.
When running authenticated mode, if the only instance admin is local-board, Paperclip emits a startup warning with a one-time high-entropy claim URL.
/board-claim/<token>?code=<code>instance_adminlocal-board admin roleThis prevents lockout when a user migrates from long-running local trusted usage to authenticated mode.
local_trusted | authenticatedauthenticated uses Better Auth sessions and bootstrap invite flowlocal_trusted ensures a real local Board user principal in authUsers with instance_user_roles admin accesscompany_memberships so user assignment/access flows remain consistentlocal_trusted and authenticated with private/public exposuredoc/plans/deployment-auth-mode-consolidation.mddoc/SPEC-implementation.mddoc/DEVELOPING.md and doc/CLI.mddoc/spec/invite-flow.md