The importance of having ntpd configured


Ok, not really importance of having it configured, but at least a post to try and get myself to remember to do it.

I discovered that the Dreamhost server I’m hosting this blog on has bad clock drift. I’m not sure why it’s happening (I’d imagine that it should be one of the first things configured in a mass server environment, but hey…)

Anyway, having a ~5 minute clock drift broke the WordPress Google Authentication plugin – and anything else that’d rely on time. So I decided to quickly check my VPSes and just make sure they had ntpd up and running.

And oddly enough, the Xen instances didn’t, the ones where ntpd is the most necessary since it maintains an internal clock state disassociated from the wall clock. OpenVZ at least (appears to) inherit from the the container host, and both hosts I’m with appear to have ntpd enabled (or at least my clocks that are pretty close to the ntp.org pool time.

In any case, getting ntpd setup on the Xen instances was painless:

yum install ntp
systemctl enable ntpd
systemctl start ntpd
ntpdate -q 0.fedora.pool.ntp.org

By default ntpd uses the NTP.org pool, so the extra ntpdate command is in theory unnecessary, but that just forced time to get in sync quickly.

Config credit goes to the Fedora official docs

, ,

  1. No comments yet.
(will not be published)