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

  1. Run:
    timedatectl
  2. Look for System clock synchronized: yes and NTP service: active. If both are there, nothing else is needed.
  3. If the NTP service is inactive, switch it on:
    timedatectl set-ntp true

Servers with chrony

  1. 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 called chrony; on AlmaLinux, Rocky Linux and RHEL it is chronyd. Installing chrony on Ubuntu or Debian removes systemd-timesyncd, so only one client runs.
  2. 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.
  3. To use other time servers, edit the pool or server lines in /etc/chrony.conf (AlmaLinux, Rocky Linux, RHEL) or add a file ending in .sources to /etc/chrony/sources.d/ (Ubuntu, Debian), for example:
    pool 0.pool.ntp.org iburst
    Then restart the service (systemctl restart chronyd or systemctl restart chrony). On Ubuntu and Debian, chronyc reload sources is enough for files in sources.d.
  4. If the clock is far off, correct it at once instead of slowly:
    chronyc makestep

Servers with systemd-timesyncd

  1. Show the status and the server in use:
    timedatectl timesync-status
  2. To choose your own time servers, create /etc/systemd/timesyncd.conf.d/servers.conf (create the folder first with mkdir -p /etc/systemd/timesyncd.conf.d):
    [Time]
    NTP=0.pool.ntp.org 1.pool.ntp.org
    FallbackNTP=ntp.ubuntu.com
  3. 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 (^? in chronyc 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

Was this answer helpful? 0 Users Found This Useful (0 Votes)