# Self-host Prometheus

> A metrics time-series database and alerting engine built for pull-based scraping.

- Page: https://levelrail.com/templates/prometheus/
- JSON: https://levelrail.com/templates/prometheus.json
- Category: Monitoring
- Licence: Apache-2.0 (Permissive license)
- Source: https://github.com/prometheus/prometheus
- Upstream docs: https://prometheus.io/docs/introduction/overview/

## Requirements
- Memory: about 512 MiB
- amd64: published, arm64: tested
- Needs configuration before start: no
- Pinned image tag: v2.54.1

## Services

| Service | Image | Tag | Ports | Volumes |
| --- | --- | --- | --- | --- |
| prometheus | prom/prometheus | v2.54.1 | 9090 | prometheus_data -> /prometheus |

## Deploy

### CLI

```bash
levelrail-cli templates deploy prometheus --name my-prometheus
```

### API

```bash
curl -X POST -H "Authorization: Bearer $TOKEN" \
  https://levelrail.example.com/api/v1/service-templates/prometheus/deploy
```

Create a token in the dashboard first. This one-click route deploys it as a trial app you can keep or remove.

## Questions

### Can I deploy Prometheus on Dokploy or Dokku?

The services and pinned images on this page can be run on any Docker host. The public Dokploy templates list has an entry with the id prometheus for this app, so check that entry as well. Dokku deploys container images with its own commands, so the pinned image prom/prometheus:v2.54.1 is what you deploy there.

Self-host Prometheus, Prometheus docker compose file, deploy Prometheus on a VPS: this page lists the pinned image, ports, volumes and the commands for each.
