Howto: Configuring more frequent time synchronisation on Ubuntu

in howto •  2 years ago


they will be removing an inbuilt NTP client in steemd it is important for witnesses to configure time synchronisation on their servers. It's not difficult, just install one package and set a more frequent rate of NTP polling to minimise the drift.

Installing the service

It is not installed by default, though timedatectl it polls upon boot as well as when a network connection comes up (the same thing, in effect, most of the time), so you need to install a package to get regular NTP time synchronisation:

sudo apt-get install ntp

Then you want to edit the configuration to change from the default polling frequency. The default polling frequency is 1024 seconds, and the parameters are powers of 2, so 2 means 4 seconds, 3 means 8, 4 means 16, etc. You need to edit the configuration file:

sudo nano /etc/ntp.conf

and add to the end of it:

minpoll 5
maxpoll 7

This means it will poll at a frequency between 32 and 128 seconds, about 30 seconds to 2 minutes. At a frequency of the default 1024 seconds, the time can drift more than a few nanoseconds, sometimes more, depending on the hardware, sometimes it can drift even up to a couple of hundred milliseconds which starts to get into the range of being able to cause a Witness to fail to produce a block on time.

When the inbuilt NTP client is removed, this could become a serious problem.

Now, after you edit the configuration, you need to enable and restart the ntp time sync daemon:

sudo systemctl enable ntp
sudo systemctl restart ntp

From then on, the system will stay accurate to within tens of milliseconds at worst, and this will help ensure your witness never misses a block.


We can't code here! This is Whale country!

Vote #1 l0k1

Go to to cast your vote by typing l0k1 into the text entry at the bottom of the leaderboard.

(note, my username is spelled El Zero Kay One or Lima Zero Kilo One, all lower case)

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

Thank you for this!

What time you got buddy?



Thank you for sharing some Bash wisdom here.

Awesome guide I just followed this today thank you very much!


Good call replying to this old post of mine as I am about to be running an RPC node. Well, it's not so important for RPC because I won't be missing blocks, but it may interfere with its function of relaying transactions to the witness nodes.