cockpit-ws8
Cockpit web service
Usage
cockpit-ws [--help]
[--port
PORT]
[--address
ADDRESS]
[--no-tls]
[--for-tls-proxy]
[--local-ssh]
[--local-session
BRIDGE]
Overview
The cockpit-ws program is the web service component used for communication between the browser application and various configuration tools and services like cockpit-bridge(1).
Users or administrators should never need to start this program as it automatically started by systemd(1) on boot up, through cockpit-tls(8).
Transport security
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.
Timeout
When started via systemd(1) then cockpit-ws will exit after 90 seconds if nobody logs in, or after the last user is disconnected.
Options
-
--help -
Show help options.
-
--port PORT -
Serve HTTP requests PORT instead of port
9090. Usually Cockpit is started on demand bysystemdsocket activation, and this option has no effect. Update theListenStreamdirectivecockpit.socketfile in the usualsystemdmanner.
-
--address ADDRESS -
Bind to address ADDRESS instead of binding to all available addresses. Usually Cockpit is started on demand by
systemdsocket activation, and this option has no effect. In that case, update theListenStreamdirective in thecockpit.socketfile in the usualsystemdmanner.
-
--no-tls -
Disable http to https redirection.
-
--for-tls-proxy -
Tell
cockpit-wsthat it is running behind a local reverse proxy that does the TLS termination. Then Cockpit puts https:// URLs into the defaultContent-Security-Policy, and accepts only https:// origins, instead of http: ones by default. However, ifOriginsis set in the cockpit.conf(5) configuration file, it will override this default.
-
--local-ssh -
Normally
cockpit-wsusescockpit-sessionand PAM to authenticate the user and start a user session. With this option enabled, it will instead authenticate via SSH at127.0.0.1port22.
-
--local-session BRIDGE -
Skip all authentication and
cockpit-session, and launch thecockpit-bridgespecified 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 thiscockpit-wsprocess. 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 this.
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 theXDG <https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html> basedir spec" to find its cockpit.conf(5) configuration file.
In addition the XDG_DATA_DIRS environment variable from theXDG <https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html> 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.
Releases
5 releases since Debian 10 (Buster); the text changed 4 times.
--for-tls-proxy since Debian 11 (Bullseye).
--proxy-tls-redirect until Debian 11 (Bullseye).