Skip to main content

Installing on Docker

This guide covers running MetricsHub as a Docker container. You can use Docker directly or Docker Compose.

Pulling the Image

Pull the Community image from Docker Hub:

docker pull metricshub/metricshub-community:3.9.02

Preparing the Configuration

Create directories and download example configuration:

mkdir -p /opt/metricshub/{logs,config}
cd /opt/metricshub
wget -O ./config/metricshub.yaml https://metricshub.com/docs/latest/resources/config/linux/metricshub-example.yaml

Set permissions (container runs as UID 1000):

chown -R 1000:1000 /opt/metricshub && chmod -R 775 /opt/metricshub

Starting the Container

cd /opt/metricshub && docker run -d \
--name=metricshub-community \
-p 31888:31888 \
-v $(pwd)/config:/opt/metricshub/lib/config \
-v $(pwd)/logs:/opt/metricshub/lib/logs \
metricshub/metricshub-community:3.9.02

Docker Compose

For easier management, you can use Docker Compose. Create a docker-compose.yaml file in /opt/metricshub:

services:
metricshub:
image: metricshub/metricshub-community:3.9.02
container_name: metricshub-community
ports:
- 31888:31888 # MetricsHub Web UI
volumes:
- ./logs:/opt/metricshub/lib/logs
- ./config:/opt/metricshub/lib/config
restart: unless-stopped

Start with docker compose up -d.

Managing Containers

Use these commands to manage your MetricsHub container:

docker stop metricshub-community
docker start metricshub-community
docker restart metricshub-community
docker logs metricshub-community

Upgrading

To upgrade to a newer version:

  1. Stop and remove the existing container:
    docker stop metricshub-community && docker rm metricshub-community
  2. Pull the latest image:
    docker pull metricshub/metricshub-community:latest
  3. Start with your existing configuration (same command as initial start)

Your configuration files are preserved in the mounted volumes.

Next Steps

Once running, you're ready to configure MetricsHub:

  1. Configure your resources — define what to monitor
  2. Set up telemetry export — choose where to send metrics
  3. Access the Web UI — manage and monitor from your browser