Instructions for installing Cockpit on Silverblue

To install cockpit (and some extensions like cockpit-podman) on a clean Silverblue installation, I tried following the instructions from CoreOS as it seems closely related: Running Cockpit — Cockpit Project

At some point the instructions say Run the Cockpit web service with a privileged container (as root): but the command does NOT start with sudo, so I executed it without:

podman container runlabel --name cockpit-ws RUN quay.io/cockpit/ws
Trying to pull quay.io/cockpit/ws:latest...
Getting image source signatures
Copying blob b9d06e6efed1 done   | 
Copying blob 6043b19b68ec done   | 
Copying config 62cb6cf8ff done   | 
Writing manifest to image destination
1cbda7f4be042cfc560a9903c26e57bc254c6c82c51163fc662b775c2ff9cbab

One of the final steps then fails:

❯ podman container runlabel INSTALL quay.io/cockpit/ws
+ sed -e /pam_selinux/d -e /pam_sepermit/d /etc/pam.d/cockpit
/container/label-install: line 28: /host/etc/pam.d/cockpit: Permission denied
Error: `/proc/self/exe run --rm --privileged -v /:/host -e IMAGE=quay.io/cockpit/ws:latest quay.io/cockpit/ws:latest /container/label-install quay.io/cockpit/ws:latest` failed: exit status 1

~ 

How do I properly install cockpit, and automatically run at boot?

NOTE: I am planning on using rootless podman-compose. Haven’t started yet and want to be careful with using sudo to not mess up anything before getting started with podman-compose

Cockpit is a web based app to manage container environment on a specific server. Silverblue is a immutable desktop os which is not really made for such cases.

You could use toolbox to install a server and use/test cockpit.

Description :
The Cockpit Web Console enables users to administer GNU/Linux servers using a web browser.

If you want to manage remote servers you can connect over the network to their cockpit installation and work direct on the server this way.

I have been using cockpit just fine on Silverblue before… So your comment makes little sense to me. I just forgot how I started it. I probably did not follow the guide for CoreOS but some instructions for Silverblue specifically.

You should be able to use the Cockpit client directly without installing anything on Silverblue.

Otherwise, layering the cockpit packages should work fine.

this is for my homeserver.
I already figured it out, I did not install the cockpit-ws package…

Correct way of doing it:


rpm-ostree install cockpit-system cockpit-ws cockpit-files cockpit-networkmanager cockpit-ostree cockpit-podman cockpit-selinux cockpit-storaged
sudo systemctl enable --now cockpit.socket
sudo firewall-cmd --add-service=cockpit
sudo firewall-cmd --add-service=cockpit --permanent

Now it works at localhost:9090 :slight_smile:
I should not have followed instructions for CoreOS as that is container-based OS… my mistake!

2 Likes

That is ok and not a problem. My comment was more a information also for new users.
When you layer software on Silverblue you have to reinstall it after a new re-base. Might be difficult if you prefer just to upgrade and let it as it is to use.

And an other information is, that on the server install you get cockpit already preinstalled.

Good to know thanks - but in my experience after an upgrade you do not need to reinstall the layered packages.
It IS an issue when you have added other repos like RPMFusion. Upgrade will not even work without removing those layers first.

But layering from the default Fedora repo should be OK… This may have been different a few versions ago (pre-v38). Any expert feel free to correct me if I am wrong…

3 Likes