{
  "manifest_version": "1.0.0",
  "template": {
    "id": "b3fc45cd-d2b1-455b-9ac7-c5340e44de8b",
    "slug": "metabase-production",
    "name": "Metabase | Open-Source BI and Dashboards with Postgres",
    "description": "BI dashboards and SQL for your team, admin ready on first boot",
    "url": "https://railway.com/deploy/metabase-production",
    "upstream": {
      "repo_url": "https://github.com/two-workspaces/metabase"
    }
  },
  "status": "unvalidated",
  "validated_at": null,
  "success_rate_30d": null,
  "services": [
    {
      "name": "Postgres",
      "source": {
        "image": "postgres:17.11-alpine"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "http": false
    },
    {
      "name": "Metabase",
      "source": {
        "repo": "https://github.com/two-workspaces/metabase"
      },
      "needs_volume": false,
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "PGDATA",
      "service": "Postgres",
      "description": "Data subdirectory - keeps Postgres happy on Railway volumes",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "POSTGRES_DB",
      "service": "Postgres",
      "description": "Database name",
      "secret": false,
      "strategy": "default",
      "default": "metabase"
    },
    {
      "key": "POSTGRES_USER",
      "service": "Postgres",
      "description": "Database user",
      "secret": false,
      "strategy": "default",
      "default": "metabase"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "Postgres",
      "description": "Auto-generated database password",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "Postgres",
      "description": "Time for Postgres to shut down cleanly on redeploy",
      "secret": false,
      "strategy": "default",
      "default": "60"
    },
    {
      "key": "PORT",
      "service": "Metabase",
      "description": "Port Railway routes the public domain to - leave as is.",
      "secret": false,
      "strategy": "default",
      "default": "3000"
    },
    {
      "key": "JAVA_OPTS",
      "service": "Metabase",
      "description": "JVM options. -Xmx caps the Java heap; raise it (e.g. -Xmx2g) for many users or big result sets.",
      "secret": false,
      "strategy": "default",
      "default": "-Xmx1g"
    },
    {
      "key": "MB_DB_HOST",
      "service": "Metabase",
      "description": "Postgres host (private network)",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "MB_DB_PASS",
      "service": "Metabase",
      "description": "Postgres password",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "MB_DB_PORT",
      "service": "Metabase",
      "description": "Postgres port",
      "secret": false,
      "strategy": "default",
      "default": "5432"
    },
    {
      "key": "MB_DB_TYPE",
      "service": "Metabase",
      "description": "Metabase's own application database type",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "MB_DB_USER",
      "service": "Metabase",
      "description": "Postgres user",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "MB_SITE_URL",
      "service": "Metabase",
      "description": "Public URL Metabase uses in links, emails and embeds. Change it after adding a custom domain.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "MB_DB_DBNAME",
      "service": "Metabase",
      "description": "Postgres database",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "MB_JETTY_HOST",
      "service": "Metabase",
      "description": "Listen on IPv4 and IPv6 so Railway's private network can reach Metabase - leave as is.",
      "secret": false,
      "strategy": "default",
      "default": "::"
    },
    {
      "key": "MB_JETTY_PORT",
      "service": "Metabase",
      "description": "HTTP port Metabase listens on - leave as is.",
      "secret": false,
      "strategy": "default",
      "default": "3000"
    },
    {
      "key": "MB_ADMIN_EMAIL",
      "service": "Metabase",
      "description": "Email for the first admin account, created on first boot. You sign in with it.",
      "secret": false,
      "strategy": "ask_user"
    },
    {
      "key": "MB_ADMIN_PASSWORD",
      "service": "Metabase",
      "description": "Password for the first admin account, generated at deploy time. Used once on first boot; change it in Metabase afterwards (Account settings -> Password).",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "MB_ENCRYPTION_SECRET_KEY",
      "service": "Metabase",
      "description": "Encrypts the connection details of the databases you add. Keep it: without it Metabase can't read them.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "metabase-production"
      }
    },
    "cli": "railway deploy --template metabase-production",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "b3fc45cd-d2b1-455b-9ac7-c5340e44de8b",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "b9bf40b2-cf7f-4509-9e2e-b51f705212c9": {
                  "icon": "https://devicons.railway.app/i/postgresql.svg",
                  "name": "Postgres",
                  "build": {},
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "postgres:17.11-alpine"
                  },
                  "variables": {
                    "PGDATA": {
                      "isOptional": false,
                      "description": "Data subdirectory - keeps Postgres happy on Railway volumes",
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Database name",
                      "defaultValue": "metabase"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "Database user",
                      "defaultValue": "metabase"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Auto-generated database password",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Time for Postgres to shut down cleanly on redeploy",
                      "defaultValue": "60"
                    }
                  },
                  "networking": {
                    "serviceDomains": {}
                  },
                  "volumeMounts": {
                    "82e2d877-5b96-414e-9f21-0740f813b864": {
                      "mountPath": "/var/lib/postgresql/data"
                    }
                  }
                },
                "bdf7e5eb-845b-41cc-8810-70a00d515d36": {
                  "icon": "https://raw.githubusercontent.com/two-workspaces/metabase/main/icon.svg",
                  "name": "Metabase",
                  "build": {
                    "dockerfilePath": "Dockerfile"
                  },
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/api/health",
                    "restartPolicyType": "ON_FAILURE",
                    "healthcheckTimeout": 600,
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/two-workspaces/metabase",
                    "rootDirectory": null
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Port Railway routes the public domain to - leave as is.",
                      "defaultValue": "3000"
                    },
                    "JAVA_OPTS": {
                      "isOptional": false,
                      "description": "JVM options. -Xmx caps the Java heap; raise it (e.g. -Xmx2g) for many users or big result sets.",
                      "defaultValue": "-Xmx1g"
                    },
                    "MB_DB_HOST": {
                      "isOptional": false,
                      "description": "Postgres host (private network)",
                      "defaultValue": "${{Postgres.RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "MB_DB_PASS": {
                      "isOptional": false,
                      "description": "Postgres password",
                      "defaultValue": "${{Postgres.POSTGRES_PASSWORD}}"
                    },
                    "MB_DB_PORT": {
                      "isOptional": false,
                      "description": "Postgres port",
                      "defaultValue": "5432"
                    },
                    "MB_DB_TYPE": {
                      "isOptional": false,
                      "description": "Metabase's own application database type",
                      "defaultValue": "postgres"
                    },
                    "MB_DB_USER": {
                      "isOptional": false,
                      "description": "Postgres user",
                      "defaultValue": "${{Postgres.POSTGRES_USER}}"
                    },
                    "MB_SITE_URL": {
                      "isOptional": false,
                      "description": "Public URL Metabase uses in links, emails and embeds. Change it after adding a custom domain.",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "MB_DB_DBNAME": {
                      "isOptional": false,
                      "description": "Postgres database",
                      "defaultValue": "${{Postgres.POSTGRES_DB}}"
                    },
                    "MB_JETTY_HOST": {
                      "isOptional": false,
                      "description": "Listen on IPv4 and IPv6 so Railway's private network can reach Metabase - leave as is.",
                      "defaultValue": "::"
                    },
                    "MB_JETTY_PORT": {
                      "isOptional": false,
                      "description": "HTTP port Metabase listens on - leave as is.",
                      "defaultValue": "3000"
                    },
                    "MB_ADMIN_EMAIL": {
                      "isOptional": false,
                      "description": "Email for the first admin account, created on first boot. You sign in with it.",
                      "defaultValue": "{{MB_ADMIN_EMAIL}}"
                    },
                    "MB_ADMIN_PASSWORD": {
                      "isOptional": false,
                      "description": "Password for the first admin account, generated at deploy time. Used once on first boot; change it in Metabase afterwards (Account settings -> Password).",
                      "defaultValue": "{{MB_ADMIN_PASSWORD}}"
                    },
                    "MB_ENCRYPTION_SECRET_KEY": {
                      "isOptional": false,
                      "description": "Encrypts the connection details of the databases you add. Keep it: without it Metabase can't read them.",
                      "defaultValue": "{{MB_ENCRYPTION_SECRET_KEY}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  },
                  "volumeMounts": {}
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "Metabase",
      "method": "GET",
      "path": "/api/health",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 2,
    "needs_volume": true
  },
  "generated_at": "2026-10-25T04:14:45.632Z",
  "generator_version": "0.1.0"
}
