NTP

Changelog

  • 2024-07-30: Init

The typical NTP service is timesyncd (typically run as system-timesyncd under systemd). This does not actually run a full NTP daemon, but an SNTP (simple NTP). From the systemd mailing list:

...focusing only on querying time from one remote server and synchronizing the local clock to it... The daemon saves the current clock to disk every time a new NTP sync has been acquired (and every 60 seconds), and uses this to possibly correct the system clock early at bootup (e.g. when no RTC clock is available)...

For more accurate timekeeping as well as serving NTP, a recommended solution is to use chrony, which comes as a "chronyd" daemon and "chronyc" CLI. Configuration is under /etc/chrony/chrony.conf, with pool and server settings. Restart the chrony service to load configuration.

server 0.sg.pool.ntp.org
server 1.sg.pool.ntp.org
server 2.sg.pool.ntp.org
server 3.sg.pool.ntp.org

Note this is critical if one wants to use TOTP for 2FA.