Grafana Self-Hosted

IntermediateDashboard

Self-hosted Grafana and Prometheus: metrics dashboards and alerting on a server you run.

Published 27 September 2026

Core Tools
Docker
Docker
Grafana
Grafana
Prometheus
Prometheus
Database
SQLite
PostgreSQL
Hosting
Hetzner
Raspberry Pi
DigitalOcean
Hostinger
Amazon Web Services
+1
Reverse Proxy
Traefik
Caddy
NGINX
Self-Hosted PaaS
Coolify
Dokploy

About Grafana Self-Hosted

Grafana and Prometheus are the most common open-source monitoring pair. Prometheus pulls metrics from your applications and exporters (Node Exporter for the server itself, client libraries inside your code) and stores them in its own time-series database on local disk. Grafana queries Prometheus with PromQL, draws the dashboards, and its built-in alerting notifies email, Slack, PagerDuty, or a webhook when a query crosses a threshold.

The stack is deliberately small to run. Grafana's own guidance is 512 MB of memory and one core, and Prometheus grows with the number of active time series it scrapes rather than with the number of dashboards. One Docker Compose file starts both on a small VPS, a cloud instance, or a single-board computer in a home lab.

Grafana's own database holds dashboards, users, folders, and alert rules, never the metrics themselves. SQLite is the default: one file with nothing to operate, which suits a personal or small-team instance. PostgreSQL is the option once several people edit dashboards at the same time, when Grafana's state should be backed up with your other databases, or when more than one Grafana instance runs behind a load balancer, which SQLite can't support.

Dashboards and data sources can also be provisioned from files: YAML and JSON kept in version control and loaded at startup. A rebuild is then a redeploy of the Compose file, and only Grafana's database and Prometheus's data directory need backups.

Key Features

  • ✓Prometheus scraping of application metrics and Node Exporter host metrics
  • ✓Grafana dashboards, variables, and annotations over PromQL queries
  • ✓Built-in Grafana alerting with email, Slack, PagerDuty, and webhook contact points
  • ✓Grafana's own state in SQLite by default, or PostgreSQL for teams and multiple instances
  • ✓Dashboards and data sources provisioned from version-controlled YAML and JSON files
  • ✓One Docker Compose file for both services, portable across any VPS, cloud instance, or home-lab board

When to Use Grafana Self-Hosted

  • →Developers monitoring their own self-hosted applications and servers
  • →Small teams that need uptime, latency, and resource dashboards without per-series billing
  • →Home-lab setups monitoring hardware on the local network
  • →Teams whose data-residency rules keep metrics off third-party services
  • →Learning PromQL and dashboard design on a setup that costs a few dollars a month

Pros

  • No per-series or per-user charge; the bill is one small server
  • Light enough for an entry VPS or a single-board computer
  • The same Grafana instance can add PostgreSQL, Loki, or cloud metrics as data sources later
  • Dashboards as code through file provisioning, so rebuilds are repeatable

Cons

  • Prometheus local storage is single-node, with no replication and 15 days of retention by default
  • Upgrades, backups, and alert delivery are yours, including watching the monitoring server itself
  • SQLite limits Grafana to one instance and a few concurrent editors; teams move to PostgreSQL
  • Logs, traces, and long-term metrics storage need more components than this stack includes

Database Options for Grafana Self-Hosted

SQLite

Grafana Self-Hosted with SQLite

Grafana's bundled default: one file, grafana.db, holding dashboards, users, and alert rules, with nothing to install or operate. Enough for one Grafana instance and a few editors. Stop Grafana or use SQLite's online backup before copying it, since a file copied mid-write can come back corrupted.

PostgreSQL

Grafana Self-Hosted with PostgreSQL

Moves Grafana's dashboards, users, and alert rules into PostgreSQL, which handles many concurrent editors and is required to run more than one Grafana instance behind a load balancer. It holds Grafana's state only; metrics stay in Prometheus. Worth it when the team grows or when Grafana's database should be backed up alongside your other PostgreSQL databases.

These are highlighted picks. To see all the tools, check the Databases category.

Hosting Options for Grafana Self-Hosted

Hetzner

Deploy Grafana Self-Hosted on Hetzner

A flat-rate root VPS from around €4-5/mo, where Grafana, Prometheus, and SQLite fit on the smallest instance for a handful of monitored services. Put it in a different location, or with a different provider, from the servers it watches, so an outage there doesn't take the dashboards and alerts down with it.

Raspberry Pi

Deploy Grafana Self-Hosted on Raspberry Pi

