How to Set NTP Server on Windows Server?

  • Home
  • Blog
  • How to Set NTP Server on Windows Server?
How to Set Up NTP Server on Windows Server 2026 Guide

Windows NTP Server Guide

Windows Server · Updated 2026

How to Set Up an NTP Server on Windows (Complete Guide)

Step-by-step instructions to enable, configure, check, and troubleshoot the NTP time server on Windows Server 2022, 2019, 2016, 2012 R2, and Windows 10/11 — via Registry, PowerShell, and Command Prompt.

🕑 14 min read
📄 Covers Windows Server 2012–2022 & Windows 10/11
✅ Fact-checked against Microsoft documentation
Quick answer: Windows uses the built-in Windows Time service (W32Time) to sync the clock over NTP on UDP port 123. Standalone PCs sync to time.windows.com by default; domain-joined machines follow the domain hierarchy up to the PDC emulator. Use w32tm /resync to force a sync and w32tm /query /status to check it.

Service nameWindows Time (W32Time)
Protocol / PortNTP over UDP 123
Default server (workgroup)time.windows.com
Default server (domain)Domain hierarchy → PDC emulator
Config toolw32tm.exe (CLI) or Registry
Registry keyHKLMSYSTEMCurrentControlSetServicesW32Time

NTP Client vs. NTP Server on Windows: What’s the Difference?

Most “windows ntp server” searches actually cover two different jobs, and mixing them up is the #1 reason configuration doesn’t behave as expected:

RoleWhat it doesWhen you need itKey setting
NTP ClientYour Windows machine pulls time from an external NTP source (e.g. time.windows.com, pool.ntp.org)Every standard PC, VPS, or server that just needs an accurate clock/syncfromflags:manual + /manualpeerlist
NTP ServerYour Windows Server responds to time requests from other devices on your networkDomain controllers, isolated/air-gapped networks, or when other machines must sync to this box specificallyNtpServerEnabled = 1 + AnnounceFlags = 5

This guide covers both: configuring Windows as a client (sections 2, 6, 7, 8) and configuring Windows Server as a true NTP server for other machines (sections 3 and 4).

How to Check the NTP Server in Windows

Before changing anything, check what your machine is currently synced to. There are two ways: the GUI, or Command Prompt / PowerShell (faster, and works over RDP without a desktop session).


  1. Open Control Panel > Clock and Region > Date and Time.
  2. Go to the Internet Time tab.
  3. Click Change settings… to see the currently configured server, or Update now to force a sync.

Run these as Administrator to check NTP server, sync status, and stratum in seconds:

w32tm /query /status
w32tm /query /source
w32tm /query /peers
w32tm /query /configuration

/query /status shows stratum, last successful sync, and the source; /query /peers lists every configured time server and its reachability.

Tip: To confirm the service is actually running before checking sync status, run sc query w32time or Get-Service w32time in PowerShell.

How to Enable an NTP Server on Windows

To turn a Windows Server into an NTP server that other devices can query, you need to flip two registry values, restart the service, and open the firewall port. Pick Registry Editor or PowerShell — both do the same thing.


  1. Open Registry Editor — press Win + R, type regedit, press Enter.
  2. Navigate to the NTP server key:
    HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesW32TimeTimeProvidersNtpServer
  3. Enable the NTP server role: double-click Enabled and set Value data to 1, then click OK.
  4. Set the AnnounceFlags: go to HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesW32TimeConfig, double-click AnnounceFlags, and set the value to 5 (Always Time Server + Always Reliable — see the reference table below).
  5. Restart the Windows Time service: open services.msc, find Windows Time, right-click → Restart.
  6. Open UDP port 123 in Windows Firewall so clients can reach the server (see the firewall rule in the PowerShell tab — it works from an elevated Command Prompt too via netsh advfirewall).

Run PowerShell as Administrator and execute each block in order:

1. Enable the NTP server role

Set-ItemProperty -Path “HKLM:SYSTEMCurrentControlSetServicesW32TimeTimeProvidersNtpServer” -Name “Enabled” -Value 1

2. Set AnnounceFlags to 5

Set-ItemProperty -Path “HKLM:SYSTEMCurrentControlSetServicesW32TimeConfig” -Name “AnnounceFlags” -Value 5

3. Restart the service

Restart-Service w32time

