{
  "manifest_version": "1.0.0",
  "template": {
    "id": "4ab76608-b53c-4626-8028-5a8e13953ad5",
    "slug": "fossbilling",
    "name": "FOSSBilling",
    "description": "Host Fossbilling on Railway!",
    "url": "https://railway.com/deploy/fossbilling"
  },
  "services": [
    {
      "name": "FOSSBilling",
      "source": {
        "image": "ghcr.io/blacksoulgem95/fossbilling-railway:latest"
      },
      "needs_volume": true,
      "volume_mount_path": "/app",
      "http": false
    },
    {
      "name": "MySQL",
      "source": {
        "image": "mysql:9.6"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/mysql",
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "FOSSBilling",
      "description": "Nginx Listen Port",
      "secret": false,
      "strategy": "default",
      "default": "8000"
    },
    {
      "key": "MYSQLHOST",
      "service": "MySQL",
      "description": "MySQL Host",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "MYSQLPORT",
      "service": "MySQL",
      "description": "MySQL Port",
      "secret": false,
      "strategy": "default",
      "default": "3306"
    },
    {
      "key": "MYSQLUSER",
      "service": "MySQL",
      "description": "MySQL User",
      "secret": false,
      "strategy": "default",
      "default": "root"
    },
    {
      "key": "MYSQL_URL",
      "service": "MySQL",
      "description": "MySQL URL",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "MYSQLDATABASE",
      "service": "MySQL",
      "description": "MySQL Database Name",
      "secret": false,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "MYSQLPASSWORD",
      "service": "MySQL",
      "description": "MySQL Password",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "MYSQL_DATABASE",
      "service": "MySQL",
      "description": "MySQL Database Name (Reference)",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "MYSQL_PUBLIC_URL",
      "service": "MySQL",
      "description": "MySQL Public URL",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "MYSQL_ROOT_PASSWORD",
      "service": "MySQL",
      "description": "MySQL ROOT Password",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "fossbilling"
      }
    },
    "cli": "railway deploy --template fossbilling",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "4ab76608-b53c-4626-8028-5a8e13953ad5",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "51845ee4-a572-45b6-bf6a-cd545ea229fb": {
                  "icon": "https://raw.githubusercontent.com/FOSSBilling/FOSSBilling/refs/heads/main/src/themes/admin_default/favicon.ico",
                  "name": "FOSSBilling",
                  "source": {
                    "image": "ghcr.io/blacksoulgem95/fossbilling-railway:latest",
                    "autoUpdates": {
                      "type": "patch",
                      "schedule": [
                        {
                          "day": 0,
                          "endHour": 6,
                          "startHour": 2
                        },
                        {
                          "day": 1,
                          "endHour": 6,
                          "startHour": 2
                        },
                        {
                          "day": 2,
                          "endHour": 6,
                          "startHour": 2
                        },
                        {
                          "day": 3,
                          "endHour": 6,
                          "startHour": 2
                        },
                        {
                          "day": 4,
                          "endHour": 6,
                          "startHour": 2
                        },
                        {
                          "day": 5,
                          "endHour": 6,
                          "startHour": 2
                        },
                        {
                          "day": 6,
                          "endHour": 6,
                          "startHour": 2
                        }
                      ]
                    }
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Nginx Listen Port",
                      "defaultValue": "8000"
                    }
                  },
                  "volumeMounts": {
                    "51845ee4-a572-45b6-bf6a-cd545ea229fb": {
                      "mountPath": "/app"
                    }
                  }
                },
                "6891d98d-8354-4be1-ae61-f182277212c6": {
                  "icon": "https://devicons.railway.app/i/mysql.svg",
                  "name": "MySQL",
                  "deploy": {
                    "startCommand": "docker-entrypoint.sh mysqld --innodb-use-native-aio=0 --disable-log-bin --performance_schema=0 --innodb-buffer-pool-size=1G",
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "mysql:9.6",
                    "autoUpdates": {
                      "type": "patch",
                      "schedule": [
                        {
                          "day": 0,
                          "endHour": 24,
                          "startHour": 0
                        },
                        {
                          "day": 6,
                          "endHour": 24,
                          "startHour": 0
                        }
                      ]
                    }
                  },
                  "variables": {
                    "MYSQLHOST": {
                      "isOptional": false,
                      "description": "MySQL Host",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "MYSQLPORT": {
                      "isOptional": false,
                      "description": "MySQL Port",
                      "defaultValue": "3306"
                    },
                    "MYSQLUSER": {
                      "isOptional": false,
                      "description": "MySQL User",
                      "defaultValue": "root"
                    },
                    "MYSQL_URL": {
                      "isOptional": false,
                      "description": "MySQL URL",
                      "defaultValue": "mysql://${{MYSQLUSER}}:${{MYSQL_ROOT_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:3306/${{MYSQL_DATABASE}}"
                    },
                    "MYSQLDATABASE": {
                      "isOptional": false,
                      "description": "MySQL Database Name",
                      "defaultValue": "{{MYSQLDATABASE}}"
                    },
                    "MYSQLPASSWORD": {
                      "isOptional": false,
                      "description": "MySQL Password",
                      "defaultValue": "${{MYSQL_ROOT_PASSWORD}}"
                    },
                    "MYSQL_DATABASE": {
                      "isOptional": false,
                      "description": "MySQL Database Name (Reference)",
                      "defaultValue": "${{MySQL.MYSQLDATABASE}}"
                    },
                    "MYSQL_PUBLIC_URL": {
                      "isOptional": false,
                      "description": "MySQL Public URL",
                      "defaultValue": "mysql://${{MYSQLUSER}}:${{MYSQL_ROOT_PASSWORD}}@${{RAILWAY_TCP_PROXY_DOMAIN}}:${{RAILWAY_TCP_PROXY_PORT}}/${{MYSQL_DATABASE}}"
                    },
                    "MYSQL_ROOT_PASSWORD": {
                      "isOptional": false,
                      "description": "MySQL ROOT Password",
                      "defaultValue": "{{MYSQL_ROOT_PASSWORD}}"
                    }
                  },
                  "volumeMounts": {
                    "6891d98d-8354-4be1-ae61-f182277212c6": {
                      "mountPath": "/var/lib/mysql"
                    }
                  },
                  "haTemplateCode": "mysql-ha",
                  "haConversionConfig": {
                    "edge": {
                      "label": "Reverse Proxies",
                      "options": [
                        1,
                        2
                      ],
                      "nodeLabel": "HAProxy",
                      "description": "HAProxy instances routing writes to the primary",
                      "defaultValue": 2
                    },
                    "replica": {
                      "label": "MySQL Replicas",
                      "options": [
                        2,
                        4,
                        6,
                        8
                      ],
                      "nodeLabel": "MySQL",
                      "description": "Requires odd count for quorum",
                      "defaultValue": 2
                    },
                    "internal": null,
                    "description": "This will convert your MySQL instance to an HA cluster with Group Replication failover and HAProxy routing to the primary.",
                    "supportedImageMajorVersions": [
                      8,
                      9
                    ]
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 2,
    "needs_volume": true
  },
  "generated_at": "2026-09-20T22:14:37.505Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-20T15:17:58.988Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_fb18627c7a13420280f1",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 45,
    "typical_build_seconds": 0,
    "typical_start_seconds": 10,
    "slowest_service": "FOSSBilling"
  }
}
