{
  "manifest_version": "1.0.0",
  "template": {
    "id": "ca642fa6-9e0a-40c5-a560-13d222d8f31c",
    "slug": "paperless-gpt",
    "name": "paperless-gpt",
    "description": "Add AI OCR, titles and tags to your paperless-ngx, behind a password",
    "url": "https://railway.com/deploy/paperless-gpt",
    "upstream": {
      "image": "ghcr.io/youssefsiam38/paperless-gpt-railway:1.0.0"
    }
  },
  "services": [
    {
      "name": "gpt",
      "source": {
        "image": "ghcr.io/youssefsiam38/paperless-gpt-railway:1.0.0"
      },
      "needs_volume": true,
      "volume_mount_path": "/app/db",
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "TZ",
      "service": "gpt",
      "description": "Timezone used for timestamps.",
      "secret": false,
      "strategy": "default",
      "default": "UTC"
    },
    {
      "key": "PORT",
      "service": "gpt",
      "description": "Port the front door listens on. Railway probes its healthcheck here, so keep it equal to the domain's target port.",
      "secret": false,
      "strategy": "default",
      "default": "8080"
    },
    {
      "key": "LLM_MODEL",
      "service": "gpt",
      "description": "Model used for titles, tags and OCR.",
      "secret": false,
      "strategy": "default",
      "default": "gpt-4o-mini"
    },
    {
      "key": "LLM_PROVIDER",
      "service": "gpt",
      "description": "Model provider: openai, anthropic, googleai, ollama or azure.",
      "secret": false,
      "strategy": "default",
      "default": "openai"
    },
    {
      "key": "PAPERLESS_BASE_URL",
      "service": "gpt",
      "description": "Address of the paperless-ngx you already run. Until you replace this placeholder the service shows a setup page instead of starting.",
      "secret": false,
      "strategy": "default",
      "default": "https://paperless.example.com"
    },
    {
      "key": "PAPERLESS_GPT_AUTH_PASSWORD",
      "service": "gpt",
      "description": "Password for that prompt. paperless-gpt has no login of its own, so this is what stops strangers reading and rewriting your documents.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "PAPERLESS_GPT_AUTH_USERNAME",
      "service": "gpt",
      "description": "Username for the password prompt that protects this instance.",
      "secret": false,
      "strategy": "default",
      "default": "admin"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "paperless-gpt"
      }
    },
    "cli": "railway deploy --template paperless-gpt",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "ca642fa6-9e0a-40c5-a560-13d222d8f31c",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "d67f70ee-9e42-4ece-b2f2-2f786c7c5e85": {
                  "icon": null,
                  "name": "gpt",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/healthz",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ghcr.io/youssefsiam38/paperless-gpt-railway:1.0.0"
                  },
                  "variables": {
                    "TZ": {
                      "isOptional": false,
                      "description": "Timezone used for timestamps.",
                      "defaultValue": "UTC"
                    },
                    "PORT": {
                      "isOptional": false,
                      "description": "Port the front door listens on. Railway probes its healthcheck here, so keep it equal to the domain's target port.",
                      "defaultValue": "8080"
                    },
                    "LLM_MODEL": {
                      "isOptional": false,
                      "description": "Model used for titles, tags and OCR.",
                      "defaultValue": "gpt-4o-mini"
                    },
                    "LLM_PROVIDER": {
                      "isOptional": false,
                      "description": "Model provider: openai, anthropic, googleai, ollama or azure.",
                      "defaultValue": "openai"
                    },
                    "OPENAI_API_KEY": {
                      "isOptional": true,
                      "description": "Your key for the chosen provider. Use the matching variable if you picked another one.",
                      "defaultValue": ""
                    },
                    "PAPERLESS_BASE_URL": {
                      "isOptional": false,
                      "description": "Address of the paperless-ngx you already run. Until you replace this placeholder the service shows a setup page instead of starting.",
                      "defaultValue": "https://paperless.example.com"
                    },
                    "PAPERLESS_API_TOKEN": {
                      "isOptional": true,
                      "description": "A token from that instance: Settings, My Profile, API Auth Token. Leave it empty on the first deploy; the service shows a setup page until it is filled in.",
                      "defaultValue": ""
                    },
                    "PAPERLESS_GPT_AUTH_PASSWORD": {
                      "isOptional": false,
                      "description": "Password for that prompt. paperless-gpt has no login of its own, so this is what stops strangers reading and rewriting your documents.",
                      "defaultValue": "{{PAPERLESS_GPT_AUTH_PASSWORD}}"
                    },
                    "PAPERLESS_GPT_AUTH_USERNAME": {
                      "isOptional": false,
                      "description": "Username for the password prompt that protects this instance.",
                      "defaultValue": "admin"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:8080": {
                        "port": 8080
                      }
                    }
                  },
                  "volumeMounts": {
                    "d67f70ee-9e42-4ece-b2f2-2f786c7c5e85": {
                      "mountPath": "/app/db"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "gpt",
      "method": "GET",
      "path": "/healthz",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 1,
    "needs_volume": true
  },
  "generated_at": "2026-09-12T16:14:42.609Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-12T15:58:45.352Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_4372691f1c36476abe93",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "healthcheck",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 17,
    "typical_build_seconds": 0,
    "typical_start_seconds": 0,
    "slowest_service": "gpt"
  }
}
