Configure the server to synchronize time with an external NTP server
The OS images for installation on a dedicated server provided by Selectel have all the necessary settings for NTP. Customization in the server OS is required if you are installing the OS manually from your own image.
Linux
Windows
1. Check the installed utility
-
Check which utility is being used on the server:
systemctl status ntpsystemctl status chronydsystemctl status systemd-timesyncdWe recommend using
Chrony, but you can customize whichever utility is already installed on the server. -
If you want to switch to
Chrony:3.1 Disable and remove the
systemd-timesyncdandntpdutilities:systemctl disable <name>sudo apt remove <name>Specify
<name>as the name of the utility you want to remove:ntporsystemd-timesyncd.3.2 Install
Chrony:sudo apt-get install chronyd
2. Customize the utility
Chrony
ntpd
systemd-timesyncd
-
Launch
Chrony:systemctl start chronyd -
Open the
Chronyconfiguration file in thevitext editor: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 <domain> iburstSpecify
<domain>- the domain name or address of the pool or server.If you need to specify multiple servers, specify 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
Chronyutility:sudo systemctl restart chronyd -
Check the list of NTP servers in use:
chronyc -N sources