{
  "manifest_version": "1.0.0",
  "template": {
    "id": "35fb9cda-6a5e-4c5c-94b8-9fec26d0224c",
    "slug": "paperclip-official-image",
    "name": "Paperclip",
    "description": "Run a team of AI agents: Claude Code, Codex and more, with Postgres",
    "url": "https://railway.com/deploy/paperclip-official-image",
    "upstream": {
      "repo_url": "https://github.com/dektionstudio/railway-template-images"
    }
  },
  "services": [
    {
      "name": "paperclip",
      "source": {
        "repo": "https://github.com/dektionstudio/railway-template-images"
      },
      "needs_volume": true,
      "volume_mount_path": "/paperclip",
      "http": true
    },
    {
      "name": "Postgres",
      "source": {
        "image": "ghcr.io/railwayapp-templates/postgres-ssl:17"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "paperclip",
      "description": "Port of the board (web UI and API)",
      "secret": false,
      "strategy": "default",
      "default": "3100"
    },
    {
      "key": "DATABASE_URL",
      "service": "paperclip",
      "description": "Railway Postgres over the private network",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PAPERCLIP_URL",
      "service": "paperclip",
      "description": "Your board. The first admin's invite link is in this service's deploy logs",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "BETTER_AUTH_SECRET",
      "service": "paperclip",
      "description": "Signs login sessions (generated)",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "PAPERCLIP_PUBLIC_URL",
      "service": "paperclip",
      "description": "Public URL Paperclip uses for logins and invite links",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "PAPERCLIP_DEPLOYMENT_MODE",
      "service": "paperclip",
      "description": "Login required (upstream's mode for servers)",
      "secret": false,
      "strategy": "default",
      "default": "authenticated"
    },
    {
      "key": "HEARTBEAT_SCHEDULER_ENABLED",
      "service": "paperclip",
      "description": "Wake agents on their schedules",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "PAPERCLIP_SECRETS_MASTER_KEY",
      "service": "paperclip",
      "description": "Encrypts the API keys and tokens you store in Paperclip (generated). Keep it: stored secrets can't be read without it",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "PAPERCLIP_DEPLOYMENT_EXPOSURE",
      "service": "paperclip",
      "description": "Internet-facing: stricter checks, no browser claim of the instance",
      "secret": false,
      "strategy": "default",
      "default": "public"
    },
    {
      "key": "PAPERCLIP_MIGRATION_AUTO_APPLY",
      "service": "paperclip",
      "description": "Apply database migrations on start, so redeploying moves you to the newest release",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "PGDATA",
      "service": "Postgres",
      "description": "Data directory inside the volume",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "POSTGRES_DB",
      "service": "Postgres",
      "description": "Database name",
      "secret": false,
      "strategy": "default",
      "default": "paperclip"
    },
    {
      "key": "DATABASE_URL",
      "service": "Postgres",
      "description": "Private connection string used by Paperclip",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "POSTGRES_USER",
      "service": "Postgres",
      "description": "Database superuser",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "Postgres",
      "description": "Database password (generated)",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "paperclip-official-image"
      }
    },
    "cli": "railway deploy --template paperclip-official-image",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "35fb9cda-6a5e-4c5c-94b8-9fec26d0224c",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "8d85f8b8-9c63-459d-b29c-3bf000111461": {
                  "icon": "https://raw.githubusercontent.com/paperclipai/paperclip/d3e0f0a238ed66a05d50ab6f627eb55874f0f57e/ui/public/apple-touch-icon.png",
                  "name": "paperclip",
                  "deploy": {
                    "healthcheckPath": "/api/health",
                    "restartPolicyType": "ON_FAILURE",
                    "healthcheckTimeout": 300,
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "dektionstudio/railway-template-images",
                    "rootDirectory": "/paperclip"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Port of the board (web UI and API)",
                      "defaultValue": "3100"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "Railway Postgres over the private network",
                      "defaultValue": "${{Postgres.DATABASE_URL}}"
                    },
                    "PAPERCLIP_URL": {
                      "isOptional": false,
                      "description": "Your board. The first admin's invite link is in this service's deploy logs",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "BETTER_AUTH_SECRET": {
                      "isOptional": false,
                      "description": "Signs login sessions (generated)",
                      "defaultValue": "{{BETTER_AUTH_SECRET}}"
                    },
                    "PAPERCLIP_PUBLIC_URL": {
                      "isOptional": false,
                      "description": "Public URL Paperclip uses for logins and invite links",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "PAPERCLIP_DEPLOYMENT_MODE": {
                      "isOptional": false,
                      "description": "Login required (upstream's mode for servers)",
                      "defaultValue": "authenticated"
                    },
                    "HEARTBEAT_SCHEDULER_ENABLED": {
                      "isOptional": false,
                      "description": "Wake agents on their schedules",
                      "defaultValue": "true"
                    },
                    "PAPERCLIP_SECRETS_MASTER_KEY": {
                      "isOptional": false,
                      "description": "Encrypts the API keys and tokens you store in Paperclip (generated). Keep it: stored secrets can't be read without it",
                      "defaultValue": "{{PAPERCLIP_SECRETS_MASTER_KEY}}"
                    },
                    "PAPERCLIP_DEPLOYMENT_EXPOSURE": {
                      "isOptional": false,
                      "description": "Internet-facing: stricter checks, no browser claim of the instance",
                      "defaultValue": "public"
                    },
                    "PAPERCLIP_MIGRATION_AUTO_APPLY": {
                      "isOptional": false,
                      "description": "Apply database migrations on start, so redeploying moves you to the newest release",
                      "defaultValue": "true"
                    }
                  },
                  "networking": {
                    "tcpProxies": {},
                    "serviceDomains": {
                      "<hasDomain>:3100": {
                        "port": 3100
                      }
                    }
                  },
                  "volumeMounts": {
                    "da380d55-2bed-4e74-be76-9345353a23fb": {
                      "mountPath": "/paperclip"
                    }
                  }
                },
                "91e2b1a9-8cec-4108-b16d-8a147ba4b5d5": {
                  "icon": "https://devicons.railway.com/i/postgresql.svg",
                  "name": "Postgres",
                  "deploy": {
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ghcr.io/railwayapp-templates/postgres-ssl:17"
                  },
                  "variables": {
                    "PGDATA": {
                      "isOptional": false,
                      "description": "Data directory inside the volume",
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Database name",
                      "defaultValue": "paperclip"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "Private connection string used by Paperclip",
                      "defaultValue": "postgresql://${{POSTGRES_USER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:5432/${{POSTGRES_DB}}"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "Database superuser",
                      "defaultValue": "postgres"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Database password (generated)",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    }
                  },
                  "networking": {
                    "tcpProxies": {},
                    "serviceDomains": {}
                  },
                  "volumeMounts": {
                    "c561db5e-d38a-462a-8e95-7e10b365b837": {
                      "mountPath": "/var/lib/postgresql/data"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "paperclip",
      "method": "GET",
      "path": "/api/health",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 2,
    "needs_volume": true
  },
  "generated_at": "2026-09-26T10:14:47.613Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-26T08:29:00.703Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_8785a58dbcd94bd5a258",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "healthcheck",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 160,
    "typical_build_seconds": 103,
    "typical_start_seconds": 40,
    "slowest_service": "paperclip"
  }
}
