Grafana Self-Hosted
IntermediateDashboardSelf-hosted Grafana and Prometheus: metrics dashboards and alerting on a server you run.
Published 27 September 2026
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
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.
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
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.
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.
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.
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.
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.
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
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.
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.
Self-Hosted PaaS Options for Grafana Self-Hosted
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.
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.
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.
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.
Stacks Related to Grafana Self-Hosted
Convex Self-Hosted
InfrastructureSelf-host the Convex reactive backend on your own server, with SQLite as the default store and PostgreSQL or managed Neon behind it when a single node isn't enough.
Kubernetes DevOps Pipeline
InfrastructureA production DevOps pipeline on Kubernetes, with a swappable CI/CD engine (GitHub Actions or GitLab CI/CD) and built-in observability.
Strapi Self-Hosted
InfrastructureSelf-hosted Strapi: an open-source headless CMS with PostgreSQL, on a server you control.
Airflow Self-Hosted
InfrastructureSelf-hosted Apache Airflow: the standard data-pipeline scheduler on your infrastructure.
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
Grafana Self-Hosted Pricing
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.
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 is AGPLv3 and Prometheus Apache 2.0, with no series, user, or retention limits.
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.