Skip to main content

Ubuntu 26.04: Configure NTP Server with NTPsec

Install and configure NTPsec as an NTP time synchronization server on Ubuntu 26.04 LTS.

May 22, 2026 4 min read
ubuntulinuxntpntpsectimeserver

Install NTPsec and configure an NTP server for time adjustment. NTP uses 123/UDP.

Install and Configure NTPsec

apt -y install ntpsec
vi /etc/ntpsec/ntp.conf

Edit the configuration file:

# line 25: adjust minclock if needed (or comment out)
# tos minclock 4 minsane 3

# line 35: comment out defaults and add your NTP pool
#pool 0.ubuntu.pool.ntp.org iburst
#pool 1.ubuntu.pool.ntp.org iburst
#pool 2.ubuntu.pool.ntp.org iburst
#pool 3.ubuntu.pool.ntp.org iburst
#server ntp.ubuntu.com
pool ntp.nict.jp iburst

Restart the service:

systemctl restart ntpsec

Allow NTP in Firewall

If UFW is enabled, allow NTP service:

ufw allow ntp

Verify Operation

ntpq -p

Output example:

     remote                                   refid      st t when poll reach   delay   offset   jitter
=======================================================================================================
 ntp.nict.jp                             .POOL.          16 p    -  256    0   0.0000   0.0000   0.0001
*ntp-k1.nict.jp                          .NICT.           1 u   46   64    1  13.3218  -0.2959   1.4842
+ntp-a2.nict.go.jp                       .NICT.           1 u   47   64    1  16.5628  -1.3190   1.3675

A * prefix indicates the currently synchronized peer.