LinuxXXIV · Time Synchronisationsystemd-timesyncd
systemd-timesyncd - the lightweight NTP client
What you'll learn
- Describe what systemd-timesyncd does and does not do
- Configure NTP servers and NTS support
- Recognise when chrony is the right choice instead
- Use timedatectl for diagnosis
Prerequisites
Verified against Ubuntu 24.04 LTS · Debian 12 (Bookworm) · RHEL 9.x · Rocky Linux 9.x · AlmaLinux 9.x · Linux kernel 6.1 LTS / 6.6 LTS · systemd 255+ · OpenSSH 8.7p1 (RHEL 9) / 9.6p1 (Ubuntu 24.04) · nftables 1.0.x · chrony 4.x · Pacemaker 2.1.x · Corosync 3.1.x · 2026-08-09
systemd-timesyncd is the lightweight NTP client that ships with systemd. It is a smaller alternative to chrony, with fewer features but easier setup. It is the default on Ubuntu desktop and increasingly common on minimal Linux installs.
What it does
- Acts as an NTP client.
- Adjusts the system clock via slewing.
- Supports NTS (Network Time Security) for authenticated time.
- Persists the RTC across reboots.
What it does NOT do
- It does NOT serve NTP to other hosts.
- It does NOT support complex source selection.
- It does NOT support authentication via shared keys.
- It does NOT support reference clocks.
For a server that needs NTP server functionality or complex configuration, chrony is the right choice.
Configure
/etc/systemd/timesyncd.conf:
[Time]
NTP=time.cloudflare.com ntp1.example.com
FallbackNTP=0.pool.ntp.org 1.pool.ntp.org
RootDistanceMaxSec=5
PollIntervalMinSec=32
PollIntervalMaxSec=2048
Apply:
sudo systemctl restart systemd-timesyncd
timedatectl status
Inspect
timedatectl status
Output:
Local time: Sun 2026-08-09 14:30:00 UTC
Universal time: Sun 2026-08-09 14:30:00 UTC
RTC time: Sun 2026-08-09 14:30:00
Time zone: UTC (UTC, +0000)
System clock synchronized: yes
NTP service: active
RTC in local TZ: no
Key fields:
- Local time: in the system time zone.
- Universal time: UTC.
- System clock synchronized: yes if NTP is syncing successfully.
- NTP service: active if systemd-timesyncd is running.
- RTC in local TZ: should be
no(RTC should be UTC).
timedatectl timesync-status
Output:
Server: time.cloudflare.com (162.159.200.1)
Poll interval: 32s (min: 32s; max: 34min 8s)
Leap: normal
Version: 4
Stratum: 3
Reference: 6A0E80A3
Precision: 1us (-24s)
Root distance: 24ms (max: 5s)
Offset: -1.234ms
Delay: 12.345ms
Jitter: 0.456ms
Packet count: 1234
Reading this:
- Server: current NTP source.
- Offset: difference between system clock and server. <10 ms is good.
- Delay: round-trip time to the server.
- Jitter: variation in delay. <1 ms is good.
- Packet count: total packets exchanged.
NTS support
systemd-timesyncd supports NTS (Network Time Security, RFC 8915) for authenticated time. Configure:
[Time]
NTP=time.cloudflare.com
NTS=time.cloudflare.com
time.cloudflare.com supports NTS. Other public servers may
not. NTS provides authentication and encryption for NTP
queries, protecting against spoofing.
When to use chrony instead
Use chrony when:
- The host is an NTP server for the local network.
- The host is on a frequently-disconnected network (laptop).
- The host needs complex source selection (e.g. GPS reference clock).
- Authentication via shared keys is required.
- High accuracy (<1 ms) is needed.
Use systemd-timesyncd when:
- The host is a desktop or simple server.
- Internet NTP is the only source.
- Minimal configuration is preferred.
For new production servers, prefer chrony. For desktop and container images, systemd-timesyncd is sufficient.
Diagnose
timedatectl status
timedatectl timesync-status
journalctl -u systemd-timesyncd -n 50
Common issues:
- “System clock synchronized: no”: NTP source is unreachable. Check the network and the configured NTP servers.
- Large offset (>1 second): the host clock is far off; NTP is slewing it back. Initial sync may take a few minutes.
- “NTP service: inactive”: systemd-timesyncd is not running.
Enable and start with
systemctl enable --now systemd-timesyncd.
Knowledge check
Knowledge check · 3 questions
Q1. Which command shows whether the system clock is synchronised with NTP?
Q2. Serving NTP to other hosts requires chrony or ntpd; systemd-timesyncd cannot do it.
Q3. Which of the following are valid [Time] directives in timesyncd.conf? Select all that apply.
Passing score: 75%. Answers are checked in this browser.