How to Configure a Local NTP Server

Estimated reading time: 3 minutes

Typically, devices rely on an internet time server and a clock source, such as a GPS satellite, to synchronize time across devices. However, in an offline scenario, where devices are not connected to the internet, time synchronization must be achieved via a local Network Time Protocol (NTP) server.

If you require a local NTP server:

  • Check with your IT team. An NTP server may already have been provisioned.
  • If an NTP server is not already available, create a Windows-based NTP server using the instructions on this page.

Check the Prerequisites

Prerequisites

  • A Windows server running Windows 7, 8, or 10 is required.
    • Note: Procedures listed on this page have been tested using Windows 10. Other Windows versions may have a slightly different workflow.
  • You must have Administrator privileges to configure the Windows server.
  • Requires a basic understanding of Windows registry. Caution should be used when updating the registry.

Configure the Windows Time Service

  1. In the File Explorer, navigate to: Control Panel\System and Security\Administrative Tools
  2. Double-click Services.
    This same task can be completed by entering services.msc in the Windows Run dialog (Windows Key + R).

  3. In the Services list, right-click on Windows Time and click Stop.
    Note: The Windows Time service may already be stopped. In this case, skip this step and go to the next step to Update the Windows Registry.

Update the Windows Registry to Create a Local NTP Service

  1. Launch Windows Run (Windows Key + R).
  2. Enter regedit and click OK.

  3. Navigate to the registry key: Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Parameters

  4. If you do not see LocalNTP REG_DWORD in the list, create it using the following steps.
    1. Right-click in the Registry Editor, select New, select DWORD, and enter LocalNTP (note that this name is case sensitive).

    2. Double-click LocalNTP, change the Value data to 1, select a Base of Hexadecimal, and click OK.

  5. Do not close the Registry Editor because it is used in the following steps.

Update the Windows Registry to Configure the Time Provider

  1. Navigate to the registry key: Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders
  2. Select NtpServer, double-click Enabled, change the Value Data to 1, select a Base of Hexadecimal, and click OK.

  3. Do not close the Registry Editor because it is used in the following steps.

Update the Windows Registry to Configure the Announce Flags

  1. Navigate to the registry key: Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Config
  2. Double-click AnnounceFlags, change the Value data to 5, select a Base of Hexadecimal, and click OK.

  3. Close the Registry Editor.

Start the Local Windows NTP Time Service

  1. In the File Explorer, navigate to: Control Panel\System and Security\Administrative Tools
  2. Double-click Services.
  3. In the Services list, right-click on Windows Time and configure the following settings:
    1. Startup type: Automatic
    2. Service Status: Start
    3. OK

The local NTP Time Server configuration is now complete. You now can synchronize the time of other computers and devices on your local network.

Synchronize Time on OT Link Platform Devices

In order for devices on your local network to communicate with this new local time server, you must know the IP address of the Windows NTP Time Server.

  1. On the Windows server that you just configured as an NTP server, go to the Windows Command Prompt, enter: ipconfig
  2. Locate the IP address of the NTP server.
  3. Go to either the OT Link Platform Web UI or the OT Link Platform Terminal User Interface (TUI) and enter the address of the local NTP server. See also, OT Link Platform Terminal User Interface.

Configure NTP Time Servers via the Web Interface

Configure NTP Time Servers via the TUI

Configure a Local NTP Server: