{
  "manifest_version": "1.0.0",
  "template": {
    "id": "81479eff-8007-462b-8898-60fbb7c3fb32",
    "slug": "bookstack-wiki",
    "name": "Bookstack",
    "description": "Open-source wiki and knowledge base with managed MySQL, Redis and a volume",
    "url": "https://railway.com/deploy/bookstack-wiki",
    "upstream": {
      "image": "linuxserver/bookstack"
    }
  },
  "services": [
    {
      "name": "bookstack",
      "source": {
        "image": "linuxserver/bookstack"
      },
      "needs_volume": true,
      "volume_mount_path": "/config",
      "http": true
    },
    {
      "name": "Redis",
      "source": {
        "image": "redis:8.2"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "http": false
    },
    {
      "name": "MySQL",
      "source": {
        "image": "mysql:9.4"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/mysql",
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "TZ",
      "service": "bookstack",
      "description": "Container timezone",
      "secret": false,
      "strategy": "default",
      "default": "Etc/UTC"
    },
    {
      "key": "PGID",
      "service": "bookstack",
      "description": "LinuxServer container group ID",
      "secret": false,
      "strategy": "default",
      "default": "911"
    },
    {
      "key": "PORT",
      "service": "bookstack",
      "description": "nginx listening port",
      "secret": false,
      "strategy": "default",
      "default": "80"
    },
    {
      "key": "PUID",
      "service": "bookstack",
      "description": "LinuxServer container user ID",
      "secret": false,
      "strategy": "default",
      "default": "911"
    },
    {
      "key": "APP_ENV",
      "service": "bookstack",
      "description": "Laravel environment name",
      "secret": false,
      "strategy": "default",
      "default": "production"
    },
    {
      "key": "APP_KEY",
      "service": "bookstack",
      "description": "32-character session encryption key",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "APP_URL",
      "service": "bookstack",
      "description": "Public base URL for links",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "DB_HOST",
      "service": "bookstack",
      "description": "Private 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": "Never enable in production",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "APP_PROXIES",
      "service": "bookstack",
      "description": "Trust Railway proxy headers",
      "secret": false,
      "strategy": "default",
      "default": "0.0.0.0/0,::/0"
    },
    {
      "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 reference",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DB_USERNAME",
      "service": "bookstack",
      "description": "Scoped database user",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "CACHE_DRIVER",
      "service": "bookstack",
      "description": "Cache store backend",
      "secret": false,
      "strategy": "default",
      "default": "redis"
    },
    {
      "key": "STORAGE_TYPE",
      "service": "bookstack",
      "description": "Serve uploads behind auth; set \"local\" for a public wiki",
      "secret": false,
      "strategy": "default",
      "default": "local_secure_restricted"
    },
    {
      "key": "REDIS_SERVERS",
      "service": "bookstack",
      "description": "Packed Redis connection string",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "SESSION_DRIVER",
      "service": "bookstack",
      "description": "Session store backend",
      "secret": false,
      "strategy": "default",
      "default": "redis"
    },
    {
      "key": "QUEUE_CONNECTION",
      "service": "bookstack",
      "description": "Queue backend; also starts worker",
      "secret": false,
      "strategy": "default",
      "default": "redis"
    },
    {
      "key": "INITIAL_ADMIN_NAME",
      "service": "bookstack",
      "description": "Display name of first admin",
      "secret": false,
      "strategy": "default",
      "default": "Admin"
    },
    {
      "key": "INITIAL_ADMIN_EMAIL",
      "service": "bookstack",
      "description": "First admin login email",
      "secret": false,
      "strategy": "default",
      "default": "admin@example.com"
    },
    {
      "key": "SESSION_SECURE_COOKIE",
      "service": "bookstack",
      "description": "HTTPS-only session cookie",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "INITIAL_ADMIN_PASSWORD",
      "service": "bookstack",
      "description": "First admin password",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "REDISHOST",
      "service": "Redis",
      "description": "Private hostname, reachable only inside the project",
      "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 ACL user created on first boot",
      "secret": false,
      "strategy": "default",
      "default": "default"
    },
    {
      "key": "REDIS_URL",
      "service": "Redis",
      "description": "Private connection string, use this from other services",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDISPASSWORD",
      "service": "Redis",
      "description": "Convenience alias of the generated password",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDIS_PASSWORD",
      "service": "Redis",
      "description": "Generated password for the default user",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "MYSQLHOST",
      "service": "MySQL",
      "description": "Private hostname, never publicly exposed",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "MYSQLPORT",
      "service": "MySQL",
      "description": "MySQL port on the private network",
      "secret": false,
      "strategy": "default",
      "default": "3306"
    },
    {
      "key": "MYSQLUSER",
      "service": "MySQL",
      "description": "Superuser; give the app a scoped user instead",
      "secret": false,
      "strategy": "default",
      "default": "root"
    },
    {
      "key": "MYSQL_URL",
      "service": "MySQL",
      "description": "Private-network connection string",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "MYSQLDATABASE",
      "service": "MySQL",
      "description": "Alias consumers reference as ${{MySQL.MYSQLDATABASE}}",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "MYSQLPASSWORD",
      "service": "MySQL",
      "description": "Alias of the root password",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "MYSQL_DATABASE",
      "service": "MySQL",
      "description": "Database created on first init",
      "secret": false,
      "strategy": "default",
      "default": "railway"
    },
    {
      "key": "MYSQL_PUBLIC_URL",
      "service": "MySQL",
      "description": "External connection string; empty host/port until a TCP proxy exists",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "MYSQL_ROOT_PASSWORD",
      "service": "MySQL",
      "description": "Root password, generated once at init — read only when the data dir is created",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "bookstack-wiki"
      }
    },
    "cli": "railway deploy --template bookstack-wiki",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "81479eff-8007-462b-8898-60fbb7c3fb32",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "077ce173-ce51-4321-b4a6-f53325461d79": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/bookstack.svg",
                  "name": "bookstack",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/status",
                    "preDeployCommand": [
                      "/bin/bash -c 'mkdir -p /config/www/framework/cache /config/www/framework/sessions /config/www/framework/views /config/www/framework/purifier /config/log/bookstack; touch /config/log/bookstack/laravel.log; for i in $(seq 1 20); do php /app/www/artisan migrate --force && break; echo \"pre-deploy: database not ready, retry $i\"; sleep 10; done; php /app/www/artisan migrate --force && { php /app/www/artisan bookstack:create-admin --initial --name=\"$INITIAL_ADMIN_NAME\" --email=\"$INITIAL_ADMIN_EMAIL\" --password=\"$INITIAL_ADMIN_PASSWORD\" || true; }'"
                    ],
                    "restartPolicyType": "ALWAYS",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "linuxserver/bookstack"
                  },
                  "variables": {
                    "TZ": {
                      "isOptional": false,
                      "description": "Container timezone",
                      "defaultValue": "Etc/UTC"
                    },
                    "PGID": {
                      "isOptional": false,
                      "description": "LinuxServer container group ID",
                      "defaultValue": "911"
                    },
                    "PORT": {
                      "isOptional": false,
                      "description": "nginx listening port",
                      "defaultValue": "80"
                    },
                    "PUID": {
                      "isOptional": false,
                      "description": "LinuxServer container user ID",
                      "defaultValue": "911"
                    },
                    "APP_ENV": {
                      "isOptional": false,
                      "description": "Laravel environment name",
                      "defaultValue": "production"
                    },
                    "APP_KEY": {
                      "isOptional": false,
                      "description": "32-character session encryption key",
                      "defaultValue": "{{APP_KEY}}"
                    },
                    "APP_URL": {
                      "isOptional": false,
                      "description": "Public base URL for links",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "DB_HOST": {
                      "isOptional": false,
                      "description": "Private MySQL hostname",
                      "defaultValue": "${{MySQL.MYSQLHOST}}"
                    },
                    "DB_PORT": {
                      "isOptional": false,
                      "description": "MySQL port",
                      "defaultValue": "${{MySQL.MYSQLPORT}}"
                    },
                    "APP_DEBUG": {
                      "isOptional": false,
                      "description": "Never enable in production",
                      "defaultValue": "false"
                    },
                    "APP_PROXIES": {
                      "isOptional": false,
                      "description": "Trust Railway proxy headers",
                      "defaultValue": "0.0.0.0/0,::/0"
                    },
                    "DB_DATABASE": {
                      "isOptional": false,
                      "description": "Database name",
                      "defaultValue": "${{MySQL.MYSQLDATABASE}}"
                    },
                    "DB_PASSWORD": {
                      "isOptional": false,
                      "description": "Database password reference",
                      "defaultValue": "${{MySQL.MYSQLPASSWORD}}"
                    },
                    "DB_USERNAME": {
                      "isOptional": false,
                      "description": "Scoped database user",
                      "defaultValue": "${{MySQL.MYSQLUSER}}"
                    },
                    "CACHE_DRIVER": {
                      "isOptional": false,
                      "description": "Cache store backend",
                      "defaultValue": "redis"
                    },
                    "STORAGE_TYPE": {
                      "isOptional": false,
                      "description": "Serve uploads behind auth; set \"local\" for a public wiki",
                      "defaultValue": "local_secure_restricted"
                    },
                    "REDIS_SERVERS": {
                      "isOptional": false,
                      "description": "Packed Redis connection string",
                      "defaultValue": "${{Redis.REDISHOST}}:${{Redis.REDISPORT}}:0:${{Redis.REDISPASSWORD}}"
                    },
                    "SESSION_DRIVER": {
                      "isOptional": false,
                      "description": "Session store backend",
                      "defaultValue": "redis"
                    },
                    "QUEUE_CONNECTION": {
                      "isOptional": false,
                      "description": "Queue backend; also starts worker",
                      "defaultValue": "redis"
                    },
                    "INITIAL_ADMIN_NAME": {
                      "isOptional": false,
                      "description": "Display name of first admin",
                      "defaultValue": "Admin"
                    },
                    "INITIAL_ADMIN_EMAIL": {
                      "isOptional": false,
                      "description": "First admin login email",
                      "defaultValue": "admin@example.com"
                    },
                    "SESSION_SECURE_COOKIE": {
                      "isOptional": false,
                      "description": "HTTPS-only session cookie",
                      "defaultValue": "true"
                    },
                    "INITIAL_ADMIN_PASSWORD": {
                      "isOptional": false,
                      "description": "First admin password",
                      "defaultValue": "{{INITIAL_ADMIN_PASSWORD}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:80": {
                        "port": 80
                      }
                    }
                  },
                  "volumeMounts": {
                    "077ce173-ce51-4321-b4a6-f53325461d79": {
                      "mountPath": "/config"
                    }
                  }
                },
                "db199005-b3c2-48df-9290-2176f410e7ca": {
                  "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"
                  },
                  "variables": {
                    "REDISHOST": {
                      "isOptional": false,
                      "description": "Private hostname, reachable only inside the project",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "REDISPORT": {
                      "isOptional": false,
                      "description": "Standard Redis port",
                      "defaultValue": "6379"
                    },
                    "REDISUSER": {
                      "isOptional": false,
                      "description": "Default ACL user created on first boot",
                      "defaultValue": "default"
                    },
                    "REDIS_URL": {
                      "isOptional": false,
                      "description": "Private connection string, use this from other services",
                      "defaultValue": "redis://${{REDISUSER}}:${{REDIS_PASSWORD}}@${{REDISHOST}}:${{REDISPORT}}"
                    },
                    "REDISPASSWORD": {
                      "isOptional": false,
                      "description": "Convenience alias of the generated password",
                      "defaultValue": "${{REDIS_PASSWORD}}"
                    },
                    "REDIS_PASSWORD": {
                      "isOptional": false,
                      "description": "Generated password for the default user",
                      "defaultValue": "{{REDIS_PASSWORD}}"
                    }
                  },
                  "volumeMounts": {
                    "db199005-b3c2-48df-9290-2176f410e7ca": {
                      "mountPath": "/data"
                    }
                  }
                },
                "fde6e1ea-9976-4a9e-8b94-0165be48cf33": {
                  "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": "Private hostname, never publicly exposed",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "MYSQLPORT": {
                      "isOptional": false,
                      "description": "MySQL port on the private network",
                      "defaultValue": "3306"
                    },
                    "MYSQLUSER": {
                      "isOptional": false,
                      "description": "Superuser; give the app a scoped user instead",
                      "defaultValue": "root"
                    },
                    "MYSQL_URL": {
                      "isOptional": false,
                      "description": "Private-network connection string",
                      "defaultValue": "mysql://${{MYSQLUSER}}:${{MYSQL_ROOT_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:3306/${{MYSQL_DATABASE}}"
                    },
                    "MYSQLDATABASE": {
                      "isOptional": false,
                      "description": "Alias consumers reference as ${{MySQL.MYSQLDATABASE}}",
                      "defaultValue": "${{MYSQL_DATABASE}}"
                    },
                    "MYSQLPASSWORD": {
                      "isOptional": false,
                      "description": "Alias of the root password",
                      "defaultValue": "${{MYSQL_ROOT_PASSWORD}}"
                    },
                    "MYSQL_DATABASE": {
                      "isOptional": false,
                      "description": "Database created on first init",
                      "defaultValue": "railway"
                    },
                    "MYSQL_PUBLIC_URL": {
                      "description": "External connection string; empty host/port until a TCP proxy exists",
                      "defaultValue": "mysql://${{MYSQLUSER}}:${{MYSQL_ROOT_PASSWORD}}@${{RAILWAY_TCP_PROXY_DOMAIN}}:${{RAILWAY_TCP_PROXY_PORT}}/${{MYSQL_DATABASE}}"
                    },
                    "MYSQL_ROOT_PASSWORD": {
                      "isOptional": false,
                      "description": "Root password, generated once at init — read only when the data dir is created",
                      "defaultValue": "{{MYSQL_ROOT_PASSWORD}}"
                    }
                  },
                  "volumeMounts": {
                    "fde6e1ea-9976-4a9e-8b94-0165be48cf33": {
                      "mountPath": "/var/lib/mysql"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "bookstack",
      "method": "GET",
      "path": "/status",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 3,
    "needs_volume": true
  },
  "generated_at": "2026-09-10T16:14:52.212Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-04T18:06:47.146Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_fd80c6c18b164f7ebfc7",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "healthcheck",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 113,
    "typical_build_seconds": 0,
    "typical_start_seconds": 21,
    "slowest_service": "bookstack"
  }
}
