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
- Install chrony:
sudo apt install chrony
- Edit
/etc/chrony/chrony.confto add NTP pools. - Start and enable:
sudo systemctl enable --now chronyd
- Check sources:
chronyc sources
Tips
chronyconverges faster than traditionalntpd.- Use
iburstfor 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.