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
- Install chrony if needed:
dnf install chronyorapt install chrony. - Edit the configuration:
/etc/chrony.conf(AlmaLinux, Rocky Linux, RHEL) or a file in/etc/chrony/conf.d/(Ubuntu, Debian). Keep the existingpoolline for upstream time, and add:allow 192.168.10.0/24
This lets clients in that network ask for the time. Without anallowline, chrony only acts as a client. - 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. - Restart it:
systemctl restart chronyd # AlmaLinux, Rocky Linux, RHEL systemctl restart chrony # Ubuntu, Debian
- 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
- Point the client to your server. In
/etc/chrony.conf(or a.sourcesfile in/etc/chrony/sources.d/on Ubuntu and Debian), replace thepoolline with:server 192.168.10.5 iburst
- 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.