# yaml-language-server: $schema=https://schema.zeabur.app/template.json
apiVersion: zeabur.com/v1
kind: Template
metadata:
    name: Paperclip
spec:
    description: Open-source orchestration for zero-human companies. If OpenClaw is an employee, Paperclip is the company. Manage goals, hire AI agents, enforce budgets, and monitor everything from one dashboard.
    coverImage: https://raw.githubusercontent.com/Tofuswang/paperclip-docker/main/doc/assets/header.png
    icon: https://raw.githubusercontent.com/Tofuswang/paperclip-docker/main/doc/assets/paperclip-icon.jpg
    variables:
        - key: PUBLIC_DOMAIN
          type: DOMAIN
          name: Domain
          description: The domain for accessing Paperclip UI (e.g. my-paperclip)
        - key: ZEABUR_AI_HUB_API_KEY
          type: AI_HUB_KEY
          name: Zeabur AI Hub API Key
          description: Zeabur AI Hub API Key — provides access to Claude, GPT, Gemini, DeepSeek and more. Required for agents to work.
    tags:
        - AI
        - Agent
        - Orchestration
        - Tool
    readme: "# Paperclip\n\n**Open-source orchestration for zero-human companies.**\n\nIf OpenClaw is an *employee*, Paperclip is the *company*.\n\nPaperclip is a Node.js server and React UI that orchestrates a team of AI agents\nto run a business. Bring your own agents, assign goals, and track work and costs\nfrom one dashboard.\n\n## What You Get\n\n- \U0001F50C **Bring Your Own Agent** — OpenClaw, Claude Code, Codex, Cursor, HTTP, Bash\n- \U0001F3AF **Goal Alignment** — every task traces back to the company mission\n- \U0001F493 **Heartbeats** — agents wake on schedule, check work, and act\n- \U0001F4B0 **Cost Control** — monthly budgets per agent, auto-throttle\n- \U0001F3E2 **Multi-Company** — one deployment, many companies, complete isolation\n- \U0001F3AB **Ticket System** — every conversation traced, every decision explained\n- \U0001F6E1️ **Governance** — approve hires, override strategy, pause any agent\n- \U0001F4CA **Org Chart** — hierarchies, roles, reporting lines\n\n## Requirements\n\n- **Minimum**: 2 vCPU / 4 GB RAM\n- **Recommended**: 4 vCPU / 8 GB RAM\n- Requires a [Dedicated Server](https://zeabur.com/docs/dedicated-server) on Zeabur\n\n## Usage\n\n1. After deployment, open the service URL from the **Networking** tab\n2. Create your first company and start hiring agents\n3. Assign goals, set budgets, and monitor from the dashboard\n\n## Links\n\n- [Documentation](https://paperclip.ing/docs)\n- [GitHub](https://github.com/paperclipai/paperclip)\n- [Discord](https://discord.gg/m4HZY7xNG3)\n\n## License\n\nMIT © 2026 Paperclip\n"
    services:
        - name: PostgreSQL
          icon: https://raw.githubusercontent.com/zeabur/service-icons/main/marketplace/postgresql.svg
          template: PREBUILT
          spec:
            id: postgresql
            source:
                image: postgres:16-alpine
            ports:
                - id: database
                  port: 5432
                  type: TCP
            volumes:
                - id: pgdata
                  dir: /var/lib/postgresql/data
            env:
                PGDATA:
                    default: /var/lib/postgresql/data/pgdata
                POSTGRES_DB:
                    default: paperclip
                POSTGRES_PASSWORD:
                    default: ${PASSWORD}
                    expose: true
                POSTGRES_USER:
                    default: paperclip
        - name: Paperclip
          icon: https://raw.githubusercontent.com/Tofuswang/paperclip-docker/main/doc/assets/paperclip-icon.jpg
          template: PREBUILT
          spec:
            id: paperclip
            source:
                image: ghcr.io/tofuswang/paperclip-docker:latest
            ports:
                - id: web
                  port: 3100
                  type: HTTP
            volumes:
                - id: paperclip-data
                  dir: /paperclip
            instructions:
                - title: Create Admin Account
                  content: Check the Runtime Log for your admin invite link (auto-generated on first boot). Copy the URL and open it in your browser to create your account.
            env:
                BETTER_AUTH_SECRET:
                    default: ${PASSWORD}
                DATABASE_URL:
                    default: postgres://paperclip:${POSTGRES_PASSWORD}@${POSTGRESQL_HOST}:5432/paperclip
                HOST:
                    default: 0.0.0.0
                NODE_ENV:
                    default: production
                PAPERCLIP_ALLOWED_HOSTNAMES:
                    default: ${ZEABUR_WEB_DOMAIN}
                PAPERCLIP_AUTH_DISABLE_SIGN_UP:
                    default: "true"
                PAPERCLIP_DEPLOYMENT_EXPOSURE:
                    default: private
                PAPERCLIP_DEPLOYMENT_MODE:
                    default: authenticated
                PAPERCLIP_HOME:
                    default: /paperclip
                PAPERCLIP_INSTANCE_ID:
                    default: default
                PORT:
                    default: "3100"
                SERVE_UI:
                    default: "true"
                ZEABUR_AI_HUB_API_KEY:
                    default: ${ZEABUR_AI_HUB_API_KEY}
          domainKey: PUBLIC_DOMAIN
