I've searched around, but I cannot find an answer.

Can I use my Raspberry Pi as an NTP server (independently).

I want to synchronize 4 devices on a LAN for logging. They will be on a LAN with no WAN access... one is a Cisco Switch, one is the Pi and the other two are conversion boxes I want to log things on (they will be NTP client).

I just need them all to sync to 1 clock source (the Pi) is there a way to do this? All the answers I find are either to setup the Pi with a GPS module (which I can't do here) or sync it to external NTP servers for cascading the clock down (which I can't do here)... can I use NTP just to send out the Pi's system time ?

  • Note, unless you add some sort of clock to the PI, the time will reset on each PI reboot. Jul 4 '18 at 11:19

You can, but you need a source for the time. a GPS module is one option, as it gets the correct time, but if you only need to set the time once and then just want to distribute it, you can just get a realtime clock module for the pi. This should be accurate up to a few seconds per year, which is probably enough when you just want to synchronize the time of your devices.

  • 1
    That's exactly what I'm looking for :-) ... After I add the RTC, can I used NTP to distribute it around the network (Pi acts as NTP Server)? I presume the command will be similar to the GPS module ones I have found to implement (obviously with changes)
    – bobuk
    Jul 3 '18 at 8:58
  • 1
    When the realtime clock is working, you can use (open)ntpd to act as ntp server. Have a look at the config file and disable syncing with upstream servers and enable serving ntp to your LAN. If you need help, any related howto should do, as a pi with a RTC just works like any other computer.
    – allo
    Jul 3 '18 at 9:04

Set the server to in /etc/ntp.conf: this is a special address which tells NTP to use your local clock as a reference.


I'm assuming you can't do GPS due to lack of skyview? I don't know where you're based, but you could consider one of the long wave MSF/"Atomic time" radio receivers. They generally continue to work inside buildings, and will give you a fairly good external reference for NTP to run with.

If that doesn't work for you, you could consider something like this http://wiki.seeedstudio.com/High_Accuracy_Pi_RTC-DS3231/ which should keep time to about 1s/week.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.