selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

ongrid logo

Self-host ongrid

v0.18.2

AI ops agent that diagnoses and fixes infra from chat

BetaOpen SourceAGPL-3.0
Updated14 hours ago
LanguageGo
Setup difficultyAdvanced
Stars
1 240
RAM
4 GB minimum, 8 GB recommended
Storage
20 GB free disk under /var/lib/ongrid
Port
9100 (Prometheus metrics endpoint)
Requires
Frontier (singchia/frontier), Grafana, Loki, MySQL, OpenTelemetry Collector, Prometheus, Pyroscope, Qdrant, SearXNG, Tempo
Docker
docker.cnb.cool/ongridio/ongrid/mysql:8.0
Install with Docker Compose
Ongrid demo showing chat-driven operationsRoot cause analysis report with approval gateWorkflow builder for automationSkills catalog showing available agent toolsMCP servers integration managementKnowledge vault for runbooks and incident historyArtifacts center for generated reportsMonitoring dashboard with fleet healthTopology map showing service dependenciesRCA session with approval and write gate

What is ongrid?

Ongrid is an AI-powered operations agent that integrates with your existing observability stack (Prometheus, Loki, Tempo, Grafana) and communication channels (Slack, Telegram, Lark, DingTalk, WeCom) to automatically investigate alerts, correlate metrics, logs, and traces across your infrastructure topology, and provide evidence-backed root-cause analysis. It runs as a self-hosted service deployed via a single install.sh script that brings up the full stack including MySQL, Prometheus, Loki, Tempo, Grafana, Qdrant, and a tunnel broker — all without requiring inbound ports on managed hosts. The agent uses specialist sub-agents for SRE, network, and database tasks, supports bring-your-own LLM (Anthropic, OpenAI, Gemini, DeepSeek, and more), and includes a browser-based SSH reverse tunnel for secure host access. It is licensed under AGPL-3.0 and currently at version v0.18.2 (pre-1.0 beta).

Should you self-host ongrid?

ongrid scores 52/100 on selfhost.directory (how scoring works) and ranks #86 of 209 in AI Agents. It has 1 240 GitHub stars.

It shipped 21 stable releases in the past year. The latest, v0.18.2, came out on 15 October 2026. New versions land roughly every 1 days.

Setup is advanced: plan for several services and some ongoing maintenance. An official Docker image is available. It is AGPL-3.0-licensed and written mostly in Go.

Its closest alternative on selfhost.directory is Orca (91/100, 108 815 stars). It scores higher overall, so compare the two before you pick. See ongrid vs Orca side by side.

Features

  • AI-powered root cause analysis
  • Approval and write gate
  • Bring-your-own LLM
  • Browser-based SSH reverse tunnel
  • Built-in observability stack
  • Chat-driven operations
  • Knowledge vault
  • Kubernetes lifecycle management
  • MCP Server Integration
  • Multi-agent coordinator with specialists
  • Network device management
  • Skills catalog
  • Topology map
  • Workflow Builder
  • Zero inbound ports architecture

ongrid README

How to install ongrid

Install ongrid with Docker Compose

Pick the latest tag at https://github.com/ongridio/ongrid/releases

VER=v0.18.2

gh release download "$VER"
--repo ongridio/ongrid
-p 'ongrid--linux-amd64.tar.xz'

Verify the sha256 — the .sha256 sidecar ships with each release.

sha256sum -c "ongrid-${VER}-linux-amd64.tar.xz.sha256"

tar xf "ongrid-${VER}-linux-amd64.tar.xz" cd "ongrid-${VER}-linux-amd64"

sudo ./install.sh

Self-contained tarball with all docker images; works in air-gapped environments

