Production-grade Network Time Protocol server written in Go.
Upstream sync · Rate limiting · CIDR policy · HTTP API
Clone the repo, start the server, then point any NTP client at it.
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)