{
  "manifest_version": "1.0.0",
  "template": {
    "id": "c1f17372-41e2-40a4-846d-05de9d899b9b",
    "slug": "lago-production",
    "name": "Lago Production | Open-Source Usage-Based Billing, Stripe Billing Alternative",
    "description": "Usage-based billing with the worker, clock and PDF invoices that bill",
    "url": "https://railway.com/deploy/lago-production",
    "upstream": {
      "repo_url": "https://github.com/nomideusz/lago-railway"
    }
  },
  "status": "unvalidated",
  "validated_at": null,
  "success_rate_30d": null,
  "services": [
    {
      "name": "PDF",
      "source": {
        "image": "getlago/lago-gotenberg:7.8.2"
      },
      "needs_volume": false,
      "http": false
    },
    {
      "name": "Redis",
      "source": {
        "image": "redis:8.10.2-alpine"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "http": false
    },
    {
      "name": "API",
      "source": {
        "repo": "https://github.com/nomideusz/lago-railway"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "http": true
    },
    {
      "name": "Lago",
      "source": {
        "image": "getlago/front:v1.54.0"
      },
      "needs_volume": false,
      "http": true
    },
    {
      "name": "Postgres",
      "source": {
        "repo": "https://github.com/nomideusz/lago-railway"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "PDF",
      "description": "Port Gotenberg listens on - leave as is",
      "secret": false,
      "strategy": "default",
      "default": "3000"
    },
    {
      "key": "REDIS_PASSWORD",
      "service": "Redis",
      "description": "Auto-generated Redis password",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "PORT",
      "service": "API",
      "description": "Port the Rails API listens on - leave as is",
      "secret": false,
      "strategy": "default",
      "default": "3000"
    },
    {
      "key": "RAILS_ENV",
      "service": "API",
      "description": "Rails environment",
      "secret": false,
      "strategy": "default",
      "default": "production"
    },
    {
      "key": "REDIS_URL",
      "service": "API",
      "description": "Redis on the private network - Sidekiq queues and live updates",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "DATABASE_URL",
      "service": "API",
      "description": "Postgres on the private network",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "LAGO_API_URL",
      "service": "API",
      "description": "Public URL of this API - used in invoice links and webhooks",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "LAGO_PDF_URL",
      "service": "API",
      "description": "Invoice PDF renderer on the private network",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "LAGO_ORG_NAME",
      "service": "API",
      "description": "Your company name - printed as the sender on invoices",
      "secret": false,
      "strategy": "ask_user"
    },
    {
      "key": "LAGO_FRONT_URL",
      "service": "API",
      "description": "Public URL of the dashboard - the only origin allowed to call the API from a browser",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "LAGO_SMTP_PORT",
      "service": "API",
      "description": "SMTP port",
      "secret": false,
      "strategy": "default",
      "default": "587"
    },
    {
      "key": "REDIS_PASSWORD",
      "service": "API",
      "description": "Redis password",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "LAGO_CREATE_ORG",
      "service": "API",
      "description": "Create the organization and admin account below on first boot",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "SECRET_KEY_BASE",
      "service": "API",
      "description": "Auto-generated Rails secret",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "LAGO_SIDEKIQ_WEB",
      "service": "API",
      "description": "Sidekiq's job dashboard has no login of its own, so it stays off",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "LAGO_DISABLE_SIGNUP",
      "service": "API",
      "description": "Public sign-up stays closed; invite teammates from Settings > Members",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "LAGO_ORG_USER_EMAIL",
      "service": "API",
      "description": "Admin login email",
      "secret": false,
      "strategy": "ask_user"
    },
    {
      "key": "RAILS_LOG_TO_STDOUT",
      "service": "API",
      "description": "Send logs to Railway's log view",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "LAGO_DISABLE_SEGMENT",
      "service": "API",
      "description": "No usage telemetry to Lago",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "LAGO_OAUTH_PROXY_URL",
      "service": "API",
      "description": "Lago's OAuth proxy for payment provider connections",
      "secret": false,
      "strategy": "default",
      "default": "https://proxy.getlago.com"
    },
    {
      "key": "LAGO_ORG_USER_PASSWORD",
      "service": "API",
      "description": "Auto-generated admin password - copy it from this service's Variables tab",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "LAGO_ENCRYPTION_PRIMARY_KEY",
      "service": "API",
      "description": "Auto-generated key encrypting integration credentials at rest",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "RAILWAY_HEALTHCHECK_TIMEOUT_SEC",
      "service": "API",
      "description": "First boot loads the database schema before /health answers",
      "secret": false,
      "strategy": "default",
      "default": "600"
    },
    {
      "key": "LAGO_ENCRYPTION_DETERMINISTIC_KEY",
      "service": "API",
      "description": "Auto-generated deterministic encryption key",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "LAGO_ENCRYPTION_KEY_DERIVATION_SALT",
      "service": "API",
      "description": "Auto-generated key derivation salt",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "API",
      "description": "Lets Sidekiq finish or requeue running jobs on redeploy",
      "secret": false,
      "strategy": "default",
      "default": "30"
    },
    {
      "key": "PORT",
      "service": "Lago",
      "description": "Port nginx listens on - leave as is",
      "secret": false,
      "strategy": "default",
      "default": "80"
    },
    {
      "key": "API_URL",
      "service": "Lago",
      "description": "Public URL of the Lago API",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "APP_ENV",
      "service": "Lago",
      "description": "Frontend environment",
      "secret": false,
      "strategy": "default",
      "default": "production"
    },
    {
      "key": "LAGO_DISABLE_SIGNUP",
      "service": "Lago",
      "description": "Hides the sign-up page when the API has it closed",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "LAGO_OAUTH_PROXY_URL",
      "service": "Lago",
      "description": "Lago's OAuth proxy for payment provider connections",
      "secret": false,
      "strategy": "default",
      "default": "https://proxy.getlago.com"
    },
    {
      "key": "PGDATA",
      "service": "Postgres",
      "description": "Data subdirectory - keeps Postgres happy on Railway volumes",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "POSTGRES_DB",
      "service": "Postgres",
      "description": "Database name",
      "secret": false,
      "strategy": "default",
      "default": "lago"
    },
    {
      "key": "POSTGRES_USER",
      "service": "Postgres",
      "description": "Database user",
      "secret": false,
      "strategy": "default",
      "default": "lago"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "Postgres",
      "description": "Auto-generated database password",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "Postgres",
      "description": "Time for Postgres to shut down cleanly on redeploy",
      "secret": false,
      "strategy": "default",
      "default": "30"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "lago-production"
      }
    },
    "cli": "railway deploy --template lago-production",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "c1f17372-41e2-40a4-846d-05de9d899b9b",
            "serializedConfig": {
              "services": {
                "44c6206d-273f-48e2-ac63-850a11584b0b": {
                  "icon": "https://cdn.jsdelivr.net/gh/nomideusz/lago-railway/icon.svg",
                  "name": "PDF",
                  "build": {},
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/health",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "getlago/lago-gotenberg:7.8.2"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Port Gotenberg listens on - leave as is",
                      "defaultValue": "3000"
                    }
                  },
                  "networking": {
                    "serviceDomains": {}
                  }
                },
                "55a2177b-2254-4eb9-b5ed-2db2563abfd2": {
                  "icon": "https://devicons.railway.app/i/redis.svg",
                  "name": "Redis",
                  "build": {},
                  "deploy": {
                    "startCommand": "/bin/sh -c \"rm -rf /data/lost+found && exec docker-entrypoint.sh redis-server --requirepass $REDIS_PASSWORD --maxmemory-policy noeviction --appendonly yes --dir /data\"",
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "redis:8.10.2-alpine"
                  },
                  "variables": {
                    "REDIS_PASSWORD": {
                      "isOptional": false,
                      "description": "Auto-generated Redis password",
                      "defaultValue": "{{REDIS_PASSWORD}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {}
                  },
                  "volumeMounts": {
                    "b5eae196-26ba-4257-a2a2-910806363d26": {
                      "mountPath": "/data"
                    }
                  }
                },
                "a88189b0-8834-426e-b711-1cbd8a04a387": {
                  "icon": "https://cdn.jsdelivr.net/gh/nomideusz/lago-railway/icon.svg",
                  "name": "API",
                  "build": {},
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/health",
                    "restartPolicyType": "ALWAYS",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/nomideusz/lago-railway",
                    "rootDirectory": "/api"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Port the Rails API listens on - leave as is",
                      "defaultValue": "3000"
                    },
                    "RAILS_ENV": {
                      "isOptional": false,
                      "description": "Rails environment",
                      "defaultValue": "production"
                    },
                    "REDIS_URL": {
                      "isOptional": false,
                      "description": "Redis on the private network - Sidekiq queues and live updates",
                      "defaultValue": "redis://default:${{Redis.REDIS_PASSWORD}}@${{Redis.RAILWAY_PRIVATE_DOMAIN}}:6379"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "Postgres on the private network",
                      "defaultValue": "postgresql://${{Postgres.POSTGRES_USER}}:${{Postgres.POSTGRES_PASSWORD}}@${{Postgres.RAILWAY_PRIVATE_DOMAIN}}:5432/${{Postgres.POSTGRES_DB}}"
                    },
                    "LAGO_API_URL": {
                      "isOptional": false,
                      "description": "Public URL of this API - used in invoice links and webhooks",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "LAGO_PDF_URL": {
                      "isOptional": false,
                      "description": "Invoice PDF renderer on the private network",
                      "defaultValue": "http://${{PDF.RAILWAY_PRIVATE_DOMAIN}}:3000"
                    },
                    "LAGO_ORG_NAME": {
                      "isOptional": false,
                      "description": "Your company name - printed as the sender on invoices",
                      "defaultValue": "{{LAGO_ORG_NAME}}"
                    },
                    "LAGO_FRONT_URL": {
                      "isOptional": false,
                      "description": "Public URL of the dashboard - the only origin allowed to call the API from a browser",
                      "defaultValue": "https://${{Lago.RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "LAGO_SMTP_PORT": {
                      "isOptional": true,
                      "description": "SMTP port",
                      "defaultValue": "587"
                    },
                    "REDIS_PASSWORD": {
                      "isOptional": false,
                      "description": "Redis password",
                      "defaultValue": "${{Redis.REDIS_PASSWORD}}"
                    },
                    "LAGO_CREATE_ORG": {
                      "isOptional": false,
                      "description": "Create the organization and admin account below on first boot",
                      "defaultValue": "true"
                    },
                    "LAGO_FROM_EMAIL": {
                      "isOptional": true,
                      "description": "Sender address for invoice emails",
                      "defaultValue": ""
                    },
                    "SECRET_KEY_BASE": {
                      "isOptional": false,
                      "description": "Auto-generated Rails secret",
                      "defaultValue": "{{SECRET_KEY_BASE}}"
                    },
                    "LAGO_SIDEKIQ_WEB": {
                      "isOptional": false,
                      "description": "Sidekiq's job dashboard has no login of its own, so it stays off",
                      "defaultValue": "false"
                    },
                    "LAGO_SMTP_ADDRESS": {
                      "isOptional": true,
                      "description": "SMTP host for invoice emails (Railway Pro or above; Hobby blocks outbound SMTP)",
                      "defaultValue": ""
                    },
                    "LAGO_SMTP_PASSWORD": {
                      "isOptional": true,
                      "description": "SMTP password",
                      "defaultValue": ""
                    },
                    "LAGO_SMTP_USERNAME": {
                      "isOptional": true,
                      "description": "SMTP username",
                      "defaultValue": ""
                    },
                    "LAGO_DISABLE_SIGNUP": {
                      "isOptional": false,
                      "description": "Public sign-up stays closed; invite teammates from Settings > Members",
                      "defaultValue": "true"
                    },
                    "LAGO_ORG_USER_EMAIL": {
                      "isOptional": false,
                      "description": "Admin login email",
                      "defaultValue": "{{LAGO_ORG_USER_EMAIL}}"
                    },
                    "RAILS_LOG_TO_STDOUT": {
                      "isOptional": false,
                      "description": "Send logs to Railway's log view",
                      "defaultValue": "true"
                    },
                    "LAGO_DISABLE_SEGMENT": {
                      "isOptional": false,
                      "description": "No usage telemetry to Lago",
                      "defaultValue": "true"
                    },
                    "LAGO_OAUTH_PROXY_URL": {
                      "isOptional": false,
                      "description": "Lago's OAuth proxy for payment provider connections",
                      "defaultValue": "https://proxy.getlago.com"
                    },
                    "LAGO_ORG_USER_PASSWORD": {
                      "isOptional": false,
                      "description": "Auto-generated admin password - copy it from this service's Variables tab",
                      "defaultValue": "{{LAGO_ORG_USER_PASSWORD}}"
                    },
                    "LAGO_ENCRYPTION_PRIMARY_KEY": {
                      "isOptional": false,
                      "description": "Auto-generated key encrypting integration credentials at rest",
                      "defaultValue": "{{LAGO_ENCRYPTION_PRIMARY_KEY}}"
                    },
                    "RAILWAY_HEALTHCHECK_TIMEOUT_SEC": {
                      "isOptional": false,
                      "description": "First boot loads the database schema before /health answers",
                      "defaultValue": "600"
                    },
                    "LAGO_ENCRYPTION_DETERMINISTIC_KEY": {
                      "isOptional": false,
                      "description": "Auto-generated deterministic encryption key",
                      "defaultValue": "{{LAGO_ENCRYPTION_DETERMINISTIC_KEY}}"
                    },
                    "LAGO_ENCRYPTION_KEY_DERIVATION_SALT": {
                      "isOptional": false,
                      "description": "Auto-generated key derivation salt",
                      "defaultValue": "{{LAGO_ENCRYPTION_KEY_DERIVATION_SALT}}"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Lets Sidekiq finish or requeue running jobs on redeploy",
                      "defaultValue": "30"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  },
                  "volumeMounts": {
                    "b117bf38-0393-448f-843a-1277c3bd75e1": {
                      "mountPath": "/data"
                    }
                  }
                },
                "cf6274db-4f46-403a-9ec9-66046214a79b": {
                  "icon": "https://cdn.jsdelivr.net/gh/nomideusz/lago-railway/icon.svg",
                  "name": "Lago",
                  "build": {},
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "getlago/front:v1.54.0"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Port nginx listens on - leave as is",
                      "defaultValue": "80"
                    },
                    "API_URL": {
                      "isOptional": false,
                      "description": "Public URL of the Lago API",
                      "defaultValue": "https://${{API.RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "APP_ENV": {
                      "isOptional": false,
                      "description": "Frontend environment",
                      "defaultValue": "production"
                    },
                    "LAGO_DISABLE_SIGNUP": {
                      "isOptional": false,
                      "description": "Hides the sign-up page when the API has it closed",
                      "defaultValue": "${{API.LAGO_DISABLE_SIGNUP}}"
                    },
                    "LAGO_OAUTH_PROXY_URL": {
                      "isOptional": false,
                      "description": "Lago's OAuth proxy for payment provider connections",
                      "defaultValue": "https://proxy.getlago.com"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  }
                },
                "fb06f76a-3f58-4a6b-a6e7-315cd5b0a60c": {
                  "icon": "https://devicons.railway.app/i/postgresql.svg",
                  "name": "Postgres",
                  "build": {},
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/nomideusz/lago-railway",
                    "rootDirectory": "/postgres"
                  },
                  "variables": {
                    "PGDATA": {
                      "isOptional": false,
                      "description": "Data subdirectory - keeps Postgres happy on Railway volumes",
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Database name",
                      "defaultValue": "lago"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "Database user",
                      "defaultValue": "lago"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Auto-generated database password",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Time for Postgres to shut down cleanly on redeploy",
                      "defaultValue": "30"
                    }
                  },
                  "networking": {
                    "serviceDomains": {}
                  },
                  "volumeMounts": {
                    "48909b82-2d25-40a7-b480-fe1c73f88814": {
                      "mountPath": "/var/lib/postgresql/data"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "API",
      "method": "GET",
      "path": "/health",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 5,
    "needs_volume": true
  },
  "generated_at": "2026-10-07T04:14:35.316Z",
  "generator_version": "0.1.0"
}
