2

Is there any issue with running systemd-timesyncd and ntp on the same machine?

I'm asking this because I have started using NTP on all servers but the systemd-timesyncd is running there as well. Should I disable it? Any issues with both running?

user630702
  • 139
  • 2
  • 6

2 Answers2

7

Running both at the same time is not recommended. Both services might be using difference ntp servers with slight difference in time. So your server will experience time corrections very frequently: time synced by ntp service will get changed by systemd-timesyncd, and vice-verse.

You may already know, you can disable systemd-timesyncd start on boot and also stop the running service simultaneously using:

systemctl disable systemd-timesyncd --now
GMaster
  • 5,992
  • 3
  • 28
  • 32
  • timesyncd is not exactly full NTP...see also https://unix.stackexchange.com/questions/504381/chrony-vs-systemd-timesyncd-what-are-the-differences-and-use-cases-as-ntp-cli/504387#504387 – Rui F Ribeiro May 09 '20 at 17:05
  • It isn't even close to be a proper `ntp` client. It is strip implementation features without any gain, actually. Just a `NIH` from `systemd` group. – Anders Feb 24 '22 at 05:07
1

You can also fully disable systemd-timesyncd using:

timedatectl set-ntp 0

Or enable using:

timedatectl set-ntp 1

See:

timedatectl --help

To check if systemd-timesyncd is enabled or disabled simply type timedatectl status and check the value of "Network time on:" where "yes" indicates enabled and "no" means disabled.

Sorry for the separate answer but I can't add a comment due to lack of reputation.

thx4help
  • 11
  • 1
  • This messes with chrony, if I have chrony installed. I don't think it's the right way to disable it. – BeepDog Apr 01 '21 at 00:33