Install PMM Server with Docker container¶
This section explains how to install PMM Server as a Docker container. While PMM Server runs independently, we highly recommend installing Watchtower alongside it to enable convenient PMM Server upgrades through the PMM user interface.
With Watchtower, you can upgrade PMM Server directly from the Upgrade page or by clicking the Upgrade Now button on the Home dashboard.
Prerequisites¶
Before starting the installation:
- Install Docker version 17.03 or higher
- Ensure your CPU supports
x86-64-v2
-
Security requirements for Watchtower:
- restrict Watchtower access to Docker network or localhost
- configure network to expose only PMM Server externally
- secure Docker socket access for Watchtower
- place both Watchtower and PMM Server on the same network
Installation options¶
You can install PMM Server with Watchtower in two ways:
The Easy-install script simplifies setup by including Watchtower commands, enabling a one-step installation of PMM with Watchtower. Run the following command:
curl -fsSL https://www.percona.com/get/pmm | /bin/bash
For a more customizable setup, follow these steps:
-
Create a Docker network for PMM and Watchtower:
docker network create pmm-network
-
(Optional) Install Watchtower to enable PMM Server upgrades via the UI.
-
Create a user-defined token to secure Watchtower’s HTTP API. You can use any value or generate a secure token using
openssl
or another method. Ensure the same token is used in both the Watchtower and PMM Server configurations:openssl rand -hex 16 # Example output: e09541c81e672bf0e48dbc72d4f92790
-
Install Watchtower using your token:
docker run --detach \ --restart always \ --network=pmm-network \ -e WATCHTOWER_HTTP_API_TOKEN=your_token \ -e WATCHTOWER_HTTP_API_UPDATE=1 \ --volume /var/run/docker.sock:/var/run/docker.sock \ --name watchtower \ percona/watchtower:latest
-
-
Run PMM Server with Docker based on your preferred data storage method:
Run Docker container¶
Summary
- Pull the Docker image.
- Choose how you want to store data.
- Run the image.
- Open the PMM UI in a browser.
Key points
-
To disable the Home Dashboard PMM Upgrade panel you can either add
-e PMM_ENABLE_UPDATES=false
to thedocker run
command (for the life of the container) or navigate to PMM Configuration > Settings > Advanced Settings and disable Check for Updates (can be turned back on by any admin in the UI). -
Eliminate browser certificate warnings by configuring a trusted certificate.
-
You can optionally enable an (insecure) HTTP connection by adding
--publish 80:8080
to thedocker run
command. However, running PMM insecure is not recommended. You should also note that PMM Client requires TLS to communicate with the server, only working on a secure port.