Yandex Cloud
Search
Contact UsGet started
  • Blog
  • Pricing
  • Documentation
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • ML & AI
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Customer Stories
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
    • Yandex Cloud Partner program
  • Blog
  • Pricing
  • Documentation
© 2025 Direct Cursus Technology L.L.C.
Yandex Compute Cloud
  • Yandex Container Solution
    • All tutorials
    • Configuring time synchronization using NTP
    • Autoscaling an instance group to process messages from a queue
    • Updating an instance group under load
    • Deploying Remote Desktop Gateway
    • Getting started with Packer
    • Transferring logs from a VM to Yandex Cloud Logging
    • Building a VM image with infrastructure tools using Packer
    • Migrating data to Yandex Cloud using Hystax Acura
    • Fault protection with Hystax Acura
    • VM backups using Hystax Acura
    • Deploying a fault-tolerant architecture with preemptible VMs
    • Configuring a fault-tolerant architecture in Yandex Cloud
    • Creating a budget trigger that invokes a function to stop a VM
    • Creating triggers that invoke a function to stop a VM and send a Telegram notification
    • Creating a Python web application with Flask
    • Creating an SAP program in Yandex Cloud
    • Deploying a Minecraft server in Yandex Cloud
    • Automating image builds using Jenkins and Packer
    • Creating test VMs via GitLab CI
    • High-performance computing on preemptible VMs
    • Configuring an SFTP server based on CentOS 7
    • Deploying GlusterFS in high availability mode
    • Deploying GlusterFS in high performance mode
    • Backing up to Object Storage with Bacula
    • Building a CI/CD pipeline in GitLab using serverless products
    • Implementing a secure high-availability network infrastructure with a dedicated DMZ based on the Check Point NGFW
    • Cloud infrastructure segmentation with the Check Point next-generation firewall
    • Configuring a secure GRE tunnel over IPsec
    • Creating a bastion host
    • Implementing fault-tolerant scenarios for NAT VMs
    • Creating a tunnel between two subnets using OpenVPN Access Server
    • Creating an external table from a Object Storage bucket table using a configuration file
    • Setting up network connectivity between BareMetal and Virtual Private Cloud subnets
    • Working with snapshots in Managed Service for Kubernetes
    • Launching the DeepSeek-R1 language model in a Yandex Compute Cloud GPU cluster
  • Access management
  • Terraform reference
  • Monitoring metrics
  • Audit Trails events
  • Release notes

In this article:

  • Getting started
  • Required paid resources
  • Prepare the infrastructure
  • Set up synchronization
  • Check synchronization
  • How to delete the resources you created
  1. Tutorials
  2. Configuring time synchronization using NTP

Configuring time synchronization using NTP

Written by
Yandex Cloud
Updated at May 7, 2025
  • Getting started
    • Required paid resources
  • Prepare the infrastructure
  • Set up synchronization
  • Check synchronization
  • How to delete the resources you created

You can set up time synchronization on Yandex Compute Cloud VMs with public servers over NTPv4.

VM time synchronization is required to correctly work with other servers and applications, process data in real time, store exact time data in system logs, etc.

NTP servers recommended for syncing:

  • 0.ru.pool.ntp.org
  • 1.ru.pool.ntp.org
  • ntp0.NL.net
  • ntp2.vniiftri.ru
  • ntp.ix.ru
  • ntps1-1.cs.tu-berlin.de.

Note

The list of recommended servers may change. Yandex Cloud will notify you 72 hours before you need to change your VM configuration.

To set up time synchronization:

  1. Get your cloud ready.
  2. Prepare your infrastructure.
  3. Set up synchronization.
  4. Check synchronization.

If you no longer need the resources you created, delete them.

Getting startedGetting started

Sign up in Yandex Cloud and create a billing account:

  1. Navigate to the management console and log in to Yandex Cloud or register a new account.
  2. On the Yandex Cloud Billing page, make sure you have a billing account linked and it has the ACTIVE or TRIAL_ACTIVE status. If you do not have a billing account, create one and link a cloud to it.

If you have an active billing account, you can navigate to the cloud page to create or select a folder for your infrastructure to operate in.

Learn more about clouds and folders.

Required paid resourcesRequired paid resources

The cost of NTP clock synchronization includes fees for computing resources and VM disks (see Yandex Compute Cloud pricing).

Prepare the infrastructurePrepare the infrastructure

  1. If you do not have a VM, create one.
  2. Assign a public IP address to the VM.

Set up synchronizationSet up synchronization

Linux (systemd)
Linux (ntpd)
Windows Server

On Linux-based VMs, make sure to enable a DHCP client with the 42 (Network Time Protocol Servers) option. The DHCP client automatically applies the list of time synchronization servers it gets from the DHCP server. Compute Cloud images incorporate proper OS presets.

In the system settings, specify the backup time synchronization servers to use if the DHCP server is unavailable.

Note

systemd-timesyncd may conflict with ntpd when running simultaneously. To see which services are running, use the ps -eF command. You can either delete ntpd or use it to set up time synchronization. For that, see the Linux (ntpd) tab.

