Debian Codegraph @

doc/modules/man/pages/cockpit-ws.8.adoc

raw
1 = cockpit-ws(8)
2
3 == Name
4
5 cockpit-ws - Cockpit web service
6
7 == Synopsis
8
9 *cockpit-ws* [*--help*] [*--port* _PORT_] [*--address* _ADDRESS_] [*--no-tls*]
10 [*--for-tls-proxy*] [*--local-ssh*] [*--local-session* _BRIDGE_]
11
12 == Description
13
14 The *cockpit-ws* program is the web service component used for
15 communication between the browser application and various configuration
16 tools and services like man:cockpit-bridge[1].
17
18 Users or administrators should never need to start this program as it
19 automatically started by man:systemd[1] on boot up, through
20 man:cockpit-tls[8].
21
22 == Transport security
23
24 *cockpit-ws* is normally run behind the *cockpit-tls* TLS
25 terminating proxy, and only deals with unencrypted HTTP by itself. But
26 for backwards compatibility it can also handle TLS connections by itself
27 when being run directly. For details how to configure certificates,
28 please refer to the man:cockpit-tls[8] documentation.
29
30 == Timeout
31
32 When started via man:systemd[1] then *cockpit-ws* will exit after 90
33 seconds if nobody logs in, or after the last user is disconnected.
34
35 == Options
36
37 *--help*::
38 Show help options.
39 *--port* _PORT_::
40 Serve HTTP requests _PORT_ instead of port *9090*. Usually Cockpit is
41 started on demand by *systemd* socket activation, and this option
42 has no effect. Update the *ListenStream* directive
43 *cockpit.socket* file in the usual *systemd* manner.
44 *--address* _ADDRESS_::
45 Bind to address _ADDRESS_ instead of binding to all available
46 addresses. Usually Cockpit is started on demand by *systemd* socket
47 activation, and this option has no effect. In that case, update the
48 *ListenStream* directive in the *cockpit.socket* file in the usual
49 *systemd* manner.
50 *--no-tls*::
51 Disable http to https redirection.
52 *--for-tls-proxy*::
53 Tell *cockpit-ws* that it is running behind a local reverse proxy
54 that does the TLS termination. Then Cockpit puts https:// URLs into
55 the default *Content-Security-Policy*, and accepts only https://
56 origins, instead of http: ones by default. However, if *Origins* is
57 set in the man:cockpit.conf[5] configuration file, it will override
58 this default.
59 *--local-ssh*::
60 Normally *cockpit-ws* uses *cockpit-session* and PAM to
61 authenticate the user and start a user session. With this option
62 enabled, it will instead authenticate via SSH at *127.0.0.1* port
63 *22*.
64 *--local-session* _BRIDGE_::
65 Skip all authentication and *cockpit-session*, and launch the
66 *cockpit-bridge* specified in _BRIDGE_ in the local session. If the
67 _BRIDGE_ is specified as `+-+` then expect an already running bridge
68 that is connected to stdin and stdout of this *cockpit-ws* process.
69 This allows the web server to run as any unprivileged user in an
70 already running session. +
71 +
72 This mode implies *--no-tls*, thus you need to use http:// URLs with
73 this.
74 [WARNING]
75 ====
76 With *--local-session* _BRIDGE_, you _have to isolate the opened TCP port_ somehow
77 (for example in a network namespace), otherwise all other users (or
78 even remote machines if the port is not just listening on localhost)
79 can access the session!
80 ====
81
82 == Environment
83
84 The *cockpit-ws* process will use the *XDG_CONFIG_DIRS* environment
85 variable from the
86 https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html[XDG
87 basedir spec] to find its man:cockpit.conf[5] configuration file.
88
89 In addition the *XDG_DATA_DIRS* environment variable from the
90 https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html[XDG
91 basedir spec] can be used to override the location to serve static files
92 from. These are the files that are served to a non-logged in user.
93
94 == Bugs
95
96 include::../partials/bugs.adoc[]
97
98 == Author
99
100 include::../partials/author.adoc[]
101
102 == See also
103
104 man:cockpit-tls[8] , man:cockpit.conf[5] , man:systemd[1]