Configure NTP Server using NTPd on Fedora 30

Last Updated:

In this guide, we are going to learn how to configure NTP server using NTPd on Fedora 30. NTP server broadcasts date and time information in order to keep the time clocks on networked computer systems synchronized to a common reference over the network or the Internet.

Configure NTP Server using NTPd on Fedora 30

Disable Chrony

Chrony is another versatile implementation of the NTP that can be used as a replacement of the the default user space NTP daemon and is installed by default on Fedora 30.

rpm -qa | grep chrony

Both Chrony Daemon (chronyd) and NTPd cannot run at the same time and hence stop and disable Chrony Daemon so as to use NTPd.

systemctl stop chronyd
systemctl disable chronyd

Install NTP Daemon (ntpd)

NTP daemon is provided by the ntp package which is available by default on Fedora 30 repos.

dnf install ntp

Configuring NTP on Fedora 30

The main configuration file for NTP is /etc/ntp.conf. Hence, to make configuration changes, open this file with your preferred editor.

vim /etc/ntp.conf

Configure Access Control to an NTP Service

The NTP daemon implements a general purpose address/mask based restriction list. Restriction can be implemented using the restrict command. The restrict command syntax is;

restrict address [mask mask] [other options]

To configure NTP to allow LAN systems to get time services from the NTP server, you need to define the network address as shown below.

# Hosts on local network are less restricted.
#restrict mask nomodify notrap
restrict mask nomodify notrap
  • The nomodify options prevents any changes to the configuration.
  • The notrap option prevents ntpdc control message protocol traps.

You can read more about restrict and other command options on man ntp.conf.

Configure Public NTP Servers Entries

NTP is configured to use time servers from the Fedora pool by default. These servers are used for time synchronization. Hence, you can obtain a list of the servers on your timezone (or your Continent) from NTP Public Pool Time Servers and add them as shown below;

# Use public servers from the project.
# Please consider joining the pool (
#pool iburst
server iburst
server iburst
server iburst
server iburst

Configure the Firewall to Allow Incoming NTP Packets

The NTP traffic consists of UDP packets on port 123. You need to permit traffic to this port through Firewalld.

firewall-cmd --add-port=123/udp --permanent
firewall-cmd --reload

Running NTPd

To start and enable NTPd to run on system boot, run the commands belows;

systemctl start ntpd
systemctl enable ntpd

Verify NTP

To verify if NTP server is working fine, try to list your NTP peers.

ntpq -p

     remote           refid      st t when poll reach   delay   offset  jitter
*     2 u   55   64   27  197.626  -44.526  50.599
+    2 u   58   64   37  197.764  -46.516  48.474
+helpdesk.digita     3 u   60   64   37  198.201   -7.566  35.213       2 u   70   64   16  160.210  -36.686  53.051

That seems fine. Proceed to configure NTP client.

Configuring NTP Client

Now that your NTP server is up and running, configure the NTP client to synchronize its time from your NTP server. In this guide, we are using Ubuntu 18.04 server as our NTP client. The configurations of the NTP client is mostly similar to the configuration of the NTP server.

Synchronize time manually using ntpdate

Run the command below to install ntpdate on Ubuntu 18.04

apt install ntpdate

To manually synchronize time with NTP server using ntpdate;

5 May 13:22:49 ntpdate[2831]: adjust time server offset -0.025443 sec

Well, seems all is well with manual time synchronization.

Synchronize time automatically with NTP

Run the command below to install ntp;

apt install ntp

NTP service is set to run by default after installation on Ubuntu 18.04. To configure the NTP client to synchronize time from your NTP server, edit the ntp configuration file and replace the public NTP pool servers with your server.

vim /etc/ntp.conf

# Specify one or more NTP servers.

# Use servers from the NTP Pool Project. Approved by Ubuntu Technical Board
# on 2011-02-08 (LP: #104525). See for
# more information.
#pool iburst
#pool iburst
#pool iburst
#pool iburst
server iburst

You can as well just add your server to the configuration file and make it the preferred reference clock. This can be achieved by the use of the prefer option.

server prefer iburst

Save the configuration file and restart ntp. You also need to disable Systemd timesyncd ntp.

timedatectl set-ntp off
systemctl restart ntp

Verify time synchronization

ntpq -p

     remote           refid      st t when poll reach   delay   offset  jitter
*      3 u    -   64    1    0.851    0.233   0.498  .POOL.          16 p    -   64    0    0.000    0.000   0.000
 alphyn.canonica    2 u    5   64    1  294.794  -31.291   0.000
 chilipepper.can    2 u    6   64    1  270.919  -50.307   0.000
 pugot.canonical   2 u    4   64    1  264.920  -50.840   0.000
 golem.canonical   2 u    3   64    1  274.537  -56.011   0.000

Enable NTP to run on system boot.

systemctl enable ntp

For the basic configurations, that is just it on how to configure NTP server using NTPd on Fedora 30.

Check our other guides on Fedora 30 by following the links below;

Install MariaDB 10.3 on Fedora 30

Administer Fedora 30/29 from Web using Cockpit

Install Apache on Fedora 30


We're passionate about sharing our knowledge and experiences with you through our blog. If you appreciate our efforts, consider buying us a virtual coffee. Your support keeps us motivated and enables us to continually improve, ensuring that we can provide you with the best content possible. Thank you for being a coffee-fueled champion of our work!

Photo of author
I am the Co-founder of, Linux and the whole FOSS enthusiast, Linux System Admin and a Blue Teamer who loves to share technological tips and hacks with others as a way of sharing knowledge as: "In vain have you acquired knowledge if you have not imparted it to others".

Leave a Comment