> For the complete documentation index, see [llms.txt](https://docs.percona.com/percona-monitoring-and-management/3/llms.txt).

# Install PMM Server with Docker

Deploy PMM Server as a Docker container for a fast, flexible and isolated setup.

## Prerequisites

Before installation, ensure you have:

- Docker version 17.03 or higher
- CPU with `x86-64-v2` support
- [Sufficient system resources](https://docs.percona.com/percona-monitoring-and-management/3/install-pmm/plan-pmm-installation/hardware_and_system.md) (recommended: 2+ CPU cores, 4+ GB RAM, 100+ GB disk space)

## Installation options

### Container setup summary

Container setup at a glance

- **Pull the Docker image**: `docker pull percona/pmm-server:3`
- **Choose storage**: Docker volumes (recommended) or host directory
- **Run the container**: Using the appropriate `docker run` command
- **Access the UI**: Navigate to `https://SERVER_IP_ADDRESS` in your browser
- **Log in**: Default credentials `admin` / `admin`

### Install PMM Server

You can install PMM Server using one of two methods:

**Easy-install script (Recommended for simplicity)**

The [Easy-install script](https://docs.percona.com/percona-monitoring-and-management/3/install-pmm/install-pmm-server/deployment-options/docker/easy-install.md) provides a one-step installation of PMM Server. Run the following command:

```sh
curl -fsSL https://www.percona.com/get/pmm | /bin/bash
```

**Manual installation (For customization)**

For a more customizable setup, follow these steps:

1. Run PMM Server with Docker based on your preferred data storage method:
   - [Run Docker with host directory](https://docs.percona.com/percona-monitoring-and-management/3/install-pmm/install-pmm-server/deployment-options/docker/run_with_host_dir.md)
   - [Run Docker with volume](https://docs.percona.com/percona-monitoring-and-management/3/install-pmm/install-pmm-server/deployment-options/docker/run_with_vol.md)

## Configuration options

### Storage configuration

You can choose either of two storage options offered by PMM Server:

| Option                                                                                                                                                                | Suitable for            | Docker parameter              |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------- | ----------------------------- |
| [Docker volumes](https://docs.percona.com/percona-monitoring-and-management/3/install-pmm/install-pmm-server/deployment-options/docker/run_with_vol.md) (Recommended) | Production environments | `--volume pmm-data:/srv`      |
| [Host directory](https://docs.percona.com/percona-monitoring-and-management/3/install-pmm/install-pmm-server/deployment-options/docker/run_with_host_dir.md)          | Development/testing     | `--volume /path/on/host:/srv` |

### Environment variables

Configure PMM Server’s behavior using environment variables:

```sh
docker run \
  --detach \
  --restart always \
  --publish 443:8443 \
  --volume pmm-data:/srv \
  -e PMM_DATA_RETENTION=720h \
  -e PMM_METRICS_RESOLUTION_HR=10s \
  --name pmm-server \
  percona/pmm-server:3
```

If the manual installation already created a `pmm-server` container, remove that container first and reuse its storage. For the steps, see [Run the examples on an existing installation](https://docs.percona.com/percona-monitoring-and-management/3/install-pmm/install-pmm-server/deployment-options/docker/env_var.md#run-the-examples-on-an-existing-installation).

Common variables:

| Variable                    | Default | Description                                                      |
| --------------------------- | ------- | ---------------------------------------------------------------- |
| `PMM_DATA_RETENTION`        | `720h`  | How long to keep metrics data, in hours. The default is 30 days. |
| `PMM_METRICS_RESOLUTION_HR` | `5s`    | High-resolution metrics interval                                 |
| `PMM_ENABLE_UPDATES`        | `true`  | Allow version checks                                             |
| `PMM_ENABLE_TELEMETRY`      | `true`  | Send usage statistics                                            |

Set `PMM_DATA_RETENTION` in hours, as a multiple of `24h`, such as `720h` for 30 days. The minimum is `24h`. If you use days, such as `30d`, PMM Server won’t start.

For a complete list, see the [environment variables](https://docs.percona.com/percona-monitoring-and-management/3/install-pmm/install-pmm-server/deployment-options/docker/env_var.md).

## Access PMM Server

After installation:

1. Access the PMM interface in your browser: `https://SERVER_IP_ADDRESS` (replace with your server’s address)
1. Log in with default credentials: `admin` / `admin`.
1. Change the default password on first login.

## Advanced configuration

After basic installation, you may want to customize your PMM Server setup:

### Security options

- Configure a [trusted SSL certificate](https://docs.percona.com/percona-monitoring-and-management/3/admin/security/ssl_encryption.md) to remove browser warnings.

- Disable updates if needed:

  - **via Docker**: add `-e PMM_ENABLE_UPDATES=0` to the `docker run` command (for the life of the container)
  - **via UI**: go to **Configuration > Settings > Advanced settings** and disable **Check for Updates** (can be turned back on by any admin in the UI)

- Enable HTTP (insecure, NOT recommended): add `--publish 80:8080` to the `docker run` command.

Warning

PMM Client requires a secure (TLS-encrypted) connection and will only communicate with PMM Server over HTTPS.

## Next steps

- [Install PMM Client on hosts you want to monitor](https://docs.percona.com/percona-monitoring-and-management/3/install-pmm/install-pmm-client/index.md)
- [Connect databases for monitoring](https://docs.percona.com/percona-monitoring-and-management/3/install-pmm/install-pmm-client/connect-database/index.md)
