Accurate system time synchronization is critical for Linux servers, virtual machines, and desktop workstations. Network authentication protocols (Kerberos, OAuth), SSL/TLS digital certificate validations, database transaction logs, and cron scheduled jobs all require precise, synchronized UTC clocks. In Ubuntu, systemd-timesyncd is the default lightweight Network Time Protocol (NTP) client daemon. However, during boot or following system updates, administrators frequently encounter the failure: Failed to start systemd-timesyncd.service - Network Time Synchronization.
Why Does systemd-timesyncd Fail to Start in Ubuntu?
The systemd-timesyncd daemon fails when it cannot bind local network sockets, read configuration files, or contact upstream NTP servers. Common causes include:
- Port 123 (NTP) Contention with Chrony or NTPd: Another time synchronization daemon (such as
chronyor legacyntp) is already running and occupying UDP port 123. - Corrupted Local Time Clock Database: Stale or damaged clock touch files located inside
/var/lib/systemd/timesync/clock. - Unreachable Fallback NTP Servers: Default NTP servers (
ntp.ubuntu.com) blocked by local DNS outages or restrictive corporate firewall rules. - Virtualization / Container Clock Locking: LXC, Docker, or OpenVZ containers where host kernels forbid guest containers from adjusting hardware clocks (
CAP_SYS_TIMEmissing). - Corrupted timesyncd.conf Syntax: Malformed formatting or invalid directives inside
/etc/systemd/timesyncd.conf.
Method 1: Check for Conflicting Time Services (Chrony or NTPd)
Only one NTP daemon can bind UDP port 123 and synchronize the kernel clock at any given time.
- Check if
chronyorntpis installed and active on your system:systemctl status chrony ntpd ntp - If
chronyis installed and running, Ubuntu purposefully disablessystemd-timesyncdbecause Chrony is the more advanced enterprise time daemon. - If you prefer Chrony, simply mask timesyncd to silence the error:
sudo systemctl mask systemd-timesyncd.service - If you prefer the default
systemd-timesyncd, remove conflicting daemons:sudo apt purge chrony ntp sudo systemctl unmask systemd-timesyncd.service sudo systemctl restart systemd-timesyncd.service
Method 2: Remove Corrupted Clock Touch Files
Damaged timestamp records in the timesync directory prevent the daemon from initialising.
- Stop the service:
sudo systemctl stop systemd-timesyncd.service - Remove the historical clock reference file:
sudo rm -f /var/lib/systemd/timesync/clock - Touch a fresh reference file:
sudo touch /var/lib/systemd/timesync/clock sudo chown systemd-timesync:systemd-timesync /var/lib/systemd/timesync/clock - Start the service:
sudo systemctl start systemd-timesyncd.service
Method 3: Configure Reliable NTP Servers in timesyncd.conf
If default Ubuntu NTP servers are unreachable, specify trusted regional NTP pools.
- Open the configuration file in a text editor:
sudo nano /etc/systemd/timesyncd.conf - Locate the
[Time]section. - Uncomment the
NTP=andFallbackNTP=lines and specify public NTP pools:[Time] NTP=time.google.com time.cloudflare.com FallbackNTP=0.ubuntu.pool.ntp.org 1.ubuntu.pool.ntp.org - Save and exit (Ctrl + O, Enter, Ctrl + X).
- Restart the service:
sudo systemctl restart systemd-timesyncd.service
Method 4: Enable Network Time Synchronization via timedatectl
Use the official control utility to re-engage network clock synchronization.
- Turn on network time synchronization:
sudo timedatectl set-ntp true - Query overall time and synchronization health:
timedatectl status - Verify that NTP service: active appears in the output report.
Method 5: Check Container Privileges in Docker / LXC
Ensure that containerized instances have permission to adjust system clocks.
- In unprivileged Docker or LXC containers, adjusting the kernel system clock is prohibited by design. The container clock inherits the host clock directly.
- If running inside a container, mask the service as it is unnecessary:
sudo systemctl mask systemd-timesyncd.service - If the container genuinely requires independent clock manipulation, add the
SYS_TIMEcapability on the host:docker run --cap-add=SYS_TIME ...