1CHRONYD(8) System Administration CHRONYD(8)
2
3
4
6 chronyd - chrony daemon
7
9 chronyd [OPTION]... [DIRECTIVE]...
10
12 chronyd is a daemon for synchronisation of the system clock. It can
13 synchronise the clock with NTP servers, reference clocks (e.g. a GPS
14 receiver), and manual input using wristwatch and keyboard via chronyc.
15 It can also operate as an NTPv4 (RFC 5905) server and peer to provide a
16 time service to other computers in the network.
17
18 If no configuration directives are specified on the command line,
19 chronyd will read them from a configuration file. The compiled-in
20 default location of the file is /etc/chrony.conf.
21
22 Informational messages, warnings, and errors will be logged to syslog.
23
25 -4
26 With this option hostnames will be resolved only to IPv4 addresses
27 and only IPv4 sockets will be created.
28
29 -6
30 With this option hostnames will be resolved only to IPv6 addresses
31 and only IPv6 sockets will be created.
32
33 -f file
34 This option can be used to specify an alternate location for the
35 configuration file. The compiled-in default value is
36 /etc/chrony.conf.
37
38 -n
39 When run in this mode, the program will not detach itself from the
40 terminal.
41
42 -d
43 When run in this mode, the program will not detach itself from the
44 terminal, and all messages will be written to the terminal instead
45 of syslog. If chronyd was compiled with enabled support for
46 debugging, this option can be used twice to enable debug messages.
47
48 -l file
49 This option enables writing of log messages to a file instead of
50 syslog or the terminal.
51
52 -L level
53 This option specifies the minimum severity level of messages to be
54 written to the log file, syslog, or terminal. The following levels
55 can be specified: -1 (debug, if compiled with enabled support for
56 debugging), 0 (informational), 1 (warning), 2 (non-fatal error),
57 and 3 (fatal error). The default value is 0.
58
59 -p
60 When run in this mode, chronyd will print the configuration and
61 exit. It will not detach from the terminal. This option can be used
62 to verify the syntax of the configuration and get the whole
63 configuration, even if it is split into multiple files and read by
64 the include or confdir directive.
65
66 -q
67 When run in this mode, chronyd will set the system clock once and
68 exit. It will not detach from the terminal.
69
70 -Q
71 This option is similar to the -q option, except it only prints the
72 offset without making any corrections of the clock and disables
73 server ports to allow chronyd to be started without root
74 privileges, assuming the configuration does not have any directives
75 which would require them (e.g. refclock, hwtimestamp, rtcfile,
76 etc).
77
78 -r
79 This option will try to reload and then delete files containing
80 sample histories for each of the servers and reference clocks being
81 used. The files are expected to be in the directory specified by
82 the dumpdir directive in the configuration file. This option is
83 useful if you want to stop and restart chronyd briefly for any
84 reason, e.g. to install a new version. However, it should be used
85 only on systems where the kernel can maintain clock compensation
86 whilst not under chronyd's control (i.e. Linux, FreeBSD, NetBSD,
87 illumos, and macOS 10.13 or later).
88
89 -R
90 When this option is used, the initstepslew directive and the
91 makestep directive used with a positive limit will be ignored. This
92 option is useful when restarting chronyd and can be used in
93 conjunction with the -r option.
94
95 -s
96 This option will set the system clock from the computer’s real-time
97 clock (RTC) or to the last modification time of the file specified
98 by the driftfile directive. Real-time clocks are supported only on
99 Linux.
100
101 If used in conjunction with the -r flag, chronyd will attempt to
102 preserve the old samples after setting the system clock from the
103 RTC. This can be used to allow chronyd to perform long term
104 averaging of the gain or loss rate across system reboots, and is
105 useful for systems with intermittent access to network that are
106 shut down when not in use. For this to work well, it relies on
107 chronyd having been able to determine accurate statistics for the
108 difference between the RTC and system clock last time the computer
109 was on.
110
111 If the last modification time of the drift file is later than both
112 the current time and the RTC time, the system time will be set to
113 it to restore the time when chronyd was previously stopped. This is
114 useful on computers that have no RTC or the RTC is broken (e.g. it
115 has no battery).
116
117 -t timeout
118 This option sets a timeout (in seconds) after which chronyd will
119 exit. If the clock is not synchronised, it will exit with a
120 non-zero status. This is useful with the -q or -Q option to shorten
121 the maximum time waiting for measurements, or with the -r option to
122 limit the time when chronyd is running, but still allow it to
123 adjust the frequency of the system clock.
124
125 -u user
126 This option sets the name of the system user to which chronyd will
127 switch after start in order to drop root privileges. It overrides
128 the user directive. The compiled-in default value is chrony.
129
130 On Linux, chronyd needs to be compiled with support for the libcap
131 library. On macOS, FreeBSD, NetBSD, and illumos chronyd forks into
132 two processes. The child process retains root privileges, but can
133 only perform a very limited range of privileged system calls on
134 behalf of the parent.
135
136 -U
137 This option disables a check for root privileges to allow chronyd
138 to be started under a non-root user, assuming the process will have
139 all capabilities (e.g. provided by the service manager) and access
140 to all files, directories, and devices, needed to operate correctly
141 in the specified configuration. Note that different capabilities
142 might be needed with different configurations and different Linux
143 kernel versions. Starting chronyd under a non-root user is not
144 recommended when the configuration is not known, or at least
145 limited to specific directives.
146
147 -F level
148 This option configures system call filters loaded by chronyd
149 processes if it was compiled with support for the Linux secure
150 computing (seccomp) facility. Three levels are defined: 0, 1, 2.
151 The filters are disabled at level 0. At levels 1 and 2, chronyd
152 will be killed if it makes a system call which is blocked by the
153 filters. The level can be specified as a negative number to trigger
154 the SIGSYS signal instead of SIGKILL, which can be useful for
155 debugging. The default value is 0.
156
157 At level 1, the filters allow only selected system calls that are
158 normally expected to be made by chronyd. Other system calls are
159 blocked. This level is recommended only if it is known to work on
160 the version of the system where chrony is installed. The filters
161 need to allow also system calls made by libraries that chronyd is
162 using (e.g. libc), but different versions or implementations of the
163 libraries might make different system calls. If the filters are
164 missing a system call, chronyd could be killed even in normal
165 operation.
166
167 At level 2, the filters block only a small number of specific
168 system calls (e.g. fork and exec). This approach should avoid false
169 positives, but the protection of the system against a compromised
170 chronyd process is much more limited.
171
172 The filters cannot be enabled with the mailonchange directive.
173
174 -P priority
175 On Linux, FreeBSD, NetBSD, and illumos this option will select the
176 SCHED_FIFO real-time scheduler at the specified priority (which
177 must be between 0 and 100). On macOS, this option must have either
178 a value of 0 to disable the thread time constraint policy or 1 for
179 the policy to be enabled. Other systems do not support this option.
180 The default value is 0.
181
182 -m
183 This option will lock chronyd into RAM so that it will never be
184 paged out. This mode is only supported on Linux, FreeBSD, NetBSD,
185 and illumos.
186
187 -x
188 This option disables the control of the system clock. chronyd will
189 not try to make any adjustments of the clock. It will assume the
190 clock is free running and still track its offset and frequency
191 relative to the estimated true time. This option allows chronyd to
192 be started without the capability to adjust or set the system clock
193 (e.g. in some containers) to operate as an NTP server.
194
195 -v, --version
196 With this option chronyd will print version number to the terminal
197 and exit.
198
199 -h, --help
200 With this option chronyd will print a help message to the terminal
201 and exit.
202
204 LISTEN_FDS
205 On Linux systems, the systemd service manager may pass file
206 descriptors for pre-initialised sockets to chronyd. The service
207 manager allocates and binds the file descriptors, and passes a copy
208 to each spawned instance of the service. This allows for
209 zero-downtime service restarts as the sockets buffer client
210 requests until the service is able to handle them. The service
211 manager sets the LISTEN_FDS environment variable to the number of
212 passed file descriptors.
213
215 /etc/chrony.conf
216
218 chronyc(1), chrony.conf(5)
219
221 For instructions on how to report bugs, please visit
222 https://chrony-project.org/.
223
225 chrony was written by Richard Curnow, Miroslav Lichvar, and others.
226
227
228
229chrony 4.5 2023-12-05 CHRONYD(8)