Skip to main content
Configure time synchronization with an external NTP server

Configure time synchronization with an external NTP server

Setting up NTP time synchronization is required when you prepare your ISO image to work with a cloud platform.

In the ready-made cloud server images, all the necessary settings for NTP synchronization are made.

  1. Check the installed utility.

  2. Customize the utility.

1. Check the installed utility

  1. Connect to the server via SSH.

  2. Check which utility is being used on the server:

    systemctl status ntp
    systemctl status chronyd
    systemctl status systemd-timesyncd

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

  3. If you want to switch to Chrony, disable and uninstall the systemd-timesyncd and ntpd utilities and install Chrony:

    systemctl disable <name>
    sudo apt remove <name>
    sudo apt-get install chronyd

    Specify <name> as the name of the utility to be removed (ntp or systemd-timesyncd).

2. Customize the utility

  1. Launch Chrony:

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

    vi /etc/chrony/chrony.conf
  3. Add or replace the 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 <ntp_server> iburst

    Specify <ntp_server> — the domain name or IP address of the NTP 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 in use:

    chronyc -N sources