Operations 9 min read

Master Chrony: Precise NTP Time Sync on Linux Servers

This guide introduces Chrony, an open‑source NTP client for Unix‑like systems, and walks through setting up a two‑server lab on Rocky Linux, configuring chronyd and chronyc, adjusting firewall rules, and interpreting synchronization status to achieve precise time keeping.

MaGe Linux Operations
MaGe Linux Operations
MaGe Linux Operations
Master Chrony: Precise NTP Time Sync on Linux Servers

Chrony Overview

Chrony is an open‑source NTP time‑synchronization tool for Unix‑like systems (Linux, BSD, macOS). It offers low latency, low CPU and memory usage, and consists of the daemon chronyd and the client utility chronyc .

chronyd : background daemon that steers the kernel clock, smooths adjustments, and synchronises with upstream servers.

chronyc : command‑line interface for monitoring and configuring the daemon, usable locally or on remote hosts.

Experimental Environment

Topology

Two servers, Server1 and Server2, are connected to the same network and can reach the Internet through NAT.

Host Details

Server1 – IP 172.16.0.134/24 – Rocky Linux 8.9 (Green Obsidian) – Kernel 4.18.0-513.5.1.el8_9.x86_64

Server2 – IP 172.16.0.150/24 – Rocky Linux 8.9 (Green Obsidian) – Kernel 4.18.0-513.5.1.el8_9.x86_64

Configuring Time Synchronization

Install Chrony

# rpm -qa | grep chrony
chrony-4.2-1.el8.rocky.1.0.x86_64

Rocky Linux 8.9 includes chrony by default; verify the installation.

Configure Server1 to sync with public NTP servers

# vim /etc/chrony.conf
# Use public servers from the pool.ntp.org project.
# Please consider joining the pool (http://www.pool.ntp.org/join.html).
# pool 2.rocky.pool.ntp.org iburst   # commented out
Server ntp.aliyun.com iburst          # Alibaba NTP server
Server time1.cloud.tencent.com iburst # Tencent NTP server

Restart and enable the daemon:

# systemctl restart chronyd
# systemctl enable chronyd
# systemctl is-active chronyd   # should show active

Check synchronization status:

# chronyc sources
MS Name/IP address         Stratum Poll Reach LastRx Last sample
===============================================================================
^* 203.107.6.88               2   6    37    63   +49us[+2956us] +/- 23ms
^- 106.55.184.199             2   6   127    60   +1891us[+1891us] +/- 47ms

The chronyc sources output columns are explained: mode (M), state (S), name/IP, stratum, poll interval, reachability, last received sample time, last sample offset, and error estimate.

Configure Server2 to sync from Server1

Edit /etc/chrony.conf on Server2 to use Server1 as a source:

# vim /etc/chrony.conf
# Use public servers from the pool.ntp.org project.
# Please consider joining the pool (http://www.pool.ntp.org/join.html).
# pool 2.rocky.pool.ntp.org iburst
Server 172.16.0.134 iburst

Restart and enable the daemon on Server2:

# systemctl restart chronyd
# systemctl enable chronyd

Open NTP service in the firewall:

# firewall-cmd --add-service=ntp --permanent
# firewall-cmd --reload

Verify synchronization status on Server2 (illustrated below).

Reference: https://blog.51cto.com/min2000/8840552 (copyright belongs to the original author).

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

Linuxtime synchronizationchronyChronycChronyd
MaGe Linux Operations
Written by

MaGe Linux Operations

Founded in 2009, MaGe Education is a top Chinese high‑end IT training brand. Its graduates earn 12K+ RMB salaries, and the school has trained tens of thousands of students. It offers high‑pay courses in Linux cloud operations, Python full‑stack, automation, data analysis, AI, and Go high‑concurrency architecture. Thanks to quality courses and a solid reputation, it has talent partnerships with numerous internet firms.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.