Enabling TLS on Prometheus and exporters

Enabling TLS on Prometheus and exporters encrypts metric queries, scrapes and alert traffic, and sets the minimum TLS version and certificate handling. This page explains the options, the setup sequence and what to confirm before go-live.

On this page

Why enabling TLS on Prometheus is the first hardening step

Enabling TLS on Prometheus and exporters encrypts the traffic between people, scrapers and Alertmanager, and it is a prerequisite for basic authentication. A Prometheus server holds a map of your infrastructure: target addresses, job names, service discovery results and the alert rules that describe what you consider a failure. Browsers, API clients, Grafana, Alertmanager and every scrape target talk to it over the network, and without TLS that traffic can be read or altered by anyone on the path. The Prometheus security model says the server supports TLS and client certificate authentication, with TLS 1.2 as the minimum version. It also supports HTTP basic authentication with bcrypt-hashed passwords, but the same model warns that basic authentication without TLS exposes those credentials in cleartext. Turning on TLS first means that any password or token you add later is not sent in the clear.

Teams usually need this work when Prometheus sits on a network that others share, when it scrapes targets in another security zone, or when a regulated environment requires encryption in transit for administrative and monitoring data. The same applies to exporters, which expose host, database and device metrics that are sensitive in their own right. The work is configuration and certificate management on servers you already run. It is not a product purchase, and the recurring effort is mostly in issuing, renewing and rotating certificates. Before you start, confirm which certificate authority your organization trusts, who owns certificate renewal, and which clients must trust the internal CA. Those answers decide how much of the rollout is planning and how much is operations.

How TLS fits between users, Prometheus, Alertmanager and exporters

The diagram starts with browsers and API clients reaching the Prometheus web interface over HTTPS, each listener governed by its own web configuration file and certificate. Prometheus then has two separate encrypted links: one for scraping exporters across the network trust boundary, and one for delivering alerts to Alertmanager. Check that every listener and every outbound client uses its own certificate chain, and that the trust boundary is enforced by network placement as well as by TLS.

Encrypted links from users, to exporters and to Alertmanager, each with its own web configuration.

Web configuration options and when each one fits

This table compares the main settings in a Prometheus or exporter web configuration file, from certificate paths to basic authentication hashes. Read each row for when the setting fits and what it costs in compatibility or strictness. The main takeaway is that TLS 1.2 is the floor named in the Prometheus security model, and every version and cipher choice should be checked against the release you run.

SettingWhen it fitsTrade-offWhat to confirm
TLS certificate and key pathsEvery HTTPS deployment. Certificate and key files are the baseline for enabling TLS on the server.Files on disk must be readable by the service account and protected from other users. Expiry is a monitoring gap unless you alert on it.Exact key names and file path handling in the web configuration docs for your release.
Minimum TLS versionSet to TLS 1.2 as the floor, which the Prometheus security model names as the minimum supported version. Raise it only when every scraper and client supports the higher version.A higher minimum blocks older scrapers, proxies and health checks that still negotiate lower versions. A lower minimum weakens the connection.Whether your release accepts the version value you intend, and which clients in your estate still need older protocols.
Cipher suite restrictionsUse when a security baseline or assessor requires an approved cipher list. Leave the default when your release already negotiates strong suites and you have no written requirement.A tight list can break clients that share no suite with the server. Names differ between TLS versions, so an incorrect list can fail quietly at startup or at handshake.Cipher names for the exact release, the TLS versions they apply to, and a handshake test from each scraper type.
Client CA for mutual TLSUse when only known clients, such as Prometheus servers, should connect to an exporter or Prometheus endpoint.Every client needs a valid certificate from that CA, which adds issuance and rotation work. Revocation and CA rollover need a plan before go-live.Client certificate option names, whether client verification is required or optional in your release, and how Prometheus scrape jobs present their certificate.
Basic authentication hashesUse for simple username and password protection on a Prometheus endpoint when no SSO proxy is planned.Credentials travel with every request, so this only makes sense over TLS. Bcrypt hashes protect stored passwords but add no identity federation or audit trail.That the endpoint runs over HTTPS first, how hashes are generated for your release, and where the scraper stores the password.
Certificate reload behaviorUse when certificates expire on a schedule and you want to replace files without a full restart.Reload behavior varies by component and release. Assuming a reload happens without checking can leave old certificates in use.Whether the component reloads certificate files on its own or needs a reload signal, and how to confirm the new certificate is served.
Validation with promtoolUse before every change to a web configuration file, in the same pipeline that deploys it.Validation checks syntax and some settings, but a passing check does not prove that clients can connect or that the chosen ciphers work.Which web configuration checks promtool performs in your release, and which handshake tests you still need to run.

