Configure time synchronization with an external NTP server
Configuring time synchronization via the NTP protocol is required when you prepare your own ISO image for use with the cloud platform.
In pre-built images of cloud servers, all necessary settings for NTP synchronization are already configured.
Linux
Windows
1. Check the installed utility
-
Check which utility is used on the server:
systemctl status ntpsystemctl status chronydsystemctl status systemd-timesyncdWe recommend using
Chrony, but you can configure the utility that is already installed on the server. -
If you want to switch to
Chrony, disable and remove thesystemd-timesyncdandntpdutilities and installChrony:systemctl disable <name>sudo apt remove <name>sudo apt-get install chronydSpecify
<name>— the name of the utility to remove (ntporsystemd-timesyncd).
2. Configure the utility
Chrony
ntpd
systemd-timesyncd
-
Start
Chrony:systemctl start chronyd -
Open the
Chronyconfiguration file in thevi:vi /etc/chrony/chrony.conf -
Add or replace the NTP servers in the file. We recommend replacing the servers in the file with Selectel NTP servers, but you can specify any available NTP servers.
server <ntp_server> iburstSpecify
<ntp_server>— the domain name or IP address of the NTP server.If you need to specify multiple servers, list each on a separate line, for example:
server 0.spb.ntp.selectel.ru iburstserver 1.spb.ntp.selectel.ru iburst -
Exit the
vitext editor with your changes saved::wq -
Restart the
Chrony:sudo systemctl restart chronyd -
Check the list of NTP servers in use:
chronyc -N sources