Installation
Use a Linux package for a managed service, a release archive for a standalone binary, or a container for Docker and Kubernetes. Download compares these options and provides installation commands. This page lists the release files and repository setup.
Repository installation follows the repository’s current package, which can lag the GitHub release. Use the versioned release artifacts below when you need exactly v1.6.0.
Pigsty
Pigsty deploys PG Exporter with metrics storage, alert rules, and Grafana dashboards. The command below downloads Pigsty; follow its installation guide to configure and deploy the monitoring stack.
Release
Download RPM, DEB, or tarball files from the latest GitHub release:
v1.6.0 Release Files:
| Type | File |
|---|---|
| DEB (amd64) | pg-exporter_1.6.0-1_amd64.deb |
| DEB (arm64) | pg-exporter_1.6.0-1_arm64.deb |
| DEB (ppc64le) | pg-exporter_1.6.0-1_ppc64le.deb |
| RPM (aarch64) | pg-exporter-1.6.0-1.aarch64.rpm |
| RPM (x86_64) | pg-exporter-1.6.0-1.x86_64.rpm |
| RPM (ppc64le) | pg-exporter-1.6.0-1.ppc64le.rpm |
| Tarball (Linux amd64) | pg_exporter-1.6.0.linux-amd64.tar.gz |
| Tarball (Linux arm64) | pg_exporter-1.6.0.linux-arm64.tar.gz |
| Tarball (Linux ppc64le) | pg_exporter-1.6.0.linux-ppc64le.tar.gz |
| Tarball (macOS amd64) | pg_exporter-1.6.0.darwin-amd64.tar.gz |
| Tarball (macOS arm64) | pg_exporter-1.6.0.darwin-arm64.tar.gz |
| Tarball (Windows amd64) | pg_exporter-1.6.0.windows-amd64.tar.gz |
Install a downloaded RPM with sudo dnf install ./<package>.rpm, or a DEB with sudo apt install ./<package>.deb. For an archive, extract it and install the binary in your $PATH. Archives also include pg_exporter.yml, package/pg_exporter.default, package/pg_exporter.service, and LICENSE.
After installation, run pg_exporter --version. Package users can start the systemd service. For an archive installation, prepare the monitoring credentials and use the foreground example.
Starting with v1.4.1, the official RPM package name and artifact prefix change from pg_exporter to pg-exporter, matching the DEB package and repository install commands. The new RPM also provides and obsoletes the legacy pg_exporter package name, allowing direct upgrades from earlier releases.
Download checksums.txt from the same release and verify files before installation. On Linux, run sha256sum -c checksums.txt --ignore-missing in the download directory; each downloaded artifact must report OK. On macOS, calculate shasum -a 256 <file> and compare its digest with the matching line in checksums.txt.
Repository
The pg-exporter package is also available in the pigsty-infra repo.
You can add the repo to your system and install it with your OS package manager:
YUM
For EL distributions such as RHEL, Rocky Linux, CentOS, AlmaLinux, and Oracle Linux:
APT
For Debian, Ubuntu and compatible Linux Distributions:
Docker
The official image supports Linux amd64 and arm64. Pull the version you intend to deploy:
The image includes /etc/pg_exporter.yml. Mount a replacement there for custom collectors. Auto-discovery is already enabled; set PG_EXPORTER_AUTO_DISCOVERY=false to disable it.
Use the Docker deployment example to mount the connection secret and start the container. The scratch image includes the system CA bundle and license, but no shell. Publicly trusted certificates can use the bundled roots; mount your private CA and set sslrootcert when using a private PKI with sslmode=verify-ca or verify-full.
Build from Source
Check out the release tag and use the Go version declared by its go.mod (Go 1.27.3 or later for v1.6.0):
This installs the binary at /usr/local/bin/pg_exporter. Use the foreground example to run it. For a systemd service, use an RPM/DEB package; it configures the runtime account and a service unit that runs /usr/bin/pg_exporter.
Compatibility
Use the default configuration for PostgreSQL 10 and later; it includes PostgreSQL 19 branches. PostgreSQL 9.1–9.6 uses the legacy bundle maintained on main, separately from versioned binary archives and RPM/DEB packages. Download that bundle independently of the binary:
For PostgreSQL 9.1, use main at 282e19d or later. This configuration fix handles tables without a TOAST relation; the older query can fail with could not open relation with OID 0 and omit all pg_table_size_* samples. It is a separate legacy maintenance change, not a change to the v1.6.0 binaries or their bundled default configuration. The copy in the v1.6.0 source tag does not contain it.
The bundled PgBouncer collectors require 1.8 or later. See Compatibility for version selection, architectures, and collector prerequisites.