Sign inSign up

ikhwan17/ntp-server

By ikhwan17

โ€ขUpdated over 1 year ago

Network Time Protocol for Self Hosted

Image
Networking
Operating systems
1

792

ikhwan17/ntp-server repository overview

โ โฑ๏ธ ikhwan17/ntp-server

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.


โ ๐Ÿ“ฆ Features

  • Provides accurate time synchronization using NTP.
  • Can be accessed via port 123/udp.
  • Lightweight and easy to deploy with Docker or Docker Compose.
  • Ideal for pairing with a backend API bridge for frontend time display.
  • Built for learning, demos, and internal development use.

โ ๐Ÿณ Docker Usage

โ Run directly
docker run -d --name ntp-server \
  -p 123:123/udp \
  ikhwan17/ntp-server

โ With Docker Compose
version: '3'
services:
  ntp-server:
    image: ikhwan17/ntp-server:latest
    ports:
      - "123:123/udp"
    restart: unless-stopped

Then run:

docker-compose up -d

โ ๐Ÿงช Test NTP Server (Optional)

docker run --rm --network host debian:stable-slim \
  bash -c "apt update && apt install -y ntpdate && ntpdate -q 127.0.0.1"

โš ๏ธ Note: --network host only works on Linux hosts.


โ ๐ŸŒ Use With API Bridge

You can use this container with an Express.js API bridge to expose NTP time to the browser via HTTP.

โ Sample Response (via API):
{
  "ntp_date": "2025-04-16",
  "ntp_time": "14:55:00"
}

โ ๐Ÿ›  Built With

  • Debian (slim)
  • ntpd (Network Time Protocol daemon)

โ ๐Ÿง‘โ€๐Ÿ’ป Maintainer

Tag summary

Content type

Image

Digest

sha256:dca106779โ€ฆ

Size

42.4 MB

Last updated

over 1 year ago

docker pull ikhwan17/ntp-server