Back to Paperclip

Environment Variables

docs/deploy/environment-variables.md

2026.428.02.6 KB
Original Source

All environment variables that Paperclip uses for server configuration.

Server Configuration

VariableDefaultDescription
PORT3100Server port
PAPERCLIP_BINDloopbackReachability preset: loopback, lan, tailnet, or custom
PAPERCLIP_BIND_HOST(unset)Required when PAPERCLIP_BIND=custom
HOST127.0.0.1Legacy host override; prefer PAPERCLIP_BIND for new setups
DATABASE_URL(embedded)PostgreSQL connection string
PAPERCLIP_HOME~/.paperclipBase directory for all Paperclip data
PAPERCLIP_INSTANCE_IDdefaultInstance identifier (for multiple local instances)
PAPERCLIP_DEPLOYMENT_MODElocal_trustedRuntime mode override
PAPERCLIP_DEPLOYMENT_EXPOSUREprivateExposure policy when deployment mode is authenticated
PAPERCLIP_API_URL(auto-derived)Paperclip API base URL. When set externally (e.g., via Kubernetes ConfigMap, load balancer, or reverse proxy), the server preserves the value instead of deriving it from the listen host and port. Useful for deployments where the public-facing URL differs from the local bind address.

Secrets

VariableDefaultDescription
PAPERCLIP_SECRETS_MASTER_KEY(from file)32-byte encryption key (base64/hex/raw)
PAPERCLIP_SECRETS_MASTER_KEY_FILE~/.paperclip/.../secrets/master.keyPath to key file
PAPERCLIP_SECRETS_STRICT_MODEfalseRequire secret refs for sensitive env vars

Agent Runtime (Injected into agent processes)

These are set automatically by the server when invoking agents:

VariableDescription
PAPERCLIP_AGENT_IDAgent's unique ID
PAPERCLIP_COMPANY_IDCompany ID
PAPERCLIP_API_URLPaperclip API base URL (inherits the server-level value; see Server Configuration above)
PAPERCLIP_API_KEYShort-lived JWT for API auth
PAPERCLIP_RUN_IDCurrent heartbeat run ID
PAPERCLIP_TASK_IDIssue that triggered this wake
PAPERCLIP_WAKE_REASONWake trigger reason
PAPERCLIP_WAKE_COMMENT_IDComment that triggered this wake
PAPERCLIP_APPROVAL_IDResolved approval ID
PAPERCLIP_APPROVAL_STATUSApproval decision
PAPERCLIP_LINKED_ISSUE_IDSComma-separated linked issue IDs

LLM Provider Keys (for adapters)

VariableDescription
ANTHROPIC_API_KEYAnthropic API key (for Claude Local adapter)
OPENAI_API_KEYOpenAI API key (for Codex Local adapter)