{
  "manifest_version": "1.0.0",
  "template": {
    "id": "4b471f6c-c2bc-456a-b328-bffb861153d6",
    "slug": "bookstack-documentation-platform",
    "name": "BookStack | Open Source Confluence Alternative",
    "description": "Self-host BookStack: Structured wiki with LDAP, SAML, API & more",
    "url": "https://railway.com/deploy/bookstack-documentation-platform",
    "upstream": {
      "image": "andreidrang/bookstack-railway:26.03.1"
    }
  },
  "services": [
    {
      "name": "BookStack",
      "source": {
        "image": "andreidrang/bookstack-railway:26.03.1"
      },
      "needs_volume": true,
      "volume_mount_path": "/config",
      "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": "BookStack",
      "description": "Container listening port",
      "secret": false,
      "strategy": "default",
      "default": "80"
    },
    {
      "key": "APP_ENV",
      "service": "BookStack",
      "description": "Laravel environment",
      "secret": false,
      "strategy": "default",
      "default": "production"
    },
    {
      "key": "APP_KEY",
      "service": "BookStack",
      "description": "Laravel encryption key",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "APP_URL",
      "service": "BookStack",
      "description": "Public-facing app URL",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "DB_HOST",
      "service": "BookStack",
      "description": "MySQL hostname",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DB_PORT",
      "service": "BookStack",
      "description": "MySQL port",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "APP_DEBUG",
      "service": "BookStack",
      "description": "Disable debug mode",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "APP_PROXIES",
      "service": "BookStack",
      "description": "Trust Railway reverse proxy",
      "secret": false,
      "strategy": "default",
      "default": "*"
    },
    {
      "key": "DB_DATABASE",
      "service": "BookStack",
      "description": "Database name",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DB_PASSWORD",
      "service": "BookStack",
      "description": "Database password",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DB_USERNAME",
      "service": "BookStack",
      "description": "Database user",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "ALLOW_ROBOTS",
      "service": "BookStack",
      "description": "Block search engines",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "CACHE_DRIVER",
      "service": "BookStack",
      "description": "Cache backend",
      "secret": false,
      "strategy": "default",
      "default": "database"
    },
    {
      "key": "SESSION_DRIVER",
      "service": "BookStack",
      "description": "Session backend",
      "secret": false,
      "strategy": "default",
      "default": "database"
    },
    {
      "key": "QUEUE_CONNECTION",
      "service": "BookStack",
      "description": "Queue backend",
      "secret": false,
      "strategy": "default",
      "default": "database"
    },
    {
      "key": "SESSION_SECURE_COOKIE",
      "service": "BookStack",
      "description": "HTTPS-only cookies",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "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": "bookstack-documentation-platform"
      }
    },
    "cli": "railway deploy --template bookstack-documentation-platform",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "4b471f6c-c2bc-456a-b328-bffb861153d6",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "77114a4d-7d77-4005-a453-4bac692951df": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/bookstack.svg",
                  "name": "BookStack",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "andreidrang/bookstack-railway:26.03.1"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Container listening port",
                      "defaultValue": "80"
                    },
                    "APP_ENV": {
                      "isOptional": false,
                      "description": "Laravel environment",
                      "defaultValue": "production"
                    },
                    "APP_KEY": {
                      "isOptional": false,
                      "description": "Laravel encryption key",
                      "defaultValue": "{{APP_KEY}}"
                    },
                    "APP_URL": {
                      "isOptional": false,
                      "description": "Public-facing app URL",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "DB_HOST": {
                      "isOptional": false,
                      "description": "MySQL hostname",
                      "defaultValue": "${{MySQL.MYSQLHOST}}"
                    },
                    "DB_PORT": {
                      "isOptional": false,
                      "description": "MySQL port",
                      "defaultValue": "${{MySQL.MYSQLPORT}}"
                    },
                    "APP_DEBUG": {
                      "isOptional": false,
                      "description": "Disable debug mode",
                      "defaultValue": "false"
                    },
                    "APP_PROXIES": {
                      "isOptional": false,
                      "description": "Trust Railway reverse proxy",
                      "defaultValue": "*"
                    },
                    "DB_DATABASE": {
                      "isOptional": false,
                      "description": "Database name",
                      "defaultValue": "${{MySQL.MYSQLDATABASE}}"
                    },
                    "DB_PASSWORD": {
                      "isOptional": false,
                      "description": "Database password",
                      "defaultValue": "${{MySQL.MYSQLPASSWORD}}"
                    },
                    "DB_USERNAME": {
                      "isOptional": false,
                      "description": "Database user",
                      "defaultValue": "${{MySQL.MYSQLUSER}}"
                    },
                    "ALLOW_ROBOTS": {
                      "isOptional": false,
                      "description": "Block search engines",
                      "defaultValue": "false"
                    },
                    "CACHE_DRIVER": {
                      "isOptional": false,
                      "description": "Cache backend",
                      "defaultValue": "database"
                    },
                    "SESSION_DRIVER": {
                      "isOptional": false,
                      "description": "Session backend",
                      "defaultValue": "database"
                    },
                    "QUEUE_CONNECTION": {
                      "isOptional": false,
                      "description": "Queue backend",
                      "defaultValue": "database"
                    },
                    "SESSION_SECURE_COOKIE": {
                      "isOptional": false,
                      "description": "HTTPS-only cookies",
                      "defaultValue": "true"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  },
                  "volumeMounts": {
                    "77114a4d-7d77-4005-a453-4bac692951df": {
                      "mountPath": "/config"
                    }
                  }
                },
                "8ed73f17-c844-4289-bc2e-4079be910b12": {
                  "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": {
                    "8ed73f17-c844-4289-bc2e-4079be910b12": {
                      "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:19:00.434Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_97aded8cabc64eeeb99d",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 64,
    "typical_build_seconds": 0,
    "typical_start_seconds": 10,
    "slowest_service": "BookStack"
  }
}
