TEMPERATUREUNIT not working in Docker?

Expected Behaviour:

Using TEMPERATUREUNIT=f in Docker Compose file, expecting temperate in admin page to show in Fahrenheit.

Actual Behaviour:

Temperature still listed in Celsius.

Is there a known issue with the TEMPERATUREUNIT flag in a Docker instance of Pi-Hole? Running on my Synology NAS, the admin page still shows the temperature in Celsius. If I run the Chronometer script, though, it does show the temp in F. Not a big deal but wanted to ask.

Can you post your compose file?

version: "3.8"

    container_name: pihole
    hostname: pihole-docker
    image: pihole/pihole:latest
      - TZ=America/New_York
      - WEBPASSWORD=<password>
      - PIHOLE_DNS_=;
      - DNSMASQ_USER=root
      - /volume1/docker/pihole/etc/pihole:/etc/pihole
      - /volume1/docker/pihole/etc/dnsmasq.d:/etc/dnsmasq.d
    restart: unless-stopped

    external: true


Can you shell in to the running container and get the output of the env command to show what the current environment is?

Has the temperature display been correct before and now it's not?

Setting this environment variable sets the value in setupVars.conf, but this is only used in chronometer (as you have seen) and PADD (also - use PADD, it's much sexier than chronometer)

For the web interface, the setting was moved to a per-browser setting alongside some others in this PR:

Some further discussion around the subject can be found:

Argh, yes! I see that now:


I changed that and it worked. Sheesh, sorry. More user error. :slight_smile:

The documentation wasn't very clear on the Docker readme... so I've changed that now, too!

1 Like

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

With Pi-hole FTL v5.21, Web v5.18.4 and Core v5.15.5 released

the temperature unit set in setupVars.conf does also set the unit for the web interface now.

1 Like