Skip to content
Back to skills

Chrony Knowledge Patch

ASecurity

chrony

  • 25 stars
  • 0 votes
  • 0 copies
  • 9 views
  • Added May 27, 2026
data-airustgosecurity

Works with

  • cli

Security analysis

A100/100

Pro scans all 5 files and shows the line behind each finding

Scanned December 1, 2026

npx -y skills add Nevaberry/nevaberry-plugins --skill chrony-knowledge-patch --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Chrony Knowledge Patch?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Chrony Knowledge Patch
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/nevaberry-chrony-knowledge-patch/badge)](https://www.skillsdirectory.com/skills/nevaberry-chrony-knowledge-patch)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: chrony-knowledge-patch
description: chrony
version: "4.8"
license: MIT
metadata:
  author: Nevaberry
---


# chrony Knowledge Patch

Use this skill when configuring, upgrading, monitoring, or troubleshooting chrony,
including NTS, hardware timestamping, and reference clocks. Load the relevant
reference for complete options, conditions, and deployment examples.

## Reference index

| Reference | Topics |
| --- | --- |
| [Core configuration](references/core-configuration.md) | Upgrade constraints, source polling, DNS, configuration reloads, local reference, drift, leap handling, daemon startup, distribution integration |
| [Hardware timestamping and PTP](references/hardware-timestamping-and-ptp.md) | NIC capabilities, timestamp corrections, interleaved NTP, experimental and RFC 10030 transports, receive filters, tunnels, PTP bridges |
| [Monitoring and troubleshooting](references/monitoring-and-troubleshooting.md) | UDP command compatibility, command sockets, selection, sample rejection, logging, rate limits, counters, exporter |
| [Network Time Security](references/network-time-security.md) | Shared-key compatibility, authentication policy, AEAD algorithms, certificates, key establishment, persistence, distribution defaults, verification |
| [Reference clocks](references/reference-clocks.md) | SHM deprecation, RTC, PHC, SENSOR, PPS filtering, gpsd sockets, serial calibration, RTC tracking |

## Upgrade changes and deprecations

The SHM driver is deprecated in favor of SOCK. Chronyd attaches to an existing SHM
segment regardless of its owner or mode; `perm` applies only at creation and defaults
to `0600`. Verify existing segments with `ipcs -m`.

Chrony 4.0 removes `RMD128`, `RMD160`, `RMD256`, and `RMD320` key types; update shared
keys on both ends before upgrading an affected association. It also removes
non-standard long authentication MACs in NTPv4. On a chrony 2.x client using a
non-MD5/SHA1 key, set `version 3` on the source. GNU Readline support is also removed.

Chrony 4.7 checks integer configuration values more strictly and can reject values
accepted by older releases. Builds require POSIX threads; the minimum supported
NTS library versions are Nettle 3.6 and GnuTLS 3.6.14.

Chrony 4.9 uses RFC 10030 NTP-over-PTP, which is wire-incompatible with the
experimental transport in 4.2–4.8. For one-step transparent-clock corrections, use
`extfield 10A` with hardware timestamps and a server supporting the Network
Correction extension field; `F324` now selects `10A`.

## Monitoring access and command compatibility

`opencommands` chooses network monitoring commands for callers permitted by
`cmdallow`. In chrony 4.7, the default set is `activity`, `manual`, `rtcdata`,
`serverstats`, `smoothing`, `sourcename`, `sources`, and `tracking`. Opt-in `authdata`,
`clients`, `ntpdata`, `selectdata`, and `sourcestats` can produce `Invalid command` or
`Bad reply from daemon` when chronyc and chronyd use different protocol versions.

Chrony 4.9 enables `sourcestats` by default over UDP and makes `serverstats` opt-in;
`serverstats` can fail when chronyc and chronyd use different protocol versions.

`cmdport 0` closes UDP monitoring, including loopback for unprivileged local callers.
`bindcmdaddress /` disables the Unix socket. Remote UDP monitoring needs both a
non-loopback bind address and a matching `cmdallow` rule. For commands that return
`Not authorised` over UDP even locally, pass a single Unix socket path with
`-h /var/run/chrony/chronyd.sock`.

Use `-e` to terminate each response with a single-dot line, including with `-m`:

```sh
chronyc -c -e -m tracking 'sources -a'
```

In chrony 4.8, `chronyc -u` drops root privileges to the specified account; the
configure script sets the build's default account.

## Source selection, polling, and DNS

`maxunreach` limits selection after a source becomes unreachable. It applies to
`server`, `pool`, `peer`, and `refclock`, defaulting to 100000 polls after eight NTP
requests without a valid reply or eight refclock polls without a valid sample.
If any sources are reachable, an unreachable source can stay selected only with a
sample newer than the oldest sample across the reachable sources.

`maxsamples 1` makes a source eligible after one measurement and disables frequency
tracking. Set it globally or per source; this can shorten `chronyd -q` or `chronyd -Q` runs.
Passing directives on the command line bypasses the configuration file; `-Q` prints
the offset without changing the system clock and disables server ports:

```sh
chronyd -Q -t 10 'pool pool.ntp.org iburst'
```

Negative poll exponents permit intervals down to `minpoll -7` (1/128 s); chronyd uses
subsecond intervals only while the server is reachable and round-trip delay is
below 10 ms. `maxdelayquant 0.2` replaces the source's `maxdelaydevratio` test with
a long-term 20th-percentile delay estimate; allow it time to converge on a stable,
frequently polled LAN.

`refresh` re-resolves source hostnames one at a time, defaults to 1,209,600 seconds,
and can replace a healthy server whose address disappears from DNS. `refresh 0`
disables periodic refresh; `chronyc refresh` refreshes all sources immediately.
Run `chronyc online` when DNS becomes available to trigger an immediate lookup of
unresolved source names.

## Configuration reloads and restarts

`confdir` reads `.conf` files lexicographically; the first directory wins for
duplicate filenames across directories on the same directive. `sourcedir` applies
the same precedence to `.sources` files containing only `server`, `pool`, or `peer`
directives. Every line needs a terminating newline. Changing an existing source's
options and running `chronyc reload sources` removes and re-adds it, losing its
measurement history and resetting selection state.

Validate and print the expanded configuration, including `include` and `confdir`:

```sh
chronyd -p -f /etc/chrony.conf
```

`dumpdir` saves histories on exit or with `chronyc dump`; `chronyd -r` loads them.
Startup removes dump files even without `-r`. `chronyd -R -r` reloads saved
measurements while ignoring `initstepslew` and `makestep` with a positive update limit.

## Local reference and holdover

`local activate` requires root distance to fall below its threshold at least once
before local time becomes eligible. After synchronization is lost, `distance`
controls takeover; `distance 0` bypasses that threshold. Among mutually polling
servers using `orphan`, the smallest reference ID takes priority.

`waitsynced` defaults to 0 seconds from the last clock update; set it at least as
long as the longest expected poll interval to avoid activation between updates.
`waitunsynced` defaults to 300 seconds with `orphan`, otherwise 0, and also applies
when source selection fails for lack of a majority.

```conf
local stratum 10 orphan distance 0.0 waitsynced 7200 waitunsynced 300
```

`fallbackdrift 16 19` applies progressively longer-term drift estimates after
2^16 through 2^19 seconds without a clock update. The first fallback marks the
clock unsynchronized; setting either exponent to zero disables fallbacks.

## NTS authentication and trust

With default `authselectmode mix` and both authenticated and unauthenticated NTP
sources, authenticated NTP sources and refclocks gain effective `trust` and
`require`. `authselectmode require` excludes unauthenticated NTP sources from selection.

`ntsaeads` defaults to `30 15` (AES-128-GCM-SIV, then AES-SIV-CMAC-256), skipping
algorithms unsupported by the crypto library. Servers should include `15` for
RFC 8915 compliance. Clients offer algorithms in list order; servers choose the
first enabled ID in the client's offer. `chronyc authdata` reports the ID in use.

Use `certset` to select a numbered trust set; system CAs are in set 0 unless
`nosystemcert` is configured. Client trust-file changes need no restart; renewed
server certificates from `ntsservercert` load on restart.

```conf
ntstrustedcerts 1 /etc/chrony/private-nts-ca.pem
server ntp1.example.net nts certset 1
```

`nocerttimecheck 1` skips certificate activation and expiration checks until the
first clock update; the default 0 keeps checks enabled. A bootstrap exception is
best paired with narrowly scoped trusted certificates. Keep `ntsrefresh`, in
seconds and defaulting to four weeks, longer than every NTS source's poll interval.

An offset from this probe confirms NTS key establishment and an authenticated NTP reply:

```sh
chronyd -Q -t 3 'server ntp.example.net iburst nts maxsamples 1'
```

## Hardware timestamping and PPS

`hwtimestamp` assumes the physical NIC clock is free-running. On Linux 5.14 or newer,
create a virtual PHC through `/sys/class/ptp/ptpX/n_vclocks` for applications needing
a synchronized clock, such as a PTP daemon. Match hardware-clock polling to NTP
polling for a hardware-timestamped LAN client.

`txcomp` adds seconds to transmit timestamps; `rxcomp` subtracts seconds from receive
timestamps. The Linux `igb` driver already compensates I210 timestamp errors, so
leave those options unset for that built-in correction.

Use `rxfilter ptp` only if `ethtool -T` lists `ptpv2-event`; omit it on an I226 listing
only `none` and `all`. On a NIC with an `all` filter, select it for ordinary NTP on a
nonstandard UDP port or for both NTP and PTP traffic.

In chrony 4.6, refclock filters of length four or more need at least four samples
per source poll; shorter filters must fill. Chrony 4.7 permits a filtered measurement
from one sample. Chrony 4.8 validates refclock samples before counting reachability
and restores PHC `:extpps` support on Linux 6.15 and later.

For SOCK refclocks, start chronyd before gpsd; chronyd creates the socket at startup.
For serial time-of-day samples, use `/run/chrony.clk.<device-basename>.sock` and
restart gpsd after restarting chronyd. On Alpine with direct `refclock PPS /dev/pps0`,
adjust service ordering so gpsd initializes the PPS device before chronyd opens it.

## Diagnostic interpretation

Even `Reach` at `377` does not ensure fresh accepted samples: `LastRx` measures time
since the last accepted sample. In `ntpdata`, `Total valid RX` counts packets passing
the first two test groups; `Total good RX` counts measurements passing all three.

In `chronyc selectdata -v`, `S` means measurements are too old relative to reachable
sources or `maxunreach` was exceeded; `s` means unsynchronized; `D` means root distance
is or recently was too large to combine. Raising `minsamples` can make `tracking`
and `sourcestats` offsets substantially smaller than actual offsets.

`chronyc reset sources` drops all source measurements and marks the daemon
unsynchronized. Use it for invalid old measurements after a network move or an
unexpected clock jump chronyd missed.

The system-clock error bound is the absolute tracking `System time` correction plus
root dispersion and half root delay, assuming the stratum-1 clock is correct. The
exporter README's `chrony_tracking_last_offset_seconds` example uses the last-update
estimate, which can differ from the remaining correction during a slew.

`rtcfile` and `rtcsync` are mutually exclusive. When tracking RTC drift with `rtcfile`,
disable shutdown jobs that set the RTC with `hwclock`: they invalidate the saved
estimates used by `chronyd -s` on the next boot.

Files in this skill

  • SKILL.md6.4 KB
  • references/local-reference-and-orphan.md1.9 KB
  • references/monitoring-and-misc.md1.9 KB
  • references/refclock-drivers.md1.1 KB
  • references/server-sources-and-nts.md1.3 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in data-ai →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.