Time synchronization using chrony

Time synchronization is a very important topic running a cardano staking pool. Ubuntu comes with NTPD by default which can cause a time drift from 500ms to 1s. It is a best practise to use Chrony instead of NTPD.

Let's install Chrony:

sudo apt-get install chrony

You need to edit the file /etc/chrony/chrony.conf after the Chrony installation is finished.

sudo nano /etc/chrony/chrony.conf

Edit the section of the NTP pools:

pool time.google.com iburst minpoll 2 maxpoll 2 maxsources 3 maxdelay 0.3

pool 0.de.pool.ntp.org iburst minpoll 2 maxpoll 2 maxsources 3 maxdelay 0.3

pool 1.de.pool.ntp.org iburst minpoll 2 maxpoll 2 maxsources 3 maxdelay 0.3

pool 2.de.pool.ntp.org iburst minpoll 2 maxpoll 2 maxsources 3 maxdelay 0.3

pool ntp.ubuntu.com iburst minpoll 2 maxpoll 2 maxsources 3 maxdelay 0.3

Edit the value of maxupdateskew and makestep:

maxupdateskew 5.0

makestep 0.1 -1

Add following lines to the end of the configuration file:

# Get TAI-UTC offset and leap seconds from the system tz database

leapsectz right/UTC

# Serve time even if not synchronized to a time source.

local stratum 10

Save the changes and restart chrony:

sudo systemctl restart chronyd.service

Your are done!