Grafana publishes a Raspberry Pi install guide and Prometheus ships ARM builds, so a board you already own can monitor a home lab or small office with no monthly bill. Keep Prometheus's data on an attached SSD rather than the SD card, since constant metric writes wear cards out, and add the tunnel if the Pi sits behind home NAT.

DigitalOcean

Deploy Grafana Self-Hosted on DigitalOcean

A root Droplet from about $6/mo with snapshots and a cloud firewall in the panel. Its managed PostgreSQL (from about $15/mo) can hold Grafana's own database if you choose the PostgreSQL option and want its backups handled for you; Prometheus's metrics still live on the Droplet's disk.

Hostinger

Deploy Grafana Self-Hosted on Hostinger

The budget VPS in the list, with KVM plans from about $6.50/mo. The entry plan's 4 GB of memory is well above what this stack needs, so Prometheus can keep longer retention or scrape more targets before an upgrade. Fewer regions than the larger providers, and backups are yours to set up.

Amazon Web Services

Deploy Grafana Self-Hosted on Amazon Web Services

An EC2 instance at roughly $6-15/mo for a small size, with an EBS volume for Prometheus's data and snapshots for backup. It fits when the monitored services already run on AWS, since Prometheus discovers EC2 targets on its own. An Application Load Balancer with AWS Certificate Manager can handle TLS instead of the reverse proxy, and RDS can host Grafana's database on the PostgreSQL option.

Google Cloud Platform

Deploy Grafana Self-Hosted on Google Cloud Platform

A Compute Engine instance at roughly $7-15/mo for a small size, with a persistent disk for Prometheus's data. It fits when the monitored services already run on Google Cloud, since Prometheus discovers Compute Engine instances on its own. Cloud Load Balancing with Google-managed certificates can handle TLS instead of the reverse proxy, and Cloud SQL can host Grafana's database on the PostgreSQL option.

These are highlighted picks. To see all the tools, check the Hosting & Cloud category.

Reverse Proxy Options for Grafana Self-Hosted

Traefik

Grafana Self-Hosted with Traefik

Routes to the Grafana container from Docker labels and renews Let's Encrypt certificates on its own. Set Grafana's root_url to the public HTTPS address, or login redirects and the links inside alert notifications point at the container's internal address.

Caddy

Grafana Self-Hosted with Caddy

Automatic HTTPS from a few lines of config, the simplest fit for one Grafana container. Caddy passes WebSocket connections through without extra setup, which Grafana Live uses to stream dashboard updates to the browser.

NGINX

Grafana Self-Hosted with NGINX

The most familiar proxy, with TLS through Certbot. Grafana Live needs the WebSocket upgrade headers on its /api/live path, and serving Grafana under a subpath also needs serve_from_sub_path set on the Grafana side.

Self-Hosted PaaS Options for Grafana Self-Hosted

Coolify

Grafana Self-Hosted with Coolify

Free and self-hosted, with one-click Grafana templates in two versions, one on SQLite and one on PostgreSQL, deployed behind Coolify's bundled proxy with HTTPS set from its dashboard. Prometheus isn't part of either template, so add it as its own service in the same project.

Dokploy

Grafana Self-Hosted with Dokploy

Free and self-hosted, with Grafana in its template catalog, deployed behind its bundled Traefik with HTTPS configured from the dashboard. As with Coolify, Prometheus goes in as its own Compose service; check that Dokploy's backups cover both Grafana's database and Prometheus's data volume.

Grafana Self-Hosted Add-ons

Each addition below extends this stack with a capability the base stack works fine without. None are required: include the ones your product actually needs when building this stack, and skip the rest.

Tunnel Add-ons

Add a tunnel when you're self-hosting without a static IP or can't open inbound ports — a home server, a VPS behind restrictive network policies, or anywhere a reverse proxy alone can't reach the internet.

Cloudflare Tunnel

Grafana Self-Hosted with Cloudflare Tunnel

Makes Grafana reachable over HTTPS through an outbound-only connection, with no inbound ports or static IP, which suits a Pi or a home server. Put Cloudflare Access in front if the dashboards shouldn't be public, since the tunnel otherwise exposes Grafana's login page to the whole internet.

ngrok

Grafana Self-Hosted with ngrok

The quicker-start tunnel for showing a dashboard from a laptop or testing alert webhooks against a local Grafana. Its free-tier limits suit that kind of temporary access rather than a permanent monitoring endpoint.

Frequently Asked Questions about Grafana Self-Hosted

Why self-host Grafana instead of using Grafana Cloud?