How Prometheus, Alertmanager and exporters differ in TLS setup

Prometheus presents a certificate on its own web interface and API, so browsers, operators and any tooling that queries it must trust that certificate. It also acts as a TLS client in several outbound connections: when it scrapes targets, when it sends alerts to Alertmanager, and when it talks to remote write or remote read endpoints. In each of those outbound connections, Prometheus verifies the other side's certificate, so the trust settings live in the Prometheus configuration.

  • Inbound web and API: Prometheus serves its UI and API over HTTPS through a web configuration file, which holds the certificate, key, minimum TLS version and cipher settings. Confirm the exact keys against the documentation for your Prometheus version.
  • Outbound alerting: Each Alertmanager entry in the alerting section of prometheus.yml needs an HTTPS scheme and a tls_config that trusts that instance's certificate. Point Prometheus at every Alertmanager instance directly, as the Alertmanager documentation describes for clustered setups, so scheme and trust are set per instance.
  • Remote endpoints: Remote write and remote read URLs that use HTTPS need the same trust setup, and any client certificate they require is configured on the Prometheus side.
  • Client certificates: If Prometheus must present a client certificate, the certificate and key go in the outbound tls_config. Prometheus supports client certificate authentication with TLS 1.2 as the minimum, according to its security model.

Check that every outbound scheme, certificate path and CA bundle matches the endpoint it serves, because a mismatch on one of them stops alerts or scrapes while Prometheus itself keeps running.

Setup sequence for HTTPS with promtool checks

This sequence turns on HTTPS for Prometheus, Alertmanager and official exporters in a controlled order, so each change is tested in isolation before it reaches scrapers, alert routing and the rest of the estate. Each step ends with a check that proves the change works before the next one begins.

  1. Inventory endpoints and their consumers

    The team that owns the monitoring stack lists every component that serves HTTP: Prometheus, each Alertmanager, exporters such as Node Exporter, and any Pushgateway. For each one, record the listen port, who scrapes or calls it (Prometheus servers, Grafana, Alertmanager peers, reverse proxies, humans using the web UI) and any scrape job or alerting target that points at it by URL. Include automation, dashboards and runbooks that hard-code addresses. The sequence is done when the list has one row per endpoint with its consumers named, because that list becomes the rollout checklist and shows which clients must trust the new certificate before the switch.

  2. Obtain certificates from the organization CA

    The PKI or security team issues server certificates from the organization's certificate authority, using the subject names and IP addresses each client actually uses to reach the component. Ask the CA team for the chain file, the leaf certificate and the private key in formats the team can place on the host with restrictive file permissions. Confirm that the CA is trusted by the scraper hosts and any Grafana or Alertmanager client, and that each certificate's subject alternative names match the hostnames in the inventory. The step is complete when openssl or an equivalent tool shows the expected names and validity dates for each certificate, and a mismatch is caught here rather than during a scrape failure.

  3. Write the web configuration in a test environment

    Pick one non-critical component, usually a Prometheus instance or an exporter in a lab or staging network, and write a web configuration file that sets the certificate and key paths, the minimum TLS version and the cipher suites the organization's policy allows. Use the form documented for the component's --web.config.file flag and keep the file and private key readable only by the service account. Avoid copying example cipher lists from blog posts without checking them against the component's documentation for the current release. The step is complete when the file is saved in version control or the configuration store, with the key referenced by path and never pasted into a shared document.

  4. Validate with promtool and the component's startup check

    Run promtool check web-config against the file to confirm the syntax, the referenced certificate paths and the key pairing before the service is touched. Then start the component in the test environment with the same web configuration and read the startup log for TLS errors, unreadable keys or unsupported cipher names. Deliberately break one input, such as a wrong key path, to confirm that validation and startup both fail clearly rather than falling back to plain HTTP. The step is done when a broken file is rejected before startup and the corrected file passes both checks, which gives the team a known-good baseline for later changes.

  5. Confirm the HTTPS endpoint with a verifying client

    From a scraper host that does not have the test certificate pinned or otherwise pre-trusted, request the endpoint with a client that verifies the full chain and hostname, such as curl without insecure flags pointed at the organization CA bundle. Check that the handshake negotiates the minimum TLS version you set and that a plain HTTP request to the same port is refused or redirected as intended. If the client fails, decide whether the fault is in the chain file, a missing intermediate or a name mismatch, and fix it before continuing. The step is complete when the verifying client returns the expected response and the TLS version and certificate subject are recorded in the change ticket.

  6. Update scrape jobs and alerting targets

    Change the scrape job for the test component to use the https scheme and the CA bundle through tls_config, and update any Alertmanager URL that Prometheus uses, pointing Prometheus at every Alertmanager instance as the Alertmanager documentation describes. Reload configuration through the approved process, then check the Prometheus targets page and the up metric for the test job. Confirm that the Alertmanager connection shows as healthy in Prometheus. The step is done when targets report as up over HTTPS and a test alert reaches the receiver, because a scrape that reports up over the wrong scheme or with skipped verification would hide a problem that only appears later.

  7. Roll out to the remaining estate in batches

    Apply the same web configuration pattern to the other Prometheus servers, Alertmanager instances and exporters, one consumer group at a time, following the inventory from the first step. Keep the previous configuration available until each batch passes the verifying-client check and the scrape health check. Watch for consumers that the inventory missed, such as dashboards, custom scripts or a reverse proxy that still uses plain HTTP. The sequence is complete when every endpoint in the inventory serves HTTPS, every consumer verifies the chain, and the team has written down the certificate renewal owner and the reload procedure for later certificate changes.

