{
  "manifest_version": "1.0.0",
  "template": {
    "id": "b8c7a2db-72b6-4254-b054-cad4c21eca11",
    "slug": "portainer-container",
    "name": "Portainer",
    "description": "Web interface for managing Docker containers and Kubernetes",
    "url": "https://railway.com/deploy/portainer-container",
    "upstream": {
      "repo_url": "https://github.com/gridalpha/portainer-railway"
    }
  },
  "services": [
    {
      "name": "portainer",
      "source": {
        "repo": "https://github.com/gridalpha/portainer-railway"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "portainer",
      "description": "HTTP listen port behind Railway's edge",
      "secret": false,
      "strategy": "default",
      "default": "8080"
    },
    {
      "key": "AGENT_SECRET",
      "service": "portainer",
      "description": "Shared secret for every Portainer Agent",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "ADMIN_PASSWORD",
      "service": "portainer",
      "description": "First administrator password, applied on first boot",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "PORTAINER_HSTS",
      "service": "portainer",
      "description": "Emit Strict-Transport-Security header",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "PORTAINER_DATA_DIR",
      "service": "portainer",
      "description": "Data directory, matches the volume mount",
      "secret": false,
      "strategy": "default",
      "default": "/data"
    },
    {
      "key": "PORTAINER_LOG_MODE",
      "service": "portainer",
      "description": "NOCOLOR, PRETTY or JSON",
      "secret": false,
      "strategy": "default",
      "default": "NOCOLOR"
    },
    {
      "key": "PORTAINER_LOG_LEVEL",
      "service": "portainer",
      "description": "DEBUG, INFO, WARN or ERROR",
      "secret": false,
      "strategy": "default",
      "default": "INFO"
    },
    {
      "key": "PORTAINER_HTTPS_PORT",
      "service": "portainer",
      "description": "Private HTTPS listener port",
      "secret": false,
      "strategy": "default",
      "default": "9443"
    },
    {
      "key": "PORTAINER_TUNNEL_PORT",
      "service": "portainer",
      "description": "Edge reverse-tunnel server port",
      "secret": false,
      "strategy": "default",
      "default": "8000"
    },
    {
      "key": "RAILWAY_DOCKERFILE_PATH",
      "service": "portainer",
      "description": "Dockerfile path for the build",
      "secret": false,
      "strategy": "default",
      "default": "Dockerfile"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "portainer",
      "description": "Clean shutdown window",
      "secret": false,
      "strategy": "default",
      "default": "15"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "portainer-container"
      }
    },
    "cli": "railway deploy --template portainer-container",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "b8c7a2db-72b6-4254-b054-cad4c21eca11",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "7f1f42a1-9f19-4375-b4d0-0f1d8243064c": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/portainer.svg",
                  "name": "portainer",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/gridalpha/portainer-railway",
                    "rootDirectory": null
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "HTTP listen port behind Railway's edge",
                      "defaultValue": "8080"
                    },
                    "AGENT_SECRET": {
                      "isOptional": false,
                      "description": "Shared secret for every Portainer Agent",
                      "defaultValue": "{{AGENT_SECRET}}"
                    },
                    "ADMIN_PASSWORD": {
                      "isOptional": false,
                      "description": "First administrator password, applied on first boot",
                      "defaultValue": "{{ADMIN_PASSWORD}}"
                    },
                    "PORTAINER_HSTS": {
                      "description": "Emit Strict-Transport-Security header",
                      "defaultValue": "true"
                    },
                    "PORTAINER_DATA_DIR": {
                      "description": "Data directory, matches the volume mount",
                      "defaultValue": "/data"
                    },
                    "PORTAINER_LOG_MODE": {
                      "isOptional": false,
                      "description": "NOCOLOR, PRETTY or JSON",
                      "defaultValue": "NOCOLOR"
                    },
                    "PORTAINER_LOG_LEVEL": {
                      "isOptional": false,
                      "description": "DEBUG, INFO, WARN or ERROR",
                      "defaultValue": "INFO"
                    },
                    "PORTAINER_HTTPS_PORT": {
                      "description": "Private HTTPS listener port",
                      "defaultValue": "9443"
                    },
                    "PORTAINER_TUNNEL_PORT": {
                      "description": "Edge reverse-tunnel server port",
                      "defaultValue": "8000"
                    },
                    "RAILWAY_DOCKERFILE_PATH": {
                      "isOptional": false,
                      "description": "Dockerfile path for the build",
                      "defaultValue": "Dockerfile"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Clean shutdown window",
                      "defaultValue": "15"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:8080": {
                        "port": 8080
                      }
                    }
                  },
                  "volumeMounts": {
                    "7f1f42a1-9f19-4375-b4d0-0f1d8243064c": {
                      "mountPath": "/data"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 1,
    "needs_volume": true
  },
  "generated_at": "2026-09-20T16:14:49.616Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-19T14:06:09.239Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_dddb005c7a0c4d2ebe6e",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 82,
    "typical_build_seconds": 21,
    "typical_start_seconds": 10,
    "slowest_service": "portainer"
  }
}
