Skip to content

network time protocol

The setup is mostly straightforward. You have a configuration file with the server specified :

config file
restrict ntp.rinis.nl nomodify notrap noquery
server ntp.rinis.nl

But the main problem is when you start this as a daemon, it will refuse to sync the time if it is off too much. So you should first run ntpdate manually once to get it up to speed :

manually sync
sudo ntpdate ntp.yourserver.com

But as you can read in this article :

here

This setting in /etc/ntp.conf will get rid of that mostly useless feature :

/etc/ntp.conf
tinker panic 0

The configuration directive tinker panic 0 instructs NTP to not give up if it sees a large jump in time. This is important for coping with large time drifts and also resuming virtual machines from their suspended state.

Another way to sync quickly is to stop the server and run it by hand

stop sync start
1
2
3
4
systemctl stop ntp
/sbin/ntpd -gq
# wait for results 
systemctl start ntp

Watch the output and your system clock. After the clock is synced stop the cli command and restart the server.