C4
Networking Azure

Chrony NTP Time Server on Ubuntu 26.04 LTS on Azure User Guide

| Product: Chrony 4.8 on Ubuntu 26.04 LTS on Azure

Overview

This guide covers the deployment and configuration of Chrony on Ubuntu 26.04 LTS on Azure using cloudimg Azure Marketplace images. Chrony is a versatile, high accuracy implementation of the Network Time Protocol (NTP) and the modern default time daemon on most Linux systems. This image ships it as a self hosted NTP time server for a network: the chronyd service disciplines the local clock from upstream time sources and serves precise time to other machines on UDP port 123.

Accurate time is foundational infrastructure. TLS certificate validation, Kerberos and Active Directory authentication, distributed databases, log correlation and audit timestamps all break in subtle ways when clocks drift. Chrony keeps this server, and every client that synchronises against it, correct to well under a millisecond, and it recovers from network interruptions and large offsets far better than the legacy ntpd it replaces.

The image runs Chrony 4.8 from the Ubuntu 26.04 LTS archive under systemd (chrony.service), so Ubuntu's security updates keep it patched. There is no web interface and no database: /etc/chrony/chrony.conf is the main configuration, the Azure reference clock is configured in /etc/chrony/conf.d/00-azure-ptp.conf, and the server is administered from the command line with chronyc.

Secure by default — not an open amplifier. A naively deployed public NTP server can be abused for reflection and amplification attacks. This image avoids that: the shipped configuration serves NTP only to the local host and the private RFC1918 network ranges, a documented and scoped allow list rather than allow all, so a query arriving from a public internet address is simply dropped. The chronyc command interface is bound to the local host only, and Chrony has no legacy monlist command at all. An NTP server has no login, so no shared or default credential of any kind ships in the image.

What is included:

  • Chrony 4.8 from the Ubuntu 26.04 LTS archive, run under systemd as chrony.service

  • An NTP service on 0.0.0.0:123/udp, serving the local host and your private networks

  • On Azure, the Hyper V host hardware clock configured as a PTP reference clock (PHC0), checked on first boot, which Chrony uses whenever it agrees with the network sources

  • The public NTP pool and Ubuntu's time servers as network time sources

  • A scoped allow list (loopback plus the RFC1918 private ranges) so the server is not an open amplifier until you deliberately widen it to your own subnets

  • The chronyc command and monitoring interface bound to the local host only, with no amplification vectors

Prerequisites

  • Active Azure subscription, SSH public key, VNet plus subnet in target region

  • Subscription to the Chrony listing on Azure Marketplace

  • Network Security Group rules allowing UDP 123 (NTP) from the clients that will synchronise against the server, and TCP 22 for administration

Recommended virtual machine size: Standard_B2s (2 vCPU, 4 GB RAM) is ample for a departmental or virtual network time server. Chrony is extremely light; larger sizes are only needed for very large client populations.

Step 1: Deploy from the Azure Portal

Search Chrony in Marketplace, select the cloudimg publisher, and click Create. Configure the Network Security Group to allow UDP 123 from the clients that will synchronise against the server, and TCP 22 for administration. Keep UDP 123 restricted to the subnets you serve; there is no need to expose it to the public internet for an internal time server.

Step 2: Deploy from the Azure CLI

RG="time-prod"; LOCATION="eastus"; VM_NAME="chrony1"
IMAGE_URN="cloudimg1647283583153:chrony-ubuntu-26-04:default:latest"
SSH_KEY="$(cat ~/.ssh/id_rsa.pub)"
az group create --name "$RG" --location "$LOCATION"
# Accept the Marketplace terms once per subscription (required before the first CLI deploy)
az vm image terms accept --urn cloudimg1647283583153:chrony-ubuntu-26-04:default:latest

az vm create \
  --resource-group "$RG" --name "$VM_NAME" \
  --image "$IMAGE_URN" \
  --size Standard_B2s \
  --admin-username azureuser \
  --ssh-key-values "$SSH_KEY" \
  --public-ip-sku Standard
# Allow NTP (UDP 123) from your client network only: replace 10.0.0.0/16 with the range your clients are in
az network nsg rule create --resource-group "$RG" --nsg-name "${VM_NAME}NSG" \
  --name allow-ntp --priority 1001 --protocol Udp --destination-port-ranges 123 \
  --source-address-prefixes 10.0.0.0/16 --access Allow --direction Inbound
