Installing Redgate Monitor for Docker
Published 02 June 2026
A Base Monitor running in a Docker container is running on Linux. Linux base monitors cannot monitor a Windows-based database instance at the present time. To monitor a Windows SQL Server instance add a secondary Windows Base Monitor.
Configure the Redgate Monitor database
The Base Monitor needs to connect to its Data Repository: either an empty database or a database previously used by Redgate Monitor. The database can be hosted in its own Docker container or as a standalone database.
Create a docker-compose.yml script that runs a Docker container with either TimescaleDB or SQL Server preinstalled.
Example TimescaleDB repository docker compose
name: Monitor database
services:
timescale_repo:
image: timescale/timescaledb-ha:pg17
container_name: rgm-repo-timescale
environment:
- POSTGRES_PASSWORD=<AdminPassword>
ports:
- 54611:5432
volumes:
- rgm-repo-timescale:/home/postgres/pgdata/data
volumes:
rgm-repo-timescale:The TimescaleDB container will automatically run timescaledb-tune on container initialization. If you would like to configure settings further see the github repo for more information, and our page on Troubleshooting PostgreSQL with TimescaleDB Data Repository
Example SQL Server repository docker compose
name: Monitor database
services:
mssql_repo:
image: mcr.microsoft.com/mssql/server:2022-latest
container_name: rgm-repo-mssql
environment:
- ACCEPT_EULA=Y
- MSSQL_SA_PASSWORD=<AdminPassword>
ports:
- 54610:1433
volumes:
- rgm-repo-mssql:/var/opt/mssql
volumes:
rgm-repo-mssql:We recommend using PostgreSQL for Monitor's database (see Configuring Redgate Monitor database using PostgreSQL with TimescaleDB), but you can also use a SQL Server database.
Run Monitor in a Docker container
- Copy the example docker-compose.yml.
Example docker-compose.yml
services: basemonitor: image: redgate/monitor-base-service:${IMAGE_TAG:-latest} container_name: rgm-basemonitor environment: - ACCEPT_EULA=${ACCEPT_EULA} - DB_TYPE=${DB_TYPE} - CONNECTION_STRING=${CONNECTION_STRING} volumes: - bm_data:/var/opt/redgate/redgatemonitor - bm_config:/etc/opt/redgate/redgatemonitor - bm_logs:/var/log/redgate/redgatemonitor networks: - rgm-network ports: - "${APP_PORT:-7399}:7399" restart: unless-stopped healthcheck: test: ["CMD-SHELL", "bash -c '</dev/tcp/localhost/7399'"] interval: 10s timeout: 5s retries: 5 start_period: 30s website: image: redgate/monitor-website:${IMAGE_TAG:-latest} container_name: rgm-website environment: - ACCEPT_EULA=${ACCEPT_EULA} - BASE_MONITOR_URL=rgm-basemonitor:7399 ports: - "${WEBSITE_PORT:-80}:80" - "${WEBSITE_SSL_PORT:-443}:443" volumes: - website_data:/var/opt/redgate/redgatemonitor - website_config:/etc/opt/redgate/redgatemonitor - website_logs:/var/log/redgate/redgatemonitor networks: - rgm-network depends_on: basemonitor: condition: service_healthy restart: unless-stopped volumes: bm_data: bm_config: bm_logs: website_data: website_config: website_logs: networks: rgm-network: name: rgm-network driver: bridge - Copy the example .env to the same directory as the above docker-compose.yml.
Example .env
# --------------------------------------------------------------- # Redgate Monitor Self-Hosted — environment configuration # Copy this file to .env and fill in the required values. # --------------------------------------------------------------- # Required: acceptance of the Redgate End User License Agreement. # The EULA is available at: https://www.red-gate.com/support/license/ # By setting ACCEPT_EULA to 'Y' you confirm your acceptance of the EULA. # Accepted values: Y, yes, true, 1 (case-insensitive). Containers will not start otherwise. ACCEPT_EULA= # Required: database type backing the Monitor repository # Values: postgres (PostgreSQL / TimescaleDB) # mssql (SQL Server) DB_TYPE=postgres # Required: connection string for the Monitor repository database # Postgres example: "Host=myserver;Database=rgm;Username=postgres;Password=your_password" # SQL Server example: "Server=myserver;Database=rgm;User Id=sa;Password=your_password" CONNECTION_STRING= # Optional: pin to a specific image version (default: latest) IMAGE_TAG=latest # Optional: host port for BaseMonitor (default: 7399) APP_PORT=7399 # Optional: host ports for the Website (defaults shown) WEBSITE_PORT=80 WEBSITE_SSL_PORT=443
- Edit the relevant parameters of the .env.
- Accept the EULA.
- Set the DB_TYPE to either "postgres" or "mssql" depending on the choice of database provider you chose for Monitor's database.
- Set the CONNECTION_STRING to the connection string of your Monitor's database.
- Run both the Base Monitor and Website containers.
Run the Monitor Docker containers
docker compose -f </path/to/monitor_docker_compose.yaml> up -d
If you are hosting Monitor's database container on the same machine as the Website and Base Monitor Docker containers, you can connect the database to Monitor's Docker network.Connect the base monitor to the repository database
docker network connect rgm-network rgm-repo-timescale
- Monitor in Docker is now configured you should be able to access it from http://localhost, if you are using the default http port 80.
- If you wish to configure HTTPs for monitor in Docker please see Configuring HTTPs for the Monitor webserver.
Data persistence
Volumes are used to persist data when containers are restarted.
Example named volume
services: service1: volumes: - volume_name:path/to/directory/on/container volumes: volume_name:
Example bind mounted volume
services: service1: volumes: - path/to/directory/on/host/machine:path/to/directory/on/container
We suggest (as used in the above docker-compose.yml) using named volumes over bind mounted volumes. Using named volumes allows you to run Monitor in Docker without being the root user. Running a Docker container as a root user has security implications since Docker containers have access to the host machine's file system. A bad actor with access to your Docker container also has full permissions to access the host machine. This comes at the cost of easy access to the container volumes, since named volumes are only accessible through the Docker container. In contrast, bind mounted volumes allow you to mount directories on your host machine's file system to directories in the Docker container. This makes the volumes accessible in the host machine's file system, but requires running the Docker containers with root level permissions so that Monitor has permission to access these directories.
If you do choose to use bind mounted volumes for your data persistence you will need to run the following command to run the Website and Base monitor containers as the root user:
Run the Monitor Docker containers as the root user
docker compose -U 0 -f </path/to/monitor_docker_compose.yaml> up -d
This documentation contains proprietary information and is protected by copyright law.
Copyright © 2026 Red Gate Software Limited. All rights reserved