Maintaining an accurate system clock is critical for Ubuntu Linux servers. If your system time drifts by even a few minutes, cryptographic certificates will fail to validate, secure SSH connections may drop, and backup scripts will trigger at the wrong times. By default, Ubuntu uses systemd-timesyncd to synchronise the clock, but this built-in tool is relatively basic and struggles to maintain microsecond accuracy on busy network servers.
For absolute precision, especially in enterprise environments, you should replace the default sync tool with Chrony, a robust, highly accurate Network Time Protocol (NTP) daemon designed specifically for modern Linux systems.
How to Install Chrony
First, you need to install the Chrony daemon from the official Ubuntu repositories.
- Open your Ubuntu Terminal.
- Update your package list:
sudo apt update - Install Chrony:
sudo apt install chrony
How to Disable the Default Timesyncd
You cannot have two different programs trying to change the system clock at the same time. You must explicitly disable the default Ubuntu sync service before starting Chrony.
- Run this command to disable and stop the default time sync service:
sudo systemctl disable --now systemd-timesyncd - Now, enable and start Chrony:
sudo systemctl enable --now chronyd
How to Verify the Sync is Working
Chrony is now actively managing your system clock in the background. You can check its status and verify that it is successfully communicating with global time servers using its built-in command-line tool, chronyc.
- Type the following command and press Enter:
chronyc tracking
Look at the output. The Reference ID line will show you the exact IP address of the external time server you are currently synced with. The System time line will display your exact offset (how far ahead or behind your computer is compared to the global atomic clock, usually measured in tiny fractions of a second). As long as the Reference ID does not say “00000000”, your server’s clock is now perfectly and permanently synchronised.