Network Time Protocol for Self Hosted
792
A lightweight and secure NTP (Network Time Protocol) server container based on Debian. Ideal for time synchronization in local development environments or isolated networks. This container can be used alongside an API bridge (e.g. with Express.js) to fetch time via HTTP.
123/udp.docker run -d --name ntp-server \
-p 123:123/udp \
ikhwan17/ntp-server
version: '3'
services:
ntp-server:
image: ikhwan17/ntp-server:latest
ports:
- "123:123/udp"
restart: unless-stopped
Then run:
docker-compose up -d
docker run --rm --network host debian:stable-slim \
bash -c "apt update && apt install -y ntpdate && ntpdate -q 127.0.0.1"
โ ๏ธ Note:
--network hostonly works on Linux hosts.
You can use this container with an Express.js API bridge to expose NTP time to the browser via HTTP.
{
"ntp_date": "2025-04-16",
"ntp_time": "14:55:00"
}
ntpd (Network Time Protocol daemon)Content type
Image
Digest
sha256:dca106779โฆ
Size
42.4 MB
Last updated
over 1 year ago
docker pull ikhwan17/ntp-server