Configure time synchronization with an external NTP server on the server
In OS images for dedicated server installation provided by Servercore, all necessary NTP settings are preconfigured. You only need to configure the server's OS if you are installing an OS manually from your own image.
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:3.1. Disable and remove the
systemd-timesyncdandntpdutilities:systemctl disable <name>sudo apt remove <name>Specify
<name>— the name of the utility to remove:ntporsystemd-timesyncd.3.2. Install
Chrony:sudo apt-get install chronyd
2. Configure the utility
Chrony
ntpd
systemd-timesyncd
-
Start
Chrony:systemctl start chronyd -
Open the
Chronyconfiguration file in thevitext editor:vi /etc/chrony/chrony.conf -
Add or replace NTP servers in the file. We recommend replacing the servers in the file with Servercore NTP servers, but you can specify any available NTP servers.
server <domain> iburstSpecify
<domain>— the domain name or the address of the pool or server. -
Exit the
vitext editor with your changes saved::wq -
Restart the
Chronyutility:sudo systemctl restart chronyd -
Check the list of NTP servers used:
chronyc -N sources