Skip to main content

How to Configure Chrony NTP Server on Ubuntu 16.04 LTS?

Since Ubuntu 16.04 timedatectl / timesyncd (which are part of systemd) replace most of ntpdate / ntp. timesyncd is available by default and replaces not only ntpdate, but also the client portion of chrony (or formerly ntpd). So on top of the one-shot action that ntpdate provided on boot and network activation, now timesyncd by default regularly checks and keeps your local time in sync. It also stores time updates locally, so that after reboots monotonically advances if applicable.

Accurate time keeping is important for a number of reasons in IT. This setup is the best practice that helps with problem diagnosis and informal server monitoring. I am living in Asia that's why i'm using this pool.
Install Chrony and Configure The NTP server:
# sudo apt install chrony
# vi /etc/chrony/chrony.conf

#pool 2.debian.pool.ntp.org offline iburst
server 0.asia.pool.ntp.org iburst
server 1.asia.pool.ntp.org iburst
server 2.asia.pool.ntp.org iburst
server 3.asia.pool.ntp.org iburst


#allow ::/0 (allow access by any IPv6 node)
allow 127.0.0.1

:x ( save & close )
After changing the any of the config file you have to restart chrony:
# sudo systemctl restart chrony.service
To see what server chrony is tracking with and performance metrics from that server execute the tracking command:
# chronyc tracking
The sources command shows a list of servers available to the system, status, and offsets from the local clock and the source. Using the -v flag provides the meanings of each column
# chronyc sources -v
The sourcestats command is used to show additional statistics for each server including the number of samples from each server and estimated offset from a source. Using the -v flag to get more details on each column is helpful initially.
# chronyc sourcestats -v

Comments