4. Allow UDP 123 through the firewall

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

AnnounceFlags reference

ValueMeaningTypical use
0Not set / not a time serverDefault on plain clients
1Always Time ServerForce the role on regardless of domain detection
2Automatic Time ServerServer role only when the domain hierarchy assigns it
4Always Reliable Time SourceClients treat this server’s time as trustworthy
5Always Time Server + Always Reliable (1+4)Recommended for a manually configured, standalone NTP server
10 (0xA)Automatic Time Server + Automatic Reliable (2+8)Default value on domain controllers

How to Configure NTP Server in Windows Server 2019 / 2022 (Domain Controller)

Inside an Active Directory domain, time doesn’t sync randomly — it follows a strict hierarchy so every domain controller, member server, and client agrees on the same clock (critical for Kerberos, which fails outside a 5-minute skew by default). This applies the same way whether you’re on Windows Server 2019 or the newer 2022 time server settings.

  1. Identify the PDC emulator — only the domain’s PDC emulator FSMO role holder should sync to an external/internet time source; every other domain controller and member computer inherits time down the domain hierarchy automatically.
  2. On the PDC emulator only, point it at a reliable external source and mark it authoritative:
w32tm /config /manualpeerlist:”0.pool.ntp.org,0x9 1.pool.ntp.org,0x9″ /syncfromflags:manual /reliable:yes /update
net stop w32time && net start w32time
  1. On every other domain controller (non-PDC), make sure they sync from the domain hierarchy instead of an external server:
w32tm /config /syncfromflags:domhier /update
net stop w32time && net start w32time

You can also manage this centrally through Group Policy: Computer Configuration > Administrative Templates > System > Windows Time Service > Time Providers, which exposes both Enable Windows NTP Server and Configure Windows NTP Client policies — useful when you need the same NTP server configuration in Windows Server 2019 domain controller and 2022 environments applied fleet-wide without touching every box by hand.

Don’t skip this: if a domain controller is virtualized, disable host time synchronization for that VM (in Hyper-V or VMware integration services) — otherwise the hypervisor and W32Time fight over the clock and sync becomes unreliable.

w32tm Command Reference (Cheat Sheet)

w32tm.exe is the command-line tool for the Windows Time service, available since Windows XP / Server 2008 and unchanged in structure through Server 2022. This is the fastest way to set, check, and force an NTP server sync from a terminal or RDP session.

TaskCommand
Check current NTP configurationw32tm /query /configuration
Check sync status & stratumw32tm /query /status
List configured NTP peersw32tm /query /peers
Show current time sourcew32tm /query /source
Force immediate resyncw32tm /resync /nowait
Set a manual NTP server (client mode)w32tm /config /manualpeerlist:"server" /syncfromflags:manual /reliable:yes /update
Test a specific NTP server’s responsew32tm /stripchart /computer:server /dataonly /samples:5
Restart the service (net commands)net stop w32time then net start w32time
Restart the service (PowerShell)Restart-Service w32time
Re-register the time servicew32tm /unregister then w32tm /register
Show current system timetime /T

How to Add or Change the NTP Server Address

To point Windows at a different NTP source — your own server, a corporate time server, or a public pool — run:

w32tm /config /syncfromflags:manual /manualpeerlist:”[server]” /reliable:YES /update
net stop w32time
net start w32time

Replace [server] with a hostname or IP; separate multiple servers with spaces inside the quotes to add redundancy, e.g. "time.windows.com pool.ntp.org".

Common public NTP server addresses

Server addressOperatorNotes
time.windows.comMicrosoftWindows default; Stratum 2
pool.ntp.orgNTP Pool ProjectCommunity-run, geographically load-balanced
time.nist.govNIST (U.S. government)Backed by NIST’s atomic clocks
time.google.comGoogleUses “leap smear” — not ideal to mix with non-smeared sources
time.cloudflare.comCloudflareAlso supports NTS (authenticated NTP)

Windows Server 2016 & 2012 R2 / 2012

Windows Server 2016

w32tm /config /manualpeerlist:pool.ntp.org /syncfromflags:MANUAL
Stop-Service w32time
Start-Service w32time
w32tm /resync

To enable the server role itself, set Enabled = 1 under HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesW32TimeTimeProvidersNtpServer, same as newer versions. If the box runs as a VM, disable host time sync for that VM to avoid conflicts.

