- Jinja 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .forgejo/workflows | ||
| defaults | ||
| meta | ||
| tasks | ||
| templates | ||
| .gitignore | ||
| CHANGELOG.md | ||
| LICENSE | ||
| README.md | ||
Paperclip
Deploys Paperclip — an open-source orchestration platform for teams of AI agents ("AI companies") — via Docker Compose, backed by PostgreSQL. Runs in authenticated deployment mode.
Requirements
- Docker
community.dockerAnsible collection (>=5.2.0)
Variables
| Variable | Default | Description |
|---|---|---|
paperclip_instance |
paperclip |
Unique instance name. Used as Compose project name and container names. |
paperclip_data_path |
/data/paperclip |
Host path for persistent data (PostgreSQL data, Paperclip home). |
paperclip_docker_path |
/docker/paperclip |
Host path for the Compose file. |
paperclip_image |
ghcr.io/paperclipai/paperclip |
Paperclip image. Override for a private mirror/registry. |
paperclip_version |
2026.916.1 |
Paperclip image tag (git release tag without the v). Pin to a specific version in production. |
paperclip_pg_version |
17 |
PostgreSQL image tag. Pin to a specific version in production. |
paperclip_domain |
~ |
Public domain. When set, enables Traefik routing labels, attaches to traefik_web, and sets PAPERCLIP_PUBLIC_URL. |
paperclip_traefik_certresolver |
default |
Traefik certificate resolver to use for paperclip_domain. |
paperclip_port |
~ |
When set, exposes Paperclip on this host port (maps to container port 3100). Omit when using paperclip_domain. |
paperclip_exposure |
private |
private (browser claim of first admin) or public (CLI bootstrap invite, requires paperclip_domain). |
paperclip_disable_signup |
false |
Disables self-service signup. Flip to true once the instance is claimed. |
paperclip_pg_user |
paperclip |
PostgreSQL user, password owner and database name (single value used for all three). |
paperclip_pg_pass |
~ |
PostgreSQL password. Required. Generate with: openssl rand -hex 32 |
paperclip_auth_secret |
~ |
BETTER_AUTH_SECRET. Required. Set once, never change. Generate with: openssl rand -hex 32 |
paperclip_tool_action_secret |
~ |
PAPERCLIP_TOOL_ACTION_SIGNING_SECRET. Required. Generate with: openssl rand -hex 32 |
paperclip_disable_telemetry |
true |
Disables Paperclip usage telemetry (PAPERCLIP_TELEMETRY_DISABLED, DO_NOT_TRACK). |
paperclip_opencode_config |
{} |
Dict rendered as the global opencode.json for the opencode_local adapter. See Self-hosted models. |
paperclip_pids_limit |
2048 |
Container PID ceiling. |
paperclip_extra_env |
{} |
Dict of extra environment variables (adapter API keys like ANTHROPIC_API_KEY, OPENAI_API_KEY, ...). |
paperclip_uninstall |
false |
Stops and removes containers and the compose directory. |
paperclip_purge |
false |
Also removes the data directory (including the database). Requires paperclip_uninstall: true. Irreversible. |
Usage
Minimal setup:
paperclip_pg_pass: "{{ vault_paperclip_pg_pass }}"
paperclip_auth_secret: "{{ vault_paperclip_auth_secret }}"
paperclip_tool_action_secret: "{{ vault_paperclip_tool_action_secret }}"
paperclip_domain: "agents.example.com"
Enabling the Claude / Codex adapters (CLIs ship in the image):
paperclip_extra_env:
ANTHROPIC_API_KEY: "{{ vault_anthropic_api_key }}"
OPENAI_API_KEY: "{{ vault_openai_api_key }}"
Self-hosted models (LiteLLM)
Paperclip's onboarding pushes Claude/Codex (Anthropic/OpenAI keys or subscriptions). To keep every model call on your own infrastructure, use the OpenCode adapter with a custom OpenAI-compatible provider as its only enabled provider:
paperclip_extra_env:
LITELLM_API_KEY: "{{ vault_paperclip_litellm_api_key }}" # read via {env:...} below
OPENCODE_DISABLE_MODELS_FETCH: "true" # no models.dev catalog fetch
OPENCODE_DISABLE_AUTOUPDATE: "true"
OPENCODE_DISABLE_LSP_DOWNLOAD: "true"
paperclip_opencode_config:
enabled_providers: [litellm] # hides anthropic/openai/... entirely
share: disabled
autoupdate: false
model: litellm/auto
small_model: litellm/auto # titles etc., else a built-in provider model is used
provider:
litellm:
npm: "@ai-sdk/openai-compatible" # bundled in OpenCode, no npm download
options:
baseURL: http://litellm:4000/v1 # container on traefik_web
apiKey: "{env:LITELLM_API_KEY}"
models:
auto: { tool_call: true, limit: { context: 131072, output: 16384 } }
Then hire agents with adapter OpenCode and model litellm/<model>. Check from the host with docker exec -u node -w /tmp paperclip opencode models.
First admin
-
privateexposure (default): open the URL, sign up, choose Claim this instance. Then setpaperclip_disable_signup: trueand re-run, so nobody else can self-register. -
publicexposure: browser claim is disabled. Mint a bootstrap invite inside the container:docker exec -it paperclip pnpm paperclipai auth bootstrap-ceo
Uninstall
To stop and remove all containers and the compose directory:
paperclip_uninstall: true
Add paperclip_purge: true to also delete the database and Paperclip home.
Notes
paperclip_auth_secretis permanent. It signs every session and (by fallback) every agent JWT. Rotating it logs out every user and invalidates all agent tokens.- Local secrets key lives in the data directory. Paperclip encrypts company secrets with a master key it auto-generates under
{{ paperclip_data_path }}/app. Back up that directory together with the database — losing it makes stored secrets unreadable. - Agents run inside the app container (
git,gh,claude,codex,opencode,geminiCLIs are pre-installed) with their workspaces under/paperclip. Size the disk accordingly. - Data directory ownership. The entrypoint drops privileges to
node(uid/gid1000) and recursively chowns/paperclipto it if anything there is owned otherwise. The role pre-creates{{ paperclip_data_path }}/appas1000:1000. - Upstream has no SSO/OIDC login — accounts are local (Better Auth email/password).
- Containers are not proxied by Traefik unless
paperclip_domainis set — it must already have atraefik_webnetwork and a matchingcertresolver(see thetraefikrole).