Skip to main content

Configure time synchronization with an external NTP server on the server

In OS images for installation on dedicated servers, which Servercore provides, all necessary NTP settings are already configured. Configure NTP in your server's OS only if you install the OS manually using your own image.

  1. Check the installed utility.
  2. Configure the utility.

1. Check the installed utility

  1. Connect to the server via SSH or via KVM console.

  2. Check which utility is used on the server:

    systemctl status ntp
    systemctl status chronyd
    systemctl status systemd-timesyncd

    We recommend using Chrony, but you can configure the utility that is already installed on the server.

  3. If you want to switch to Chrony:

    3.1. Disable and remove the systemd-timesyncd and ntpd utilities:

    systemctl disable <name>
    sudo apt remove <name>

    Specify <name> — the name of the utility to remove: ntp or systemd-timesyncd.

    3.2. Install Chrony:

    sudo apt-get install chronyd

2. Configure the utility

  1. Start Chrony:

    systemctl start chronyd
  2. Open the Chrony configuration file in the vi text editor:

    vi /etc/chrony/chrony.conf
  3. 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> iburst

    Specify <domain> — the domain name or the address of the pool or server.

  4. Exit the vi text editor with your changes saved:

    :wq
  5. Restart the Chrony utility:

    sudo systemctl restart chronyd
  6. Check the list of NTP servers used:

    chronyc -N sources