{
  "manifest_version": "1.0.0",
  "template": {
    "id": "9343483b-499a-4641-a2ec-f66fdcbdef37",
    "slug": "openpanel-23",
    "name": "OpenPanel 2.3",
    "description": "Open-source Mixpanel alternative: product analytics on ClickHouse",
    "url": "https://railway.com/deploy/openpanel-23",
    "upstream": {
      "image": "caddy:2.10.2-alpine"
    }
  },
  "status": "unvalidated",
  "validated_at": null,
  "success_rate_30d": null,
  "services": [
    {
      "name": "OpenPanel",
      "source": {
        "image": "caddy:2.10.2-alpine"
      },
      "needs_volume": false,
      "http": true
    },
    {
      "name": "Dashboard",
      "source": {
        "image": "lindesvard/openpanel-dashboard:2.3.0"
      },
      "needs_volume": false,
      "http": false
    },
    {
      "name": "Redis",
      "source": {
        "image": "redis:8.10"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "http": false
    },
    {
      "name": "API",
      "source": {
        "image": "lindesvard/openpanel-api:2.3.0"
      },
      "needs_volume": false,
      "http": false
    },
    {
      "name": "Postgres",
      "source": {
        "image": "ghcr.io/railwayapp-templates/postgres-ssl:17"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "http": false
    },
    {
      "name": "ClickHouse",
      "source": {
        "image": "clickhouse/clickhouse-server:25.10.2.65-alpine"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/clickhouse",
      "http": false
    },
    {
      "name": "Worker",
      "source": {
        "image": "lindesvard/openpanel-worker:2.3.0"
      },
      "needs_volume": false,
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "OpenPanel",
      "description": "Port Railway routes the public domain to",
      "secret": false,
      "strategy": "default",
      "default": "8080"
    },
    {
      "key": "CADDYFILE",
      "service": "OpenPanel",
      "description": "Caddy config: /api goes to the API, everything else to the dashboard",
      "secret": false,
      "strategy": "default",
      "default": "{\n\tadmin off\n\tauto_https off\n\tservers {\n\t\t# Only Railway's edge reaches this port; keep the visitor IP it forwards.\n\t\ttrusted_proxies static 0.0.0.0/0 ::/0\n\t}\n}\n\n:{$PORT} {\n\tencode gzip\n\thandle /healthz {\n\t\trespond \"ok\" 200\n\t}\n\t# Tracking API and the dashboard's backend, with /api stripped (as upstream).\n\thandle_path /api* {\n\t\treverse_proxy {$API_UPSTREAM}\n\t}\n\thandle {\n\t\treverse_proxy {$DASHBOARD_UPSTREAM}\n\t}\n}\n"
    },
    {
      "key": "API_UPSTREAM",
      "service": "OpenPanel",
      "description": "API on the private network",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "DASHBOARD_UPSTREAM",
      "service": "OpenPanel",
      "description": "Dashboard on the private network",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PORT",
      "service": "Dashboard",
      "description": "Port the dashboard listens on",
      "secret": false,
      "strategy": "default",
      "default": "3000"
    },
    {
      "key": "API_URL",
      "service": "Dashboard",
      "description": "Public URL of the API (the dashboard URL plus /api)",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "NODE_ENV",
      "service": "Dashboard",
      "description": "Runs OpenPanel in production mode",
      "secret": false,
      "strategy": "default",
      "default": "production"
    },
    {
      "key": "REDIS_URL",
      "service": "Dashboard",
      "description": "Redis connection (private network); family=0 lets the client use Railway's IPv6 network",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "BATCH_SIZE",
      "service": "Dashboard",
      "description": "Events written to ClickHouse per batch",
      "secret": false,
      "strategy": "default",
      "default": "5000"
    },
    {
      "key": "SELF_HOSTED",
      "service": "Dashboard",
      "description": "Self-hosted mode (no billing, first user becomes admin)",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "DATABASE_URL",
      "service": "Dashboard",
      "description": "Postgres connection (private network)",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "COOKIE_SECRET",
      "service": "Dashboard",
      "description": "Session cookie secret (shared with the API)",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DASHBOARD_URL",
      "service": "Dashboard",
      "description": "Public URL of the dashboard. Change it when you add a custom domain",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "BATCH_INTERVAL",
      "service": "Dashboard",
      "description": "Milliseconds between event batches",
      "secret": false,
      "strategy": "default",
      "default": "10000"
    },
    {
      "key": "CLICKHOUSE_URL",
      "service": "Dashboard",
      "description": "ClickHouse connection (private network)",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "ALLOW_INVITATION",
      "service": "Dashboard",
      "description": "Let the admin invite team members",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "ALLOW_REGISTRATION",
      "service": "Dashboard",
      "description": "Let anyone sign up. false: only the admin and people they invite",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "DATABASE_URL_DIRECT",
      "service": "Dashboard",
      "description": "Postgres connection for migrations (private network)",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "CUSTOM_COOKIE_DOMAIN",
      "service": "Dashboard",
      "description": "Domain the login cookie is set for. Must be the dashboard's host: OpenPanel would otherwise use the parent domain (up.railway.app), which browsers reject",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "Dashboard",
      "description": "Time to finish requests on shutdown",
      "secret": false,
      "strategy": "default",
      "default": "30"
    },
    {
      "key": "REDIS_PASSWORD",
      "service": "Redis",
      "description": "Redis password (generated)",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "PORT",
      "service": "API",
      "description": "Port Railway health-checks",
      "secret": false,
      "strategy": "default",
      "default": "3000"
    },
    {
      "key": "API_URL",
      "service": "API",
      "description": "Public URL of the API (the dashboard URL plus /api)",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "CH_HOST",
      "service": "API",
      "description": "ClickHouse host the start script waits for",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "API_HOST",
      "service": "API",
      "description": "Listen on all IPv6 and IPv4 addresses (Railway's private network is IPv6)",
      "secret": false,
      "strategy": "default",
      "default": "::"
    },
    {
      "key": "API_PORT",
      "service": "API",
      "description": "Port the API listens on",
      "secret": false,
      "strategy": "default",
      "default": "3000"
    },
    {
      "key": "NODE_ENV",
      "service": "API",
      "description": "Runs OpenPanel in production mode",
      "secret": false,
      "strategy": "default",
      "default": "production"
    },
    {
      "key": "REDIS_URL",
      "service": "API",
      "description": "Redis connection (private network); family=0 lets the client use Railway's IPv6 network",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "API_RUN_SH",
      "service": "API",
      "description": "Start script: waits for ClickHouse, runs migrations, creates the admin, starts the API",
      "secret": false,
      "strategy": "default",
      "default": "# OpenPanel API on Railway. Waits for ClickHouse, runs the Postgres (Prisma)\n# and ClickHouse migrations, creates the admin account from ADMIN_EMAIL and\n# ADMIN_PASSWORD on a private port before the API is reachable (so the first\n# visitor can't claim it), then starts the API on Railway's IPv6 network.\nset -eu\nlog() { echo \"openpanel-setup: $*\"; }\n\nlog \"waiting for ClickHouse at $CH_HOST\"\ni=0\nuntil curl -sf \"http://$CH_HOST:8123/ping\" >/dev/null 2>&1; do\n  i=$((i+1)); [ \"$i\" -ge 120 ] && { log \"ClickHouse did not answer in 10 minutes\"; exit 1; }\n  sleep 5\ndone\n\nlog \"running migrations\"\ncd /app/packages/db\ni=0\n# The migration runner prints the database URLs with their passwords; keep those lines out of the log.\nuntil CI=true pnpm run migrate:deploy >/tmp/migrate.log 2>&1; do\n  grep -v -E \"POSTGRES:|CLICKHOUSE:\" /tmp/migrate.log | tail -15\n  i=$((i+1)); [ \"$i\" -ge 30 ] && { log \"migrations kept failing\"; exit 1; }\n  log \"migrations failed, retrying in 10 s\"; sleep 10\ndone\ngrep -v -E \"POSTGRES:|CLICKHOUSE:\" /tmp/migrate.log | grep -E \"Applied|migrat|Will run|Finished\" | tail -12 || true\ncd /app/apps/api\n\nif [ -n \"${ADMIN_EMAIL:-}\" ]; then\n  log \"creating the admin account $ADMIN_EMAIL (skipped if any user exists)\"\n  API_PORT=3999 API_HOST=127.0.0.1 node dist/index.js >/tmp/seed.log 2>&1 &\n  seed=$!\n  i=0\n  until curl -sf http://127.0.0.1:3999/healthcheck >/dev/null 2>&1; do\n    i=$((i+1)); [ \"$i\" -ge 90 ] && { log \"seed instance did not start\"; tail -20 /tmp/seed.log; break; }\n    sleep 2\n  done\n  node -e '\n    const e = process.env;\n    const body = { json: { firstName: e.ADMIN_FIRST_NAME || \"Admin\", lastName: e.ADMIN_LAST_NAME || \"User\",\n      email: e.ADMIN_EMAIL, password: e.ADMIN_PASSWORD, confirmPassword: e.ADMIN_PASSWORD } };\n    fetch(\"http://127.0.0.1:3999/trpc/auth.signUpEmail\", { method: \"POST\",\n      headers: { \"content-type\": \"application/json\" }, body: JSON.stringify(body) })\n      .then(async (r) => {\n        const t = await r.text();\n        if (r.ok) console.log(\"openpanel-setup: admin created\");\n        else console.log(\"openpanel-setup: admin not created (\" + r.status + \"): \" + ((t.match(/\"message\":\"([^\"]*)\"/) || [])[1] || t.slice(0, 120)));\n      })\n      .catch((err) => console.log(\"openpanel-setup: admin request failed: \" + err.message));\n  '\n  kill \"$seed\" 2>/dev/null || true\n  wait \"$seed\" 2>/dev/null || true\nfi\n\nlog \"starting the API on [$API_HOST]:$API_PORT\"\nexec node dist/index.js\n"
    },
    {
      "key": "BATCH_SIZE",
      "service": "API",
      "description": "Events written to ClickHouse per batch",
      "secret": false,
      "strategy": "default",
      "default": "5000"
    },
    {
      "key": "ADMIN_EMAIL",
      "service": "API",
      "description": "Email of the admin account, created on first start. You log in with it",
      "secret": false,
      "strategy": "ask_user"
    },
    {
      "key": "SELF_HOSTED",
      "service": "API",
      "description": "Self-hosted mode (no billing, first user becomes admin)",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "DATABASE_URL",
      "service": "API",
      "description": "Postgres connection (private network)",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "COOKIE_SECRET",
      "service": "API",
      "description": "Session cookie secret (generated)",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "DASHBOARD_URL",
      "service": "API",
      "description": "Public URL of the dashboard. Change it when you add a custom domain",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "ADMIN_PASSWORD",
      "service": "API",
      "description": "Admin password (generated). Read it here after deploy",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "BATCH_INTERVAL",
      "service": "API",
      "description": "Milliseconds between event batches",
      "secret": false,
      "strategy": "default",
      "default": "10000"
    },
    {
      "key": "CLICKHOUSE_URL",
      "service": "API",
      "description": "ClickHouse connection (private network)",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "ADMIN_LAST_NAME",
      "service": "API",
      "description": "Admin last name",
      "secret": false,
      "strategy": "default",
      "default": "User"
    },
    {
      "key": "ADMIN_FIRST_NAME",
      "service": "API",
      "description": "Admin first name",
      "secret": false,
      "strategy": "default",
      "default": "Admin"
    },
    {
      "key": "ALLOW_INVITATION",
      "service": "API",
      "description": "Let the admin invite team members",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "ALLOW_REGISTRATION",
      "service": "API",
      "description": "Let anyone sign up. false: only the admin and people they invite",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "DATABASE_URL_DIRECT",
      "service": "API",
      "description": "Postgres connection for migrations (private network)",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "CUSTOM_COOKIE_DOMAIN",
      "service": "API",
      "description": "Domain the login cookie is set for. Must be the dashboard's host: OpenPanel would otherwise use the parent domain (up.railway.app), which browsers reject",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "API",
      "description": "Time to finish requests on shutdown",
      "secret": false,
      "strategy": "default",
      "default": "30"
    },
    {
      "key": "PGDATA",
      "service": "Postgres",
      "description": "Data directory on the volume",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "PGHOST",
      "service": "Postgres",
      "description": "Private host",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PGPORT",
      "service": "Postgres",
      "description": "Port",
      "secret": false,
      "strategy": "default",
      "default": "5432"
    },
    {
      "key": "PGUSER",
      "service": "Postgres",
      "description": "User",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGDATABASE",
      "service": "Postgres",
      "description": "Database",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGPASSWORD",
      "service": "Postgres",
      "description": "Password",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_DB",
      "service": "Postgres",
      "description": "Database name (users, projects, settings)",
      "secret": false,
      "strategy": "default",
      "default": "openpanel"
    },
    {
      "key": "DATABASE_URL",
      "service": "Postgres",
      "description": "Private connection string",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "POSTGRES_USER",
      "service": "Postgres",
      "description": "Database superuser",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "SSL_CERT_DAYS",
      "service": "Postgres",
      "description": "Validity of the generated TLS certificate",
      "secret": false,
      "strategy": "default",
      "default": "820"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "Postgres",
      "description": "Database password (generated)",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "Postgres",
      "description": "Time to shut down cleanly",
      "secret": false,
      "strategy": "default",
      "default": "60"
    },
    {
      "key": "CLICKHOUSE_DB",
      "service": "ClickHouse",
      "description": "Database for events",
      "secret": false,
      "strategy": "default",
      "default": "openpanel"
    },
    {
      "key": "CLICKHOUSE_USER",
      "service": "ClickHouse",
      "description": "ClickHouse user",
      "secret": false,
      "strategy": "default",
      "default": "openpanel"
    },
    {
      "key": "CLICKHOUSE_RUN_SH",
      "service": "ClickHouse",
      "description": "Start script: small log tables and thread limits, then the official entrypoint",
      "secret": false,
      "strategy": "default",
      "default": "# ClickHouse for OpenPanel on Railway: keeps internal log tables small, limits\n# threads for a small container, then starts the official entrypoint. The image\n# listens on IPv6 and IPv4, which Railway's private network needs.\nset -eu\ncat > /etc/clickhouse-server/config.d/railway.xml <<'XML'\n<clickhouse>\n    <logger><level>warning</level><console>true</console></logger>\n    <keep_alive_timeout>10</keep_alive_timeout>\n    <mark_cache_size>524288000</mark_cache_size>\n    <trace_log remove=\"remove\"/>\n    <text_log remove=\"remove\"/>\n    <metric_log remove=\"remove\"/>\n    <asynchronous_metric_log remove=\"remove\"/>\n    <processors_profile_log remove=\"remove\"/>\n    <query_metric_log remove=\"remove\"/>\n    <query_thread_log remove=\"remove\"/>\n    <query_views_log remove=\"remove\"/>\n    <asynchronous_insert_log remove=\"remove\"/>\n    <opentelemetry_span_log remove=\"remove\"/>\n    <session_log remove=\"remove\"/>\n    <latency_log remove=\"remove\"/>\n    <query_log replace=\"1\">\n        <database>system</database>\n        <table>query_log</table>\n        <flush_interval_milliseconds>7500</flush_interval_milliseconds>\n        <engine>ENGINE = MergeTree PARTITION BY event_date ORDER BY (event_time) TTL event_date + interval 3 day SETTINGS ttl_only_drop_parts=1</engine>\n    </query_log>\n    <part_log><ttl>event_date + INTERVAL 3 DAY DELETE</ttl></part_log>\n    <error_log><ttl>event_date + INTERVAL 7 DAY DELETE</ttl></error_log>\n    <macros>\n        <shard>1</shard>\n        <replica>replica1</replica>\n        <cluster>openpanel_cluster</cluster>\n    </macros>\n</clickhouse>\nXML\ncat > /etc/clickhouse-server/users.d/railway-low-resources.xml <<'XML'\n<clickhouse>\n    <profiles>\n        <default>\n            <max_threads>2</max_threads>\n            <max_download_threads>1</max_download_threads>\n            <input_format_parallel_parsing>0</input_format_parallel_parsing>\n            <output_format_parallel_formatting>0</output_format_parallel_formatting>\n            <log_query_threads>0</log_query_threads>\n        </default>\n    </profiles>\n</clickhouse>\nXML\nexec /entrypoint.sh\n"
    },
    {
      "key": "CLICKHOUSE_PASSWORD",
      "service": "ClickHouse",
      "description": "ClickHouse password (generated)",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "ClickHouse",
      "description": "Time to shut down cleanly",
      "secret": false,
      "strategy": "default",
      "default": "60"
    },
    {
      "key": "CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT",
      "service": "ClickHouse",
      "description": "Lets the user manage access",
      "secret": false,
      "strategy": "default",
      "default": "1"
    },
    {
      "key": "PORT",
      "service": "Worker",
      "description": "Port of the worker's health endpoint",
      "secret": false,
      "strategy": "default",
      "default": "3000"
    },
    {
      "key": "API_URL",
      "service": "Worker",
      "description": "Public URL of the API (the dashboard URL plus /api)",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "NODE_ENV",
      "service": "Worker",
      "description": "Runs OpenPanel in production mode",
      "secret": false,
      "strategy": "default",
      "default": "production"
    },
    {
      "key": "REDIS_URL",
      "service": "Worker",
      "description": "Redis connection (private network); family=0 lets the client use Railway's IPv6 network",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "BATCH_SIZE",
      "service": "Worker",
      "description": "Events written to ClickHouse per batch",
      "secret": false,
      "strategy": "default",
      "default": "5000"
    },
    {
      "key": "SELF_HOSTED",
      "service": "Worker",
      "description": "Self-hosted mode (no billing, first user becomes admin)",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "DATABASE_URL",
      "service": "Worker",
      "description": "Postgres connection (private network)",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "COOKIE_SECRET",
      "service": "Worker",
      "description": "Session cookie secret (shared with the API)",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DASHBOARD_URL",
      "service": "Worker",
      "description": "Public URL of the dashboard. Change it when you add a custom domain",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "BATCH_INTERVAL",
      "service": "Worker",
      "description": "Milliseconds between event batches",
      "secret": false,
      "strategy": "default",
      "default": "10000"
    },
    {
      "key": "CLICKHOUSE_URL",
      "service": "Worker",
      "description": "ClickHouse connection (private network)",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "ALLOW_INVITATION",
      "service": "Worker",
      "description": "Let the admin invite team members",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "ALLOW_REGISTRATION",
      "service": "Worker",
      "description": "Let anyone sign up. false: only the admin and people they invite",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "DATABASE_URL_DIRECT",
      "service": "Worker",
      "description": "Postgres connection for migrations (private network)",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "CUSTOM_COOKIE_DOMAIN",
      "service": "Worker",
      "description": "Domain the login cookie is set for. Must be the dashboard's host: OpenPanel would otherwise use the parent domain (up.railway.app), which browsers reject",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "Worker",
      "description": "Time to finish running jobs on shutdown",
      "secret": false,
      "strategy": "default",
      "default": "60"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "openpanel-23"
      }
    },
    "cli": "railway deploy --template openpanel-23",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "9343483b-499a-4641-a2ec-f66fdcbdef37",
            "serializedConfig": {
              "services": {
                "0f3f9e6c-972a-4f14-8f73-e7bccfdae732": {
                  "icon": "https://cdn.jsdelivr.net/gh/selfhst/icons/svg/openpanel.svg",
                  "name": "OpenPanel",
                  "deploy": {
                    "startCommand": "/bin/sh -c \"printenv CADDYFILE > /etc/caddy/Caddyfile && exec caddy run --config /etc/caddy/Caddyfile --adapter caddyfile\"",
                    "healthcheckPath": "/healthz",
                    "restartPolicyType": "ON_FAILURE",
                    "healthcheckTimeout": 120,
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "caddy:2.10.2-alpine"
                  },
                  "variables": {
                    "PORT": {
                      "description": "Port Railway routes the public domain to",
                      "defaultValue": "8080"
                    },
                    "CADDYFILE": {
                      "description": "Caddy config: /api goes to the API, everything else to the dashboard",
                      "defaultValue": "{\n\tadmin off\n\tauto_https off\n\tservers {\n\t\t# Only Railway's edge reaches this port; keep the visitor IP it forwards.\n\t\ttrusted_proxies static 0.0.0.0/0 ::/0\n\t}\n}\n\n:{$PORT} {\n\tencode gzip\n\thandle /healthz {\n\t\trespond \"ok\" 200\n\t}\n\t# Tracking API and the dashboard's backend, with /api stripped (as upstream).\n\thandle_path /api* {\n\t\treverse_proxy {$API_UPSTREAM}\n\t}\n\thandle {\n\t\treverse_proxy {$DASHBOARD_UPSTREAM}\n\t}\n}\n"
                    },
                    "API_UPSTREAM": {
                      "description": "API on the private network",
                      "defaultValue": "${{API.RAILWAY_PRIVATE_DOMAIN}}:3000"
                    },
                    "DASHBOARD_UPSTREAM": {
                      "description": "Dashboard on the private network",
                      "defaultValue": "${{Dashboard.RAILWAY_PRIVATE_DOMAIN}}:3000"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  }
                },
                "2dabf3b7-2ba2-4624-b53d-cb943732842f": {
                  "icon": "https://cdn.jsdelivr.net/gh/selfhst/icons/svg/openpanel.svg",
                  "name": "Dashboard",
                  "deploy": {
                    "healthcheckPath": "/api/healthcheck",
                    "restartPolicyType": "ON_FAILURE",
                    "healthcheckTimeout": 300,
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "lindesvard/openpanel-dashboard:2.3.0"
                  },
                  "variables": {
                    "PORT": {
                      "description": "Port the dashboard listens on",
                      "defaultValue": "3000"
                    },
                    "API_URL": {
                      "description": "Public URL of the API (the dashboard URL plus /api)",
                      "defaultValue": "https://${{OpenPanel.RAILWAY_PUBLIC_DOMAIN}}/api"
                    },
                    "NODE_ENV": {
                      "description": "Runs OpenPanel in production mode",
                      "defaultValue": "production"
                    },
                    "REDIS_URL": {
                      "description": "Redis connection (private network); family=0 lets the client use Railway's IPv6 network",
                      "defaultValue": "redis://default:${{Redis.REDIS_PASSWORD}}@${{Redis.RAILWAY_PRIVATE_DOMAIN}}:6379?family=0"
                    },
                    "BATCH_SIZE": {
                      "description": "Events written to ClickHouse per batch",
                      "defaultValue": "5000"
                    },
                    "SELF_HOSTED": {
                      "description": "Self-hosted mode (no billing, first user becomes admin)",
                      "defaultValue": "true"
                    },
                    "DATABASE_URL": {
                      "description": "Postgres connection (private network)",
                      "defaultValue": "postgresql://${{Postgres.POSTGRES_USER}}:${{Postgres.POSTGRES_PASSWORD}}@${{Postgres.RAILWAY_PRIVATE_DOMAIN}}:5432/${{Postgres.POSTGRES_DB}}"
                    },
                    "EMAIL_SENDER": {
                      "isOptional": true,
                      "description": "Sender address for invitations and password resets (optional, needs RESEND_API_KEY)",
                      "defaultValue": ""
                    },
                    "COOKIE_SECRET": {
                      "description": "Session cookie secret (shared with the API)",
                      "defaultValue": "${{API.COOKIE_SECRET}}"
                    },
                    "DASHBOARD_URL": {
                      "description": "Public URL of the dashboard. Change it when you add a custom domain",
                      "defaultValue": "https://${{OpenPanel.RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "BATCH_INTERVAL": {
                      "description": "Milliseconds between event batches",
                      "defaultValue": "10000"
                    },
                    "CLICKHOUSE_URL": {
                      "description": "ClickHouse connection (private network)",
                      "defaultValue": "http://${{ClickHouse.CLICKHOUSE_USER}}:${{ClickHouse.CLICKHOUSE_PASSWORD}}@${{ClickHouse.RAILWAY_PRIVATE_DOMAIN}}:8123/${{ClickHouse.CLICKHOUSE_DB}}"
                    },
                    "RESEND_API_KEY": {
                      "isOptional": true,
                      "description": "Resend API key for sending email (optional)",
                      "defaultValue": ""
                    },
                    "ALLOW_INVITATION": {
                      "description": "Let the admin invite team members",
                      "defaultValue": "true"
                    },
                    "ALLOW_REGISTRATION": {
                      "description": "Let anyone sign up. false: only the admin and people they invite",
                      "defaultValue": "false"
                    },
                    "DATABASE_URL_DIRECT": {
                      "description": "Postgres connection for migrations (private network)",
                      "defaultValue": "${{DATABASE_URL}}"
                    },
                    "CUSTOM_COOKIE_DOMAIN": {
                      "description": "Domain the login cookie is set for. Must be the dashboard's host: OpenPanel would otherwise use the parent domain (up.railway.app), which browsers reject",
                      "defaultValue": "${{OpenPanel.RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "description": "Time to finish requests on shutdown",
                      "defaultValue": "30"
                    }
                  }
                },
                "674dc9ee-4a5b-414e-b9df-ab48c61f28f2": {
                  "icon": "https://devicons.railway.app/i/redis.svg",
                  "name": "Redis",
                  "deploy": {
                    "startCommand": "/bin/sh -c \"rm -rf /data/lost+found; exec docker-entrypoint.sh redis-server --requirepass $REDIS_PASSWORD --appendonly yes --dir /data --maxmemory 512mb --maxmemory-policy noeviction\"",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "redis:8.10"
                  },
                  "variables": {
                    "REDIS_PASSWORD": {
                      "description": "Redis password (generated)",
                      "defaultValue": "{{REDIS_PASSWORD}}"
                    }
                  },
                  "volumeMounts": {
                    "81d07d2d-cb65-4ab1-8c79-cefb4a5b4806": {
                      "mountPath": "/data"
                    }
                  }
                },
                "95386d15-fa88-459c-bd51-de48f97fd2c8": {
                  "icon": "https://cdn.jsdelivr.net/gh/selfhst/icons/svg/openpanel.svg",
                  "name": "API",
                  "deploy": {
                    "startCommand": "/bin/sh -c \"printenv API_RUN_SH > /tmp/run.sh && exec sh /tmp/run.sh\"",
                    "healthcheckPath": "/healthcheck",
                    "restartPolicyType": "ON_FAILURE",
                    "healthcheckTimeout": 600,
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "lindesvard/openpanel-api:2.3.0"
                  },
                  "variables": {
                    "PORT": {
                      "description": "Port Railway health-checks",
                      "defaultValue": "3000"
                    },
                    "API_URL": {
                      "description": "Public URL of the API (the dashboard URL plus /api)",
                      "defaultValue": "https://${{OpenPanel.RAILWAY_PUBLIC_DOMAIN}}/api"
                    },
                    "CH_HOST": {
                      "description": "ClickHouse host the start script waits for",
                      "defaultValue": "${{ClickHouse.RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "API_HOST": {
                      "description": "Listen on all IPv6 and IPv4 addresses (Railway's private network is IPv6)",
                      "defaultValue": "::"
                    },
                    "API_PORT": {
                      "description": "Port the API listens on",
                      "defaultValue": "3000"
                    },
                    "NODE_ENV": {
                      "description": "Runs OpenPanel in production mode",
                      "defaultValue": "production"
                    },
                    "REDIS_URL": {
                      "description": "Redis connection (private network); family=0 lets the client use Railway's IPv6 network",
                      "defaultValue": "redis://default:${{Redis.REDIS_PASSWORD}}@${{Redis.RAILWAY_PRIVATE_DOMAIN}}:6379?family=0"
                    },
                    "API_RUN_SH": {
                      "description": "Start script: waits for ClickHouse, runs migrations, creates the admin, starts the API",
                      "defaultValue": "# OpenPanel API on Railway. Waits for ClickHouse, runs the Postgres (Prisma)\n# and ClickHouse migrations, creates the admin account from ADMIN_EMAIL and\n# ADMIN_PASSWORD on a private port before the API is reachable (so the first\n# visitor can't claim it), then starts the API on Railway's IPv6 network.\nset -eu\nlog() { echo \"openpanel-setup: $*\"; }\n\nlog \"waiting for ClickHouse at $CH_HOST\"\ni=0\nuntil curl -sf \"http://$CH_HOST:8123/ping\" >/dev/null 2>&1; do\n  i=$((i+1)); [ \"$i\" -ge 120 ] && { log \"ClickHouse did not answer in 10 minutes\"; exit 1; }\n  sleep 5\ndone\n\nlog \"running migrations\"\ncd /app/packages/db\ni=0\n# The migration runner prints the database URLs with their passwords; keep those lines out of the log.\nuntil CI=true pnpm run migrate:deploy >/tmp/migrate.log 2>&1; do\n  grep -v -E \"POSTGRES:|CLICKHOUSE:\" /tmp/migrate.log | tail -15\n  i=$((i+1)); [ \"$i\" -ge 30 ] && { log \"migrations kept failing\"; exit 1; }\n  log \"migrations failed, retrying in 10 s\"; sleep 10\ndone\ngrep -v -E \"POSTGRES:|CLICKHOUSE:\" /tmp/migrate.log | grep -E \"Applied|migrat|Will run|Finished\" | tail -12 || true\ncd /app/apps/api\n\nif [ -n \"${ADMIN_EMAIL:-}\" ]; then\n  log \"creating the admin account $ADMIN_EMAIL (skipped if any user exists)\"\n  API_PORT=3999 API_HOST=127.0.0.1 node dist/index.js >/tmp/seed.log 2>&1 &\n  seed=$!\n  i=0\n  until curl -sf http://127.0.0.1:3999/healthcheck >/dev/null 2>&1; do\n    i=$((i+1)); [ \"$i\" -ge 90 ] && { log \"seed instance did not start\"; tail -20 /tmp/seed.log; break; }\n    sleep 2\n  done\n  node -e '\n    const e = process.env;\n    const body = { json: { firstName: e.ADMIN_FIRST_NAME || \"Admin\", lastName: e.ADMIN_LAST_NAME || \"User\",\n      email: e.ADMIN_EMAIL, password: e.ADMIN_PASSWORD, confirmPassword: e.ADMIN_PASSWORD } };\n    fetch(\"http://127.0.0.1:3999/trpc/auth.signUpEmail\", { method: \"POST\",\n      headers: { \"content-type\": \"application/json\" }, body: JSON.stringify(body) })\n      .then(async (r) => {\n        const t = await r.text();\n        if (r.ok) console.log(\"openpanel-setup: admin created\");\n        else console.log(\"openpanel-setup: admin not created (\" + r.status + \"): \" + ((t.match(/\"message\":\"([^\"]*)\"/) || [])[1] || t.slice(0, 120)));\n      })\n      .catch((err) => console.log(\"openpanel-setup: admin request failed: \" + err.message));\n  '\n  kill \"$seed\" 2>/dev/null || true\n  wait \"$seed\" 2>/dev/null || true\nfi\n\nlog \"starting the API on [$API_HOST]:$API_PORT\"\nexec node dist/index.js\n"
                    },
                    "BATCH_SIZE": {
                      "description": "Events written to ClickHouse per batch",
                      "defaultValue": "5000"
                    },
                    "ADMIN_EMAIL": {
                      "description": "Email of the admin account, created on first start. You log in with it",
                      "defaultValue": "{{ADMIN_EMAIL}}"
                    },
                    "SELF_HOSTED": {
                      "description": "Self-hosted mode (no billing, first user becomes admin)",
                      "defaultValue": "true"
                    },
                    "DATABASE_URL": {
                      "description": "Postgres connection (private network)",
                      "defaultValue": "postgresql://${{Postgres.POSTGRES_USER}}:${{Postgres.POSTGRES_PASSWORD}}@${{Postgres.RAILWAY_PRIVATE_DOMAIN}}:5432/${{Postgres.POSTGRES_DB}}"
                    },
                    "EMAIL_SENDER": {
                      "isOptional": true,
                      "description": "Sender address for invitations and password resets (optional, needs RESEND_API_KEY)",
                      "defaultValue": ""
                    },
                    "COOKIE_SECRET": {
                      "description": "Session cookie secret (generated)",
                      "defaultValue": "{{COOKIE_SECRET}}"
                    },
                    "DASHBOARD_URL": {
                      "description": "Public URL of the dashboard. Change it when you add a custom domain",
                      "defaultValue": "https://${{OpenPanel.RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "ADMIN_PASSWORD": {
                      "description": "Admin password (generated). Read it here after deploy",
                      "defaultValue": "{{ADMIN_PASSWORD}}"
                    },
                    "BATCH_INTERVAL": {
                      "description": "Milliseconds between event batches",
                      "defaultValue": "10000"
                    },
                    "CLICKHOUSE_URL": {
                      "description": "ClickHouse connection (private network)",
                      "defaultValue": "http://${{ClickHouse.CLICKHOUSE_USER}}:${{ClickHouse.CLICKHOUSE_PASSWORD}}@${{ClickHouse.RAILWAY_PRIVATE_DOMAIN}}:8123/${{ClickHouse.CLICKHOUSE_DB}}"
                    },
                    "RESEND_API_KEY": {
                      "isOptional": true,
                      "description": "Resend API key for sending email (optional)",
                      "defaultValue": ""
                    },
                    "ADMIN_LAST_NAME": {
                      "description": "Admin last name",
                      "defaultValue": "User"
                    },
                    "ADMIN_FIRST_NAME": {
                      "description": "Admin first name",
                      "defaultValue": "Admin"
                    },
                    "ALLOW_INVITATION": {
                      "description": "Let the admin invite team members",
                      "defaultValue": "true"
                    },
                    "ALLOW_REGISTRATION": {
                      "description": "Let anyone sign up. false: only the admin and people they invite",
                      "defaultValue": "false"
                    },
                    "DATABASE_URL_DIRECT": {
                      "description": "Postgres connection for migrations (private network)",
                      "defaultValue": "${{DATABASE_URL}}"
                    },
                    "CUSTOM_COOKIE_DOMAIN": {
                      "description": "Domain the login cookie is set for. Must be the dashboard's host: OpenPanel would otherwise use the parent domain (up.railway.app), which browsers reject",
                      "defaultValue": "${{OpenPanel.RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "description": "Time to finish requests on shutdown",
                      "defaultValue": "30"
                    }
                  }
                },
                "a0263873-4bc9-440f-ad54-8a19fc51290e": {
                  "icon": "https://devicons.railway.app/i/postgresql.svg",
                  "name": "Postgres",
                  "deploy": {
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ghcr.io/railwayapp-templates/postgres-ssl:17"
                  },
                  "variables": {
                    "PGDATA": {
                      "description": "Data directory on the volume",
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "PGHOST": {
                      "description": "Private host",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "PGPORT": {
                      "description": "Port",
                      "defaultValue": "5432"
                    },
                    "PGUSER": {
                      "description": "User",
                      "defaultValue": "${{POSTGRES_USER}}"
                    },
                    "PGDATABASE": {
                      "description": "Database",
                      "defaultValue": "${{POSTGRES_DB}}"
                    },
                    "PGPASSWORD": {
                      "description": "Password",
                      "defaultValue": "${{POSTGRES_PASSWORD}}"
                    },
                    "POSTGRES_DB": {
                      "description": "Database name (users, projects, settings)",
                      "defaultValue": "openpanel"
                    },
                    "DATABASE_URL": {
                      "description": "Private connection string",
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:5432/${{PGDATABASE}}"
                    },
                    "POSTGRES_USER": {
                      "description": "Database superuser",
                      "defaultValue": "postgres"
                    },
                    "SSL_CERT_DAYS": {
                      "description": "Validity of the generated TLS certificate",
                      "defaultValue": "820"
                    },
                    "POSTGRES_PASSWORD": {
                      "description": "Database password (generated)",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "description": "Time to shut down cleanly",
                      "defaultValue": "60"
                    }
                  },
                  "volumeMounts": {
                    "871af892-5559-415c-add2-3a3785c73838": {
                      "mountPath": "/var/lib/postgresql/data"
                    }
                  }
                },
                "d0359baf-5fe5-4c2b-88b6-020ade03a0c6": {
                  "icon": "https://cdn.jsdelivr.net/gh/selfhst/icons/svg/clickhouse.svg",
                  "name": "ClickHouse",
                  "deploy": {
                    "startCommand": "/bin/sh -c \"printenv CLICKHOUSE_RUN_SH > /tmp/run.sh && exec sh /tmp/run.sh\"",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "clickhouse/clickhouse-server:25.10.2.65-alpine"
                  },
                  "variables": {
                    "CLICKHOUSE_DB": {
                      "description": "Database for events",
                      "defaultValue": "openpanel"
                    },
                    "CLICKHOUSE_USER": {
                      "description": "ClickHouse user",
                      "defaultValue": "openpanel"
                    },
                    "CLICKHOUSE_RUN_SH": {
                      "description": "Start script: small log tables and thread limits, then the official entrypoint",
                      "defaultValue": "# ClickHouse for OpenPanel on Railway: keeps internal log tables small, limits\n# threads for a small container, then starts the official entrypoint. The image\n# listens on IPv6 and IPv4, which Railway's private network needs.\nset -eu\ncat > /etc/clickhouse-server/config.d/railway.xml <<'XML'\n<clickhouse>\n    <logger><level>warning</level><console>true</console></logger>\n    <keep_alive_timeout>10</keep_alive_timeout>\n    <mark_cache_size>524288000</mark_cache_size>\n    <trace_log remove=\"remove\"/>\n    <text_log remove=\"remove\"/>\n    <metric_log remove=\"remove\"/>\n    <asynchronous_metric_log remove=\"remove\"/>\n    <processors_profile_log remove=\"remove\"/>\n    <query_metric_log remove=\"remove\"/>\n    <query_thread_log remove=\"remove\"/>\n    <query_views_log remove=\"remove\"/>\n    <asynchronous_insert_log remove=\"remove\"/>\n    <opentelemetry_span_log remove=\"remove\"/>\n    <session_log remove=\"remove\"/>\n    <latency_log remove=\"remove\"/>\n    <query_log replace=\"1\">\n        <database>system</database>\n        <table>query_log</table>\n        <flush_interval_milliseconds>7500</flush_interval_milliseconds>\n        <engine>ENGINE = MergeTree PARTITION BY event_date ORDER BY (event_time) TTL event_date + interval 3 day SETTINGS ttl_only_drop_parts=1</engine>\n    </query_log>\n    <part_log><ttl>event_date + INTERVAL 3 DAY DELETE</ttl></part_log>\n    <error_log><ttl>event_date + INTERVAL 7 DAY DELETE</ttl></error_log>\n    <macros>\n        <shard>1</shard>\n        <replica>replica1</replica>\n        <cluster>openpanel_cluster</cluster>\n    </macros>\n</clickhouse>\nXML\ncat > /etc/clickhouse-server/users.d/railway-low-resources.xml <<'XML'\n<clickhouse>\n    <profiles>\n        <default>\n            <max_threads>2</max_threads>\n            <max_download_threads>1</max_download_threads>\n            <input_format_parallel_parsing>0</input_format_parallel_parsing>\n            <output_format_parallel_formatting>0</output_format_parallel_formatting>\n            <log_query_threads>0</log_query_threads>\n        </default>\n    </profiles>\n</clickhouse>\nXML\nexec /entrypoint.sh\n"
                    },
                    "CLICKHOUSE_PASSWORD": {
                      "description": "ClickHouse password (generated)",
                      "defaultValue": "{{CLICKHOUSE_PASSWORD}}"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "description": "Time to shut down cleanly",
                      "defaultValue": "60"
                    },
                    "CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT": {
                      "description": "Lets the user manage access",
                      "defaultValue": "1"
                    }
                  },
                  "volumeMounts": {
                    "02d7cdd6-762a-47f0-9862-e65e4c07fd07": {
                      "mountPath": "/var/lib/clickhouse"
                    }
                  }
                },
                "e3041c45-a66c-4567-a875-9c73cb41f0c1": {
                  "icon": "https://cdn.jsdelivr.net/gh/selfhst/icons/svg/openpanel.svg",
                  "name": "Worker",
                  "deploy": {
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "lindesvard/openpanel-worker:2.3.0"
                  },
                  "variables": {
                    "PORT": {
                      "description": "Port of the worker's health endpoint",
                      "defaultValue": "3000"
                    },
                    "API_URL": {
                      "description": "Public URL of the API (the dashboard URL plus /api)",
                      "defaultValue": "https://${{OpenPanel.RAILWAY_PUBLIC_DOMAIN}}/api"
                    },
                    "NODE_ENV": {
                      "description": "Runs OpenPanel in production mode",
                      "defaultValue": "production"
                    },
                    "REDIS_URL": {
                      "description": "Redis connection (private network); family=0 lets the client use Railway's IPv6 network",
                      "defaultValue": "redis://default:${{Redis.REDIS_PASSWORD}}@${{Redis.RAILWAY_PRIVATE_DOMAIN}}:6379?family=0"
                    },
                    "BATCH_SIZE": {
                      "description": "Events written to ClickHouse per batch",
                      "defaultValue": "5000"
                    },
                    "SELF_HOSTED": {
                      "description": "Self-hosted mode (no billing, first user becomes admin)",
                      "defaultValue": "true"
                    },
                    "DATABASE_URL": {
                      "description": "Postgres connection (private network)",
                      "defaultValue": "postgresql://${{Postgres.POSTGRES_USER}}:${{Postgres.POSTGRES_PASSWORD}}@${{Postgres.RAILWAY_PRIVATE_DOMAIN}}:5432/${{Postgres.POSTGRES_DB}}"
                    },
                    "EMAIL_SENDER": {
                      "isOptional": true,
                      "description": "Sender address for invitations and password resets (optional, needs RESEND_API_KEY)",
                      "defaultValue": ""
                    },
                    "COOKIE_SECRET": {
                      "description": "Session cookie secret (shared with the API)",
                      "defaultValue": "${{API.COOKIE_SECRET}}"
                    },
                    "DASHBOARD_URL": {
                      "description": "Public URL of the dashboard. Change it when you add a custom domain",
                      "defaultValue": "https://${{OpenPanel.RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "BATCH_INTERVAL": {
                      "description": "Milliseconds between event batches",
                      "defaultValue": "10000"
                    },
                    "CLICKHOUSE_URL": {
                      "description": "ClickHouse connection (private network)",
                      "defaultValue": "http://${{ClickHouse.CLICKHOUSE_USER}}:${{ClickHouse.CLICKHOUSE_PASSWORD}}@${{ClickHouse.RAILWAY_PRIVATE_DOMAIN}}:8123/${{ClickHouse.CLICKHOUSE_DB}}"
                    },
                    "RESEND_API_KEY": {
                      "isOptional": true,
                      "description": "Resend API key for sending email (optional)",
                      "defaultValue": ""
                    },
                    "ALLOW_INVITATION": {
                      "description": "Let the admin invite team members",
                      "defaultValue": "true"
                    },
                    "ALLOW_REGISTRATION": {
                      "description": "Let anyone sign up. false: only the admin and people they invite",
                      "defaultValue": "false"
                    },
                    "DATABASE_URL_DIRECT": {
                      "description": "Postgres connection for migrations (private network)",
                      "defaultValue": "${{DATABASE_URL}}"
                    },
                    "CUSTOM_COOKIE_DOMAIN": {
                      "description": "Domain the login cookie is set for. Must be the dashboard's host: OpenPanel would otherwise use the parent domain (up.railway.app), which browsers reject",
                      "defaultValue": "${{OpenPanel.RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "description": "Time to finish running jobs on shutdown",
                      "defaultValue": "60"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "OpenPanel",
      "method": "GET",
      "path": "/healthz",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 7,
    "needs_volume": true
  },
  "generated_at": "2026-11-08T22:15:11.842Z",
  "generator_version": "0.1.0"
}