Certificate reloads and rotation without losing scrapes

Once TLS is enabled, certificate rotation becomes a recurring operations task rather than a one-time setup. The key point is that a renewed certificate is not picked up automatically by every component, so each Prometheus, Alertmanager and exporter instance needs a documented reload step and a check that the new certificate is actually being served. Confirm with your deployment method whether the certificate files are read at startup only or whether the process reloads them on a signal or endpoint, because that answer determines the runbook. After each rotation, verify the served certificate from outside the process, for example by inspecting the certificate presented on the listening port and comparing its serial number and expiry date with the file you deployed. Do not rely on the reload command returning success alone.

The reload path is also where a separate security decision sits. Prometheus can reload its configuration through the lifecycle endpoint, but that endpoint is disabled by default and is enabled only with the --web.enable-lifecycle flag. The Prometheus security model also documents that the admin APIs are disabled by default. Enabling the lifecycle endpoint therefore adds a new way to change running behavior over HTTP, and it is exposed to anyone who can reach the listener, which matters more once TLS and authentication are in place for other reasons. Decide whether you need that endpoint at all, or whether a process restart from your orchestrator is enough. If you do enable it, restrict it at the network or proxy layer and treat it as its own item in your access review.

The most damaging failure is an expired certificate. When a scrape target's certificate expires, the scrape fails, the up series for that target drops, and any alert that depends on the metric may stop firing without any notice, which is the silent alerting problem. Plan for this by monitoring certificate expiry as a metric in its own right, using an exporter or an external check, and writing an alert rule that fires well before the expiry date so that a human has time to renew. Also alert on scrape failures with TLS errors. Confirm with your certificate authority and tooling how renewal notices are sent, and make sure the expiry alert is routed to a receiver that someone monitors.

Security decisions beyond the certificate itself

Turning on HTTPS protects traffic in transit, but it does not decide who can reach the web UI, change configuration or make an exporter fetch arbitrary addresses. The cards below cover the adjacent decisions that determine whether the TLS setup holds up under review.

TLS alone or added authentication

TLS encrypts traffic but does not identify callers. Prometheus supports TLS with client certificate authentication and HTTP basic authentication with bcrypt-hashed passwords, and basic authentication without TLS exposes credentials in cleartext. Decide per endpoint whether encryption alone is enough, whether scrapers need client certificates, or whether a password is required, and record that decision for each listener.

Prometheus security model

Authenticating proxy with SSO