To set up time synchronization:

  1. Connect to the VM over SSH.

  2. Open the /etc/systemd/timesyncd.conf file by running this command in the terminal:

    sudo nano /etc/systemd/timesyncd.conf
    
  3. Specify the addresses of the recommended servers in the FallbackNTP= parameter of the [Time] section, e.g.:

    FallbackNTP=0.ru.pool.ntp.org 1.ru.pool.ntp.org ntp0.NL.net ntp2.vniiftri.ru ntp.ix.ru ntps1-1.cs.tu-berlin.de
    
  4. In the systemd.network configuration file, specify the UseNTP=true parameter. You can normally find the configuration file in the /etc/systemd/network/ or /var/lib/systemd/network/ directory.

    You can also use the networkd.conf file in the /etc/systemd/ directory.

  5. Restart time synchronization:

    sudo systemctl restart systemd-timesyncd
    

On Linux-based VMs, make sure to enable a DHCP client with setting 42 (Network Time Protocol Servers). The DHCP client automatically applies the list of time synchronization servers it gets from the DHCP server. Compute Cloud images incorporate proper OS presets.

In the system settings, specify the backup time synchronization servers to use if the DHCP server is unavailable.

Note

ntpd may conflict with systemd-timesyncd when running simultaneously. To see which services are running, use the ps -eF command. You can either delete systemd-timesyncd or use it to set up time synchronization. For that, see the Linux (systemd) tab.

To set up time synchronization:

  1. Connect to the VM over SSH.

  2. Install ntpd by running this command in the terminal:

    sudo apt-get install ntp
    
  3. Open the /etc/ntp.conf file:

    sudo nano /etc/ntp.conf
    
  4. Specify the recommended server addresses. Comment out the default server addresses with # at the beginning of the lines. Here is an example:

    # Use servers from the NTP Pool Project. Approved by Ubuntu Technical Board
    # on 2011-02-08 (LP: #104525). See http://www.pool.ntp.org/join.html for
    # more information.
    # server 0.ubuntu.pool.ntp.org
    # server 1.ubuntu.pool.ntp.org
    # server 2.ubuntu.pool.ntp.org
    # server 3.ubuntu.pool.ntp.org
    server 0.ru.pool.ntp.org
    server 1.ru.pool.ntp.org
    server ntp0.NL.net
    server ntp2.vniiftri.ru
    server ntp.ix.ru
    server ntps1-1.cs.tu-berlin.de
    
  5. Restart time synchronization:

    sudo service ntp restart
    

To set up time synchronization:

  1. Connect to the VM over RDP.

  2. Run cmd or PowerShell as an administrator.

  3. Stop the Windows Time service by running this command:

    net stop w32time
    

    Result:

    The Windows Time service is stopping.
    The Windows Time service was stopped successfully.
    
  4. Specify the recommended server addresses, e.g.:

    w32tm /config /syncfromflags:manual /manualpeerlist:"0.ru.pool.ntp.org 1.ru.pool.ntp.org ntp0.NL.net ntp2.vniiftri.ru ntp.ix.ru ntps1-1.cs.tu-berlin.de"
    

    Result:

    The command completed successfully.
    
  5. Specify the VM is a reliable time source:

    w32tm /config /reliable:yes
    

    Result:

    The command completed successfully.
    
  6. Start the Windows Time service:

    net start w32time
    

    Result:

    The Windows Time service is starting.
    The Windows Time service was started successfully.
    

Check synchronizationCheck synchronization

Linux (systemd)
Linux (ntpd)
Windows Server

Run this command:

timedatectl

Result:

...
System clock synchronized: yes                        
              NTP service: active   
...

Run this command:

sudo ntpq -p

Result:

    remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
ntp.ubuntu.com  .POOL.          16 p    -   64    0    0.000   +0.000   0.000
time.cloudflare 10.87.12.180     3 u    4   64    1    7.870   -0.924   0.000
195.218.227.230 85.21.78.23      3 u    -   64    1   33.619   +1.099   0.000
ntp0.nl.uu.net  .GPS.            1 u    4   64    1   46.894   -1.309   0.000
ntp2.vniiftri.r .MRS.            1 u    2   64    1   10.392   -1.075   0.000
ntp.ix.ru       .GLN.            1 u    2   64    1    6.511   -0.738   0.000
ntps1-1.eecsit. .GPS.            1 u    4   64    1   33.026   -0.646   0.000
alphyn.canonica 132.163.96.1     2 u    3   64    1  124.037   -1.936   0.000
185.125.190.57  201.68.88.106    2 u    1   64    1   50.676   -0.090   0.000
185.125.190.58  145.238.203.14   2 u    -   64    1   57.460   -0.464   0.000

Run the command below and specify the VM name:

w32tm /query /configuration

Result:

...
[TimeProviders]
...
NtpServer: 0.ru.pool.ntp.org 1.ru.pool.ntp.org ntp0.NL.net ntp2.vniiftri.ru ntp.ix.ru ntps1-1.cs.tu-berlin.de (Local)
...

How to delete the resources you createdHow to delete the resources you created

To stop paying for the resources you created, delete your VM.

Was the article helpful?

Previous
All tutorials
Next
Overview
© 2025 Direct Cursus Technology L.L.C.