Skip to content

How to Configure an NTP Server and Clients with chrony

Updated 2 min read

Updated: 28 September 2026 · Applies to: chrony 4.5 to 4.8 on AlmaLinux and Rocky Linux 9 and 10, RHEL 9 and 10, Ubuntu 24.04 and 26.04, Debian 13

On a network with many servers, one of them can act as the time server for the others: it takes the time from the internet, and the rest synchronise with it. This keeps all clocks consistent even if outside access is limited. The older CentOS 7 guides used ntpd; current systems use chrony, which does both roles. The configuration below was checked with chrony 4.8 on AlmaLinux 9.

On the time server

  1. Install chrony if needed: dnf install chrony or apt install chrony.
  2. Edit the configuration: /etc/chrony.conf (AlmaLinux, Rocky Linux, RHEL) or a file in /etc/chrony/conf.d/ (Ubuntu, Debian). Keep the existing pool line for upstream time, and add:
    allow 192.168.10.0/24
    This lets clients in that network ask for the time. Without an allow line, chrony only acts as a client.
  3. Optional: to keep serving time when the internet connection is down, add local stratum 10. The clients then stay in step with this server even without an upstream source; only use it on a single, designated time server.
  4. Restart it:
    systemctl restart chronyd     # AlmaLinux, Rocky Linux, RHEL
    systemctl restart chrony      # Ubuntu, Debian
  5. Open UDP port 123 for your network:
    firewall-cmd --permanent --add-rich-rule='rule family="ipv4" source address="192.168.10.0/24" service name="ntp" accept'
    firewall-cmd --reload
    With UFW: ufw allow from 192.168.10.0/24 to any port 123 proto udp.

On each client

  1. Point the client to your server. In /etc/chrony.conf (or a .sources file in /etc/chrony/sources.d/ on Ubuntu and Debian), replace the pool line with:
    server 192.168.10.5 iburst
  2. Restart chrony and check the source:
    systemctl restart chronyd
    chronyc sources -v
    The server should be listed with ^*, which means it is in use.

Check on the server

chronyc tracking        # the server's own synchronisation
chronyc clients         # which clients have asked for the time

For a single server that only needs to keep its own clock right, see how to synchronize time with NTP on Linux.

Official documentation: chrony documentation.

Related services

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.

Was this answer helpful?

Still stuck? Open a ticket