{
  "manifest_version": "1.0.0",
  "template": {
    "id": "5d169cef-ae9b-4471-ae7f-c68de6d22d19",
    "slug": "lago-1",
    "name": "Lago [Updated Sep '26]",
    "description": "Lago [Sep '26] (Open-Source Usage-Based Billing & Metering) Self Host",
    "url": "https://railway.com/deploy/lago-1",
    "upstream": {
      "repo_url": "https://github.com/shruti060701/lago-railway"
    }
  },
  "services": [
    {
      "name": "Redis",
      "source": {
        "image": "redis:8.2.1"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "http": false
    },
    {
      "name": "tender-friendship",
      "source": {
        "repo": "https://github.com/shruti060701/lago-railway"
      },
      "needs_volume": false,
      "http": true
    },
    {
      "name": "peaceful-determination",
      "source": {
        "repo": "https://github.com/shruti060701/lago-railway"
      },
      "needs_volume": true,
      "volume_mount_path": "/data/postgres",
      "http": false
    },
    {
      "name": "lago-railway",
      "source": {
        "repo": "https://github.com/shruti060701/lago-railway"
      },
      "needs_volume": false,
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "REDISHOST",
      "service": "Redis",
      "description": "Alias, resolves to `redis.railway.internal`.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "REDISPORT",
      "service": "Redis",
      "description": "Standard Redis port.",
      "secret": false,
      "strategy": "default",
      "default": "6379"
    },
    {
      "key": "REDISUSER",
      "service": "Redis",
      "description": "Default Redis ACL user.",
      "secret": false,
      "strategy": "default",
      "default": "default"
    },
    {
      "key": "REDIS_URL",
      "service": "Redis",
      "description": "Full connection string, this is what `lago-railway` and `worker` reference via `${{Redis.REDIS_URL}}`.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDISPASSWORD",
      "service": "Redis",
      "description": " Alias of `REDIS_PASSWORD`.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDIS_PASSWORD",
      "service": "Redis",
      "description": "Password portion of the connection string.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "REDIS_PUBLIC_URL",
      "service": "Redis",
      "description": "Public (external) connection string, not used by this template since api/worker connect over the private network.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "API_URL",
      "service": "tender-friendship",
      "description": "Tells the frontend where the API lives.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "APP_ENV",
      "service": "tender-friendship",
      "description": "Standard environment setting.",
      "secret": false,
      "strategy": "default",
      "default": "production"
    },
    {
      "key": "LAGO_OAUTH_PROXY_URL",
      "service": "tender-friendship",
      "description": "Lago's own hosted OAuth proxy, used for optional Google SSO login. Hardcoded in Lago's own compose.",
      "secret": false,
      "strategy": "default",
      "default": "https://proxy.getlago.com"
    },
    {
      "key": "PGDATA",
      "service": "peaceful-determination",
      "description": "Must be a subdirectory of the volume mount, not the mount point itself (see Known Findings).",
      "secret": false,
      "strategy": "default",
      "default": "/data/postgres/pgdata"
    },
    {
      "key": "PGPORT",
      "service": "peaceful-determination",
      "description": "Standard Postgres port.",
      "secret": false,
      "strategy": "default",
      "default": "5432"
    },
    {
      "key": "POSTGRES_DB",
      "service": "peaceful-determination",
      "description": "Database name the api/worker services connect to.",
      "secret": false,
      "strategy": "default",
      "default": "lago"
    },
    {
      "key": "POSTGRES_USER",
      "service": "peaceful-determination",
      "description": "Database user.",
      "secret": false,
      "strategy": "default",
      "default": "lago"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "peaceful-determination",
      "description": "**Do not use `${{secret()}}` here** (see Known Findings). Must match the password embedded in `DATABASE_URL` on both `lago-railway` and `worker` exactly.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "RAILS_ENV",
      "service": "lago-railway",
      "description": "Standard Rails environment setting.",
      "secret": false,
      "strategy": "default",
      "default": "production"
    },
    {
      "key": "REDIS_URL",
      "service": "lago-railway",
      "description": "Redis connection string.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DATABASE_URL",
      "service": "lago-railway",
      "description": "Postgres connection string. Uses a literal password, not `${{secret()}}` (see Known Findings).",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "LAGO_API_URL",
      "service": "lago-railway",
      "description": "Public URL of the API. **Generate the API's domain BEFORE setting this** ([[reference_railway_generate_domain_before_public_domain_vars]]).",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "LAGO_FRONT_URL",
      "service": "lago-railway",
      "description": "Public URL of the frontend. Same domain-first ordering rule applies.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "SECRET_KEY_BASE",
      "service": "lago-railway",
      "description": "Rails secret key, required for the app to boot at all.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "RAILS_LOG_TO_STDOUT",
      "service": "lago-railway",
      "description": "Ensures logs are visible via `railway logs`.",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "LAGO_DISABLE_SEGMENT",
      "service": "lago-railway",
      "description": "Opts out of Lago's own anonymous usage analytics.",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "LAGO_RSA_PRIVATE_KEY",
      "service": "lago-railway",
      "description": "Signs outgoing webhooks. Must be a real generated key, never the compose file's own placeholder.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "LAGO_ENCRYPTION_PRIMARY_KEY",
      "service": "lago-railway",
      "description": "Encrypts sensitive stored data.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "LAGO_ENCRYPTION_DETERMINISTIC_KEY",
      "service": "lago-railway",
      "description": "Encrypts sensitive stored data (deterministic mode).",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "LAGO_ENCRYPTION_KEY_DERIVATION_SALT",
      "service": "lago-railway",
      "description": "Salt for the encryption key derivation.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "lago-1"
      }
    },
    "cli": "railway deploy --template lago-1",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "5d169cef-ae9b-4471-ae7f-c68de6d22d19",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "3d98b837-ba6e-4251-a3a0-95a1bd6e32ea": {
                  "icon": "https://cdn.sanity.io/images/sy1jschh/production/0ce0bfdcfbdbf69662b1116671f97c2dd788b655-157x157.svg",
                  "name": "Redis",
                  "deploy": {
                    "startCommand": "/bin/sh -c \"rm -rf $RAILWAY_VOLUME_MOUNT_PATH/lost+found/ && exec docker-entrypoint.sh redis-server --requirepass $REDIS_PASSWORD --save 60 1 --dir $RAILWAY_VOLUME_MOUNT_PATH\"",
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "redis:8.2.1"
                  },
                  "variables": {
                    "REDISHOST": {
                      "isOptional": true,
                      "description": "Alias, resolves to `redis.railway.internal`.",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "REDISPORT": {
                      "isOptional": true,
                      "description": "Standard Redis port.",
                      "defaultValue": "6379"
                    },
                    "REDISUSER": {
                      "isOptional": true,
                      "description": "Default Redis ACL user.",
                      "defaultValue": "default"
                    },
                    "REDIS_URL": {
                      "isOptional": false,
                      "description": "Full connection string, this is what `lago-railway` and `worker` reference via `${{Redis.REDIS_URL}}`.",
                      "defaultValue": "redis://${{REDISUSER}}:${{REDIS_PASSWORD}}@${{REDISHOST}}:${{REDISPORT}}"
                    },
                    "REDISPASSWORD": {
                      "isOptional": true,
                      "description": " Alias of `REDIS_PASSWORD`.",
                      "defaultValue": "${{REDIS_PASSWORD}}"
                    },
                    "REDIS_PASSWORD": {
                      "isOptional": true,
                      "description": "Password portion of the connection string.",
                      "defaultValue": "{{REDIS_PASSWORD}}"
                    },
                    "REDIS_PUBLIC_URL": {
                      "isOptional": true,
                      "description": "Public (external) connection string, not used by this template since api/worker connect over the private network.",
                      "defaultValue": "redis://default:${{REDIS_PASSWORD}}@${{RAILWAY_TCP_PROXY_DOMAIN}}:${{RAILWAY_TCP_PROXY_PORT}}"
                    }
                  },
                  "volumeMounts": {
                    "3d98b837-ba6e-4251-a3a0-95a1bd6e32ea": {
                      "mountPath": "/data"
                    }
                  },
                  "haTemplateCode": "redis-ha",
                  "haConversionConfig": {
                    "edge": {
                      "label": "Reverse Proxies",
                      "options": [
                        1,
                        2
                      ],
                      "nodeLabel": "HAProxy",
                      "description": "HAProxy instances routing writes to the primary",
                      "defaultValue": 2
                    },
                    "replica": {
                      "label": "Redis Replicas",
                      "options": [
                        2,
                        3,
                        4,
                        5
                      ],
                      "nodeLabel": "Redis",
                      "description": "Nodes running Redis + colocated Sentinel",
                      "defaultValue": 2
                    },
                    "internal": null,
                    "description": "This will convert your Redis instance to an HA cluster with Sentinel failover and HAProxy routing to the primary."
                  }
                },
                "5b1b2662-c667-4c9a-bab8-466348ef57c5": {
                  "icon": "https://elest.io/images/softwares/364/logo.png",
                  "name": "tender-friendship",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/shruti060701/lago-railway",
                    "rootDirectory": "/front"
                  },
                  "variables": {
                    "API_URL": {
                      "isOptional": false,
                      "description": "Tells the frontend where the API lives.",
                      "defaultValue": "https://${{lago-railway.RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "APP_ENV": {
                      "isOptional": true,
                      "description": "Standard environment setting.",
                      "defaultValue": "production"
                    },
                    "LAGO_OAUTH_PROXY_URL": {
                      "isOptional": true,
                      "description": "Lago's own hosted OAuth proxy, used for optional Google SSO login. Hardcoded in Lago's own compose.",
                      "defaultValue": "https://proxy.getlago.com"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  }
                },
                "6eaa0ad0-4f23-43cb-a5b9-8df261b9c6a1": {
                  "icon": "https://devicons.railway.app/postgres",
                  "name": "peaceful-determination",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/shruti060701/lago-railway",
                    "rootDirectory": "/postgres"
                  },
                  "variables": {
                    "PGDATA": {
                      "isOptional": false,
                      "description": "Must be a subdirectory of the volume mount, not the mount point itself (see Known Findings).",
                      "defaultValue": "/data/postgres/pgdata"
                    },
                    "PGPORT": {
                      "isOptional": true,
                      "description": "Standard Postgres port.",
                      "defaultValue": "5432"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Database name the api/worker services connect to.",
                      "defaultValue": "lago"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "Database user.",
                      "defaultValue": "lago"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "**Do not use `${{secret()}}` here** (see Known Findings). Must match the password embedded in `DATABASE_URL` on both `lago-railway` and `worker` exactly.",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    }
                  },
                  "volumeMounts": {
                    "6eaa0ad0-4f23-43cb-a5b9-8df261b9c6a1": {
                      "mountPath": "/data/postgres"
                    }
                  }
                },
                "b45f0acf-a4d8-40fb-8051-998bb2a73a59": {
                  "icon": "https://elest.io/images/softwares/364/logo.png",
                  "name": "lago-railway",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/health",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/shruti060701/lago-railway",
                    "rootDirectory": "/api"
                  },
                  "variables": {
                    "RAILS_ENV": {
                      "isOptional": true,
                      "description": "Standard Rails environment setting.",
                      "defaultValue": "production"
                    },
                    "REDIS_URL": {
                      "isOptional": false,
                      "description": "Redis connection string.",
                      "defaultValue": "${{Redis.REDIS_URL}}"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "Postgres connection string. Uses a literal password, not `${{secret()}}` (see Known Findings).",
                      "defaultValue": "postgresql://lago:1be247682a2ca74d8ff64f8128d4b4446598b82568acb012@${{peaceful-determination.RAILWAY_PRIVATE_DOMAIN}}:5432/lago?search_path=public"
                    },
                    "LAGO_API_URL": {
                      "isOptional": false,
                      "description": "Public URL of the API. **Generate the API's domain BEFORE setting this** ([[reference_railway_generate_domain_before_public_domain_vars]]).",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "LAGO_FRONT_URL": {
                      "isOptional": false,
                      "description": "Public URL of the frontend. Same domain-first ordering rule applies.",
                      "defaultValue": "https://${{tender-friendship.RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "SECRET_KEY_BASE": {
                      "isOptional": false,
                      "description": "Rails secret key, required for the app to boot at all.",
                      "defaultValue": "{{SECRET_KEY_BASE}}"
                    },
                    "RAILS_LOG_TO_STDOUT": {
                      "isOptional": true,
                      "description": "Ensures logs are visible via `railway logs`.",
                      "defaultValue": "true"
                    },
                    "LAGO_DISABLE_SEGMENT": {
                      "isOptional": true,
                      "description": "Opts out of Lago's own anonymous usage analytics.",
                      "defaultValue": "true"
                    },
                    "LAGO_RSA_PRIVATE_KEY": {
                      "isOptional": false,
                      "description": "Signs outgoing webhooks. Must be a real generated key, never the compose file's own placeholder.",
                      "defaultValue": "{{LAGO_RSA_PRIVATE_KEY}}"
                    },
                    "LAGO_ENCRYPTION_PRIMARY_KEY": {
                      "isOptional": false,
                      "description": "Encrypts sensitive stored data.",
                      "defaultValue": "{{LAGO_ENCRYPTION_PRIMARY_KEY}}"
                    },
                    "LAGO_ENCRYPTION_DETERMINISTIC_KEY": {
                      "isOptional": false,
                      "description": "Encrypts sensitive stored data (deterministic mode).",
                      "defaultValue": "{{LAGO_ENCRYPTION_DETERMINISTIC_KEY}}"
                    },
                    "LAGO_ENCRYPTION_KEY_DERIVATION_SALT": {
                      "isOptional": false,
                      "description": "Salt for the encryption key derivation.",
                      "defaultValue": "{{LAGO_ENCRYPTION_KEY_DERIVATION_SALT}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "tender-friendship",
      "method": "GET",
      "path": "/",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 4,
    "needs_volume": true
  },
  "generated_at": "2026-09-22T22:14:50.114Z",
  "generator_version": "0.1.0",
  "status": "degraded",
  "validated_at": "2026-09-22T05:58:50.860Z",
  "success_rate_30d": 0,
  "validation": {
    "last_run_id": "run_27b0a23ddd1546c89f64",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": false,
        "detail": "FAILED,SUCCESS,SUCCESS,SUCCESS"
      }
    ]
  }
}