How to configure ongrid

  • ONGRID_ADMIN_EMAILadmin@ongrid.localBootstrap admin (cloud only). Seeded on first startup if the email is unused. Leave both empty to start with an empty users table (nobody can log in until you set these and restart).

    Bootstrap admin (cloud only). Seeded on first startup if the email is unused. Leave both empty to start with an empty users table (nobody can log in until you set these and restart).

  • ONGRID_ADMIN_PASSWORD
  • ONGRID_ALERT_COOLDOWN10m
  • ONGRID_ALERT_CPU_PERCENT90
  • ONGRID_ALERT_DISK_USED_PERCENT90
  • ONGRID_ALERT_ENABLEDtrue--- Built-in host alert thresholds (fast-path HostMetricPoint) ---

    --- Built-in host alert thresholds (fast-path HostMetricPoint) ---

  • ONGRID_ALERT_LOAD100 disables load1 alerting; set an absolute load threshold if desired.

    0 disables load1 alerting; set an absolute load threshold if desired.

  • ONGRID_ALERT_MEM_PERCENT90
  • ONGRID_DB_DIALECTmysqlDatabase (default: MySQL)

    Database (default: MySQL)

  • ONGRID_DB_DSNongrid:ongrid@tcp(127.0.0.1:3306)/ongrid?parseTime=true&charset=utf8mb4&loc=Local
  • ONGRID_DB_PATH
  • ONGRID_EDGE_ACCESS_KEY
  • ONGRID_EDGE_CLOUD_ADDRlocalhost:40012ongrid-edge only — dial the broker's edge-bound port (40012, host-mapped to 40012)

    ongrid-edge only — dial the broker's edge-bound port (40012, host-mapped to 40012)

  • ONGRID_EDGE_COLLECTOR_INTERVAL10s
  • ONGRID_EDGE_COLLECTOR_MODEauto
  • ONGRID_EDGE_SCRAPE_CONFIG_FILE/etc/ongrid-edge/scrape.yaml
  • ONGRID_EDGE_SECRET_KEY
  • ONGRID_FRONTIER_ADDRfrontier:40011--- Frontier broker (upstream singchia/frontier; ADR-007) --- Manager dials the broker's service-bound port (40011). Inside docker compose use `frontier:40011`; for `make run-ongrid` against a frontier container exposed via the dev compose, use `localhost:40011`.

    --- Frontier broker (upstream singchia/frontier; ADR-007) --- Manager dials the broker's service-bound port (40011). Inside docker compose use `frontier:40011`; for `make run-ongrid` against a frontier container exposed via the dev compose, use `localhost:40011`.

  • ONGRID_FRONTIER_SERVICE_NAMEongrid-manager
  • ONGRID_HTTP_ADDR:8080Server ports (in-container; nginx fronts these on the host — see ADR-008)

    Server ports (in-container; nginx fronts these on the host — see ADR-008)

  • ONGRID_HTTP_PORT443nginx-fronted host ports (ADR-008). 443 = HTTPS, 80 = HTTP redirect. Set ONGRID_HTTP_REDIRECT_PORT=0 to disable the 80 -> 443 redirect.

    nginx-fronted host ports (ADR-008). 443 = HTTPS, 80 = HTTP redirect. Set ONGRID_HTTP_REDIRECT_PORT=0 to disable the 80 -> 443 redirect.

  • ONGRID_HTTP_REDIRECT_PORT80
  • ONGRID_JWT_ACCESS_TTL15m
  • ONGRID_JWT_REFRESH_TTL168h
  • ONGRID_JWT_SECRETJWT signing

    JWT signing

  • ONGRID_METRICS_ADDR:9100
  • ONGRID_NOTIFY_DEFAULT_CHANNELSlog
  • ONGRID_NOTIFY_DINGTALK_ENABLEDfalseDingTalk custom robot webhook.

    DingTalk custom robot webhook.

  • ONGRID_NOTIFY_DINGTALK_NAMEdingtalk
  • ONGRID_NOTIFY_DINGTALK_SECRET
  • ONGRID_NOTIFY_DINGTALK_WEBHOOK_URL
  • ONGRID_NOTIFY_ENABLEDfalse--- Outbound notifications (alerts / scheduled jobs / proactive AIOps) --- Disabled by default. Set default channels to any enabled channel names below.

    --- Outbound notifications (alerts / scheduled jobs / proactive AIOps) --- Disabled by default. Set default channels to any enabled channel names below.

  • ONGRID_NOTIFY_FEISHU_ENABLEDfalseFeishu/Lark custom bot webhook.

    Feishu/Lark custom bot webhook.

  • ONGRID_NOTIFY_FEISHU_NAMEfeishu
  • ONGRID_NOTIFY_FEISHU_SECRET
  • ONGRID_NOTIFY_FEISHU_WEBHOOK_URL
  • ONGRID_NOTIFY_LOG_ENABLEDtrueLocal dry-run sink. Useful before wiring real external channels.

    Local dry-run sink. Useful before wiring real external channels.

  • ONGRID_NOTIFY_LOG_NAMElog
  • ONGRID_NOTIFY_SLACK_ENABLEDfalseSlack incoming webhook.

    Slack incoming webhook.

  • ONGRID_NOTIFY_SLACK_NAMEslack
  • ONGRID_NOTIFY_SLACK_WEBHOOK_URL
  • ONGRID_NOTIFY_TIMEOUT10s
  • ONGRID_NOTIFY_WEBHOOK_ENABLEDGeneric JSON webhook. If secret is set, requests carry X-Ongrid-Signature.

    Generic JSON webhook. If secret is set, requests carry X-Ongrid-Signature.

  • ONGRID_NOTIFY_WEBHOOK_NAMEwebhook
  • ONGRID_NOTIFY_WEBHOOK_SECRET
  • ONGRID_NOTIFY_WEBHOOK_URL
  • ONGRID_OPENAI_API_KEYOpenAI

    OpenAI

  • ONGRID_OPENAI_BASE_URL
  • ONGRID_OPENAI_MODELgpt-4o
  • ONGRID_PROM_ENABLEDtrue--- Cloud-side Prometheus (ADR-009) --- When ONGRID_PROM_ENABLED=true the manager forwards push_prom_samples to remote_write, and the AI agent gains a query_promql tool. Leave false until you actually deploy a Prom container.

    --- Cloud-side Prometheus (ADR-009) --- When ONGRID_PROM_ENABLED=true the manager forwards push_prom_samples to remote_write, and the AI agent gains a query_promql tool. Leave false until you actually deploy a Prom container.

  • ONGRID_PROM_QUERY_URLhttp://prometheus:9090/prometheusOptional Prometheus-compatible query API root. Empty means ONGRID_PROM_URL.

    Optional Prometheus-compatible query API root. Empty means ONGRID_PROM_URL.

  • ONGRID_PROM_REMOTE_WRITE_URLOptional exact remote_write endpoint for Prometheus-compatible TSDBs (VictoriaMetrics / Mimir / Cortex / Thanos receive). Empty means ONGRID_PROM_URL + /api/v1/write.

    Optional exact remote_write endpoint for Prometheus-compatible TSDBs (VictoriaMetrics / Mimir / Cortex / Thanos receive). Empty means ONGRID_PROM_URL + /api/v1/write.

  • ONGRID_PROM_URLhttp://prometheus:9090/prometheus

ongrid releases & version history

More in DevOps

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…