| 1 |
'\" t |
| 2 |
.\" Title: cockpit-tls |
| 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\-TLS" "8" "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-tls \- TLS proxy for Cockpit web service |
| 32 |
.SH "SYNOPSIS" |
| 33 |
.sp |
| 34 |
\fBcockpit\-tls\fP [\fB\-\-help\fP] [\fB\-\-port\fP \fIPORT\fP] [\fB\-\-no\-tls\fP] [\fB\-\-idle\-timeout\fP \fISECONDS\fP] |
| 35 |
.SH "DESCRIPTION" |
| 36 |
.sp |
| 37 |
The \fBcockpit\-tls\fP program is a TLS terminating HTTP proxy for |
| 38 |
\fBcockpit\-ws\fP(8). It manages a set of isolated cockpit\-ws instances, |
| 39 |
one per TLS client certificate, plus one for TLS without a client |
| 40 |
certificate, and one for unencrypted HTTP. With that, one session cannot |
| 41 |
tamper with another one through possible security vulnerability |
| 42 |
exploits. |
| 43 |
.sp |
| 44 |
Users or administrators should never need to start this program as it |
| 45 |
automatically started by \fBsystemd\fP(1) via socket activation. |
| 46 |
.SH "TRANSPORT SECURITY" |
| 47 |
.sp |
| 48 |
To specify the TLS certificate the web service should use, simply drop a |
| 49 |
file with the extension \fB.cert\fP in the \fB/etc/cockpit/ws\-certs.d\fP |
| 50 |
directory, or below \fB$XDG_CONFIG_DIRS\fP if set (see |
| 51 |
\fBcockpit.conf\fP(5)). If there are multiple files |
| 52 |
in this directory, then the highest priority one is chosen after |
| 53 |
sorting. |
| 54 |
.sp |
| 55 |
The \fB.cert\fP file should contain at least two OpenSSL style PEM blocks. |
| 56 |
First one or more \f(CRBEGIN CERTIFICATE\fP blocks for the server |
| 57 |
certificate and intermediate certificate authorities and a second one |
| 58 |
containing a \f(CRBEGIN PRIVATE KEY\fP or similar. The key must not be |
| 59 |
encrypted. |
| 60 |
.sp |
| 61 |
If there is no TLS certificate, a self\-signed certificate is |
| 62 |
automatically generated using \fBsscg\fP (if available) or \fBopenssl\fP and |
| 63 |
stored in the \fB0\-self\-signed.cert\fP file. |
| 64 |
.sp |
| 65 |
When enrolling into a FreeIPA domain, an SSL certificate is requested |
| 66 |
from the IPA server and stored in \fB10\-ipa.cert\fP. |
| 67 |
.sp |
| 68 |
To check which certificate \fBcockpit\-ws\fP will use, run the following |
| 69 |
command. |
| 70 |
.sp |
| 71 |
.if n .RS 4 |
| 72 |
.nf |
| 73 |
.fam C |
| 74 |
$ sudo /usr/libexec/cockpit\-certificate\-ensure \-\-check |
| 75 |
.fam |
| 76 |
.fi |
| 77 |
.if n .RE |
| 78 |
.sp |
| 79 |
Or, on Debian\-based systems: |
| 80 |
.sp |
| 81 |
.if n .RS 4 |
| 82 |
.nf |
| 83 |
.fam C |
| 84 |
$ sudo /usr/lib/cockpit/cockpit\-certificate\-ensure \-\-check |
| 85 |
.fam |
| 86 |
.fi |
| 87 |
.if n .RE |
| 88 |
.sp |
| 89 |
If using \fBcertmonger\fP to manage certificates, following command can be |
| 90 |
used to generate a certificate/key pair: |
| 91 |
.sp |
| 92 |
.if n .RS 4 |
| 93 |
.nf |
| 94 |
.fam C |
| 95 |
CERT_FILE=/etc/cockpit/ws\-certs.d/50\-certmonger.crt |
| 96 |
KEY_FILE=/etc/cockpit/ws\-certs.d/50\-certmonger.key |
| 97 |
|
| 98 |
getcert request \-f ${CERT_FILE} \-k ${KEY_FILE} \-D $(hostname \-\-fqdn) |
| 99 |
.fam |
| 100 |
.fi |
| 101 |
.if n .RE |
| 102 |
.SH "OPTIONS" |
| 103 |
.sp |
| 104 |
\fB\-\-help\fP |
| 105 |
.RS 4 |
| 106 |
Show help options. |
| 107 |
.RE |
| 108 |
.sp |
| 109 |
\fB\-\-port\fP \fIPORT\fP |
| 110 |
.RS 4 |
| 111 |
Serve HTTP requests on \fIPORT\fP instead of port 9090. Usually Cockpit is |
| 112 |
started on demand by \fBsystemd\fP socket activation, and this option |
| 113 |
has no effect. Update the \fBListenStream\fP directive |
| 114 |
\fBcockpit.socket\fP file in the usual \fBsystemd\fP manner. |
| 115 |
.RE |
| 116 |
.sp |
| 117 |
\fB\-\-no\-tls\fP |
| 118 |
.RS 4 |
| 119 |
Don\(cqt use TLS. Certificates will not be read, and https connections |
| 120 |
denied. Then \fBcockpit\-tls\fP will only manage a single cockpit\-ws |
| 121 |
instance, and thus not do anything different than running |
| 122 |
\fBcockpit\-ws \-\-no\-tls\fP directly. Only use this for debugging or |
| 123 |
testing. |
| 124 |
.RE |
| 125 |
.sp |
| 126 |
\fB\-\-idle\-timeout\fP \fISECONDS\fP |
| 127 |
.RS 4 |
| 128 |
If greater than 0, exit if no connections have happened for the given |
| 129 |
number of seconds, i. e. the server is idle. If not given, the default |
| 130 |
is 90. |
| 131 |
.RE |
| 132 |
.SH "ENVIRONMENT" |
| 133 |
.sp |
| 134 |
The \fBcockpit\-tls\fP program expects the \fBRUNTIME_DIRECTORY\fP |
| 135 |
environment variable to be set to an empty directory (preferably in |
| 136 |
\fB/run/\fP) that is only accessible by the system user under which it is |
| 137 |
running. This contains the Unix sockets for communicating with the |
| 138 |
\fBcockpit\-ws\fP instances, and in the future, state information about |
| 139 |
client certificates. This variable is normally set by the |
| 140 |
\fBcockpit.service\fP systemd unit. |
| 141 |
.sp |
| 142 |
In addition, \fBcockpit\-tls\fP will use the \fBXDG_CONFIG_DIRS\fP |
| 143 |
environment variable from the |
| 144 |
\c |
| 145 |
.URL "https://specifications.freedesktop.org/basedir\-spec/basedir\-spec\-latest.html" "XDG |
| 146 |
basedir spec" to find its certificates and the \fBcockpit.conf\fP(5) |
| 147 |
configuration file. |
| 148 |
.SH "BUGS" |
| 149 |
.sp |
| 150 |
Please send bug reports to either the distribution bug tracker or the \c |
| 151 |
.URL "https://github.com/cockpit\-project/cockpit/issues/new" "upstream bug tracker" "." |
| 152 |
.SH "AUTHOR" |
| 153 |
.sp |
| 154 |
Cockpit has been written by many |
| 155 |
.URL "https://github.com/cockpit\-project/cockpit" "contributors" "." |
| 156 |
.SH "SEE ALSO" |
| 157 |
.sp |
| 158 |
\fBcockpit\-ws\fP(8) , \fBcockpit.conf\fP(5) , \fBsystemd\fP(1) |