{
  "manifest_version": "1.0.0",
  "template": {
    "id": "3c2795d7-65fa-4623-9408-8a6bb82a5018",
    "slug": "calibre-web-server",
    "name": "Calibre",
    "description": "Web app for reading and managing your own e-book collection",
    "url": "https://railway.com/deploy/calibre-web-server",
    "upstream": {
      "image": "axllent/mailpit:latest"
    }
  },
  "services": [
    {
      "name": "mailpit",
      "source": {
        "image": "axllent/mailpit:latest"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "http": true
    },
    {
      "name": "calibre-web",
      "source": {
        "repo": "https://github.com/gridalpha/calibre-web-railway"
      },
      "needs_volume": true,
      "volume_mount_path": "/config",
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "mailpit",
      "description": "Web inbox port",
      "secret": false,
      "strategy": "default",
      "default": "8025"
    },
    {
      "key": "MP_UI_AUTH",
      "service": "mailpit",
      "description": "Username and password for the inbox",
      "secret": false,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "MP_DATABASE",
      "service": "mailpit",
      "description": "Message store on the volume",
      "secret": false,
      "strategy": "default",
      "default": "/data/mailpit.db"
    },
    {
      "key": "MP_MAX_MESSAGES",
      "service": "mailpit",
      "description": "Messages kept before rotation",
      "secret": false,
      "strategy": "default",
      "default": "5000"
    },
    {
      "key": "MP_SMTP_MAX_RECIPIENTS",
      "service": "mailpit",
      "description": "Recipient cap per message",
      "secret": false,
      "strategy": "default",
      "default": "100"
    },
    {
      "key": "TZ",
      "service": "calibre-web",
      "description": "Container timezone",
      "secret": false,
      "strategy": "default",
      "default": "Etc/UTC"
    },
    {
      "key": "PGID",
      "service": "calibre-web",
      "description": "Group id the app runs as",
      "secret": false,
      "strategy": "default",
      "default": "911"
    },
    {
      "key": "PORT",
      "service": "calibre-web",
      "description": "HTTP port the app listens on",
      "secret": false,
      "strategy": "default",
      "default": "8083"
    },
    {
      "key": "PUID",
      "service": "calibre-web",
      "description": "User id the app runs as",
      "secret": false,
      "strategy": "default",
      "default": "911"
    },
    {
      "key": "SMTP_FROM",
      "service": "calibre-web",
      "description": "Sender address on outgoing mail",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "SMTP_HOST",
      "service": "calibre-web",
      "description": "Private mail server hostname",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "SMTP_PORT",
      "service": "calibre-web",
      "description": "Mail server SMTP port",
      "secret": false,
      "strategy": "default",
      "default": "1025"
    },
    {
      "key": "SECRET_KEY",
      "service": "calibre-web",
      "description": "Session cookie signing key",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "ADMIN_PASSWORD",
      "service": "calibre-web",
      "description": "Password for the admin account",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "CALIBRE_LIBRARY_DIR",
      "service": "calibre-web",
      "description": "Calibre library path on the volume",
      "secret": false,
      "strategy": "default",
      "default": "/config/library"
    },
    {
      "key": "RAILWAY_DOCKERFILE_PATH",
      "service": "calibre-web",
      "description": "Dockerfile used for the build",
      "secret": false,
      "strategy": "default",
      "default": "Dockerfile"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "calibre-web-server"
      }
    },
    "cli": "railway deploy --template calibre-web-server",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "3c2795d7-65fa-4623-9408-8a6bb82a5018",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "b9dfaade-93e3-43e9-b032-da65a4463a0e": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/mailpit.svg",
                  "name": "mailpit",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/livez",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "axllent/mailpit:latest"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Web inbox port",
                      "defaultValue": "8025"
                    },
                    "MP_UI_AUTH": {
                      "isOptional": false,
                      "description": "Username and password for the inbox",
                      "defaultValue": "{{MP_UI_AUTH}}"
                    },
                    "MP_DATABASE": {
                      "isOptional": false,
                      "description": "Message store on the volume",
                      "defaultValue": "/data/mailpit.db"
                    },
                    "MP_MAX_MESSAGES": {
                      "isOptional": false,
                      "description": "Messages kept before rotation",
                      "defaultValue": "5000"
                    },
                    "MP_SMTP_MAX_RECIPIENTS": {
                      "isOptional": false,
                      "description": "Recipient cap per message",
                      "defaultValue": "100"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:8025": {
                        "port": 8025
                      }
                    }
                  },
                  "volumeMounts": {
                    "b9dfaade-93e3-43e9-b032-da65a4463a0e": {
                      "mountPath": "/data"
                    }
                  }
                },
                "e37b39d9-16ab-4276-87f2-792ddbc5526d": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/calibre-web.svg",
                  "name": "calibre-web",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/gridalpha/calibre-web-railway",
                    "rootDirectory": null
                  },
                  "variables": {
                    "TZ": {
                      "isOptional": false,
                      "description": "Container timezone",
                      "defaultValue": "Etc/UTC"
                    },
                    "PGID": {
                      "isOptional": false,
                      "description": "Group id the app runs as",
                      "defaultValue": "911"
                    },
                    "PORT": {
                      "isOptional": false,
                      "description": "HTTP port the app listens on",
                      "defaultValue": "8083"
                    },
                    "PUID": {
                      "isOptional": false,
                      "description": "User id the app runs as",
                      "defaultValue": "911"
                    },
                    "SMTP_FROM": {
                      "description": "Sender address on outgoing mail",
                      "defaultValue": "Calibre-Web <calibre-web@${{RAILWAY_PUBLIC_DOMAIN}}>"
                    },
                    "SMTP_HOST": {
                      "isOptional": false,
                      "description": "Private mail server hostname",
                      "defaultValue": "${{mailpit.RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "SMTP_PORT": {
                      "isOptional": false,
                      "description": "Mail server SMTP port",
                      "defaultValue": "1025"
                    },
                    "SECRET_KEY": {
                      "isOptional": false,
                      "description": "Session cookie signing key",
                      "defaultValue": "{{SECRET_KEY}}"
                    },
                    "ADMIN_PASSWORD": {
                      "isOptional": false,
                      "description": "Password for the admin account",
                      "defaultValue": "{{ADMIN_PASSWORD}}"
                    },
                    "CALIBRE_LIBRARY_DIR": {
                      "isOptional": false,
                      "description": "Calibre library path on the volume",
                      "defaultValue": "/config/library"
                    },
                    "RAILWAY_DOCKERFILE_PATH": {
                      "isOptional": false,
                      "description": "Dockerfile used for the build",
                      "defaultValue": "Dockerfile"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:8083": {
                        "port": 8083
                      }
                    }
                  },
                  "volumeMounts": {
                    "e37b39d9-16ab-4276-87f2-792ddbc5526d": {
                      "mountPath": "/config"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "mailpit",
      "method": "GET",
      "path": "/livez",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 2,
    "needs_volume": true
  },
  "generated_at": "2026-09-20T10:14:37.339Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-19T14:48:57.689Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_d5ec32126d1b4b5aa8a0",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "healthcheck",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 120,
    "typical_build_seconds": 41,
    "typical_start_seconds": 20,
    "slowest_service": "calibre-web"
  }
}
