FreeBSD Install OpenNTPD NTP Server / Client To Synchronize The Local Clock

OpenNTPD is a free and easy-to-use implementation of the Network Time Protocol (NTP) that provides accurate time synchronization between servers and clients on a network. Here are the steps to install OpenNTPD on FreeBSD:

  1. Update the package repository:
    # pkg update
  2. Install OpenNTPD:
    # pkg install openntpd
  3. Edit the configuration file /etc/ntpd.conf to specify the time servers that you want to use for time synchronization:
    server time.server.com

    Replace time.server.com with the name or IP address of the time server that you want to use.

  4. Start the OpenNTPD service and enable it to start at boot time:
    # service openntpd onestart
    # sysrc openntpd_enable="YES"
  5. Verify that the OpenNTPD service is running and synchronizing the local clock:
    # ntpctl -s all

    This command should display the status of the time synchronization, including the time server that is being used and the offset between the local clock and the time server.

That’s it! Your FreeBSD system is now synchronized with the time server using OpenNTPD.

Leave a Comment