Time synchronisation

To keep the server's clock accurate you need NTP. Network Time Protocol (NTP) is a network protocol for synchronising a computer's internal clock across networks with variable latency.

Modern systems: chrony

On AlmaLinux, Rocky Linux and CentOS 8 or later, synchronisation is handled by chronyd:

dnf -y install chrony
systemctl enable --now chronyd

On Ubuntu and Debian:

apt install chrony
systemctl enable --now chrony

Check synchronisation status:

chronyc tracking
timedatectl status

Older systems: ntpd

Install the service:

yum -y install ntp        # CentOS 6/7
apt-get install ntp       # Ubuntu

Synchronise once, immediately:

ntpdate pool.ntp.org

Start the service:

systemctl start ntpd      # CentOS 7
service ntpd start        # CentOS 6
service ntp start         # Ubuntu

Enable it at boot:

systemctl enable ntpd     # CentOS 7
chkconfig ntpd on         # CentOS 6
update-rc.d ntp defaults  # Ubuntu

See also configuring the time zone.

Ready to start?

Pick a plan — your server will be ready in 15 minutes.