Metering and data location. Grafana Cloud's free tier covers 10,000 active metric series, 50 GB of logs, and 3 active users, with 14 days of retention. Pro starts with a $19/mo platform fee that includes the same usage, then bills $8 per extra active user and $6.50 per 1,000 extra series, with 13 months of metrics retention. Self-hosting removes those meters and keeps metrics on your own server; the limits become your disk and memory. What you give up is operations: upgrades, backups, and retention are yours, and a hosted service keeps alerting even when your own infrastructure is down.

What does the server need to run?

Grafana's own guidance is 512 MB of memory and one core for the Grafana server. Prometheus adds to that in proportion to the active time series it scrapes, so a handful of services with Node Exporter fit alongside Grafana on a 1 GB instance, and 2 GB leaves room for more targets or longer retention. Disk follows Prometheus's own formula: retention time multiplied by samples per second multiplied by 1-2 bytes per sample, which keeps the default 15 days of a small setup to a few gigabytes. Many concurrent Grafana users raise the CPU need, not the memory floor.

What needs backing up, and how do upgrades work?

Grafana's database, the SQLite file or PostgreSQL, holds dashboards, users, folders, and alert rules. Prometheus's data directory holds the metrics, which many teams treat as expendable because they age out anyway. Provisioning files belong in version control. Before upgrading Grafana, back up its database and config: Grafana migrates its schema on startup, and some majors run long migrations (12.0 rewrites the annotation table). Prometheus upgrades are a new container image on the same data directory.

Should Grafana use SQLite or PostgreSQL?

SQLite for one person or a small team: nothing to operate, and backups are a file. PostgreSQL once several people edit dashboards at the same time, when you want Grafana behind a load balancer with more than one instance, or when its state should sit with your other backed-up databases. Decide early if you can. Grafana has no built-in command for moving from SQLite to PostgreSQL, so switching later means a community migration tool or re-creating dashboards from provisioning files.

What happens to alerts if the monitoring server goes down?

They stop. Grafana's alerting runs on the same server, so a crash, full disk, or network outage there silences every alert without warning. Keep the monitoring server off the infrastructure it watches (a different location or provider), and add one outside check on Grafana itself: an external uptime monitor, or a heartbeat alert that pings a service such as Healthchecks.io and pages you when the pings stop arriving.

Scores

Popularity4/5

Grafana is the default dashboards tool across the industry; a developer with no observability duties has still almost certainly seen a Grafana graph.

Learning Curve2/5

Getting Grafana and Prometheus running in Docker is quick; the curve lives in PromQL and dashboard craft, not operations.

Flexibility4/5

Grafana visualizes anything with a data source plugin: this stack ships Prometheus, but the same instance graphs PostgreSQL, Loki, and cloud metrics alike.

Performance3/5

Grafana itself is light; query performance lives mostly in Prometheus and the metrics retention you configure.

Portability5/5

Dashboards export as JSON, Prometheus runs everywhere, and the pair moves to any Docker host by copying files.

Tools in the Grafana Self-Hosted Stack

DevOps & CI/CD

Observability & Monitoring

Database (choose one)

Hosting (choose one)

Reverse Proxy or PaaS (choose one)

Reverse Proxy

Self-Hosted PaaS

Add-ons (optional — add any, or none)

Tunnel

Grafana Self-Hosted Pricing

From ~$6/mo Free to start

Grafana, Prometheus, and both database options are open source, so the recurring cost is one small server at $5-20/mo, or nothing on a Raspberry Pi you already own. The comparison is Grafana Cloud: its free tier covers 10,000 active series and 3 users with 14-day retention, and Pro starts with a $19/mo platform fee, then bills per extra user and per series. Self-hosting removes those meters; your server's disk and memory become the ceiling.

Server (VPS or cloud)$5-20/mo

1 GB of RAM runs Grafana (512 MB by its own guidance) and Prometheus for a handful of services; 2 GB leaves room for more targets or longer retention.

Grafana, Prometheus, SQLite/PostgreSQLFree (open source)

Grafana is AGPLv3 and Prometheus Apache 2.0, with no series, user, or retention limits.

Exposure (reverse proxy or PaaS)Free (open source)

Traefik, Caddy, NGINX, Coolify, and Dokploy all self-host free, with free Let's Encrypt certificates.

Grafana Self-Hosted System Requirements

source
RAM
512 MB minimum recommended
CPU
1 core minimum recommended
OS
Debian or Ubuntu, RHEL or Fedora, SUSE or openSUSE, macOS, or Windows

The published floors cover the Grafana server process only, so size up from them for many concurrent users. The Prometheus in this stack adds its own appetite, which grows with the number of active series it scrapes.