Self-host Prometheus
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
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
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:9090What you take on
Prometheus is mature and well-understood, with a couple of operational realities worth planning for: