1COCKPIT-WS(8) cockpit-ws COCKPIT-WS(8)
2
3
4
6 cockpit-ws - Cockpit web service
7
9 cockpit-ws [--help] [--port PORT] [--address ADDRESS] [--no-tls]
10 [--local-ssh] [--local-session BRIDGE]
11
13 The cockpit-ws program is the web service component used for
14 communication between the browser application and various configuration
15 tools and services like cockpit-bridge(8).
16
17 Users or administrators should never need to start this program as it
18 automatically started by systemd(1) on bootup.
19
21 To specify the TLS certificate the web service should use, simply drop
22 a file with the extension .cert in the /etc/cockpit/ws-certs.d
23 directory. If there are multiple files in this directory, then the
24 highest priority one is chosen after sorting.
25
26 The .cert file should contain at least two OpenSSL style PEM blocks.
27 First one or more BEGIN CERTIFICATE blocks for the server certificate
28 and intermediate certificate authorities and a last one containing a
29 BEGIN PRIVATE KEY or similar. The key may not be encrypted.
30
31 If there is no TLS certificate, a self-signed certificate is
32 automatically generated using openssl and stored in the
33 0-self-signed.cert file.
34
35 When enrolling into a FreeIPA domain, an SSL certificate is requested
36 from the IPA server and stored in 10-ipa.cert.
37
38 To check which certificate cockpit-ws will use, run the following
39 command.
40
41 $ sudo remotectl certificate
42
43 If using certmonger to manage certificates, following command can be
44 used to automatically prepare concatenated .cert file:
45
46 CERT_FILE=/etc/pki/tls/certs/$(hostname).pem
47 KEY_FILE=/etc/pki/tls/private/$(hostname).key
48
49 getcert request -f ${CERT_FILE} -k ${KEY_FILE} -D $(hostname --fqdn) -C "sed -n w/etc/cockpit/ws-certs.d/50-from-certmonger.cert ${CERT_FILE} ${KEY_FILE}"
50
52 When started via systemd(1) then cockpit-ws will exit after 90 seconds
53 if nobody logs in, or after the last user is disconnected.
54
56 --help
57 Show help options.
58
59 --port PORT
60 Serve HTTP requests PORT instead of port 9090. Usually Cockpit is
61 started on demand by systemd socket activation, and this option has
62 no effect. Update the ListenStream directive cockpit.socket file in
63 the usual systemd manner.
64
65 --address ADDRESS
66 Bind to address ADDRESS instead of binding to all available
67 addresses. Usually Cockpit is started on demand by systemd socket
68 activation, and this option has no effect. In that case, update the
69 ListenStream directive in the cockpit.socket file in the usual
70 systemd manner.
71
72 --no-tls
73 Don't use TLS.
74
75 --local-ssh
76 Normally cockpit-ws uses cockpit-session and PAM to authenticate
77 the user and start a user session. With this option enabled, it
78 will instead authenticate via SSH at 127.0.0.1 port 22.
79
80 --local-session BRIDGE
81 Skip all authentication and cockpit-session, and launch the
82 cockpit-bridge specified in BRIDGE in the local session. If the
83 BRIDGE is specified as - then expect an already running bridge that
84 is connected to stdin and stdout of this cockpit-ws process. This
85 allows the web server to run as any unprivileged user in an already
86 running session.
87
88 This mode implies --no-tls, thus you need to use http:// URLs with
89 this.
90
91 Warning
92 If you use this, you have to isolate the opened TCP port
93 somehow (for example in a network namespace), otherwise all
94 other users (or even remote machines if the port is not just
95 listening on localhost) can access the session!
96
98 The cockpit-ws process will use the XDG_CONFIG_DIRS environment
99 variable from the XDG basedir spec[1] to find its cockpit.conf(5)
100 configuration file.
101
102 In addition the XDG_DATA_DIRS environment variable from the XDG basedir
103 spec[1] can be used to override the location to serve static files
104 from. These are the files that are served to a non-logged in user.
105
107 Please send bug reports to either the distribution bug tracker or the
108 upstream bug tracker[2].
109
111 Cockpit has been written by many contributors[3].
112
114 cockpit.conf(5) , systemd(1)
115
117 1. XDG basedir spec
118 https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
119
120 2. upstream bug tracker
121 https://github.com/cockpit-project/cockpit/issues/new
122
123 3. contributors
124 https://github.com/cockpit-project/cockpit/
125
126
127
128cockpit 06/04/2019 COCKPIT-WS(8)