Prometheus has no built-in single sign-on and no built-in CSRF protection on mutating endpoints. A common pattern places an authenticating reverse proxy in front of the web UI and API, terminates TLS there, and passes only authorized requests through. Confirm which paths the proxy protects, including the query and API routes, and that the Prometheus port is not reachable around the proxy.

Security model details

Private key access control

The private key in the web configuration is the credential that proves the server's identity. Make the key file readable only by the account that runs the Prometheus, Alertmanager or exporter process, and keep it out of shared configuration repositories and container images. Check file ownership and mode after each deployment, and plan rotation so a copied key can be replaced quickly.

Change control on web configuration

The web configuration file decides the minimum TLS version, cipher choices and whether authentication is enforced. A quiet edit can weaken all of them at once. Restrict write access to a small set of administrators, route changes through version control with review, and run promtool checks in the pipeline before a reload so a broken or weakened file never reaches a running service.

Minimum TLS version
TLS 1.2

Exporter abuse through URL parameters

Exporters such as SNMP and Blackbox take their targets from URL parameters, so anyone with HTTP access to them can make them send requests to arbitrary endpoints. TLS does not prevent this. Limit which clients can reach these exporters at the network layer, require authentication in front of them, and restrict the modules and targets they may probe. Confirm this for every exporter you enable, not only the ones you expect to be abused.

Exporter security notes

What to confirm in your environment before go-live

Before you turn on HTTPS, confirm the exact flags and keys your Prometheus release accepts for the web configuration file. Do not copy settings from older guides or from another component. The current LTS line is 3.13, and the latest minor release is 3.15.0 as of October 2026, so check the release notes for the version you actually run. A minor release generally stops receiving bug fixes six weeks after its cycle begins, so a version that looked current when your runbook was written may already be out of support. Repeat the same check for every official exporter. Confirm that each exporter version accepts the same web configuration file structure, because some exporters may differ in which keys they read or how they report errors. Run every change in a non-production environment first and read the Prometheus release cycle page for support dates before you schedule the upgrade.

Next, test compatibility with your oldest client. Prometheus supports TLS 1.2 as its minimum, so set the minimum version and cipher list only after you know which scrapers, Alertmanager instances, Grafana data sources, health checkers and automation tools will connect. A minimum that suits your security policy can still break an older monitoring agent or a script that runs from an aging host. Ask each owning team for the TLS versions and cipher suites their client supports, and verify the handshake from each one with a test scrape before you enforce the setting. Also confirm that your internal CA chain is complete. Each server certificate should include the intermediate certificates clients need, the chain should be trusted by every scraper and browser, and the certificate renewal process should be documented with an owner, a calendar reminder and a tested reload step. Confirm that certificate reloads work on the exact release you run, since reloading is only useful if the process picks up the new files without a restart.

Finally, check every system that sits between users and the endpoints. Grafana data sources, Alertmanager receivers, load balancers, reverse proxies and any service that scrapes Prometheus must accept the new certificates and the protocol settings. Alertmanager receivers in particular often call external services, so confirm that the Prometheus-to-Alertmanager connection and the Alertmanager outbound trust stores work as expected. Record the result of each check in a go-live checklist. Use promtool to validate configuration files before deployment, and then confirm the live endpoint with a manual handshake test. If any dependency cannot accept the new settings, plan a rollback path or a dated exception rather than changing the security baseline during the rollout.

Questions teams ask before enabling TLS on Prometheus

How much effort does enabling TLS on Prometheus take?

The effort depends on how many endpoints you run and how many of them need certificates. Prometheus, Alertmanager and each exporter need their own web configuration file and certificate, and every scrape job and client must trust the issuing CA and use the right server name. The main drivers are the endpoint count, how certificates are requested and approved in your organization, and whether every scraper, dashboard and alert tool can connect over HTTPS without workarounds. Ask any partner to break the estimate down per endpoint, per scraper and per client, and to list which of those are not yet inventoried.

Can an internal team enable TLS on Prometheus by itself?

Yes, a team with Linux administration and certificate experience can usually do it, because the web configuration file is a small YAML document and promtool can validate it before a restart. The hard part is coordination: scrape configs, Grafana data sources, alert senders and exporters all change at once, and a mistake can stop scraping silently. Teams without a clear owner for each component, or without a non-production copy of the monitoring stack, often find that a short review of their plan by an outside engineer saves a rollback.

