{
  "manifest_version": "1.0.0",
  "template": {
    "id": "4132fa3d-7a01-44e8-a78e-f14855276a5f",
    "slug": "deploy-hoppscotch-for-the-desktop-app",
    "name": "Hoppscotch Desktop",
    "description": "Connect the Hoppscotch desktop app to your instance",
    "url": "https://railway.com/deploy/deploy-hoppscotch-for-the-desktop-app",
    "upstream": {
      "image": "hoppscotch/hoppscotch:2026.9.0@sha256:3160f5b3acf49478552a66a0785ee6c75f64311066f149f7d946fbd540f8388d"
    }
  },
  "services": [
    {
      "name": "Hoppscotch",
      "source": {
        "image": "hoppscotch/hoppscotch:2026.9.0@sha256:3160f5b3acf49478552a66a0785ee6c75f64311066f149f7d946fbd540f8388d"
      },
      "needs_volume": false,
      "http": true
    },
    {
      "name": "Postgres",
      "source": {
        "image": "ghcr.io/railwayapp-templates/postgres-ssl:18.6@sha256:fcc6686a3f4f1962fe4ed77a15884553b7bd611ae1cea3204687968c5c09d517"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "Hoppscotch",
      "description": "Internal backend port that Caddy proxies /backend to; keep 8080",
      "secret": false,
      "strategy": "default",
      "default": "8080"
    },
    {
      "key": "TRUST_PROXY",
      "service": "Hoppscotch",
      "description": "Use X-Forwarded-For client IPs behind Railway's proxy",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "DATABASE_URL",
      "service": "Hoppscotch",
      "description": "Postgres connection string (Railway Postgres, private network)",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "VITE_BASE_URL",
      "service": "Hoppscotch",
      "description": "Public URL of the Hoppscotch web app",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "VITE_ADMIN_URL",
      "service": "Hoppscotch",
      "description": "Public URL of the admin dashboard",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "DATA_ENCRYPTION_KEY",
      "service": "Hoppscotch",
      "description": "32-char key that encrypts secrets stored in the database; never change after first boot",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "VITE_BACKEND_WS_URL",
      "service": "Hoppscotch",
      "description": "GraphQL WebSocket endpoint for live sync",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "WHITELISTED_ORIGINS",
      "service": "Hoppscotch",
      "description": "Allowed CORS and desktop-app origins",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "VITE_BACKEND_API_URL",
      "service": "Hoppscotch",
      "description": "REST API base URL (also used for OAuth callbacks)",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "VITE_BACKEND_GQL_URL",
      "service": "Hoppscotch",
      "description": "GraphQL API endpoint used by the frontends",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "VITE_SHORTCODE_BASE_URL",
      "service": "Hoppscotch",
      "description": "Base URL for shared request links",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "ENABLE_SUBPATH_BASED_ACCESS",
      "service": "Hoppscotch",
      "description": "Serve app at /, admin at /admin and API at /backend on one domain",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "WEBAPP_SERVER_SIGNING_SECRET",
      "service": "Hoppscotch",
      "description": "Seed for the desktop-app bundle signing key, stable across redeploys",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "PGDATA",
      "service": "Postgres",
      "description": "Data directory on the volume",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "PGHOST",
      "service": "Postgres",
      "description": "Private hostname of the database",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PGPORT",
      "service": "Postgres",
      "description": "Postgres port",
      "secret": false,
      "strategy": "default",
      "default": "5432"
    },
    {
      "key": "PGUSER",
      "service": "Postgres",
      "description": "User for the Railway data panel",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGDATABASE",
      "service": "Postgres",
      "description": "Database for the Railway data panel",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGPASSWORD",
      "service": "Postgres",
      "description": "Password for the Railway data panel",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_DB",
      "service": "Postgres",
      "description": "Default database name",
      "secret": false,
      "strategy": "default",
      "default": "railway"
    },
    {
      "key": "DATABASE_URL",
      "service": "Postgres",
      "description": "Private connection string for other services",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "POSTGRES_USER",
      "service": "Postgres",
      "description": "Postgres superuser name",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "SSL_CERT_DAYS",
      "service": "Postgres",
      "description": "Validity of the self-signed SSL certificate in days",
      "secret": false,
      "strategy": "default",
      "default": "820"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "Postgres",
      "description": "Generated Postgres password",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "Postgres",
      "description": "Seconds Postgres gets to shut down cleanly",
      "secret": false,
      "strategy": "default",
      "default": "60"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "deploy-hoppscotch-for-the-desktop-app"
      }
    },
    "cli": "railway deploy --template deploy-hoppscotch-for-the-desktop-app",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "4132fa3d-7a01-44e8-a78e-f14855276a5f",
            "serializedConfig": {
              "services": {
                "57799e17-28b7-44b5-8731-f4cbd8623402": {
                  "icon": null,
                  "name": "Hoppscotch",
                  "deploy": {
                    "startCommand": "/bin/sh -c \"cd /dist/backend && pnpm exec prisma migrate deploy && exec tini -s -- node /usr/src/app/aio_run.mjs\"",
                    "healthcheckPath": "/ping",
                    "restartPolicyType": "ALWAYS",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "hoppscotch/hoppscotch:2026.9.0@sha256:3160f5b3acf49478552a66a0785ee6c75f64311066f149f7d946fbd540f8388d"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Internal backend port that Caddy proxies /backend to; keep 8080",
                      "defaultValue": "8080"
                    },
                    "TRUST_PROXY": {
                      "isOptional": false,
                      "description": "Use X-Forwarded-For client IPs behind Railway's proxy",
                      "defaultValue": "true"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "Postgres connection string (Railway Postgres, private network)",
                      "defaultValue": "${{Postgres.DATABASE_URL}}"
                    },
                    "VITE_BASE_URL": {
                      "isOptional": false,
                      "description": "Public URL of the Hoppscotch web app",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "VITE_ADMIN_URL": {
                      "isOptional": false,
                      "description": "Public URL of the admin dashboard",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}/admin"
                    },
                    "DATA_ENCRYPTION_KEY": {
                      "isOptional": false,
                      "description": "32-char key that encrypts secrets stored in the database; never change after first boot",
                      "defaultValue": "{{DATA_ENCRYPTION_KEY}}"
                    },
                    "VITE_BACKEND_WS_URL": {
                      "isOptional": false,
                      "description": "GraphQL WebSocket endpoint for live sync",
                      "defaultValue": "wss://${{RAILWAY_PUBLIC_DOMAIN}}/backend/graphql"
                    },
                    "WHITELISTED_ORIGINS": {
                      "isOptional": false,
                      "description": "Allowed CORS and desktop-app origins",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}},app://localhost_3200,app://hoppscotch"
                    },
                    "VITE_BACKEND_API_URL": {
                      "isOptional": false,
                      "description": "REST API base URL (also used for OAuth callbacks)",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}/backend/v1"
                    },
                    "VITE_BACKEND_GQL_URL": {
                      "isOptional": false,
                      "description": "GraphQL API endpoint used by the frontends",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}/backend/graphql"
                    },
                    "VITE_SHORTCODE_BASE_URL": {
                      "isOptional": false,
                      "description": "Base URL for shared request links",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "ENABLE_SUBPATH_BASED_ACCESS": {
                      "isOptional": false,
                      "description": "Serve app at /, admin at /admin and API at /backend on one domain",
                      "defaultValue": "true"
                    },
                    "WEBAPP_SERVER_SIGNING_SECRET": {
                      "isOptional": false,
                      "description": "Seed for the desktop-app bundle signing key, stable across redeploys",
                      "defaultValue": "{{WEBAPP_SERVER_SIGNING_SECRET}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:80": {
                        "port": 80
                      }
                    }
                  }
                },
                "caaa5b2a-c88f-4363-9efa-9c756c9c6327": {
                  "icon": "https://devicons.railway.app/i/postgresql.svg",
                  "name": "Postgres",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ghcr.io/railwayapp-templates/postgres-ssl:18.6@sha256:fcc6686a3f4f1962fe4ed77a15884553b7bd611ae1cea3204687968c5c09d517"
                  },
                  "variables": {
                    "PGDATA": {
                      "isOptional": false,
                      "description": "Data directory on the volume",
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "PGHOST": {
                      "isOptional": false,
                      "description": "Private hostname of the database",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "PGPORT": {
                      "isOptional": false,
                      "description": "Postgres port",
                      "defaultValue": "5432"
                    },
                    "PGUSER": {
                      "isOptional": false,
                      "description": "User for the Railway data panel",
                      "defaultValue": "${{ POSTGRES_USER }}"
                    },
                    "PGDATABASE": {
                      "isOptional": false,
                      "description": "Database for the Railway data panel",
                      "defaultValue": "${{POSTGRES_DB}}"
                    },
                    "PGPASSWORD": {
                      "isOptional": false,
                      "description": "Password for the Railway data panel",
                      "defaultValue": "${{POSTGRES_PASSWORD}}"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Default database name",
                      "defaultValue": "railway"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "Private connection string for other services",
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:5432/${{PGDATABASE}}"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "Postgres superuser name",
                      "defaultValue": "postgres"
                    },
                    "SSL_CERT_DAYS": {
                      "isOptional": false,
                      "description": "Validity of the self-signed SSL certificate in days",
                      "defaultValue": "820"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Generated Postgres password",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Seconds Postgres gets to shut down cleanly",
                      "defaultValue": "60"
                    }
                  },
                  "volumeMounts": {
                    "caaa5b2a-c88f-4363-9efa-9c756c9c6327": {
                      "mountPath": "/var/lib/postgresql/data"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "Hoppscotch",
      "method": "GET",
      "path": "/ping",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 2,
    "needs_volume": true
  },
  "generated_at": "2026-10-21T10:14:45.258Z",
  "generator_version": "0.1.0",
  "status": "degraded",
  "validated_at": "2026-10-21T07:05:01.782Z",
  "success_rate_30d": 0,
  "validation": {
    "last_run_id": "run_ff83bca2cf0240919f0f",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "run_completed",
        "passed": false,
        "detail": "Railway API errors: Not Authorized"
      },
      {
        "name": "cleanup",
        "passed": false,
        "detail": "Railway API errors: Not Authorized"
      }
    ]
  }
}
