Skip to content

Self-host Prometheus

updated Jul 2026prices checked · Jul 2026Install verified on Ubuntu 26.04 · Sep 2026 · how we test
We earn commissions when you shop through the links below. Full disclosure →

The de facto open-source metrics time-series database and alerting engine, scraping targets over HTTP and powering most self-hosted dashboarding stacks.

Key facts

LicenseApache-2.0
StackGo
Min RAM2048 MB
Official imageyes
Measured idle RAM37 MB
Difficulty
Our recommendation

Pick Prometheus when you want the de facto standard for metrics collection and alerting — pull-based scraping, PromQL, and an ecosystem every exporter and dashboard already speaks. It's metrics only, not logs or traces, so pair it with Grafana for dashboards and Loki or another tool if you need logs too.

Follow the Prometheus deploy guide →

What you need

  • Any VPS with at least 2048 MB of RAM
  • A domain you control — most self-hosted setups need HTTPS in front of them
  • Under an hour if you've used Docker before
Where to host itaffiliate disclosure
Hetzner Cloudrun it on
From $23.59/mo · 2 vCPU / 4 GB / 80 GB · EU + US
Get Hetzner Cloud (opens in new tab)
Kamaterafree trial
From $4/mo · 1 vCPU / 1 GB / 20 GB · US + EU + Asia
Start free on Kamatera → (opens in new tab)
DigitalOceanalso works on
From $6/mo · 1 vCPU / 1 GB / 25 GB · US + EU + Asia
Deploy on DigitalOcean → (opens in new tab)

Paid link — we earn a commission if you shop through it.

Install

Run these commands on your server:

# Prometheus — official Docker image
# prometheus.yml must exist before the run, or Docker mounts a directory over it
printf 'global:\n  scrape_interval: 15s\nscrape_configs:\n  - job_name: prometheus\n    static_configs:\n      - targets: [localhost:9090]\n' > prometheus.yml
docker run -d --name prometheus -p 9090:9090 -v $PWD/prometheus.yml:/etc/prometheus/prometheus.yml -v prometheus-data:/prometheus prom/prometheus
# →  http://SERVER_IP:9090

What you take on

Prometheus is mature and well-understood, with a couple of operational realities worth planning for:

non-negotiableLocal storage isn't built for long retention. The default TSDB is fine for weeks, not years — reach for Thanos or Mimir if you need long-term or multi-cluster storage.
non-negotiableIt's metrics-only. There's no log or trace storage here — Prometheus is one piece of a stack, not the whole thing.
non-negotiableScrape targets need service discovery at scale. A handful of static targets is trivial; dozens of dynamic containers means setting up discovery (Docker, Kubernetes, file-based) properly.

An alternative to

Head-to-head

More in Observability

We use analytics cookies (Google Analytics, PostHog) to see which guides are useful. No ad networks, no cross-site tracking. See our privacy policy.