{
  "manifest_version": "1.0.0",
  "template": {
    "id": "136856ce-3e1d-4b17-9c86-6041ccfdc52d",
    "slug": "kit-hermes-build-0920",
    "name": "Hermes Agent",
    "description": "Hermes Agent: self-hosted AI agent for Telegram, Discord, Slack with memory",
    "url": "https://railway.com/deploy/kit-hermes-build-0920",
    "upstream": {
      "image": "nousresearch/hermes-agent:v2026.9.24@sha256:fca358f12efd65bfaaca05884166f15c0e2788375ca30d77061ac1ebc96452b7"
    }
  },
  "services": [
    {
      "name": "Hermes",
      "source": {
        "image": "nousresearch/hermes-agent:v2026.9.24@sha256:fca358f12efd65bfaaca05884166f15c0e2788375ca30d77061ac1ebc96452b7"
      },
      "needs_volume": true,
      "volume_mount_path": "/opt/data",
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "Hermes",
      "description": "Port the Hermes dashboard listens on. Railway's public domain and healthcheck target this port.",
      "secret": false,
      "strategy": "default",
      "default": "9119"
    },
    {
      "key": "HERMES_HOME",
      "service": "Hermes",
      "description": "Hermes state directory (config, sessions, memory, skills). Mounted on the volume so it survives redeploys.",
      "secret": false,
      "strategy": "default",
      "default": "/opt/data"
    },
    {
      "key": "API_SERVER_KEY",
      "service": "Hermes",
      "description": "Bearer token for the OpenAI-compatible API. Generated once at deploy time.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "API_SERVER_HOST",
      "service": "Hermes",
      "description": "Bind address for the API server.",
      "secret": false,
      "strategy": "default",
      "default": "0.0.0.0"
    },
    {
      "key": "API_SERVER_ENABLED",
      "service": "Hermes",
      "description": "Turns on Hermes's OpenAI-compatible API server on the gateway (port 8642 inside the container; reach it via the dashboard or private networking).",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "GATEWAY_MULTIPLEX_PROFILES",
      "service": "Hermes",
      "description": "Keeps the gateway in single-profile mode so it reads provider keys from these service variables. Switching the model in the dashboard otherwise turns on multi-profile mode, where Telegram and the API stop seeing keys set here.",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "HERMES_DASHBOARD_PUBLIC_URL",
      "service": "Hermes",
      "description": "Public URL of the dashboard, used for links and OAuth callbacks. Set automatically from your Railway domain.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "HERMES_DISABLE_LAZY_INSTALLS",
      "service": "Hermes",
      "description": "Do not pip-install optional tool packages at runtime; keeps boots fast and the image immutable.",
      "secret": false,
      "strategy": "default",
      "default": "1"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "Hermes",
      "description": "Seconds Railway keeps the old container serving while the new one starts and passes its healthcheck.",
      "secret": false,
      "strategy": "default",
      "default": "60"
    },
    {
      "key": "HERMES_DASHBOARD_BASIC_AUTH_PASSWORD",
      "service": "Hermes",
      "description": "Password for the web dashboard. Generated for you - copy it from this Variables tab after deploying.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "HERMES_DASHBOARD_BASIC_AUTH_USERNAME",
      "service": "Hermes",
      "description": "Username for the web dashboard's login.",
      "secret": false,
      "strategy": "default",
      "default": "admin"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "kit-hermes-build-0920"
      }
    },
    "cli": "railway deploy --template kit-hermes-build-0920",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "136856ce-3e1d-4b17-9c86-6041ccfdc52d",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "9ff3be86-7a13-4c52-b124-f946a9884819": {
                  "icon": "https://bogusz.co/external/hermes-icon.png",
                  "name": "Hermes",
                  "deploy": {
                    "startCommand": "/opt/hermes/docker/entrypoint-dispatch.sh bash -c 'cmp -s /opt/data/config.yaml /opt/hermes/cli-config.yaml.example && sed -i \"/^  base_url: \\\"https:\\/\\/openrouter.ai\\/api\\/v1\\\"$/d\" /opt/data/config.yaml\nhermes dashboard --host 0.0.0.0 --port \"$PORT\" --no-open & dash=$!\ngw=\ntrap \"kill -TERM \\$gw \\$dash 2>/dev/null; wait; exit 0\" TERM INT\ndashboard_exited() {\n  echo \"[railway] dashboard exited with code $1; stopping the gateway so Railway restarts the service\"\n  kill -TERM $gw 2>/dev/null; wait $gw 2>/dev/null\n  exit 1\n}\nstamp() { stat -c %Y /opt/data/config.yaml /opt/data/.env 2>/dev/null | tr \"\\n\" \" \"; }\ndelay=5\nwhile :; do\n  started=$SECONDS\n  hermes gateway run --external-supervisor & gw=$!\n  ended=; wait -n -p ended $gw $dash; code=$?\n  [ \"$ended\" = \"$dash\" ] && dashboard_exited $code\n  if [ \"$code\" -eq 75 ]; then delay=5; continue; fi\n  [ $((SECONDS - started)) -gt 600 ] && delay=5\n  cap=60; [ \"$code\" -eq 78 ] && cap=600\n  echo \"[railway] gateway exited with code $code; the dashboard stays up. Restarting the gateway in ${delay}s, or as soon as config.yaml or .env changes.\"\n  before=$(stamp); until_=$((SECONDS + delay))\n  while [ $SECONDS -lt $until_ ] && [ \"$(stamp)\" = \"$before\" ]; do\n    sleep 5 & nap=$!\n    ended=; wait -n -p ended $nap $dash; code=$?\n    [ \"$ended\" = \"$dash\" ] && { kill $nap 2>/dev/null; dashboard_exited $code; }\n  done\n  delay=$((delay * 2)); [ $delay -gt $cap ] && delay=$cap\ndone'",
                    "healthcheckPath": "/api/health",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "nousresearch/hermes-agent:v2026.9.24@sha256:fca358f12efd65bfaaca05884166f15c0e2788375ca30d77061ac1ebc96452b7"
                  },
                  "variables": {
                    "PORT": {
                      "description": "Port the Hermes dashboard listens on. Railway's public domain and healthcheck target this port.",
                      "defaultValue": "9119"
                    },
                    "HERMES_HOME": {
                      "description": "Hermes state directory (config, sessions, memory, skills). Mounted on the volume so it survives redeploys.",
                      "defaultValue": "/opt/data"
                    },
                    "API_SERVER_KEY": {
                      "description": "Bearer token for the OpenAI-compatible API. Generated once at deploy time.",
                      "defaultValue": "{{API_SERVER_KEY}}"
                    },
                    "OPENAI_API_KEY": {
                      "isOptional": true,
                      "description": "Optional - OpenAI key, if you prefer OpenAI directly.",
                      "defaultValue": ""
                    },
                    "API_SERVER_HOST": {
                      "description": "Bind address for the API server.",
                      "defaultValue": "0.0.0.0"
                    },
                    "ANTHROPIC_API_KEY": {
                      "isOptional": true,
                      "description": "Optional - Anthropic key, if you prefer Claude directly.",
                      "defaultValue": ""
                    },
                    "DISCORD_BOT_TOKEN": {
                      "isOptional": true,
                      "description": "Optional - Discord bot token, if you want the agent in Discord.",
                      "defaultValue": ""
                    },
                    "API_SERVER_ENABLED": {
                      "description": "Turns on Hermes's OpenAI-compatible API server on the gateway (port 8642 inside the container; reach it via the dashboard or private networking).",
                      "defaultValue": "true"
                    },
                    "OPENROUTER_API_KEY": {
                      "isOptional": true,
                      "description": "Optional - OpenRouter key so the agent can talk to a model. You can also add any provider key from the dashboard after deploying.",
                      "defaultValue": ""
                    },
                    "TELEGRAM_BOT_TOKEN": {
                      "isOptional": true,
                      "description": "Optional - Telegram bot token from @BotFather. Leave blank to run without Telegram; the dashboard and API still work.",
                      "defaultValue": ""
                    },
                    "TELEGRAM_ALLOWED_USERS": {
                      "isOptional": true,
                      "description": "Optional - Comma-separated Telegram user IDs allowed to talk to the bot. Leave blank to allow no one until you set it.",
                      "defaultValue": ""
                    },
                    "GATEWAY_MULTIPLEX_PROFILES": {
                      "isOptional": false,
                      "description": "Keeps the gateway in single-profile mode so it reads provider keys from these service variables. Switching the model in the dashboard otherwise turns on multi-profile mode, where Telegram and the API stop seeing keys set here.",
                      "defaultValue": "false"
                    },
                    "HERMES_DASHBOARD_PUBLIC_URL": {
                      "description": "Public URL of the dashboard, used for links and OAuth callbacks. Set automatically from your Railway domain.",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "HERMES_DISABLE_LAZY_INSTALLS": {
                      "description": "Do not pip-install optional tool packages at runtime; keeps boots fast and the image immutable.",
                      "defaultValue": "1"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "description": "Seconds Railway keeps the old container serving while the new one starts and passes its healthcheck.",
                      "defaultValue": "60"
                    },
                    "HERMES_DASHBOARD_BASIC_AUTH_PASSWORD": {
                      "description": "Password for the web dashboard. Generated for you - copy it from this Variables tab after deploying.",
                      "defaultValue": "{{HERMES_DASHBOARD_BASIC_AUTH_PASSWORD}}"
                    },
                    "HERMES_DASHBOARD_BASIC_AUTH_USERNAME": {
                      "description": "Username for the web dashboard's login.",
                      "defaultValue": "admin"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:9119": {
                        "port": 9119
                      }
                    }
                  },
                  "volumeMounts": {
                    "9ff3be86-7a13-4c52-b124-f946a9884819": {
                      "mountPath": "/opt/data"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "Hermes",
      "method": "GET",
      "path": "/api/health",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 1,
    "needs_volume": true
  },
  "generated_at": "2026-10-06T04:14:42.626Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-10-05T05:27:16.279Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_b41138e6e10245a9b608",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "healthcheck",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 58,
    "typical_build_seconds": 0,
    "typical_start_seconds": 10,
    "slowest_service": "Hermes"
  }
}
