2025-12-02 03:16:34 -09:00
|
|
|
= cockpit-ws(8)
|
2025-12-02 03:08:41 -09:00
|
|
|
|
2025-12-02 03:16:34 -09:00
|
|
|
== Name
|
2025-12-02 03:08:41 -09:00
|
|
|
|
2025-12-02 03:16:34 -09:00
|
|
|
cockpit-ws - Cockpit web service
|
2025-12-02 03:08:41 -09:00
|
|
|
|
2025-12-02 03:16:34 -09:00
|
|
|
== Synopsis
|
2025-12-02 03:08:41 -09:00
|
|
|
|
2025-12-02 03:16:34 -09:00
|
|
|
*cockpit-ws* [*--help*] [*--port* _PORT_] [*--address* _ADDRESS_] [*--no-tls*]
|
|
|
|
|
[*--for-tls-proxy*] [*--local-ssh*] [*--local-session* _BRIDGE_]
|
2025-12-02 03:08:41 -09:00
|
|
|
|
2025-12-02 03:16:34 -09:00
|
|
|
== Description
|
2025-12-02 03:08:41 -09:00
|
|
|
|
2025-12-02 03:16:34 -09:00
|
|
|
The *cockpit-ws* program is the web service component used for
|
2025-12-02 03:08:41 -09:00
|
|
|
communication between the browser application and various configuration
|
2025-12-02 03:16:34 -09:00
|
|
|
tools and services like *cockpit-bridge(1)*.
|
2025-12-02 03:08:41 -09:00
|
|
|
|
|
|
|
|
Users or administrators should never need to start this program as it
|
2025-12-02 03:16:34 -09:00
|
|
|
automatically started by *systemd(1)* on bootup, through
|
|
|
|
|
*cockpit-tls(8)*.
|
2025-12-02 03:08:41 -09:00
|
|
|
|
2025-12-02 03:16:34 -09:00
|
|
|
== Transport security
|
2025-12-02 03:08:41 -09:00
|
|
|
|
2025-12-02 03:16:34 -09:00
|
|
|
*cockpit-ws* is normally run behind the *cockpit-tls* TLS
|
|
|
|
|
terminating proxy, and only deals with unencrypted HTTP by itself. But
|
|
|
|
|
for backwards compatibility it can also handle TLS connections by itself
|
|
|
|
|
when being run directly. For details how to configure certificates,
|
|
|
|
|
please refer to the *cockpit-tls(8)* documentation.
|
2025-12-02 03:08:41 -09:00
|
|
|
|
2025-12-02 03:16:34 -09:00
|
|
|
== Timeout
|
2025-12-02 03:08:41 -09:00
|
|
|
|
2025-12-02 03:16:34 -09:00
|
|
|
When started via *systemd(1)* then *cockpit-ws* will exit after 90
|
2025-12-02 03:08:41 -09:00
|
|
|
seconds if nobody logs in, or after the last user is disconnected.
|
|
|
|
|
|
2025-12-02 03:16:34 -09:00
|
|
|
== Options
|
2025-12-02 03:08:41 -09:00
|
|
|
|
2025-12-02 03:16:34 -09:00
|
|
|
*--help*::
|
2025-12-02 03:08:41 -09:00
|
|
|
Show help options.
|
2025-12-02 03:16:34 -09:00
|
|
|
*--port* _PORT_::
|
|
|
|
|
Serve HTTP requests _PORT_ instead of port *9090*. Usually Cockpit is
|
|
|
|
|
started on demand by *systemd* socket activation, and this option
|
|
|
|
|
has no effect. Update the *ListenStream* directive
|
|
|
|
|
*cockpit.socket* file in the usual *systemd* manner.
|
|
|
|
|
*--address* _ADDRESS_::
|
|
|
|
|
Bind to address _ADDRESS_ instead of binding to all available
|
|
|
|
|
addresses. Usually Cockpit is started on demand by *systemd* socket
|
2025-12-02 03:08:41 -09:00
|
|
|
activation, and this option has no effect. In that case, update the
|
2025-12-02 03:16:34 -09:00
|
|
|
*ListenStream* directive in the *cockpit.socket* file in the usual
|
|
|
|
|
*systemd* manner.
|
|
|
|
|
*--no-tls*::
|
2026-01-21 22:28:49 -09:00
|
|
|
Disable http to https redirection.
|
2025-12-02 03:16:34 -09:00
|
|
|
*--for-tls-proxy*::
|
|
|
|
|
Tell *cockpit-ws* that it is running behind a local reverse proxy
|
|
|
|
|
that does the TLS termination. Then Cockpit puts https:// URLs into
|
|
|
|
|
the default *Content-Security-Policy*, and accepts only https://
|
|
|
|
|
origins, instead of http: ones by default. However, if *Origins* is
|
|
|
|
|
set in the *cockpit.conf(5)* configuration file, it will override
|
|
|
|
|
this default.
|
|
|
|
|
*--local-ssh*::
|
|
|
|
|
Normally *cockpit-ws* uses *cockpit-session* and PAM to
|
|
|
|
|
authenticate the user and start a user session. With this option
|
|
|
|
|
enabled, it will instead authenticate via SSH at *127.0.0.1* port
|
|
|
|
|
*22*.
|
|
|
|
|
*--local-session* _BRIDGE_::
|
|
|
|
|
Skip all authentication and *cockpit-session*, and launch the
|
|
|
|
|
*cockpit-bridge* specified in _BRIDGE_ in the local session. If the
|
|
|
|
|
_BRIDGE_ is specified as `+-+` then expect an already running bridge
|
|
|
|
|
that is connected to stdin and stdout of this *cockpit-ws* process.
|
|
|
|
|
This allows the web server to run as any unprivileged user in an
|
|
|
|
|
already running session. +
|
|
|
|
|
+
|
|
|
|
|
This mode implies *--no-tls*, thus you need to use http:// URLs with
|
2025-12-02 03:08:41 -09:00
|
|
|
this.
|
2025-12-02 03:16:34 -09:00
|
|
|
[WARNING]
|
|
|
|
|
====
|
|
|
|
|
With *--local-session* _BRIDGE_, you _have to isolate the opened TCP port_ somehow
|
|
|
|
|
(for example in a network namespace), otherwise all other users (or
|
|
|
|
|
even remote machines if the port is not just listening on localhost)
|
|
|
|
|
can access the session!
|
|
|
|
|
====
|
|
|
|
|
|
|
|
|
|
== Environment
|
|
|
|
|
|
|
|
|
|
The *cockpit-ws* process will use the *XDG_CONFIG_DIRS* environment
|
|
|
|
|
variable from the
|
2025-12-02 03:08:41 -09:00
|
|
|
https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html[XDG
|
2025-12-02 03:16:34 -09:00
|
|
|
basedir spec] to find its *cockpit.conf(5)* configuration file.
|
2025-12-02 03:08:41 -09:00
|
|
|
|
2025-12-02 03:16:34 -09:00
|
|
|
In addition the *XDG_DATA_DIRS* environment variable from the
|
2025-12-02 03:08:41 -09:00
|
|
|
https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html[XDG
|
|
|
|
|
basedir spec] can be used to override the location to serve static files
|
|
|
|
|
from. These are the files that are served to a non-logged in user.
|
|
|
|
|
|
2025-12-02 03:16:34 -09:00
|
|
|
== Bugs
|
2025-12-02 03:08:41 -09:00
|
|
|
|
2025-12-02 03:16:34 -09:00
|
|
|
include::partials/bugs.adoc[]
|
2025-12-02 03:08:41 -09:00
|
|
|
|
2025-12-02 03:16:34 -09:00
|
|
|
== Author
|
2025-12-02 03:08:41 -09:00
|
|
|
|
2025-12-02 03:16:34 -09:00
|
|
|
include::partials/author.adoc[]
|
2025-12-02 03:08:41 -09:00
|
|
|
|
2025-12-02 03:16:34 -09:00
|
|
|
== See also
|
2025-12-02 03:08:41 -09:00
|
|
|
|
2025-12-02 03:16:34 -09:00
|
|
|
*cockpit-tls(8)* , *cockpit.conf(5)* , *systemd(1)*
|