{
  "manifest_version": "1.0.0",
  "template": {
    "id": "c713adbd-243f-41c0-835e-14d5f7442146",
    "slug": "flarum",
    "name": "Flarum | Open-Source Community Forum on Railway, Discourse alternative",
    "description": "Self host Flarum. Lightweight, modern PHP forum with 1600+ extensions",
    "url": "https://railway.com/deploy/flarum",
    "upstream": {
      "image": "crazymax/flarum:latest"
    }
  },
  "services": [
    {
      "name": "Flarum",
      "source": {
        "image": "crazymax/flarum:latest"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "http": true
    },
    {
      "name": "MySQL",
      "source": {
        "image": "mysql:9.4"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/mysql",
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "Flarum",
      "description": "HTTP listening port",
      "secret": false,
      "strategy": "default",
      "default": "8000"
    },
    {
      "key": "DB_HOST",
      "service": "Flarum",
      "description": "MySQL server hostname",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DB_NAME",
      "service": "Flarum",
      "description": "MySQL database name",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DB_PORT",
      "service": "Flarum",
      "description": "MySQL server port",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DB_USER",
      "service": "Flarum",
      "description": "MySQL database user",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DB_PASSWORD",
      "service": "Flarum",
      "description": "MySQL database password",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "FLARUM_DEBUG",
      "service": "Flarum",
      "description": "Enable debug mode",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "MEMORY_LIMIT",
      "service": "Flarum",
      "description": "PHP memory limit",
      "secret": false,
      "strategy": "default",
      "default": "256M"
    },
    {
      "key": "REAL_IP_FROM",
      "service": "Flarum",
      "description": "Trusted proxy CIDR range",
      "secret": false,
      "strategy": "default",
      "default": "0.0.0.0/0"
    },
    {
      "key": "REAL_IP_HEADER",
      "service": "Flarum",
      "description": "Header for client IP",
      "secret": false,
      "strategy": "default",
      "default": "X-Forwarded-For"
    },
    {
      "key": "FLARUM_BASE_URL",
      "service": "Flarum",
      "description": "Public forum URL",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "UPLOAD_MAX_SIZE",
      "service": "Flarum",
      "description": "Max file upload size",
      "secret": false,
      "strategy": "default",
      "default": "50M"
    },
    {
      "key": "OPCACHE_MEM_SIZE",
      "service": "Flarum",
      "description": "OPcache memory in MB",
      "secret": false,
      "strategy": "default",
      "default": "128"
    },
    {
      "key": "FLARUM_FORUM_TITLE",
      "service": "Flarum",
      "description": "Forum title (first install only)",
      "secret": false,
      "strategy": "default",
      "default": "Flarum Forum"
    },
    {
      "key": "MYSQLHOST",
      "service": "MySQL",
      "description": "MySQL internal hostname",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "MYSQLPORT",
      "service": "MySQL",
      "description": "MySQL service port",
      "secret": false,
      "strategy": "default",
      "default": "3306"
    },
    {
      "key": "MYSQLUSER",
      "service": "MySQL",
      "description": "Default MySQL root username",
      "secret": false,
      "strategy": "default",
      "default": "root"
    },
    {
      "key": "MYSQL_URL",
      "service": "MySQL",
      "description": "Internal MySQL connection string",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "MYSQLDATABASE",
      "service": "MySQL",
      "description": "Database name reference variable",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "MYSQLPASSWORD",
      "service": "MySQL",
      "description": "MySQL password reference",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "MYSQL_DATABASE",
      "service": "MySQL",
      "description": "Default database name created",
      "secret": false,
      "strategy": "default",
      "default": "railway"
    },
    {
      "key": "MYSQL_PUBLIC_URL",
      "service": "MySQL",
      "description": "Public MySQL connection URL",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "MYSQL_ROOT_PASSWORD",
      "service": "MySQL",
      "description": "Root user password credential",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "flarum"
      }
    },
    "cli": "railway deploy --template flarum",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "c713adbd-243f-41c0-835e-14d5f7442146",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "0c880203-3bec-4d9f-85f1-d66351f4e3d9": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/flarum.svg",
                  "name": "Flarum",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "crazymax/flarum:latest"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "HTTP listening port",
                      "defaultValue": "8000"
                    },
                    "DB_HOST": {
                      "isOptional": false,
                      "description": "MySQL server hostname",
                      "defaultValue": "${{MySQL.MYSQLHOST}}"
                    },
                    "DB_NAME": {
                      "isOptional": false,
                      "description": "MySQL database name",
                      "defaultValue": "${{MySQL.MYSQLDATABASE}}"
                    },
                    "DB_PORT": {
                      "isOptional": false,
                      "description": "MySQL server port",
                      "defaultValue": "${{MySQL.MYSQLPORT}}"
                    },
                    "DB_USER": {
                      "isOptional": false,
                      "description": "MySQL database user",
                      "defaultValue": "${{MySQL.MYSQLUSER}}"
                    },
                    "DB_PASSWORD": {
                      "isOptional": false,
                      "description": "MySQL database password",
                      "defaultValue": "${{MySQL.MYSQLPASSWORD}}"
                    },
                    "FLARUM_DEBUG": {
                      "isOptional": false,
                      "description": "Enable debug mode",
                      "defaultValue": "false"
                    },
                    "MEMORY_LIMIT": {
                      "isOptional": false,
                      "description": "PHP memory limit",
                      "defaultValue": "256M"
                    },
                    "REAL_IP_FROM": {
                      "isOptional": false,
                      "description": "Trusted proxy CIDR range",
                      "defaultValue": "0.0.0.0/0"
                    },
                    "REAL_IP_HEADER": {
                      "isOptional": false,
                      "description": "Header for client IP",
                      "defaultValue": "X-Forwarded-For"
                    },
                    "FLARUM_BASE_URL": {
                      "isOptional": false,
                      "description": "Public forum URL",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "UPLOAD_MAX_SIZE": {
                      "isOptional": false,
                      "description": "Max file upload size",
                      "defaultValue": "50M"
                    },
                    "OPCACHE_MEM_SIZE": {
                      "isOptional": false,
                      "description": "OPcache memory in MB",
                      "defaultValue": "128"
                    },
                    "FLARUM_FORUM_TITLE": {
                      "isOptional": false,
                      "description": "Forum title (first install only)",
                      "defaultValue": "Flarum Forum"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  },
                  "volumeMounts": {
                    "0c880203-3bec-4d9f-85f1-d66351f4e3d9": {
                      "mountPath": "/data"
                    }
                  }
                },
                "f5f602dc-e227-496c-ab83-9f1597f42201": {
                  "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.4"
                  },
                  "variables": {
                    "MYSQLHOST": {
                      "isOptional": false,
                      "description": "MySQL internal hostname",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "MYSQLPORT": {
                      "isOptional": false,
                      "description": "MySQL service port",
                      "defaultValue": "3306"
                    },
                    "MYSQLUSER": {
                      "isOptional": false,
                      "description": "Default MySQL root username",
                      "defaultValue": "root"
                    },
                    "MYSQL_URL": {
                      "isOptional": false,
                      "description": "Internal MySQL connection string",
                      "defaultValue": "mysql://${{MYSQLUSER}}:${{MYSQL_ROOT_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:3306/${{MYSQL_DATABASE}}"
                    },
                    "MYSQLDATABASE": {
                      "isOptional": false,
                      "description": "Database name reference variable",
                      "defaultValue": "${{MYSQL_DATABASE}}"
                    },
                    "MYSQLPASSWORD": {
                      "isOptional": false,
                      "description": "MySQL password reference",
                      "defaultValue": "${{MYSQL_ROOT_PASSWORD}}"
                    },
                    "MYSQL_DATABASE": {
                      "isOptional": false,
                      "description": "Default database name created",
                      "defaultValue": "railway"
                    },
                    "MYSQL_PUBLIC_URL": {
                      "isOptional": false,
                      "description": "Public MySQL connection URL",
                      "defaultValue": "mysql://${{MYSQLUSER}}:${{MYSQL_ROOT_PASSWORD}}@${{RAILWAY_TCP_PROXY_DOMAIN}}:${{RAILWAY_TCP_PROXY_PORT}}/${{MYSQL_DATABASE}}"
                    },
                    "MYSQL_ROOT_PASSWORD": {
                      "isOptional": false,
                      "description": "Root user password credential",
                      "defaultValue": "{{MYSQL_ROOT_PASSWORD}}"
                    }
                  },
                  "volumeMounts": {
                    "f5f602dc-e227-496c-ab83-9f1597f42201": {
                      "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-21T22:14:44.200Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-20T13:34:32.556Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_39df54248b9d4d3f8aee",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 87,
    "typical_build_seconds": 0,
    "typical_start_seconds": 10,
    "slowest_service": "Flarum"
  }
}
