{
  "manifest_version": "1.0.0",
  "template": {
    "id": "7afed580-ff56-4564-910d-67e2eeca1f05",
    "slug": "mosquitto",
    "name": "Mosquitto",
    "description": "Mesagse broker that connects devices and apps over MQTT",
    "url": "https://railway.com/deploy/mosquitto",
    "upstream": {
      "repo_url": "https://github.com/gridalpha/mosquitto-railway"
    }
  },
  "services": [
    {
      "name": "Mosquitto",
      "source": {
        "repo": "https://github.com/gridalpha/mosquitto-railway"
      },
      "needs_volume": true,
      "volume_mount_path": "/mosquitto/data",
      "tcp_ports": [
        8883
      ],
      "http": false
    },
    {
      "name": "Gateway",
      "source": {
        "repo": "https://github.com/gridalpha/mosquitto-railway"
      },
      "needs_volume": false,
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "Mosquitto",
      "description": "Health check listener port",
      "secret": false,
      "strategy": "default",
      "default": "9884"
    },
    {
      "key": "MQTT_URL",
      "service": "Mosquitto",
      "description": "Private connection string",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "MQTTS_URL",
      "service": "Mosquitto",
      "description": "Public TLS connection string",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "MQTT_HOST",
      "service": "Mosquitto",
      "description": "Private hostname for consumers",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "MQTT_PORT",
      "service": "Mosquitto",
      "description": "Private MQTT port for consumers",
      "secret": false,
      "strategy": "default",
      "default": "1883"
    },
    {
      "key": "MQTT_LOG_TYPE",
      "service": "Mosquitto",
      "description": "Log levels the broker prints",
      "secret": false,
      "strategy": "default",
      "default": "error,warning,notice,information"
    },
    {
      "key": "MQTT_PASSWORD",
      "service": "Mosquitto",
      "description": "Password for that account",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "MQTT_USERNAME",
      "service": "Mosquitto",
      "description": "Account for MQTT and the dashboard",
      "secret": false,
      "strategy": "default",
      "default": "admin"
    },
    {
      "key": "MQTT_PASSWORD_HASH",
      "service": "Mosquitto",
      "description": "Password hash algorithm",
      "secret": true,
      "strategy": "default",
      "default": "sha512-pbkdf2"
    },
    {
      "key": "MQTT_MAX_PACKET_SIZE",
      "service": "Mosquitto",
      "description": "Largest accepted MQTT packet, bytes",
      "secret": false,
      "strategy": "default",
      "default": "2000000"
    },
    {
      "key": "RAILWAY_DOCKERFILE_PATH",
      "service": "Mosquitto",
      "description": "Dockerfile that builds the broker",
      "secret": false,
      "strategy": "default",
      "default": "broker/Dockerfile"
    },
    {
      "key": "PORT",
      "service": "Gateway",
      "description": "HTTP server listening port",
      "secret": false,
      "strategy": "default",
      "default": "8080"
    },
    {
      "key": "BROKER_HOST",
      "service": "Gateway",
      "description": "Private hostname of the broker",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "RAILWAY_DOCKERFILE_PATH",
      "service": "Gateway",
      "description": "Dockerfile that builds the gateway",
      "secret": false,
      "strategy": "default",
      "default": "gateway/Dockerfile"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "mosquitto"
      }
    },
    "cli": "railway deploy --template mosquitto",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "7afed580-ff56-4564-910d-67e2eeca1f05",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "b83e967c-a6bd-4d24-92ac-7cb19e1ac683": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/mosquitto.svg",
                  "name": "Mosquitto",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/api/v1/version",
                    "restartPolicyType": "ALWAYS",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/gridalpha/mosquitto-railway",
                    "rootDirectory": null
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Health check listener port",
                      "defaultValue": "9884"
                    },
                    "MQTT_URL": {
                      "isOptional": false,
                      "description": "Private connection string",
                      "defaultValue": "mqtt://${{MQTT_USERNAME}}:${{MQTT_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:1883"
                    },
                    "MQTTS_URL": {
                      "isOptional": false,
                      "description": "Public TLS connection string",
                      "defaultValue": "mqtts://${{RAILWAY_TCP_PROXY_DOMAIN}}:${{RAILWAY_TCP_PROXY_PORT}}"
                    },
                    "MQTT_HOST": {
                      "isOptional": false,
                      "description": "Private hostname for consumers",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "MQTT_PORT": {
                      "isOptional": false,
                      "description": "Private MQTT port for consumers",
                      "defaultValue": "1883"
                    },
                    "MQTT_LOG_TYPE": {
                      "description": "Log levels the broker prints",
                      "defaultValue": "error,warning,notice,information"
                    },
                    "MQTT_PASSWORD": {
                      "isOptional": false,
                      "description": "Password for that account",
                      "defaultValue": "{{MQTT_PASSWORD}}"
                    },
                    "MQTT_USERNAME": {
                      "isOptional": false,
                      "description": "Account for MQTT and the dashboard",
                      "defaultValue": "admin"
                    },
                    "MQTT_EXTRA_USERS": {
                      "isOptional": true,
                      "description": "Optional user:password,user2:password2 list",
                      "defaultValue": ""
                    },
                    "MQTT_PASSWORD_HASH": {
                      "description": "Password hash algorithm",
                      "defaultValue": "sha512-pbkdf2"
                    },
                    "MQTT_MAX_PACKET_SIZE": {
                      "description": "Largest accepted MQTT packet, bytes",
                      "defaultValue": "2000000"
                    },
                    "RAILWAY_DOCKERFILE_PATH": {
                      "isOptional": false,
                      "description": "Dockerfile that builds the broker",
                      "defaultValue": "broker/Dockerfile"
                    }
                  },
                  "networking": {
                    "tcpProxies": {
                      "8883": {}
                    }
                  },
                  "volumeMounts": {
                    "b83e967c-a6bd-4d24-92ac-7cb19e1ac683": {
                      "mountPath": "/mosquitto/data"
                    }
                  }
                },
                "d07318b4-070c-407e-8c59-1a672698ce8b": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/caddy.svg",
                  "name": "Gateway",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/healthz",
                    "restartPolicyType": "ALWAYS",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/gridalpha/mosquitto-railway",
                    "rootDirectory": null
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "HTTP server listening port",
                      "defaultValue": "8080"
                    },
                    "BROKER_HOST": {
                      "isOptional": false,
                      "description": "Private hostname of the broker",
                      "defaultValue": "${{Mosquitto.RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "RAILWAY_DOCKERFILE_PATH": {
                      "isOptional": false,
                      "description": "Dockerfile that builds the gateway",
                      "defaultValue": "gateway/Dockerfile"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:8080": {
                        "port": 8080
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "Gateway",
      "method": "GET",
      "path": "/healthz",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 2,
    "needs_volume": true
  },
  "generated_at": "2026-09-20T16:14:49.616Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-19T14:51:21.579Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_a004cb6f49044ea29d13",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "healthcheck",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 78,
    "typical_build_seconds": 11,
    "typical_start_seconds": 10,
    "slowest_service": "Gateway"
  }
}
