Updated: 28 September 2026 · Applies to: chrony 4.5 to 4.8 and systemd-timesyncd on AlmaLinux and Rocky Linux 9 and 10, RHEL 9 and 10, Ubuntu 24.04 and 26.04, Debian 13
A server's clock must be right to the second: TLS certificates, logs, cron jobs, databases and two-factor codes all depend on it. Linux keeps the clock in step with time servers using the Network Time Protocol (NTP). Older guides used ntpd and ntpdate, which current distributions no longer install. Today one of two services does the job:
- chrony: the default on AlmaLinux, Rocky Linux and RHEL, and on Ubuntu 26.04 (where it also uses NTS, which authenticates the time servers).
- systemd-timesyncd: the default on Ubuntu 24.04 and Debian 13. It is a simple client and is enough for most servers.
Check the current state
- Run:
timedatectl
- Look for System clock synchronized: yes and NTP service: active. If both are there, nothing else is needed.
- If the NTP service is inactive, switch it on:
timedatectl set-ntp true
Servers with chrony
- Install and start it if it is missing:
dnf install chrony && systemctl enable --now chronyd # AlmaLinux, Rocky Linux, RHEL apt install chrony # Ubuntu, Debian (starts automatically)
On Ubuntu and Debian the service is calledchrony; on AlmaLinux, Rocky Linux and RHEL it ischronyd. Installing chrony on Ubuntu or Debian removes systemd-timesyncd, so only one client runs. - See which time servers it uses and how far off the clock is:
chronyc sources -v chronyc tracking
The source marked^*is the one in use. "System time" in the tracking output shows the current offset. - To use other time servers, edit the
poolorserverlines in/etc/chrony.conf(AlmaLinux, Rocky Linux, RHEL) or add a file ending in.sourcesto/etc/chrony/sources.d/(Ubuntu, Debian), for example:pool 0.pool.ntp.org iburst
Then restart the service (systemctl restart chronydorsystemctl restart chrony). On Ubuntu and Debian,chronyc reload sourcesis enough for files insources.d. - If the clock is far off, correct it at once instead of slowly:
chronyc makestep
Servers with systemd-timesyncd
- Show the status and the server in use:
timedatectl timesync-status
- To choose your own time servers, create
/etc/systemd/timesyncd.conf.d/servers.conf(create the folder first withmkdir -p /etc/systemd/timesyncd.conf.d):[Time] NTP=0.pool.ntp.org 1.pool.ntp.org FallbackNTP=ntp.ubuntu.com
- Restart it and check again:
systemctl restart systemd-timesyncd timedatectl timesync-status
One-off sync (the old ntpdate)
ntpdate is no longer available on AlmaLinux, Rocky Linux or RHEL. With chrony, chronyc makestep does the same job while chronyd is running. On Ubuntu and Debian the ntpsec-ntpdate package still provides an ntpdate command if a script needs it.
Time zone
NTP always keeps the clock in UTC; the time zone only changes how time is shown. Set it with timedatectl set-timezone Asia/Kolkata (list the names with timedatectl list-timezones).
Common problems
- No sources reachable (
^?inchronyc sources): allow outgoing UDP port 123 in the server firewall. With NTS on Ubuntu 26.04, outgoing TCP port 4460 must be open too. - "NTP service: n/a": no time client is installed. Install chrony as shown above.
- Clock correct but wrong hour: the time zone is wrong, not the clock.
- Two clients fighting: run only one of chrony, systemd-timesyncd or ntpd.
Official documentation: chrony documentation and timesyncd.conf.
Ucartz services for this topic
- KVM VPS hosting: NVMe SSD and full root access, with Free Basic Managed Support.
- Unmanaged dedicated servers: full root access and free IPMI KVM, with Free Basic Managed Support.
- Linux server management: hardening, patching, monitoring and automation for Ubuntu, Debian, RHEL and AlmaLinux.