What do we need to provide for a TLS project?

You need access to the certificate authority or the process that issues certificates, an agreed change window for each Prometheus and Alertmanager restart, and a test environment that mirrors your scrape targets closely enough to catch trust errors. You also need a named owner for every scrape target and exporter, because each one must accept the new certificate before the old endpoint is retired. Confirm who can approve private key handling, where keys are stored, and how file permissions are set on the hosts before work starts.

Is TLS alone enough to secure Prometheus?

No. TLS protects data in transit and lets clients verify the server, but it does not authenticate users to the web UI or API. The Prometheus security model says TLS can be combined with client certificate authentication or HTTP basic authentication with bcrypt-hashed passwords, and that basic authentication without TLS exposes credentials in cleartext. Admin APIs, network reachability and exporter misuse need separate controls, so TLS should be one item in a wider hardening plan rather than the whole plan.

How is certificate rotation handled after TLS is enabled?

Rotation is a recurring task, not a one-time setup. Prometheus and exporters read their certificate files at startup, and the Prometheus security model and web configuration documentation describe reloading the web configuration, so confirm the exact reload behavior for each component and version you run before relying on it. Your process should record expiry dates, renew certificates before they lapse, replace files atomically and test each scraper after the change. Ask a partner to show the rotation runbook and the monitoring that alerts on approaching expiry.

Are free public certificates or an internal CA appropriate for Prometheus?

Both can be appropriate, depending on where the endpoints are reachable. Endpoints that only internal scrapers and operators use usually fit an internal CA that your organization already controls, because you decide the trust chain and the lifetime. Public certificates require the hostname to be publicly resolvable and validated, which many monitoring endpoints are not. Whichever you choose, confirm that your CA policy, key storage and renewal workflow cover monitoring endpoints, and that the choice matches your compliance and change control rules.

What should we ask a partner to include in a written TLS scope?

A written scope should list each component and version in scope, the certificate source and trust chain, the minimum TLS version and cipher policy you require, and the scrape jobs and clients that will be updated. It should name the validation steps, including promtool checks and a scrape test per target, the rollback plan, the change windows, and the handover of certificate rotation runbooks. Ask for the exclusions too, such as Grafana, reverse proxies or exporters not covered, and for the deliverable format, since fixed scopes are agreed in writing before work starts.

Does enabling TLS change how Prometheus stores or queries data?

No. TLS changes how connections to Prometheus are secured, not how samples are written to the local time series database or how PromQL queries run. Prometheus stores data in two-hour blocks with a write-ahead log, and the storage documentation notes that local storage is not clustered or replicated. Your retention and backup decisions stay the same, though the restart needed for a TLS change should be scheduled so that no scrape gap goes unnoticed.

How DeployOpen scopes and delivers TLS hardening for Prometheus

DeployOpen plans and implements TLS for Prometheus, Alertmanager and the exporters you run, inside your own infrastructure, with the web configuration, certificate handling and validation agreed in writing before work starts. Engagements are fixed-scope, so the systems covered, the deliverables and the timeline are set out before any change is made to a production monitoring stack.

How we scope

  • Inventory every Prometheus server, Alertmanager, exporter and scrape path that needs HTTPS in your environment.
  • Confirm which clients, Grafana instances and alert receivers must trust the certificate chain before changes.
  • Agree the certificate authority model, minimum TLS version and cipher policy in the written scope.

How we build

  • Write web configuration files for each component and validate them with promtool before rollout.
  • Set up certificate reload handling and test that renewed certificates are picked up without a restart.
  • Test client connections, scrape jobs and alert delivery in a staging environment that mirrors production.

How we hand over

  • Document each web configuration file, certificate locations, owners and the renewal procedure your team will follow.
  • Deliver a runbook covering rollback steps, expiry monitoring and the commands used for validation.
  • Walk your platform and security engineers through the configuration and confirm they can rotate certificates alone.

How we support

  • Offer ongoing support, upgrades and continuous testing as a retainer after the initial implementation.
  • Review TLS settings when Prometheus, Alertmanager or exporter versions change and plan the update window.
  • Confirm with your team which evidence from the configuration your compliance reviewers will need to see.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.