How to Set NTP Server on Windows Server?

General Windows Topic

July 20, 2023 by Ashley

How to Install and Set NTP Server on Windows Server

Timing is everything! There are thousands of NTP servers around the world. Both the protocol and the client-server program that runs on computers are referred to as NTP. Network Time Protocol (NTP) is an internet protocol used to synchronize with computer clock time sources in a network.  Join us with this article to review the way you can Set NTP Server on Windows Server. A time-stamp data exchange takes place between the server and client, which aids in precisely setting the time on the client systems to match the time on the NTP server.

Since a discrepancy of even a fraction of a second can cause problems, accurate time for all devices on a computer network is important for many reasons. So, NTP Server supports time synchronization and is made to be very fault-tolerant and scalable. After buying Windows VPS, you might need to synchronize the machines on your network at the same time. Setting up NTP Server on Windows Server is what you can do perfectly at the end of this guide. Let’s get started to make your NTP Server ready to synchronize time across your network.

What is NTP Server and Why Set it Up?

NTP is a network protocol that enables you to synchronize clocks on devices over a network. It always makes sure that time differences between the server and client systems are minimized and that client systems are always in sync with the server. It listens on UDP port 123.
Many services and IT applications depend on proper time settings to work as intended, thus keeping your server’s clock accurate is crucial. These comprise, to name a few, database replication, monitoring and auditing applications, and logging services. Server time skew, and client time skew in general, is undesirable and frequently results in conflict in time-critical applications. It is recommended to install and enable an NTP server on your server in order to keep accurate time settings on your server and, by extension, throughout the network.

Set NTP Server on Windows is not that complicated. This tutorial helps you to install and enable the NTP server on your server quickly and simply.

Steps to Set NTP Server on Windows Server

You can easily use NTP on your Windows Time service to synchronize time across a network. Let’s go through the steps of this guide to learn how to Install and Configure NTP Server on Windows. Two different methods will be explained, and you can choose the one you prefer more.

Step 1. Open Registry Editor

Search for the ”Run” application in the start menu. There, type in ”regedit” and press Enter.

Open up Registry Editor

There will appear a window similar to the one below.

Registry Editor Window

Step 2. Find NTP Server Files

Follow the below path to go to the NTP Server Configuration:


You can see the tree’s end in the picture below. As you can see, the files we are looking for are on the right pane.

NtpServer Path

Step 3. Enable NTP Server

To open a tiny window, double-click the “Enabled” file. A section on the window titled “Value data” is there. As shown below, change the value from 0 to 1. After changing, click “OK”.

How to Enable NtpServer

Step 4. Create the AnnounceFlags 5

First, let’s see what is AnnounceFlag?

This computer’s status as a trustworthy time server is controlled by entry. If a computer is not also designated as a time server, it cannot be certified as dependable. The default value for domain members is 10. The default value for stand-alone clients and servers is 10.

Follow the path below:


To go to the ”Config”:


Make the AnnounceFlags 5

On the right pane, as seen above, you will find a file with the name “AnnounceFlags” while there. Double-click it. That will cause a tiny window akin to the one in Step 3 to open. Change the value from a to 5 under “Value data“.

Step 5. Restart NTP Server

By pressing the Windows key and typing “Services,” the “Services” window will appear. Look for “Windows Time” once it has opened. Click “Restart” from the context menu when you right-click on it.

Restart NtpServer

Step 6. Open UDP port 123 in the Firewall

Your Windows Server must have UDP port 123 open in order for NTP to connect to the clocks. Please check your firewall configuration if you can’t reach the servers. To complete this step, follow the How to open a Port on Windows VPS Firewall guide. Remember that this port is UDP and not TCP.

Configure NTP Using PowerShell

From Windows XP and Windows Server 2008 up to the most recent versions of each OS, PowerShell offers a command-line tool with the name w32tm.exe. You may set up your Windows PC to sync with online time servers using the w32tm.exe program. This is typically the tool of choice when configuring and keeping track of the time on your Windows Server installation. The command-line utility is very simple to use.

If you prefer to use PowerShell, the second method of this guide would be your preferred one to Set NTP Server on Windows. Just open your PowerShell as administrator and use the following commands to do all the steps of the previous method.

Enable NTP Server

Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\w32time\TimeProviders\NtpServer" -Name "Enabled" -Value 1

Create the AnnounceFlags 5

Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\services\W32Time\Config" -Name "AnnounceFlags" -Value 5

Restart NTP Server

Restart-Service w32Time

Run the command below to allow NTP port: (If Firewall is running)

New-NetFirewallRule `
-Name "NTP Server Port" `
-DisplayName "NTP Server Port" `
-Description 'Allow NTP Server Port' `
-Profile Any `
-Direction Inbound `
-Action Allow `
-Protocol UDP `
-Program Any `
-LocalAddress Any `
-LocalPort 123

Most Used Commands to Configure NTP Server

Let’s review some useful commands while setting up NTP Server on Windows.

To check NTP configuration, run:

w32tm /query /configuration

To check NTP server list, type:

w32tm /query /peers

To force NTP server synchronization, run:

w32tm /resync /nowait

Use the command below to show the source of the NTP time:

w32tm /query /source

To show the status of NTP service, type:

w32tm /query /status

At this point, you know everything you need to Set NTP Server on Windows Server.

How to Disable NTP Server on Windows Server?

To disable Windows Internet Time Update, follow the below steps:

1. Load Control Panel.

2. Click Date and Time.

3. Click the Internet Time tab.

4. Click Change settings.

5. Click to clear the checkbox to Synchronize with an Internet time server.

Disable NTP Server on Windows

6. Click OK to save.

7. Close the Date and Time dialog box.

8. Close the Control Panel.


Yes. Go to the "Internet Time" tab and select "Change Settings." If you want the clock to sync automatically, click the "Synchronize with an internet time server" box; otherwise, uncheck it to set the clock manually.

It is always advised to select an NTP server that is located close to the device you wish to time-synchronize. It is also advised to use a server that is hosted by a reputable business or organization.


In this article, you earned How to Set NTP Server on Windows Server. As we promised, it was simple and straightforward to set up an NTP server on your Windows server instance. After setting up the NTP service on your server, Windows clients connected to the domain will synchronize with the domain controllers and other domain controllers in your environment. Keep in mind that if NTP is set up on a virtual machine, make sure it is configured to exclusively sync with the time service rather than the host system.

If you follow the steps of this guide properly then you can smoothly install and Set NTP Server on Windows without any errors but do not hesitate to contact us if you encounter any problems. Our technical support team will try their best to solve your problems.

Rate this docs


​ ​ ​ ​

About the Author Ashley

Leave a Reply

Your email address will not be published. Required fields are marked *