Solution Architect. passionate about exploring, deploying, and writing about new technologies related to systems, networks, cloud, and microservices.

Setup Standalone NTP Server on Ubuntu 22.04

- Advertisement -

This post is about Setup Standalone NTP Server on Ubuntu 22.04

NTP is a Network Time Protocole server used to synchronize the time of network devices within the LAN, cloud tenant, or within your LAN.

One of the examples is Real-Time communication APPs. The Infrastructure (Machines, VMs, Kubernetes Cluster, PODs, etc) time should be synced; otherwise, the app will not work correctly.

Standalone NTP Server Requirement

OS: Ubuntu 22.04

Step 1: Install Ubuntu Server or Create VM using the Virtualization platform.

Step 2: Install chrony

$ sudo timedatectl set-timezone Asia/Karachi

set your timezone according to your zone

$ sudo apt update

$ sudo apt install chrony

This will provide two binaries:
·        chronyd – the actual daemon to sync and serve via the NTP protocol
·        chronyc – command-line interface for chrony daemon

Configure Chronyd

$ vi /etc/chrony/chrony.conf

get your timezone from the https://www.pool.ntp.org/zone

I added my zone. you can add your nearest zone

$ systemctl restart chrony.service

Allow the clients’ IP to serve NTP services to those clients only. add your client IP or complete subnet in the config file “/etc/chrony/chrony.conf”

$ systemctl restart chrony.service

View Status

$ chronyc sources

Step 3: configure NTP client

$ sudo timedatectl set-timezone Asia/Karachi

Install NTP client

$ sudo apt install chrony

configure chrony conf file


$ vi /etc/chrony/chrony.conf

add your sever IP in chrony.conf file

$ sudo timedatectl set-ntp true

the client is getting NTP services

done 🙂

- Advertisement -


Please enter your comment!
Please enter your name here

Latest articles

Join us on Facebook