Pi-hole graph and stats reset on Save

Hi

I have two installations of Pi-hole v5. The first is running on a Raspberry Pi and is working just fine.

The second is running as a docker container. Functionally, it is all working just fine, but I've noticed that any time I restart the container, or even hit Save on one of the settings screens, the statistics are wiped and the graphs start from scratch.

I'm using the pihole:pihole:latest docker image, and here's my docker-compose. All other information persists - configurations, hosts, etc.

  pihole:
    container_name: pihole
    image: pihole/pihole:latest
    hostname: dns
#    domainname: lan
    ports:
      - "53:53/tcp"
      - "53:53/udp"
      - "67:67/udp"
      - "80:80/tcp"
      - "443:443/tcp"
    environment:
      - DNS1=8.8.8.8
      - DNS2=1.1.1.1
      - TZ=${TZ}
    volumes:
      - /etc/hosts:/etc/hosts:ro
      - /etc/localtime:/etc/localtime:ro
      - /etc/timezone:/etc/timezone:ro
      - /data/appdata/docker/pihole/etc/pihole:/etc/pihole/
      - /data/appdata/docker/pihole/etc/dnsmasq.d:/etc/dnsmasq.d/
    networks:
      ext_net:
        ipv4_address: 192.168.1.9
    dns:
      - 127.0.0.1
      - 8.8.8.8
      - 1.1.1.1
    cap_add:
      - NET_ADMIN
    restart: unless-stopped

The pihole output in the log file shows the following when I hit save, which is when the stats/graphs reset:

Stopping pihole-FTL
Starting pihole-FTL (no-daemon) as root

Debug Token:

https://tricorder.pi-hole.net/a9l5i1il0e

Fixed it!

It's a docker permissions issue. It seems that you can't set the UID/GID for pihole when running the docker image, so it was having issues accessing the pihole-ftl.db file. Doing a chmod 777 on the host directory has solved it.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.