> ## Content Index
> Fetch the complete content index at: https://blog.gonzaleztroyano.es/llms.txt
> Use this file to discover other available public pages before exploring further.

# Using Pi-hole as local NTP server
- URL: https://blog.gonzaleztroyano.es/using-pi-hole-as-local-ntp-server/
- Published: 2025-09-02T22:43:04.000Z
- Updated: 2025-09-02T22:43:21.000Z
- Author: Pablo González Troyano
- Tags: tech-notes, ntp, sysadmin

We can think about the Pi-hole as a local NTP *cache*. Or, more [RFC2030-compliant](https://datatracker.ietf.org/doc/html/rfc2030?ref=blog.gonzaleztroyano.es#:~:Stratum:%20This%20is%20a%20eight-bit%20unsigned%20integer%20indicating%20the%20stratumlevel%20of%20the%20local%20clock,%20with%20values%20defined%20as%20follows:), a lower stratum NTP server. In our home scenario, the added delay (much lower than a second) is almost negligible.

On the other hand, thinking about the common good of the Internet (and also on the NTP server admin team & service), having a *NTP cache* is a really efficient, as the stratum 1 server only receive request from one device (Pi-hole server) instead of all the devices that you have (can be tens of them).

On the following diagram can be seen graphically:

![](https://blog.gonzaleztroyano.es/content/images/2025/09/pihole-as-ntp.drawio-1.png)

## Activating Pi-hole's NTP server

On the Pi-hole admin panel, we've to activate *Expert settings,* clicking on the toggle on the top right corner of the *Settings > System* page.

![](https://blog.gonzaleztroyano.es/content/images/2025/09/imagen-1.png)

After doing so, a new option appears on the *Settings* submenu (marked as 5 on the capture below):

![](https://blog.gonzaleztroyano.es/content/images/2025/09/imagen-2.png)

## Setting upstream NTP server

[As I've stated before](https://blog.gonzaleztroyano.es/tech-notes/servidores-de-tiempo-ntp-para-espana/), here in Spain the official time is distributed by the Army Royal Observatory ([ROA, ](https://armada.defensa.gob.es/ArmadaPortal/page/Portal/ArmadaEspannola/cienciaobservatorio/prefLang-es/?ref=blog.gonzaleztroyano.es)*[Real Observatorio de la Armada](https://armada.defensa.gob.es/ArmadaPortal/page/Portal/ArmadaEspannola/cienciaobservatorio/prefLang-es/?ref=blog.gonzaleztroyano.es)*), so to configure Pi-hole to query this Stratum 1 server, we must set the following option/variable \[6 on the following image\]:

![](https://blog.gonzaleztroyano.es/content/images/2025/09/imagen-3.png)

## Configure clients:

It's recommended to set the DHCP options, if available, as it's practical. The problem is that most of the clients ignore this option to choose the one hardcoded or default (time.windows.com on Windows, for example).

So to set the Pi-hole as NTP server for local clients, just follow the instructions on [Windows](https://blog.gonzaleztroyano.es/tech-notes/servidores-de-tiempo-ntp-para-espana/) or [Linux](https://blog.gonzaleztroyano.es/tech-notes/configurar-ntp-con-chrony-conf/).

## Any doubts?

Do not hesitate to [contact me](https://blog.gonzaleztroyano.es/sobre-mi/#%C2%BFalguna-duda) with any questions, suggestions, complaints or clarifications you may have, I'll be happy to talk to you!