{
  "manifest_version": "1.0.0",
  "template": {
    "id": "f385e725-954d-4b24-a3e4-85c38b337599",
    "slug": "grafana-alloy-lgtm",
    "name": "Grafana Alloy LGTM",
    "description": "Deploy and Host the Grafana LGTM stack with Alloy and Faro RUM",
    "url": "https://railway.com/deploy/grafana-alloy-lgtm",
    "upstream": {
      "repo_url": "https://github.com/jratienza65/otel-lgtm-railway"
    }
  },
  "services": [
    {
      "name": "Prometheus",
      "source": {
        "repo": "https://github.com/jratienza65/otel-lgtm-railway"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "http": false
    },
    {
      "name": "Loki",
      "source": {
        "repo": "https://github.com/jratienza65/otel-lgtm-railway"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "http": false
    },
    {
      "name": "Alloy",
      "source": {
        "repo": "https://github.com/jratienza65/otel-lgtm-railway"
      },
      "needs_volume": false,
      "http": true
    },
    {
      "name": "Grafana",
      "source": {
        "repo": "https://github.com/jratienza65/otel-lgtm-railway"
      },
      "needs_volume": true,
      "volume_mount_path": "/data/grafana",
      "http": true
    },
    {
      "name": "Tempo",
      "source": {
        "repo": "https://github.com/jratienza65/otel-lgtm-railway"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "Prometheus",
      "description": "HTTP port Prometheus listens on.",
      "secret": false,
      "strategy": "default",
      "default": "9090"
    },
    {
      "key": "VERSION",
      "service": "Prometheus",
      "description": "Prometheus image tag, passed as a build arg.",
      "secret": false,
      "strategy": "default",
      "default": "v3.8.0"
    },
    {
      "key": "RAILWAY_RUN_UID",
      "service": "Prometheus",
      "description": "Run as root so Prometheus can write to the mounted volume.",
      "secret": false,
      "strategy": "default",
      "default": "0"
    },
    {
      "key": "PORT",
      "service": "Loki",
      "description": "HTTP port Loki listens on.",
      "secret": false,
      "strategy": "default",
      "default": "3100"
    },
    {
      "key": "VERSION",
      "service": "Loki",
      "description": "Loki image tag, passed as a build arg.",
      "secret": false,
      "strategy": "default",
      "default": "3.6.2"
    },
    {
      "key": "RAILWAY_RUN_UID",
      "service": "Loki",
      "description": "Run as root so Loki can write to the mounted volume.",
      "secret": false,
      "strategy": "default",
      "default": "0"
    },
    {
      "key": "RAILWAY_PROMETHEUS_ALERTMANAGER_ENDPOINT",
      "service": "Loki",
      "description": "Alertmanager for the ruler. *Optional; leave unset if you do not alert on logs.*",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PORT",
      "service": "Alloy",
      "description": "Alloy's healthcheck port.",
      "secret": false,
      "strategy": "default",
      "default": "12345"
    },
    {
      "key": "VERSION",
      "service": "Alloy",
      "description": "Alloy image tag, passed as a build arg.",
      "secret": false,
      "strategy": "default",
      "default": "v1.18.1"
    },
    {
      "key": "FARO_API_KEY",
      "service": "Alloy",
      "description": "Key browsers send as `x-api-key`. Filters noise; the rate limit, payload cap and CORS list are the real controls.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "OTEL_INGEST_PASSWORD",
      "service": "Alloy",
      "description": "Password for that receiver. Producers send `Authorization: Basic <base64 user:password>`.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "OTEL_INGEST_USERNAME",
      "service": "Alloy",
      "description": "Username for the OTLP receiver on 4318. **Required** — the service will not start without it.",
      "secret": false,
      "strategy": "default",
      "default": "railway"
    },
    {
      "key": "RAILWAY_LOKI_ENDPOINT",
      "service": "Alloy",
      "description": "Where logs are written. Loki's OTLP path, not its base URL.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "RAILWAY_TEMPO_ENDPOINT",
      "service": "Alloy",
      "description": "Where traces are written. Tempo's OTLP port.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "FARO_CORS_ALLOWED_ORIGINS",
      "service": "Alloy",
      "description": "Comma-separated frontend origins. Replaces the localhost fallback, so production does not keep localhost allowed.",
      "secret": false,
      "strategy": "default",
      "default": "localhost"
    },
    {
      "key": "FARO_ALLOW_UNAUTHENTICATED",
      "service": "Alloy",
      "description": "Set `true` instead to run an open endpoint. One of these two is required.",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "RAILWAY_PROMETHEUS_ENDPOINT",
      "service": "Alloy",
      "description": "Where metrics are written. Prometheus's OTLP path.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PORT",
      "service": "Grafana",
      "description": "HTTP port Grafana listens on.",
      "secret": false,
      "strategy": "default",
      "default": "3000"
    },
    {
      "key": "VERSION",
      "service": "Grafana",
      "description": "Grafana image tag, passed as a build arg.",
      "secret": false,
      "strategy": "default",
      "default": "12.3.1"
    },
    {
      "key": "GF_PATHS_DATA",
      "service": "Grafana",
      "description": "Grafana's data directory. Must match the volume mount path.",
      "secret": false,
      "strategy": "default",
      "default": "/data/grafana"
    },
    {
      "key": "RAILWAY_RUN_UID",
      "service": "Grafana",
      "description": "Run as root so Grafana can write to the mounted volume.",
      "secret": false,
      "strategy": "default",
      "default": "0"
    },
    {
      "key": "GF_PLUGINS_PREINSTALL",
      "service": "Grafana",
      "description": "Plugins installed at startup, comma-separated.",
      "secret": false,
      "strategy": "default",
      "default": "grafana-simple-json-datasource,grafana-piechart-panel,grafana-geomap-panel,grafana-clock-panel"
    },
    {
      "key": "RAILWAY_LOKI_ENDPOINT",
      "service": "Grafana",
      "description": "Loki datasource URL. Base URL — **not** the `/otlp` path the collector uses.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "GF_SECURITY_ADMIN_USER",
      "service": "Grafana",
      "description": "Username for the initial admin login.",
      "secret": false,
      "strategy": "default",
      "default": "admin"
    },
    {
      "key": "RAILWAY_TEMPO_ENDPOINT",
      "service": "Grafana",
      "description": "Tempo datasource URL. Its HTTP port, **not** the 4318 OTLP port.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "GF_DEFAULT_INSTANCE_NAME",
      "service": "Grafana",
      "description": "Grafana's default instance name.",
      "secret": false,
      "strategy": "default",
      "default": "Alloy LGTM!"
    },
    {
      "key": "GF_SECURITY_ADMIN_PASSWORD",
      "service": "Grafana",
      "description": "Password for the initial admin login. **Mark as secret.**",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "RAILWAY_PROMETHEUS_ENDPOINT",
      "service": "Grafana",
      "description": "Prometheus datasource URL. Base URL — **not** the `/api/v1/otlp` path.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PORT",
      "service": "Tempo",
      "description": "HTTP port Tempo listens on.",
      "secret": false,
      "strategy": "default",
      "default": "3200"
    },
    {
      "key": "VERSION",
      "service": "Tempo",
      "description": "Tempo image tag, passed as a build arg.",
      "secret": false,
      "strategy": "default",
      "default": "2.9.0"
    },
    {
      "key": "RAILWAY_RUN_UID",
      "service": "Tempo",
      "description": "Run as root so Tempo can write to the mounted volume.",
      "secret": false,
      "strategy": "default",
      "default": "0"
    },
    {
      "key": "RAILWAY_PROMETHEUS_REMOTE_WRITE_ENDPOINT",
      "service": "Tempo",
      "description": "Where span metrics and service graphs are remote-written.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "grafana-alloy-lgtm"
      }
    },
    "cli": "railway deploy --template grafana-alloy-lgtm",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "f385e725-954d-4b24-a3e4-85c38b337599",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "17ee99ae-6931-4e06-8ee0-2e4b3fbb5632": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/prometheus.svg",
                  "name": "Prometheus",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/metrics",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/jratienza65/otel-lgtm-railway",
                    "rootDirectory": "/prometheus"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "HTTP port Prometheus listens on.",
                      "defaultValue": "9090"
                    },
                    "VERSION": {
                      "isOptional": false,
                      "description": "Prometheus image tag, passed as a build arg.",
                      "defaultValue": "v3.8.0"
                    },
                    "RAILWAY_RUN_UID": {
                      "isOptional": false,
                      "description": "Run as root so Prometheus can write to the mounted volume.",
                      "defaultValue": "0"
                    }
                  },
                  "volumeMounts": {
                    "17ee99ae-6931-4e06-8ee0-2e4b3fbb5632": {
                      "mountPath": "/data"
                    }
                  }
                },
                "86241afe-787f-40c6-987b-fc8ed5f2a38e": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/loki.svg",
                  "name": "Loki",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/ready",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/jratienza65/otel-lgtm-railway",
                    "rootDirectory": "/loki"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "HTTP port Loki listens on.",
                      "defaultValue": "3100"
                    },
                    "VERSION": {
                      "isOptional": false,
                      "description": "Loki image tag, passed as a build arg.",
                      "defaultValue": "3.6.2"
                    },
                    "RAILWAY_RUN_UID": {
                      "isOptional": false,
                      "description": "Run as root so Loki can write to the mounted volume.",
                      "defaultValue": "0"
                    },
                    "RAILWAY_PROMETHEUS_ALERTMANAGER_ENDPOINT": {
                      "description": "Alertmanager for the ruler. *Optional; leave unset if you do not alert on logs.*",
                      "defaultValue": "http://${{Prometheus.RAILWAY_PRIVATE_DOMAIN}}:8888"
                    }
                  },
                  "volumeMounts": {
                    "86241afe-787f-40c6-987b-fc8ed5f2a38e": {
                      "mountPath": "/data"
                    }
                  }
                },
                "a08e227f-6bfc-4b9e-833d-b6abb50eb9e8": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/alloy.svg",
                  "name": "Alloy",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/ready",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/jratienza65/otel-lgtm-railway",
                    "rootDirectory": "/alloy/gateway"
                  },
                  "variables": {
                    "PORT": {
                      "description": "Alloy's healthcheck port.",
                      "defaultValue": "12345"
                    },
                    "VERSION": {
                      "isOptional": false,
                      "description": "Alloy image tag, passed as a build arg.",
                      "defaultValue": "v1.18.1"
                    },
                    "FARO_API_KEY": {
                      "isOptional": false,
                      "description": "Key browsers send as `x-api-key`. Filters noise; the rate limit, payload cap and CORS list are the real controls.",
                      "defaultValue": "{{FARO_API_KEY}}"
                    },
                    "OTEL_INGEST_PASSWORD": {
                      "description": "Password for that receiver. Producers send `Authorization: Basic <base64 user:password>`.",
                      "defaultValue": "{{OTEL_INGEST_PASSWORD}}"
                    },
                    "OTEL_INGEST_USERNAME": {
                      "description": "Username for the OTLP receiver on 4318. **Required** — the service will not start without it.",
                      "defaultValue": "railway"
                    },
                    "RAILWAY_LOKI_ENDPOINT": {
                      "isOptional": false,
                      "description": "Where logs are written. Loki's OTLP path, not its base URL.",
                      "defaultValue": "http://${{Loki.RAILWAY_PRIVATE_DOMAIN}}:3100/otlp"
                    },
                    "RAILWAY_TEMPO_ENDPOINT": {
                      "isOptional": false,
                      "description": "Where traces are written. Tempo's OTLP port.",
                      "defaultValue": "http://${{Tempo.RAILWAY_PRIVATE_DOMAIN}}:4318"
                    },
                    "FARO_CORS_ALLOWED_ORIGINS": {
                      "isOptional": false,
                      "description": "Comma-separated frontend origins. Replaces the localhost fallback, so production does not keep localhost allowed.",
                      "defaultValue": "localhost"
                    },
                    "FARO_ALLOW_UNAUTHENTICATED": {
                      "description": "Set `true` instead to run an open endpoint. One of these two is required.",
                      "defaultValue": "false"
                    },
                    "RAILWAY_PROMETHEUS_ENDPOINT": {
                      "isOptional": false,
                      "description": "Where metrics are written. Prometheus's OTLP path.",
                      "defaultValue": "http://${{Prometheus.RAILWAY_PRIVATE_DOMAIN}}:9090/api/v1/otlp"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:4318": {
                        "port": 4318
                      },
                      "<hasDomain>:12347": {
                        "port": 12347
                      }
                    }
                  }
                },
                "b22aacad-bbec-478f-8143-9b43fce3e9f2": {
                  "icon": "https://devicons.railway.app/grafana",
                  "name": "Grafana",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/api/health",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/jratienza65/otel-lgtm-railway",
                    "rootDirectory": "/grafana"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "HTTP port Grafana listens on.",
                      "defaultValue": "3000"
                    },
                    "VERSION": {
                      "isOptional": false,
                      "description": "Grafana image tag, passed as a build arg.",
                      "defaultValue": "12.3.1"
                    },
                    "GF_PATHS_DATA": {
                      "isOptional": false,
                      "description": "Grafana's data directory. Must match the volume mount path.",
                      "defaultValue": "/data/grafana"
                    },
                    "RAILWAY_RUN_UID": {
                      "isOptional": false,
                      "description": "Run as root so Grafana can write to the mounted volume.",
                      "defaultValue": "0"
                    },
                    "GF_PLUGINS_PREINSTALL": {
                      "isOptional": false,
                      "description": "Plugins installed at startup, comma-separated.",
                      "defaultValue": "grafana-simple-json-datasource,grafana-piechart-panel,grafana-geomap-panel,grafana-clock-panel"
                    },
                    "RAILWAY_LOKI_ENDPOINT": {
                      "isOptional": false,
                      "description": "Loki datasource URL. Base URL — **not** the `/otlp` path the collector uses.",
                      "defaultValue": "http://${{Loki.RAILWAY_PRIVATE_DOMAIN}}:3100"
                    },
                    "GF_SECURITY_ADMIN_USER": {
                      "isOptional": false,
                      "description": "Username for the initial admin login.",
                      "defaultValue": "admin"
                    },
                    "RAILWAY_TEMPO_ENDPOINT": {
                      "isOptional": false,
                      "description": "Tempo datasource URL. Its HTTP port, **not** the 4318 OTLP port.",
                      "defaultValue": "http://${{Tempo.RAILWAY_PRIVATE_DOMAIN}}:3200"
                    },
                    "GF_DEFAULT_INSTANCE_NAME": {
                      "isOptional": false,
                      "description": "Grafana's default instance name.",
                      "defaultValue": "Alloy LGTM!"
                    },
                    "GF_SECURITY_ADMIN_PASSWORD": {
                      "isOptional": false,
                      "description": "Password for the initial admin login. **Mark as secret.**",
                      "defaultValue": "{{GF_SECURITY_ADMIN_PASSWORD}}"
                    },
                    "RAILWAY_PROMETHEUS_ENDPOINT": {
                      "isOptional": false,
                      "description": "Prometheus datasource URL. Base URL — **not** the `/api/v1/otlp` path.",
                      "defaultValue": "http://${{Prometheus.RAILWAY_PRIVATE_DOMAIN}}:9090"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:3000": {
                        "port": 3000
                      }
                    }
                  },
                  "volumeMounts": {
                    "b22aacad-bbec-478f-8143-9b43fce3e9f2": {
                      "mountPath": "/data/grafana"
                    }
                  }
                },
                "e993c617-3f1e-4e25-bd29-712ce5a719c0": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/tempo.svg",
                  "name": "Tempo",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/ready",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/jratienza65/otel-lgtm-railway",
                    "rootDirectory": "/tempo"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "HTTP port Tempo listens on.",
                      "defaultValue": "3200"
                    },
                    "VERSION": {
                      "isOptional": false,
                      "description": "Tempo image tag, passed as a build arg.",
                      "defaultValue": "2.9.0"
                    },
                    "RAILWAY_RUN_UID": {
                      "isOptional": false,
                      "description": "Run as root so Tempo can write to the mounted volume.",
                      "defaultValue": "0"
                    },
                    "RAILWAY_PROMETHEUS_REMOTE_WRITE_ENDPOINT": {
                      "isOptional": false,
                      "description": "Where span metrics and service graphs are remote-written.",
                      "defaultValue": "http://${{Prometheus.RAILWAY_PRIVATE_DOMAIN}}:9090/api/v1/write"
                    }
                  },
                  "volumeMounts": {
                    "e993c617-3f1e-4e25-bd29-712ce5a719c0": {
                      "mountPath": "/data"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "Alloy",
      "method": "GET",
      "path": "/ready",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 5,
    "needs_volume": true
  },
  "generated_at": "2026-09-09T00:02:40.379Z",
  "generator_version": "0.1.0",
  "status": "degraded",
  "validated_at": "2026-09-08T22:10:17.924Z",
  "success_rate_30d": 0,
  "validation": {
    "last_run_id": "run_68e85530025a421fa09a",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "healthcheck",
        "passed": false,
        "detail": "got 401, expected 200"
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ]
  }
}
