| 1 |
'\" t |
| 2 |
.\" Title: cockpit-ws |
| 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\-WS" "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-ws \- Cockpit web service |
| 32 |
.SH "SYNOPSIS" |
| 33 |
.sp |
| 34 |
\fBcockpit\-ws\fP [\fB\-\-help\fP] [\fB\-\-port\fP \fIPORT\fP] [\fB\-\-address\fP \fIADDRESS\fP] [\fB\-\-no\-tls\fP] |
| 35 |
[\fB\-\-for\-tls\-proxy\fP] [\fB\-\-local\-ssh\fP] [\fB\-\-local\-session\fP \fIBRIDGE\fP] |
| 36 |
.SH "DESCRIPTION" |
| 37 |
.sp |
| 38 |
The \fBcockpit\-ws\fP program is the web service component used for |
| 39 |
communication between the browser application and various configuration |
| 40 |
tools and services like \fBcockpit\-bridge\fP(1). |
| 41 |
.sp |
| 42 |
Users or administrators should never need to start this program as it |
| 43 |
automatically started by \fBsystemd\fP(1) on boot up, through |
| 44 |
\fBcockpit\-tls\fP(8). |
| 45 |
.SH "TRANSPORT SECURITY" |
| 46 |
.sp |
| 47 |
\fBcockpit\-ws\fP is normally run behind the \fBcockpit\-tls\fP TLS |
| 48 |
terminating proxy, and only deals with unencrypted HTTP by itself. But |
| 49 |
for backwards compatibility it can also handle TLS connections by itself |
| 50 |
when being run directly. For details how to configure certificates, |
| 51 |
please refer to the \fBcockpit\-tls\fP(8) documentation. |
| 52 |
.SH "TIMEOUT" |
| 53 |
.sp |
| 54 |
When started via \fBsystemd\fP(1) then \fBcockpit\-ws\fP will exit after 90 |
| 55 |
seconds if nobody logs in, or after the last user is disconnected. |
| 56 |
.SH "OPTIONS" |
| 57 |
.sp |
| 58 |
\fB\-\-help\fP |
| 59 |
.RS 4 |
| 60 |
Show help options. |
| 61 |
.RE |
| 62 |
.sp |
| 63 |
\fB\-\-port\fP \fIPORT\fP |
| 64 |
.RS 4 |
| 65 |
Serve HTTP requests \fIPORT\fP instead of port \fB9090\fP. Usually Cockpit is |
| 66 |
started on demand by \fBsystemd\fP socket activation, and this option |
| 67 |
has no effect. Update the \fBListenStream\fP directive |
| 68 |
\fBcockpit.socket\fP file in the usual \fBsystemd\fP manner. |
| 69 |
.RE |
| 70 |
.sp |
| 71 |
\fB\-\-address\fP \fIADDRESS\fP |
| 72 |
.RS 4 |
| 73 |
Bind to address \fIADDRESS\fP instead of binding to all available |
| 74 |
addresses. Usually Cockpit is started on demand by \fBsystemd\fP socket |
| 75 |
activation, and this option has no effect. In that case, update the |
| 76 |
\fBListenStream\fP directive in the \fBcockpit.socket\fP file in the usual |
| 77 |
\fBsystemd\fP manner. |
| 78 |
.RE |
| 79 |
.sp |
| 80 |
\fB\-\-no\-tls\fP |
| 81 |
.RS 4 |
| 82 |
Disable http to https redirection. |
| 83 |
.RE |
| 84 |
.sp |
| 85 |
\fB\-\-for\-tls\-proxy\fP |
| 86 |
.RS 4 |
| 87 |
Tell \fBcockpit\-ws\fP that it is running behind a local reverse proxy |
| 88 |
that does the TLS termination. Then Cockpit puts https:// URLs into |
| 89 |
the default \fBContent\-Security\-Policy\fP, and accepts only https:// |
| 90 |
origins, instead of http: ones by default. However, if \fBOrigins\fP is |
| 91 |
set in the \fBcockpit.conf\fP(5) configuration file, it will override |
| 92 |
this default. |
| 93 |
.RE |
| 94 |
.sp |
| 95 |
\fB\-\-local\-ssh\fP |
| 96 |
.RS 4 |
| 97 |
Normally \fBcockpit\-ws\fP uses \fBcockpit\-session\fP and PAM to |
| 98 |
authenticate the user and start a user session. With this option |
| 99 |
enabled, it will instead authenticate via SSH at \fB127.0.0.1\fP port |
| 100 |
\fB22\fP. |
| 101 |
.RE |
| 102 |
.sp |
| 103 |
\fB\-\-local\-session\fP \fIBRIDGE\fP |
| 104 |
.RS 4 |
| 105 |
Skip all authentication and \fBcockpit\-session\fP, and launch the |
| 106 |
\fBcockpit\-bridge\fP specified in \fIBRIDGE\fP in the local session. If the |
| 107 |
\fIBRIDGE\fP is specified as \f(CR\-\fP then expect an already running bridge |
| 108 |
that is connected to stdin and stdout of this \fBcockpit\-ws\fP process. |
| 109 |
This allows the web server to run as any unprivileged user in an |
| 110 |
already running session. |
| 111 |
.br |
| 112 |
|
| 113 |
.br |
| 114 |
This mode implies \fB\-\-no\-tls\fP, thus you need to use http:// URLs with |
| 115 |
this. |
| 116 |
.RE |
| 117 |
.if n .sp |
| 118 |
.RS 4 |
| 119 |
.it 1 an-trap |
| 120 |
.nr an-no-space-flag 1 |
| 121 |
.nr an-break-flag 1 |
| 122 |
.br |
| 123 |
.ps +1 |
| 124 |
.B Warning |
| 125 |
.ps -1 |
| 126 |
.br |
| 127 |
.sp |
| 128 |
With \fB\-\-local\-session\fP \fIBRIDGE\fP, you \fIhave to isolate the opened TCP port\fP somehow |
| 129 |
(for example in a network namespace), otherwise all other users (or |
| 130 |
even remote machines if the port is not just listening on localhost) |
| 131 |
can access the session! |
| 132 |
.sp .5v |
| 133 |
.RE |
| 134 |
.SH "ENVIRONMENT" |
| 135 |
.sp |
| 136 |
The \fBcockpit\-ws\fP process will use the \fBXDG_CONFIG_DIRS\fP environment |
| 137 |
variable from the |
| 138 |
\c |
| 139 |
.URL "https://specifications.freedesktop.org/basedir\-spec/basedir\-spec\-latest.html" "XDG |
| 140 |
basedir spec" to find its \fBcockpit.conf\fP(5) configuration file. |
| 141 |
.sp |
| 142 |
In addition the \fBXDG_DATA_DIRS\fP environment variable from the |
| 143 |
\c |
| 144 |
.URL "https://specifications.freedesktop.org/basedir\-spec/basedir\-spec\-latest.html" "XDG |
| 145 |
basedir spec" can be used to override the location to serve static files |
| 146 |
from. These are the files that are served to a non\-logged in user. |
| 147 |
.SH "BUGS" |
| 148 |
.sp |
| 149 |
Please send bug reports to either the distribution bug tracker or the \c |
| 150 |
.URL "https://github.com/cockpit\-project/cockpit/issues/new" "upstream bug tracker" "." |
| 151 |
.SH "AUTHOR" |
| 152 |
.sp |
| 153 |
Cockpit has been written by many |
| 154 |
.URL "https://github.com/cockpit\-project/cockpit" "contributors" "." |
| 155 |
.SH "SEE ALSO" |
| 156 |
.sp |
| 157 |
\fBcockpit\-tls\fP(8) , \fBcockpit.conf\fP(5) , \fBsystemd\fP(1) |