How to Install NTP Server on Windows Server 2019.
Keeping accurate time on your server is critical in large part because many services and IT applications rely on accurate time settings to function properly. These include logging services, monitoring, and auditing applications, database replication, and more.
Time-shifting on servers and any client systems is undesirable in this regard and usually causes conflict in time-critical applications. To maintain accurate time settings on your server and on the extension network, it is recommended that you install and enable an NTP server on your server.
What is an NTP server?
NTP, short for Network Time Protocol, is a protocol that synchronizes time between networked devices. It listens on UDP port 123 and always makes sure that the time mismatch between server and client systems is fixed and client systems are always in sync with the server.
NTP server refers to a network device or service that extracts time from an external time source and synchronizes the time over the network using the NTP protocol. This guide focuses on installing the NTP service on Windows server 2019.
How Does NTP Work?
As a protocol, NTP requires a client-server architecture. For example, an NTP client on a Windows PC initiates the exchange of time requests with an NTP server.
Time-stamped data is exchanged between the server and the client, and this helps to adjust the clocks on the client systems with the highest degree of accuracy to match the time on the NTP server. In this guide, we’ll walk you through the installation and configuration of an NTP server on Windows Server 2019.
There are several ways to configure an NTP server, and we’ll go over each in turn.
Install NTP Server on Windows Server 2019 using Windows PowerShell
Windows Server environments have a dedicated Windows Time service that handles time synchronization between the server and client systems. This is known as the Windows Time Service. PowerShell provides a command-line tool known as w32tm.exe and is included in all versions of Windows, from Windows XP and Windows Server 2008 to the latest versions of every OS.
Using the w32tm.exe utility, you can configure your Windows system to synchronize with online time servers. This is usually the tool of choice when configuring and monitoring time on your Windows Server system.
Using the command-line utility is pretty straightforward.
For example, to configure the server to point to 2 different time servers, namely 0.us.pool.ntp.org and 1.us.pool.ntp.org, start PowerShell as administrator and run the command below
w32tm / config / syncfromflags: manual /manualpeerlist:nts0.us.pool.ntp.org 1.us.pool.ntp.org “/ update
Then restart the Windows Time service using the commands:
Stop service w32time
Here is a snippet of commands.
After that, you can confirm the values ​​of the NTP servers configured in the registry by running this command:
w32tm / dumpreg / subkey: options
Configure NTP Server on Windows Server 2019 using the Registry editor
The second method for installing and configuring an NTP server is using the Registry Editor. If you are not a fan of Windows PowerShell, this really comes in handy.
First, open the registry editor. Press Windows key + R, type Regedit, and press ENTER. The Windows Registry will start as shown below.
Then follow the path shown below
Computer HKEY_LOCAL_MACHINE SYSTEM CurrentControlSet Services W32Time TimeProviders NtpServer
On the right pane. Be sure to locate and double-click the file labeled “Enabled” in the diagram shown below.
Then, in the Data Value text box, set the value to 1 and click OK.
Then follow the path:
Computer HKEY_LOCAL_MACHINE SYSTEM CurrentControlSet Services W32Time Config
In the right pane, double-click the “Announce Flags” file.
Double-click the file and enter 5 in the Value text box and click OK.
For the changes to take effect, you need to restart the NTP server by going to the services window. To do this, press “Windows key + R” and enter “services.MSC”. Scroll down and find “Windows Time”, right-click it, and select the “Restart” option.
Useful w32tm commands
After configuring the NTP server, you can use the following commands to test various aspects of the server:
To check the status of the NTP server, run the command:
w32tm / request / status
To show the current NTP pool used to sync time with execution:
w32tm / request / source
You can also display a list of NTP time servers along with their configuration status as shown.
w32tm / query / peers
To display the configuration parameters of the NTP server, run the command:
w32tm / request / source
This reveals quite a bit of information.
Final Take
We cannot stress enough how important it is to maintain accurate time and date settings on your server. As you’ve seen, setting up an NTP server on your Windows Server instance is pretty straightforward and straightforward.
Once you have configured the NTP service on your server, other domain controllers in your environment will synchronize with that server, and Windows clients in the domain will synchronize with the domain controllers. Hopefully, you can now install and configure NTP on Windows Server 2019.
How to Install NTP Server on Windows Server 2019
How to Install NTP Server on Windows Server 2019.