4

How do I set the NTP server setting to a custom value in recent versions of Raspbian? I've noticed in a Stretch image that /etc/ntpd.conf does not exist in the default full image, nor is ntpd process running or even installed, yet when on an Internet-connected network, the system time does get set at or soon after system boot.

I'm primarily interested in if and how raspbian supports this by default (if it does), rather than how I can modify it outside of typical administrative actions.

My question is very similar to this question: "How to use NTP on Raspberry Pi by local NTP server" But the only answer (which refers to /etc/ntpd.conf) has a disclaimer that says "This answer is OBSOLETE. Debian 9 uses systemd-timesyncd.service."

So I guess a better way to phrase this question is, how do I set custom local NTP servers for systemd-timesyncd.service?

  • 1
    Stretch uses a different NTP implementation than prior versions: chrony.tuxfamily.org So what you will find is chronyd, not ntpd. – goldilocks Jul 5 '18 at 18:29
5

Edit /etc/systemd/timesyncd.conf , especially the second line

[Time]
NTP=your.servername.goes.here
FallbackNTP=0.arch.pool.ntp.org 1.arch.pool.ntp.org 2.arch.pool.ntp.org 3.arch.pool.ntp.org
#RootDistanceMaxSec=5
#PollIntervalMinSec=32
#PollIntervalMaxSec=2048

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.