Today in our guide we show you step by step How to configure the NTP server in Windows Server.

As part of event logging, network security, and other computer activities, it is very important to configure NTP if you are an IT in charge of an organization's infrastructure. This tutorial will go through the process of setting up a Windows server as an NTP server.

Setup of Windows Server as an NTP Server

One way to guarantee that the clocks of all of your computers are in sync is to use Network Time Protocol, or NTP, which is one internet protocol that is scalable. 

Two ways to perform an NTP Server setup on Windows Server include by using Windows PowerShell and also by using the Windows Registry.

Step 1: Setup the NTP server using the Registry Editor.



First, we will see the possibilities of the Registry Editor to configure the NTP Server. The Windows Registry is a hierarchical database that allows you to configure your computer's settings. We will be configuring it. Here are the actions you can follow to accomplish that.


Have a copy of your register.


Further, we will configure Win32Time's AnnounceFlags and enable NtpServer using the registry key.


The NTP Server must be restarted next.


The last step is to open the correct UDP port in the firewall.


Opening the Registry Editor is as simple as going to Start, typing "regedit," and then clicking Ok. To proceed, click Yes when prompted by the UAC. So that you may restore your system to an earlier point in time in the event that anything goes wrong, we will now create a registry backup. For this, open Registry Editor and navigate to File > Import. Then, select the destination folder for the import and hit the save button.


Once the import is complete, open the Registry Editor and go to the following location.


Windows Registry Key Local Machine SystemNTPServer is a component of CurrentControlSetServicesW32TimeTimeProviders.


To change the Value data of the Enabled value to 1, locate it in the list of values and double-click on it. Your server's NTP protocol will be enabled after this.


We must proceed to the following spot after this.


Windows Registry Key Local Machine Systemthe current control set, services, Windows 32, and time configuration


To change the Value data of AnnounceFlags to 5, locate it, double-click it, and then set it to 5.


The next step is to restart the Time service, which will restart the NTP Server. Press Win + S, type in "Services," and open the application. Then, right-click on the Windows Time service and select Restart from the context menu. Once the service has restarted, we can proceed to the last step.


The Network Time Protocol (NTP) uses UDP Port 123, so we will open that one last time. Here are the steps you can follow to achieve that.


To open the Windows Defender Firewall with Advanced Security program, open Run by pressing Win + R. Then, type "wf.msc" and press Enter.


Click on Inbound Rules, then click New Rule.


Click Next after selecting Port.


After that, select UDP protocol type and enter 123 in Specific local port section, click on the Next button.


Now select Allow the connection.


Please select one profile or more, that this rule will be applied on it (Domain, Private, Public) Click Next


Besides giving a description for your new rule, specify the name, then click Next.


This will allow the NTP to pass through, opening UDP Port 123.


That is how you configure the Windows Server NTP Server.

2. Configure NTP server using PowerShell


We have provided both the GUI and CLI for you to configure the NTP server. In this topic, you will have to open the PowerShell on your computer and run the below command.


This command needs to be executed in order to enable the NTP Server Registry key.


"Set-ItemProperty -Path "HKLM:SYSTEMCurrentControlSetServicesw32timeTimeProvidersNtpServer" -Name "Enabled" -Value 1"


Finally, run the below command to set AnnounceFlags to 5.


Provide the following as an argument with a command: Set-ItemProperty -Path "HKLM:SYSTEMCurrentControlSetservicesW32TimeConfig" -Name "AnnounceFlags" -Value 5.


Run- Restart-Service w32Time to restart the Time service.


Now we may set up the firewall by running these instructions.


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


With this guide, you will certainly be able to configure the NTP server on Windows Server. Without further ado, we wish you the best of luck.




Other Articles
How to install and deploy Network Controller on Windows Server
Here is a step-by-step guide that shows you How to Install and Deploy a Network Driver on Windows Server

How to install and configure Windows Server Essentials Experience
To learn how to install and configure Windows Server Essentials Experience, here is a complete guide.

How to setup IPAM on Windows Server
If you are wondering how to configure IPAM on Windows Server, here is a guide with the best answer.

How to export Windows Event logs with PowerShell
Here we leave you a complete guide so you can learn how to export Windows event logs with PowerShell.

How to create Podcast using NotebookLM AI
If you are wondering how to create a podcast with NotebookLM AI, here is a guide with the best answer.

How to Fix Windows Server failed to release DHCP Lease
Today in our post we show you How to fix the Windows Server error when releasing the DHCP lease.

How to Fix Windows stuck in Diagnostic Startup mode
To learn how to fix Windows stuck in diagnostic boot mode here is a complete guide.

How to change Gridline color in Excel
If you don't know how to change the color of the grid in Excel, here is a guide that will help you with it.

How to Fix Microsoft Account keeps asking for password
Today in our publication we show you step by step How to solve the problem that the Microsoft account keeps asking for the password.

How to Fix No sound after waking from Sleep mode or Hibernate in Windows 11
If you are wondering how to fix the problem of no sound after waking up from sleep or hibernation mode in Windows 11? here is a guide with the best answer.

How to configure Host Guardian Service on Windows Server
Here we leave you a step-by-step guide so you can learn how to configure the Host Guardian service in Windows Server in a simple way.