Menu
User

DropVPS Team

Writer: Cooper Reagan

how to add ntp server in windows? (with CMD)

how to add ntp server in windows? (with CMD)

Publication Date

04/20/2025

Category

Articles

Reading Time

3 Min

Table of Contents

Time synchronization is crucial for maintaining the accuracy of timestamps on your server, especially if you’re running applications that rely on precise timing. In this guide, we will walk you through the steps to add an NTP (Network Time Protocol) server in Windows, ensuring your system clock is always accurate.

Step 1: Open Command Prompt as Administrator

First, you’ll need to open the Command Prompt with administrative privileges. To do this:

  1. Press Windows + X to open the Quick Access Menu.
  2. Select Command Prompt (Admin) or Windows PowerShell (Admin).

Step 2: Check the Current Time Server

Before adding a new NTP server, you might want to check which server your system is currently using. Run the following command:

w32tm /query /status

This command will display the current configuration and status of the time service.

Step 3: Add Your NTP Server

To specify a new NTP server, use the following command. Replace time.server.com with your desired NTP server address:

w32tm /config /manualpeerlist:"time.server.com" /syncfromflags:manual /reliable:YES /update

Step 4: Restart the Windows Time Service

After configuring the new NTP server, you need to restart the Windows Time service to apply the changes. Execute the following commands:

net stop w32time
net start w32time

Step 5: Force Time Synchronization

To immediately synchronize the time with the new NTP server, run:

w32tm /resync

You should see a success message confirming the synchronization.

Step 6: Verify the Configuration

To ensure that your new NTP server is set up correctly, use the following command:

w32tm /query /peers

This will list the current NTP servers your Windows machine is configured to use. Verify that your newly added server appears in the list.

Additional Tips

  • If you’re using a firewall, make sure that UDP port 123 is open to allow NTP traffic.
  • You can add multiple NTP servers by separating them with a space in the manualpeerlist parameter:
    w32tm /config /manualpeerlist:"time1.server.com time2.server.com" /syncfromflags:manual /reliable:YES /update

Adding an NTP server in Windows is a straightforward process that can significantly enhance the time accuracy of your system. By following the steps outlined in this guide, you can ensure that your server remains synchronized with reliable time sources. For more tips and guides, stay tuned to our blog at DropVPS.com!

Windows VPS
U
Loading...

Related Posts