How to use chrony for accurate time synchronization

· Category: Linux

Short answer

chrony is a modern NTP implementation that synchronizes system clocks quickly and maintains accuracy even on intermittent networks.

Steps

  1. Install chrony:
sudo apt install chrony
  1. Edit /etc/chrony/chrony.conf to add NTP pools.
  2. Start and enable:
sudo systemctl enable --now chronyd
  1. Check sources:
chronyc sources

Tips

  • chrony converges faster than traditional ntpd.
  • Use iburst for faster initial synchronization.
  • Can act as an NTP server for local networks.

Common issues

  • Firewall blocking UDP port 123 prevents time sync.
  • Large initial offsets may require a manual step with chronyc makestep.