{
  "manifest_version": "1.0.0",
  "template": {
    "id": "d8bd749a-be7e-4694-88c7-9caf1597aa85",
    "slug": "metabase-business-intelligence",
    "name": "Metabase | Open Source BI and Analytics Dashboard",
    "description": "Business intelligence and dashboards, backed by a persistent Postgres",
    "url": "https://railway.com/deploy/metabase-business-intelligence",
    "upstream": {
      "image": "metabase/metabase:v0.63.16.8"
    }
  },
  "services": [
    {
      "name": "Metabase",
      "source": {
        "image": "metabase/metabase:v0.63.16.8"
      },
      "needs_volume": false,
      "http": true
    },
    {
      "name": "Postgres",
      "source": {
        "image": "postgres:18.6-alpine"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql",
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "Metabase",
      "description": "Where Railway sends traffic and healthchecks. Metabase never reads this variable, so it has to be set to the port Metabase actually listens on — otherwise the platform probes a closed port and the deploy fails while the app is healthy.",
      "secret": false,
      "strategy": "default",
      "default": "3000"
    },
    {
      "key": "JAVA_OPTS",
      "service": "Metabase",
      "description": "JVM options. The heap cap keeps a schema sync over a large warehouse inside a GC pause instead of the container memory limit. Raise it together with the service's memory.",
      "secret": false,
      "strategy": "default",
      "default": "-Xmx1g"
    },
    {
      "key": "MB_DB_HOST",
      "service": "Metabase",
      "description": "Private hostname of the bundled Postgres. Repoint it to reuse an application database you already run.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "MB_DB_PASS",
      "service": "Metabase",
      "description": "Application database password. Resolves to the password generated for the bundled Postgres.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "MB_DB_PORT",
      "service": "Metabase",
      "description": "Port of the application database.",
      "secret": false,
      "strategy": "default",
      "default": "5432"
    },
    {
      "key": "MB_DB_TYPE",
      "service": "Metabase",
      "description": "Application database engine. Keep it postgres: the h2 fallback writes to the container filesystem and is wiped on every redeploy.",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "MB_DB_USER",
      "service": "Metabase",
      "description": "Application database user.",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "MB_DB_DBNAME",
      "service": "Metabase",
      "description": "Database that holds Metabase's own state — questions, dashboards, users, permissions.",
      "secret": false,
      "strategy": "default",
      "default": "metabase"
    },
    {
      "key": "MB_JETTY_HOST",
      "service": "Metabase",
      "description": "Bind address. `::` serves IPv6 (Railway's private network) and IPv4 (healthchecks and the edge proxy) at once.",
      "secret": false,
      "strategy": "default",
      "default": "::"
    },
    {
      "key": "MB_JETTY_PORT",
      "service": "Metabase",
      "description": "Port Metabase listens on. Keep it equal to PORT.",
      "secret": false,
      "strategy": "default",
      "default": "3000"
    },
    {
      "key": "MB_ENCRYPTION_SECRET_KEY",
      "service": "Metabase",
      "description": "Encrypts the credentials of every connected data source at rest. Generated once at deploy — changing it later makes all saved connections undecryptable.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "POSTGRES_DB",
      "service": "Postgres",
      "description": "Database created on first boot for Metabase's application state.",
      "secret": false,
      "strategy": "default",
      "default": "metabase"
    },
    {
      "key": "POSTGRES_USER",
      "service": "Postgres",
      "description": "Superuser owning the application database.",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "Postgres",
      "description": "Generated once at deploy. Postgres is reachable only over the private network — it has no public endpoint.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "metabase-business-intelligence"
      }
    },
    "cli": "railway deploy --template metabase-business-intelligence",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "d8bd749a-be7e-4694-88c7-9caf1597aa85",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "83bfd426-4355-4998-8a59-816b4c3c05de": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/metabase.svg",
                  "name": "Metabase",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/api/health",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 2
                  },
                  "source": {
                    "image": "metabase/metabase:v0.63.16.8"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Where Railway sends traffic and healthchecks. Metabase never reads this variable, so it has to be set to the port Metabase actually listens on — otherwise the platform probes a closed port and the deploy fails while the app is healthy.",
                      "defaultValue": "3000"
                    },
                    "JAVA_OPTS": {
                      "isOptional": false,
                      "description": "JVM options. The heap cap keeps a schema sync over a large warehouse inside a GC pause instead of the container memory limit. Raise it together with the service's memory.",
                      "defaultValue": "-Xmx1g"
                    },
                    "MB_DB_HOST": {
                      "isOptional": false,
                      "description": "Private hostname of the bundled Postgres. Repoint it to reuse an application database you already run.",
                      "defaultValue": "${{Postgres.RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "MB_DB_PASS": {
                      "isOptional": false,
                      "description": "Application database password. Resolves to the password generated for the bundled Postgres.",
                      "defaultValue": "${{Postgres.POSTGRES_PASSWORD}}"
                    },
                    "MB_DB_PORT": {
                      "isOptional": false,
                      "description": "Port of the application database.",
                      "defaultValue": "5432"
                    },
                    "MB_DB_TYPE": {
                      "isOptional": false,
                      "description": "Application database engine. Keep it postgres: the h2 fallback writes to the container filesystem and is wiped on every redeploy.",
                      "defaultValue": "postgres"
                    },
                    "MB_DB_USER": {
                      "isOptional": false,
                      "description": "Application database user.",
                      "defaultValue": "postgres"
                    },
                    "MB_DB_DBNAME": {
                      "isOptional": false,
                      "description": "Database that holds Metabase's own state — questions, dashboards, users, permissions.",
                      "defaultValue": "metabase"
                    },
                    "MB_JETTY_HOST": {
                      "isOptional": false,
                      "description": "Bind address. `::` serves IPv6 (Railway's private network) and IPv4 (healthchecks and the edge proxy) at once.",
                      "defaultValue": "::"
                    },
                    "MB_JETTY_PORT": {
                      "isOptional": false,
                      "description": "Port Metabase listens on. Keep it equal to PORT.",
                      "defaultValue": "3000"
                    },
                    "MB_ENCRYPTION_SECRET_KEY": {
                      "isOptional": false,
                      "description": "Encrypts the credentials of every connected data source at rest. Generated once at deploy — changing it later makes all saved connections undecryptable.",
                      "defaultValue": "{{MB_ENCRYPTION_SECRET_KEY}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:3000": {
                        "port": 3000
                      }
                    }
                  }
                },
                "88b05be4-ba3e-4baa-b675-c008fcd44eba": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/postgresql.svg",
                  "name": "Postgres",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 2
                  },
                  "source": {
                    "image": "postgres:18.6-alpine"
                  },
                  "variables": {
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Database created on first boot for Metabase's application state.",
                      "defaultValue": "metabase"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "Superuser owning the application database.",
                      "defaultValue": "postgres"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Generated once at deploy. Postgres is reachable only over the private network — it has no public endpoint.",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    }
                  },
                  "volumeMounts": {
                    "88b05be4-ba3e-4baa-b675-c008fcd44eba": {
                      "mountPath": "/var/lib/postgresql"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "Metabase",
      "method": "GET",
      "path": "/api/health",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 2,
    "needs_volume": true
  },
  "generated_at": "2026-09-19T04:14:37.968Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-17T10:17:39.720Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_90d6e7c979a54ac4b112",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "healthcheck",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 147,
    "typical_build_seconds": 0,
    "typical_start_seconds": 91,
    "slowest_service": "Metabase"
  }
}
