Debian Codegraph @

doc/output/man/cockpit.conf.5

raw
1 '\" t
2 .\" Title: cockpit.conf
3 .\" Author: [see the "AUTHOR(S)" section]
4 .\" Generator: Asciidoctor 2.0.26
5 .\" Date: 2026-09-23
6 .\" Manual: cockpit
7 .\" Source: cockpit
8 .\" Language: English
9 .\"
10 .TH "COCKPIT.CONF" "5" "2026-09-23" "cockpit" "cockpit"
11 .ie \n(.g .ds Aq \(aq
12 .el .ds Aq '
13 .ss \n[.ss] 0
14 .nh
15 .ad l
16 .de URL
17 \fI\\$2\fP <\\$1>\\$3
18 ..
19 .als MTO URL
20 .if \n[.g] \{\
21 . mso www.tmac
22 . am URL
23 . ad l
24 . .
25 . am MTO
26 . ad l
27 . .
28 . LINKSTYLE blue R < >
29 .\}
30 .SH "NAME"
31 cockpit.conf \- Cockpit configuration file
32 .SH "DESCRIPTION"
33 .sp
34 Cockpit can be configured via /etc/cockpit/cockpit.conf. If
35 \fB$XDG_CONFIG_DIRS\fP is set, then the first path containing a
36 \fB../cockpit/cockpit.conf\fP is used instead. Other configuration files
37 and directories are searched for in the same way.
38 .sp
39 This file is not required and may need to be created manually. The file
40 has a INI file syntax and thus contains key / value pairs, grouped into
41 topical groups. See the examples below for details.
42 .sp
43 Note: The port that cockpit listens on cannot be changed in this file.
44 To change the port change the systemd \fBcockpit.socket\fP file.
45 .SH "WEBSERVICE"
46 .sp
47 \fBOrigins\fP
48 .RS 4
49 By default cockpit will not accept crossdomain websocket connections.
50 Use this setting to allow access from alternate domains. Origins
51 should include scheme, host and port, if necessary. Wildcards and glob
52 expressions are permitted. IPv6 addresses must have their brackets escaped
53 with backslashes (e.g. \f(CR\(rs[::1\(rs]\fP) as they are matched using \f(CRfnmatch()\fP.
54
55 .br
56 .RE
57 .sp
58 .if n .RS 4
59 .nf
60 .fam C
61 [WebService]
62 Origins = https://somedomain1.com https://somedomain2.com:9090 https://*.somedomain3.com https://\(rs[::1\(rs]:9090
63 .fam
64 .fi
65 .if n .RE
66 .sp
67 \fBProtocolHeader\fP
68 .RS 4
69 Configure cockpit to look at the contents of this header to determine
70 if a connection is using tls. This should only be used when cockpit is
71 behind a reverse proxy, and care should be taken to make sure that
72 incoming requests cannot set this header.
73
74 .br
75 .RE
76 .sp
77 .if n .RS 4
78 .nf
79 .fam C
80 [WebService]
81 ProtocolHeader = X\-Forwarded\-Proto
82 .fam
83 .fi
84 .if n .RE
85 .sp
86 \fBForwardedForHeader\fP
87 .RS 4
88 Configure cockpit to look at the contents of this header to determine
89 the real origin of a connection. This should only be used when cockpit
90 is behind a reverse proxy, and care should be taken to make sure that
91 incoming requests cannot set this header.
92
93 .br
94 .RE
95 .sp
96 .if n .RS 4
97 .nf
98 .fam C
99 [WebService]
100 ForwardedForHeader = X\-Forwarded\-For
101 .fam
102 .fi
103 .if n .RE
104 .sp
105 \fBLoginTitle\fP
106 .RS 4
107 Set the browser title for the login screen.
108 .RE
109 .sp
110 \fBLoginTo\fP
111 .RS 4
112 When set to \f(CRtrue\fP the \fIConnect to\fP option on the login screen is
113 visible and allows logging into another server. When set to \f(CRfalse\fP,
114 direct remote logins are disallowed. If this option is not specified
115 then it will be automatically detected based on whether the
116 \fBcockpit\-bridge\fP package is installed and the \fBssh\fP program is
117 available.
118 .br
119
120 .br
121 If cockpit\-ws is exposed to the public internet, and also has access
122 to a private internal network, it is recommended to explicitly set
123 \fBLoginTo=false\fP. This prevents unauthenticated remote attackers from
124 scanning the internal network for existing machines and open ports.
125 .RE
126 .sp
127 \fBRequireHost\fP
128 .RS 4
129 When set to \f(CRtrue\fP cockpit will require users to use the \fIConnect
130 to\fP option to specify the host to log into.
131 .RE
132 .sp
133 \fBAllowMultiHost\fP
134 .RS 4
135 When set to \f(CRtrue\fP, cockpit will allow users to connect to multiple
136 hosts in one session. The default is OS specific.
137 .br
138
139 .br
140 When connecting to multiple servers, JavaScript runs without
141 isolation. All systems will be vulnerable to potential attacks from
142 other connected hosts. Enable this option \fIonly\fP when all hosts are
143 trusted.
144 .RE
145 .sp
146 \fBMaxStartups\fP
147 .RS 4
148 Same as the \fBsshd\fP configuration option by the same name. Specifies
149 the maximum number of concurrent login attempts allowed. Additional
150 connections will be dropped until authentication succeeds or the
151 connections are closed. Defaults to 10.
152 .br
153
154 .br
155 Alternatively, random early drop can be enabled by specifying the
156 three colon separated values \fBstart:rate:full\fP (e.g. "10:30:60").
157 Cockpit will start refusing authentication attempts with a probability
158 of \fBrate/100\fP (30%) if there are currently \fBstart\fP (10)
159 unauthenticated connections. The probability increases linearly and
160 all connection attempts are refused if the number of unauthenticated
161 connections reaches \fBfull\fP (60).
162 .RE
163 .sp
164 \fBMaxConcurrentConnections\fP
165 .RS 4
166 Limits the number of concurrent HTTP connections on the Cockpit port.
167 Connection attempts that exceed this limit are rejected early on
168 without reading a single byte. This can be used during brute\-force
169 attacks. It differs from \fBMaxStartups\fP, which protects against too
170 many concurrent authentication attempts. Defaults to 500.
171 .RE
172 .sp
173 \fBAllowUnencrypted\fP
174 .RS 4
175 If true, cockpit will accept unencrypted HTTP connections. Otherwise,
176 it redirects all HTTP connections to HTTPS. Exceptions are connections
177 from localhost and for certain URLs (like \fB/ping\fP). Defaults to
178 false.
179 .RE
180 .sp
181 \fBUrlRoot\fP
182 .RS 4
183 The root URL where you will be serving cockpit. When provided cockpit
184 will expect all requests to be prefixed with the given url. This is
185 mostly useful when you are using cockpit behind a reverse proxy, such
186 as nginx. \f(CR/cockpit/\fP and \f(CR/cockpit+\fP are reserved and should not
187 be used. For example \f(CR/cockpit\-new/\fP is ok. \f(CR/cockpit/\fP and
188 \f(CR/cockpit+new/\fP are not.
189 .RE
190 .sp
191 \fBClientCertAuthentication\fP
192 .RS 4
193 If true, enable TLS client certificates for authenticating users.
194 Commonly these are provided by a smart card, but it\(cqs equally possible
195 to import certificates directly into the web browser. Please see the
196 \c
197 .URL "https://docs.cockpit\-project.org/cockpit\-guide/latest/guide/cert\-authentication.html" "Certificate/smart
198 card authentication" section in the Cockpit guide for details.
199 .RE
200 .sp
201 \fBShell\fP
202 .RS 4
203 The relative URL to top level component to display in Cockpit once
204 logged in. Defaults to \f(CR/shell/index.html\fP
205 .RE
206 .sp
207 \fBCustomLoginPage\fP
208 .RS 4
209 Load the login page from an alternative directory. The directory must
210 contain a \f(CRlogin.html\fP and optionally a \f(CRpo.js\fP file for translations.
211 When not set, the hardcoded \f(CR$prefix/share/cockpit/static\fP directory is used.
212 .RE
213 .SH "LOG"
214 .sp
215 \fBFatal\fP
216 .RS 4
217 The kind of log messages in the bridge to treat as fatal. Separate
218 multiple values with spaces. Relevant values are: \fBcriticals\fP and
219 \fBwarnings\fP.
220 .RE
221 .SH "OAUTH"
222 .sp
223 Cockpit can be configured to support the
224 .URL "https://tools.ietf.org/html/rfc6749#section\-4.2" "implicit grant" ""
225 OAuth
226 authorization flow. When successful the resulting oauth token will be
227 passed to cockpit\-ws using the \fBBearer\fP auth\-scheme. For a login to be
228 successful, cockpit will also need a to be configured to verify and
229 allow \fBBearer\fP tokens.
230 .sp
231 \fBURL\fP
232 .RS 4
233 This is the url that cockpit will redirect the users browser to when
234 it needs to obtain an oauth token. Cockpit will add a redirect_uri
235 parameter to the url with the location of where the oauth provider
236 should redirect to once a token has been obtained.
237 .RE
238 .sp
239 \fBErrorParam\fP
240 .RS 4
241 When a oauth provider redirects a user back to cockpit, look for this
242 parameter in the querystring or fragment portion of the url to find a
243 error message. When not provided it will default to
244 \fBerror_description\fP
245 .RE
246 .sp
247 \fBTokenParam\fP
248 .RS 4
249 When a oauth provider redirects a user back to cockpit, look for this
250 parameter in the querystring or fragment portion of the url to find
251 the access token. When not provided it will default to
252 \fBaccess_token\fP
253 .RE
254 .SH "SESSION"
255 .sp
256 \fBBanner\fP
257 .RS 4
258 The contents of the specified file (commonly \fB/etc/issue\fP) are shown
259 on the login page. By default, no banner is displayed.
260 .RE
261 .sp
262 \fBIdleTimeout\fP
263 .RS 4
264 Time in minutes after which session expires and user is logged out if
265 no user action has been performed in the given time. This idle timeout
266 only applies to interactive password logins. With non\-interactive
267 authentication methods like Kerberos, OAuth, or certificate login, the
268 browser cannot forget credentials, and thus automatic logouts are not
269 useful for protecting credentials of forgotten sessions. Set to \fB0\fP
270 to disable session timeout.
271
272 .br
273 .RE
274 .sp
275 .if n .RS 4
276 .nf
277 .fam C
278 [Session]
279 IdleTimeout=15
280 .fam
281 .fi
282 .if n .RE
283 .sp
284
285 .RS 4
286 When not specified, there is no idle timeout by default.
287 .RE
288 .sp
289 \fBWarnBeforeConnecting\fP
290 .RS 4
291 Whether to warn before connecting to remote hosts from the Shell.
292 Defaults to true.
293
294 .br
295 .RE
296 .sp
297 .if n .RS 4
298 .nf
299 .fam C
300 [Session]
301 WarnBeforeConnecting=false
302 .fam
303 .fi
304 .if n .RE
305 .SH "BUGS"
306 .sp
307 Please send bug reports to either the distribution bug tracker or the \c
308 .URL "https://github.com/cockpit\-project/cockpit/issues/new" "upstream bug tracker" "."
309 .SH "AUTHOR"
310 .sp
311 Cockpit has been written by many
312 .URL "https://github.com/cockpit\-project/cockpit" "contributors" "."
313 .SH "SEE ALSO"
314 .sp
315 \fBcockpit\-ws\fP(8), \fBcockpit\-tls\fP(8)