/
How do I setup my own time server

How do I setup my own time server

  1. Open the terminal and enter the following command to edit the time synchronization configuration file:

sudo nano /etc/systemd/timesyncd.conf
  1. In the file, find the line "#NTP=" and replace it with the IP address of your desired NTP server, for example:

NTP=172.16.59.134
  1. Save the changes and exit the text editor.

  2. Restart the systemd-timesyncd service to apply the new configuration:

sudo systemctl restart systemd-timesyncd

If the time is still not synchronized after a while, it could be due to a significant time difference (clock skew). You can remedy this with the following steps:

  1. Stop NTP synchronization

timedatectl set-ntp false
  1. Set the time manually to a value close to the current time:

sudo timedatectl set-time "2021-10-18 09:19:00"
  1. Resume NTP synchronization

timedatectl set-ntp true

If you still have problems, please send a screenshot after entering this command.

systemctl status systemd-timesyncd

Please have also a look here:

Related content