Windows Server 2012 / 2012 R2

Open an elevated Command Prompt and start the time service directly:

net start w32time

The server will begin synchronizing with its configured external NTP sources or domain hierarchy immediately after the service starts.

How to Set NTP Server in Windows 10 / 11

  1. Go to Control Panel > Clock, Language, and Region > Date and Time > Internet Time tab.
  2. Click Change settings…
  3. Check Synchronize with an Internet time server.
  4. Enter your preferred server address, or leave the default.
  5. Click Update now, then OK.

The same steps work identically for a windows ntp server address change on both Windows 10 and Windows 11 — the Settings app UI differs slightly, but Control Panel’s Internet Time tab is unchanged.

How to Disable NTP Time Sync on Windows

  1. Open Control Panel.
  2. Click Date and Time.
  3. Select the Internet Time tab.
  4. Click Change settings…
  5. Clear the checkbox for Synchronize with an Internet time server.
  6. Click OK to save, then close the dialog.

Or via PowerShell, stop and disable the service entirely:

Stop-Service w32time
Set-Service w32time -StartupType Disabled

Troubleshooting NTP Sync Issues

SymptomLikely causeFix
w32tm /resync fails with an access errorNot running as AdministratorRe-open Command Prompt / PowerShell elevated
Clients can’t reach your NTP serverUDP 123 blockedAdd the inbound firewall rule shown in the “Enable NTP Server” section
Time keeps drifting on a VMHypervisor is also syncing the clockDisable host time synchronization in the VM’s integration/guest services
Domain controller won’t sync externallyIt isn’t the PDC emulatorOnly the PDC emulator should use /syncfromflags:manual; others should use domhier
w32tm /query /status shows “Error: 0x800705B4”Time service not responding / stuckRun w32tm /unregister then w32tm /register, then start the service again
Large clock offset, sync seems to do nothingW32Time has a default correction limitForce it with w32tm /config /update plus w32tm /resync /rediscover

Frequently Asked Questions

Yes. Windows uses the Network Time Protocol through the built-in Windows Time service (W32Time) to keep the system clock accurate for logging, Kerberos authentication, and general network operations. Domain-joined machines sync automatically; standalone machines default to time.windows.com.

NTP always uses UDP port 123, both for outbound client requests and inbound requests if the machine is acting as a server. This is registered with IANA and doesn’t change across Windows versions.

Standalone/workgroup PCs default to time.windows.com. Domain-joined computers instead follow the domain time hierarchy up to the domain’s PDC emulator, which is the only machine that (by default) should point outward to an external source.

Run w32tm /query /status for sync status and stratum, w32tm /query /source for the current source, and w32tm /query /peers to see every configured server and whether it’s reachable.

Open an elevated Command Prompt and run w32tm /resync. If it reports “the computer did not resync because no time data was available,” check your NTP server address and firewall first.

Run w32tm /config /manualpeerlist:"ntp_server" /syncfromflags:manual /reliable:yes /update, replacing ntp_server with your chosen address, then restart the service with net stop w32time && net start w32time and run w32tm /resync.

Use net stop w32time followed by net start w32time in Command Prompt, or Restart-Service w32time in PowerShell. Both require an elevated (Administrator) session.

Run w32tm /query /source and w32tm /query /peers to confirm it’s syncing, or test a specific server’s response directly with w32tm /stripchart /computer:IPADDRESSORDNSNAME /dataonly /samples:5.

Yes — every registry change in this guide has a PowerShell equivalent using Set-ItemProperty, and service restarts can use Restart-Service w32time. See the PowerShell tab in the “Enable an NTP Server” section above.

No — the W32Time service, registry paths, and w32tm commands are identical across Server 2012 R2 through Server 2022. The only practical difference is the Settings app UI; Control Panel and PowerShell methods work the same on every version.

Sources & References

Need a Windows Server that’s ready to configure?

Spin up a clean Windows RDP or Windows Server instance with full admin access and set your NTP server in minutes.


Explore Windows Server Plans

Related Reading

teamrdpextra

Team RDPExtra creates practical guides and resources covering Remote Desktop Protocol (RDP), Windows and Linux servers, VPS hosting, networking, remote access, server administration, and related technologies.

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
0
Would love your thoughts, please comment.x
()
x