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: 0 (informational), 1 (warning), 2 (non-fatal
56 error), and 3 (fatal error). The default value is 0.
57
58 -p
59 When run in this mode, chronyd will print the configuration and
60 exit. It will not detach from the terminal. This option can be used
61 to verify the syntax of the configuration and get the whole
62 configuration, even if it is split into multiple files and read by
63 the include or confdir directive.
64
65 -q
66 When run in this mode, chronyd will set the system clock once and
67 exit. It will not detach from the terminal.
68
69 -Q
70 This option is similar to the -q option, except it only prints the
71 offset without making any corrections of the clock and disables
72 server ports to allow chronyd to be started without root
73 privileges, assuming the configuration does not have any directives
74 which would require them (e.g. refclock, hwtimestamp, rtcfile,
75 etc).
76
77 -r
78 This option will try to reload and then delete files containing
79 sample histories for each of the servers and reference clocks being
80 used. The files are expected to be in the directory specified by
81 the dumpdir directive in the configuration file. This option is
82 useful if you want to stop and restart chronyd briefly for any
83 reason, e.g. to install a new version. However, it should be used
84 only on systems where the kernel can maintain clock compensation
85 whilst not under chronyd's control (i.e. Linux, FreeBSD, NetBSD,
86 illumos, and macOS 10.13 or later).
87
88 -R
89 When this option is used, the initstepslew directive and the
90 makestep directive used with a positive limit will be ignored. This
91 option is useful when restarting chronyd and can be used in
92 conjunction with the -r option.
93
94 -s
95 This option will set the system clock from the computer’s real-time
96 clock (RTC) or to the last modification time of the file specified
97 by the driftfile directive. Real-time clocks are supported only on
98 Linux.
99
100 If used in conjunction with the -r flag, chronyd will attempt to
101 preserve the old samples after setting the system clock from the
102 RTC. This can be used to allow chronyd to perform long term
103 averaging of the gain or loss rate across system reboots, and is
104 useful for systems with intermittent access to network that are
105 shut down when not in use. For this to work well, it relies on
106 chronyd having been able to determine accurate statistics for the
107 difference between the RTC and system clock last time the computer
108 was on.
109
110 If the last modification time of the drift file is later than both
111 the current time and the RTC time, the system time will be set to
112 it to restore the time when chronyd was previously stopped. This is
113 useful on computers that have no RTC or the RTC is broken (e.g. it
114 has no battery).
115
116 -t timeout
117 This option sets a timeout (in seconds) after which chronyd will
118 exit. If the clock is not synchronised, it will exit with a
119 non-zero status. This is useful with the -q or -Q option to shorten
120 the maximum time waiting for measurements, or with the -r option to
121 limit the time when chronyd is running, but still allow it to
122 adjust the frequency of the system clock.
123
124 -u user
125 This option sets the name of the system user to which chronyd will
126 switch after start in order to drop root privileges. It overrides
127 the user directive. The compiled-in default value is chrony.
128
129 On Linux, chronyd needs to be compiled with support for the libcap
130 library. On macOS, FreeBSD, NetBSD, and illumos chronyd forks into
131 two processes. The child process retains root privileges, but can
132 only perform a very limited range of privileged system calls on
133 behalf of the parent.
134
135 -U
136 This option disables a check for root privileges to allow chronyd
137 to be started under a non-root user, assuming the process will have
138 all capabilities (e.g. provided by the service manager) and access
139 to all files, directories, and devices, needed to operate correctly
140 in the specified configuration. Note that different capabilities
141 might be needed with different configurations and different Linux
142 kernel versions. Starting chronyd under a non-root user is not
143 recommended when the configuration is not known, or at least
144 limited to specific directives.
145
146 -F level
147 This option configures system call filters loaded by chronyd
148 processes if it was compiled with support for the Linux secure
149 computing (seccomp) facility. Three levels are defined: 0, 1, 2.
150 The filters are disabled at level 0. At levels 1 and 2, chronyd
151 will be killed if it makes a system call which is blocked by the
152 filters. The level can be specified as a negative number to trigger
153 the SIGSYS signal instead of SIGKILL, which can be useful for
154 debugging. The default value is 0.
155
156 At level 1, the filters allow only selected system calls that are
157 normally expected to be made by chronyd. Other system calls are
158 blocked. This level is recommended only if it is known to work on
159 the version of the system where chrony is installed. The filters
160 need to allow also system calls made by libraries that chronyd is
161 using (e.g. libc), but different versions or implementations of the
162 libraries might make different system calls. If the filters are
163 missing a system call, chronyd could be killed even in normal
164 operation.
165
166 At level 2, the filters block only a small number of specific
167 system calls (e.g. fork and exec). This approach should avoid false
168 positives, but the protection of the system against a compromised
169 chronyd process is much more limited.
170
171 The filters cannot be enabled with the mailonchange directive.
172
173 -P priority
174 On Linux, FreeBSD, NetBSD, and illumos this option will select the
175 SCHED_FIFO real-time scheduler at the specified priority (which
176 must be between 0 and 100). On macOS, this option must have either
177 a value of 0 to disable the thread time constraint policy or 1 for
178 the policy to be enabled. Other systems do not support this option.
179 The default value is 0.
180
181 -m
182 This option will lock chronyd into RAM so that it will never be
183 paged out. This mode is only supported on Linux, FreeBSD, NetBSD,
184 and illumos.
185
186 -x
187 This option disables the control of the system clock. chronyd will
188 not try to make any adjustments of the clock. It will assume the
189 clock is free running and still track its offset and frequency
190 relative to the estimated true time. This option allows chronyd to
191 be started without the capability to adjust or set the system clock
192 (e.g. in some containers) to operate as an NTP server.
193
194 -v, --version
195 With this option chronyd will print version number to the terminal
196 and exit.
197
198 -h, --help
199 With this option chronyd will print a help message to the terminal
200 and exit.
201
203 /etc/chrony.conf
204
206 chronyc(1), chrony.conf(5)
207
209 For instructions on how to report bugs, please visit
210 https://chrony-project.org/.
211
213 chrony was written by Richard Curnow, Miroslav Lichvar, and others.
214
215
216
217chrony 4.4 2023-08-09 CHRONYD(8)