az vm open-port --resource-group "$RG" --name "$VM_NAME" --port 22 --priority 1002

Open UDP 123 only to the client subnets you intend to serve.

Step 3: First boot

On first boot the image checks that the Azure Hyper V host clock is configured as a PTP reference (adding it if the OS has not), resolves this VM's address, writes the informational note /root/chrony-info.txt, and restarts chrony so it is serving time within seconds. SSH in as azureuser and read the note:

sudo cat /root/chrony-info.txt

The note records this server's role, its private address and the NTP port it serves, the PTP reference clock, and the path to the configuration. Chrony has no password, so the note holds no secret.

Step 4: Confirm the service is running

chrony.service is active, chronyd --version reports 4.8, and ss confirms chronyd is listening on UDP 123 on all interfaces, ready to answer clients on your allowed networks.

systemctl is-active chrony.service
chronyd --version
sudo ss -ulnp | grep -E ':123'

The ss output shows chronyd bound to 0.0.0.0:123 and [::]:123 — the NTP server port. (The command port 323 is bound only to 127.0.0.1 and ::1, so it is never reachable off the box.)

chrony.service reports active, chronyd reports version 4.8 with its feature flags, and ss shows chronyd listening on UDP port 123 on both 0.0.0.0 and the IPv6 wildcard, the NTP server port that answers clients

Step 5: Confirm the clock is synchronised

chronyc tracking reports the server's own synchronisation state. Leap status : Normal means the server is synchronised and safe to serve time. The Reference ID and Stratum identify the upstream source the server is locked to, and the System time and RMS offset lines show how tightly the clock is disciplined, typically well under a millisecond.

chronyc tracking

The server locks to whichever source Chrony judges best: on Azure that is the Hyper V host clock (PHC0, stratum 1 through it) when it agrees with the network sources, otherwise an NTP server (stratum 2 or 3). Either way it reports Leap status : Normal and a System time offset well under a millisecond once settled. Right after a restart the RMS offset is larger while Chrony converges.

chronyc tracking shows the server locked to an NTP server at stratum 2, with Leap status Normal and a System time offset of a few nanoseconds of NTP time, confirming the NTP server is synchronised and safe to serve time

Step 6: Review the time sources

chronyc sources lists every source the server is disciplining from, with two marker columns at the start of each line. The first is the mode: ^ is an NTP server and # is a local hardware reference clock such as the Azure PHC. The second is the state: * is the currently selected best source, + is a source combined with it, and - or ? are sources that are not currently selected. chronyc sourcestats shows the measured offset and skew for each.

chronyc sources
chronyc sourcestats

On Azure you will see the PHC0 hardware reference clock alongside several ntp.ubuntu.com and pool servers, with one source marked * as the current best. If the host clock disagrees with the network sources, Chrony marks PHC0 with x (a falseticker: a source it does not trust because the majority disagrees) and keeps the server on the network sources, so a host clock that drifts cannot pull your time off. On the build machine shown here the host clock read about 35 ms ahead of every network source, so Chrony set it aside and served time from an NTP server; on a host whose clock agrees, PHC0 is selected with #*.

Exactly one PHC0 line appears: the Ubuntu 26.04 image for Azure configures the host clock in /etc/chrony/conf.d/00-azure-ptp.conf, and first boot adds no second copy of it.

chronyc sources lists the PHC0 Azure host clock marked x as a falseticker 35 ms away from the network sources, and several Ubuntu and pool NTP servers, one marked with an asterisk as the currently selected best source; sourcestats shows the measured offset and skew of each

Step 7: Confirm it serves time and is not an open amplifier

This is the security posture that matters for an NTP server. The shipped allow list answers only the local host and the RFC1918 private ranges, so a query from a public source address is dropped. Read the allow list, confirm the command port is loopback only, then prove the server answers a real NTP client query on port 123 with the bundled self check.

sudo grep -E '^(allow|cmdport|bindcmdaddress|leapseclist)' /etc/chrony/chrony.conf
sudo ss -ulnp | grep -E ':323'
python3 /usr/local/sbin/ntp-selfcheck.py 127.0.0.1

The allow lines are scoped to 127.0.0.1, ::1 and the private ranges — never allow all. The leapseclist line reads leap second announcements from the system time zone data. The command port 323 is bound only to loopback. The self check sends a real NTP client request to port 123 and prints OK with the returned time, proving the server serves NTP while remaining scoped to your private networks.

