Skip to content

Netdata

Docker Compose deployment guide for Netdata on Ubuntu.

Netdata is a real-time monitoring platform that provides detailed performance metrics for Linux servers, containers, applications, disks, networks, and more through a modern web interface.

I use Netdata to monitor multiple homelab servers from a single dashboard.

Official project:


Create the Project

Create a directory for Netdata:

/opt/docker/netdata

Move into it:

cd /opt/docker/netdata

Create the Docker Compose File

Create:

/opt/docker/netdata/docker-compose.yml

Paste:

services:
  netdata:
    image: netdata/netdata:latest
    container_name: netdata

    ports:
      - "19999:19999"

    restart: unless-stopped

    volumes:
      - netdata_config:/etc/netdata
      - netdata_lib:/var/lib/netdata
      - netdata_cache:/var/cache/netdata

volumes:
  netdata_config:
  netdata_lib:
  netdata_cache:

Start Netdata

Start the container:

docker compose up -d

Check the logs:

docker logs -f netdata

Access the Web Interface

Open:

http://SERVER-IP:19999

Example:

http://192.168.1.50:19999

You should see the Netdata dashboard displaying real-time metrics.


Monitoring Multiple Servers

Netdata can monitor multiple machines from a single interface.

Install Netdata on each server you want to monitor.

For example:

micropc
micro2pc
minipc

You can then connect the nodes through Netdata Cloud to view them all from a single dashboard.

This allows you to:

  • Monitor CPU usage
  • Monitor memory usage
  • Monitor disk performance
  • Monitor network traffic
  • Monitor Docker containers
  • View alerts across multiple servers

from one location.


Reverse Proxy (Optional)

If you already use a reverse proxy such as Caddy, you may prefer to expose Netdata through a subdomain instead of opening port 19999 directly.

Example:

https://netdata.example.com

Restrict access appropriately, especially if the dashboard is exposed to the internet.

If you are new to reverse proxies, see the Topic page:

What is a Reverse Proxy?


Advanced Example (Reference Only)

This is the configuration I currently use in my own homelab.

services:
  netdata:
    image: netdata/netdata:latest
    container_name: netdata
    stop_grace_period: 30s

    hostname: micropc

    ports:
      - 19999:19999

    restart: unless-stopped

    cap_add:
      - SYS_PTRACE

    security_opt:
      - apparmor:unconfined

    volumes:
      - /opt/docker/netdata/config:/etc/netdata
      - /opt/docker/netdata/lib:/var/lib/netdata
      - /opt/docker/netdata/cache:/var/cache/netdata
      - /etc/passwd:/host/etc/passwd:ro
      - /etc/group:/host/etc/group:ro
      - /proc:/host/proc:ro
      - /sys:/host/sys:ro
      - /etc/os-release:/host/etc/os-release:ro
      - /var/run/docker.sock:/var/run/docker.sock:ro

This configuration provides:

  • Persistent configuration storage
  • Host system monitoring
  • Docker container monitoring
  • Hostname identification
  • Additional system metrics

Updating Netdata

Pull the latest image:

docker compose pull

Restart the container:

docker compose up -d

Backups

Back up the Netdata configuration folders:

/opt/docker/netdata/config
/opt/docker/netdata/lib
/opt/docker/netdata/cache

If you use bind mounts, restoring these folders will restore your Netdata configuration.


Final Thoughts

Netdata is one of the easiest ways to gain visibility into a homelab environment. It provides excellent real-time monitoring with minimal configuration and can scale from a single server to multiple nodes across an entire homelab.