Pi-hole display time received from ntp server

I am using pi-hole as my DHCP server and Network Time Sync is enabled. Given that Pi-Hole can now function as a time-server to the LAN would it be possible to display the time that Pi-Hole has obtained from the external NTP server (default pool.ntp.org). Perhaps it could be displayed under β€˜Status’ in the top left corner (where temperature used to be).

Thankyou for considering this.

You can check the server time using the command line.
The time is also displayed on every query, in Query Log page.

There are no plans to show a clock on the web interface.

My thought was that, as Pi-hole is providing the NTP service then it would be appropriate to display the data obtained by that NTP service, just as it does for DHCP. Thanks for considering my idea.

I believe that Pi-hole uses a external NTP server to keep its time in sync. Pi-hole itself is not an NTP Server. The system you are running (laptop/desktop/windows/linux, etc) know the time, and most use an external NTP server already for time, display time, so as rdwebdesign points out, you can use the command line or, if you are using a Windows/Apple/Linux desktop device, you have the time, likely from NTP already, or look at the Pi-hole query log.

Thanks. You are correct. Pi-hole is not an NTP server (it, by default, points to pool.ntp.org as the NTP server) but it is an NTP client (Settings | All Settings | Network Time Sync). As a client, it queries the NTP server and gets back the time. It would be nice to easily see the time value that has been returned from the NTP server.

Thanks again. Jeff

Yes Pi-hole can act as an NTP server:

$ pstree -pst $(pidof -s pihole-FTL)
systemd(1)───pihole-FTL(22835)─┬─{civetweb-master}(23312)
                               β”œβ”€{civetweb-timer}(23311)
                               β”œβ”€{civetweb-worker}(23313)
                               β”œβ”€{civetweb-worker}(23314)
                               β”œβ”€{civetweb-worker}(23315)
                               β”œβ”€{civetweb-worker}(23316)
                               β”œβ”€{civetweb-worker}(23317)
                               β”œβ”€{civetweb-worker}(23318)
                               β”œβ”€{civetweb-worker}(23319)
                               β”œβ”€{civetweb-worker}(24204)
                               β”œβ”€{civetweb-worker}(24205)
                               β”œβ”€{civetweb-worker}(24206)
                               β”œβ”€{database}(23307)
                               β”œβ”€{dns-client}(23309)
                               β”œβ”€{housekeeper}(23308)
                               β”œβ”€{ntp-server4}(23305)
                               β”œβ”€{ntp-server6}(23306)
                               └─{timer}(23310)
$ grep ntp /etc/services
nntp            119/tcp         readnews untp   # USENET News Transfer Protocol
ntp             123/udp                         # Network Time Protocol
nntps           563/tcp         snntp           # NNTP over SSL
$ sudo ss -nlup sport = 123
State   Recv-Q  Send-Q    Local Address:Port     Peer Address:Port  Process
UNCONN  0       0               0.0.0.0:123           0.0.0.0:*      users:(("pihole-FTL",pid=22835,fd=30))
UNCONN  0       0                     *:123                 *:*      users:(("pihole-FTL",pid=22835,fd=31))

But I noticed only if below setting is flipped on or its Kiss Of Death:

$ sudo pihole-FTL --config ntp.sync.active
false
$ sudo ntpdig -d localhost
ntpdig: querying ::1 (localhost)
ntpdig: querying 127.0.0.1 (localhost)
ntpdig: localhost: Response dropped: stratum 0, probable KOD packet
ntpdig: no eligible servers
$ sudo pihole-FTL --config ntp.sync.active true
true
$ sudo ntpdig -d localhost
ntpdig: querying ::1 (localhost)
ntpdig: querying 127.0.0.1 (localhost)
org t1: ec460a3b.c25dc000 rec t2: ec460a40.c6a4fca4
xmt t3: ec460a40.c6a68f4b dst t4: ec460a40.c6e0d000
org t1: 1755024315.759243 rec t2: 1755024320.775955
xmt t3: 1755024320.775979 dst t4: 1755024320.776868
rec-org t21: 5.016712  xmt-dst t34: -0.000889
2025-08-12 20:45:20.775979 (+0200) +2.507912 +/- 2.508877 localhost 127.0.0.1 s2 no-leap

The ntpdig binary is contained in below package:

$ apt-file search bin/ntpdig
ntpsec-ntpdig: /usr/bin/ntpdig

Pi-hole can act as both NTP client and server, i.e. it can sync time with an NTP server and update the system's time and RTC (if configured accordingly), and it can listen for NTP requests by other clients on port 123 and answer the time as provided by the system clock.

Could you explain what you want to do with that time?

Pi-hole synchronises time with an NTP server once an hour.
Compared with the current time, that time would be permanently slow, except for the split second when Pi-hole has successfully synchronised time.

What makes you consider seeing that time useful?

I stand corrected. Thank you for clarifying that.

1 Like

Hi Bucking_Horn, You are correct, of course Pi-Hole is an NTP server (as well as client). I’ve even tested it with one of my windows systems on my LAN and it works. I just forget so many things!!

Why do I consider a display of the time would be useful?
(1) Mainly because I’ve seen messages appear (in detail at Tools | Pi-hole diagnosis) that complain about loss of connection with the NTP server. It would be nice to have a time display on the main Pi-hole page as a confirmation that all is well in the world of NTP synchronization.
(2) It’s a pain to have to go to the CLI just to check the time.
(3) Windows has a time display at the bottom right and it’s useful to have it there.

Opening this Feature Request has been very educational for me. Thanks everyone for your wise suggestions.

Thankyou deHakkelaar, that’s all useful information and educational. Much appreciated.

Jeff

1 Like

I totally forgot as I still have to get used to the version 6 release but,
you dont have to install ntpdig on the Pi-hole host for diagnosing as the pihole-FTL binary can do that too:

$ pihole-FTL help
[..]

NTP client:
    Query an NTP server for the current time and print the
    result in human-readable format. An optional server may be
    as argument. If the server is omitted, 127.0.0.1 is used.

    The system time is updated on the system when the optional
    --update flag is given.

    Usage: pihole-FTL ntp [server] [--update]

Thankyou deHakkelaar, I didn't know that. Helpful :slight_smile:

1 Like