the chrony.conf allow lines are scoped to loopback and the RFC1918 private ranges with no allow all, the command port 323 is bound only to 127.0.0.1 and colon-colon-1, and the ntp-selfcheck tool sends a client request to port 123 and prints OK with the returned time, proving the server serves NTP and is not an open amplifier

Step 8: Point your clients at the server

Configure your other machines to use this instance as their NTP server, using its private IP address (shown in the info note from Step 3). The examples below are run on each client, not on this server.

# --- Linux client running chrony ---
# Add a line to the client's /etc/chrony/chrony.conf, then restart chrony:
#   server <server-ip> iburst
#
# --- Linux client running systemd-timesyncd ---
# Set NTP=<server-ip> in /etc/systemd/timesyncd.conf, then:
#   sudo systemctl restart systemd-timesyncd
#
# --- Windows client ---
#   w32tm /config /manualpeerlist:"<server-ip>" /syncfromflags:manual /update
#
# Verify from a Linux client that it is using this server:
#   chronyc sources        # the server should appear, selected with a '*'

Replace <server-ip> with this instance's private IP address. Because the default allow list already covers the RFC1918 private ranges, clients on your virtual network can synchronise immediately with no change on the server.

Step 9: Widen the allow list to your network

The shipped allow list covers the whole RFC1918 private space. To narrow it to your exact virtual network, or to serve a network outside RFC1918, edit the allow lines in /etc/chrony/chrony.conf and restart the service. Only add networks you control — never use allow all, which turns the server into an open amplifier.

# Edit /etc/chrony/chrony.conf and set the allow list to your exact VNet CIDR, e.g.
#   allow 10.20.0.0/16
# Remove the broader ranges you do not need, then apply the change:
#   sudo systemctl restart chrony
# Confirm the new scope:
#   sudo grep -E '^allow' /etc/chrony/chrony.conf

Chrony reads the configuration on restart; if there is a syntax error the service fails to start and reports it in systemctl status chrony, and the server does not answer clients until you correct the file and restart it again.

Step 10: Review the configuration and info note

Everything Chrony does is in /etc/chrony/chrony.conf and the drop ins in /etc/chrony/conf.d/ (the Hyper V reference clock line is in 00-azure-ptp.conf), and the per instance details are in the info note. Both are readable with sudo.

sudo cat /etc/chrony/chrony.conf
sudo cat /etc/chrony/conf.d/00-azure-ptp.conf
sudo cat /root/chrony-info.txt

The info note is 0600 root:root and holds no secret — an NTP server has no login. It simply records the server's role, the address it serves, and the PTP reference for convenience.

Step 11: Security recommendations

  • Restrict the NSG to your use case. Allow UDP 123 only from the client subnets you serve. There is no need to expose an internal time server to the public internet.

  • Keep the allow list tight. Only add subnets you control to the allow lines. Never use allow all — that turns the server back into an open amplifier that can be abused for reflection attacks.

  • Leave the command port loopback only. The chronyc command interface is bound to 127.0.0.1 and ::1 so it cannot be reached or reflected from off the box. Keep it that way; administer the server over SSH.

  • Keep several sources. Leave the host clock (PHC0) and the network sources configured together: Chrony uses the host clock when it agrees with them and sets it aside (marked x) when it does not.

  • Keep the OS patched. Unattended security upgrades remain enabled on the running VM.

Step 12: Support and Licensing

Chrony is an open source project distributed under the GNU General Public License version 2. This cloudimg image bundles the unmodified Chrony package from the Ubuntu 26.04 LTS archive. cloudimg provides the packaging, the secure by default scoped allow configuration, the Azure PTP reference clock check, the paired deploy guide, and cloudimg support. cloudimg's support team is on hand 24 hours a day by email (support@cloudimg.co.uk), with a guaranteed response within 24 hours.

cloudimg is not affiliated with or endorsed by the Chrony project. Chrony is a mark of its respective owner and is used here only to identify the software.

Deploy on Azure

Find Chrony NTP Time Server on Ubuntu 26.04 LTS on the Azure Marketplace, published by cloudimg. Deploy from the Portal or the Azure CLI as shown above.

Need Help?

Email support@cloudimg.co.uk for deployment help, configuration questions, or licensing enquiries.