NTP Server

Production-grade Network Time Protocol server written in Go.
Upstream sync · Rate limiting · CIDR policy · HTTP API

Current UTC Time — Live loading
--:--:--
Stratum
Offset
RTT
Reference ID
Upstream server
Run Your Own & Connect

Clone the repo, start the server, then point any NTP client at it.

Clone git clone https://github.com/aykutsp/ntp-server.git
Run go run ./cmd/ntp-server -config ./configs/server.example.json
NTP 127.0.0.1 : 12300 / UDP
HTTP API http://127.0.0.1:8080
Client Examples
go run ./cmd/ntp-query -server 127.0.0.1:12300
# /etc/chrony.conf
server 127.0.0.1 port 12300 iburst

sudo systemctl restart chronyd
chronyc tracking
sntp -S 127.0.0.1
w32tm /config /manualpeerlist:"127.0.0.1" /syncfromflags:manual /update
w32tm /resync /force
w32tm /query /status
pip install ntplib

import ntplib
r = ntplib.NTPClient().request('127.0.0.1', port=12300)
print('offset:', r.offset, 'stratum:', r.stratum)
GitHub  ·  CI Workflow  ·  Documentation
Built with Go  ·  MIT License