For System Administrator managing the huge number of systems on their LAN. It is best practice to set up your own NTP server and synchronize the time of all LAN system from it. Main NTP server will synchronize its time from public NTP servers. This article will help you to Setup time synchronization (NTP) server on Ubuntu, Debian, and its derivatives operating systems.

Step 1 – Install NTP Server

You can simply install the ntpd server from default repositories by executing the following command from terminal.

sudo apt-get install ntp

Step 2 – Configure NTP Server

Now we need to set up local NTP server to synchronize their time from public NTP server. You can choose ntp pool server as per your choice or location. Visit to find ntp pool. For this example, I am using default Ubuntu’s ntp pool servers.

sudo vi /etc/ntp.conf

Edit /etc/ntp.conf and change following pools as per your choice. By default these servers are configured:

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


Step 3 – Reload NTP Server

After making changes in ntp.conf, reload your server to apply changes.

sudo service ntp reload

Step 4 – Open Firewall Ports

NTP server uses port 123 for service requests. So we need to open port 123 in the firewall.

Iptables Users:

sudo iptables -A INPUT -m state --state NEW -p tcp --dport 123 -j ACCEPT

UFW Users:

sudo ufw allow 123/tcp

Step 5 – Synchronize Time on Client

After making all configuration’s, now verify server configuration by synchronizing client systems. For example, if your server IP is, then run the following command through a terminal on the client system.

ntpdate -s