Cockpit Project
cockpit-project.org
cockpit-project.org
If you're on a RHEL or Fedora base, it might be already installed and running. You just hit it on port 9090 with your web browser, and log in with your OS creds (same that you use for SSH). If it's not installed yet and/or you want to also add performance co-pilot[1], it's pretty easy to do:
# Install cockpit and pcp and activate services
dnf install -y cockpit pcp cockpit-pcp
systemctl enable --now cockpit.socket
systemctl enable --now pmlogger
# If needed, open port 9090 in the firewall
firewall-cmd --zone=public --permanent --add-service=cockpit
# Alternatively you can open it for just your own IP
firewall-cmd --zone=public --permanent --add-rich-rule='rule family="ipv4" source address="38.14.154.124" port protocol="tcp" port="9090" accept'
Here's the same commands in a gist if preferred: https://gist.github.com/FreedomBen/62b348ed45045e53356aeb714...Two years ago he started using cockpit on his fedora homelab server and now every time we talk I'm so proud of how he's getting into Linux thanks to Cockpit.
Highly recommend it for people on the Fedora ecosystem!
My only complaint on Netdata is that its resource heavy(especially the Go plugins) and so they're not fit for resource-constrained systems like Raspberry Pi; I wonder whether Cockpit is a good replacement there.
The goal was to make in-roads on Windows Server-like deployments. "Cattle, not pets" was becoming uber-popular, but the thinking on the desktop team was that there was still a wide market for pets. People with toy servers, small businesses that just want a server inside their network, they all deserve UIs that don't require heavy sysadmin-ing.
I think it turned out quite nicely, and it seems it's still going!
https://augeas.net/news.html 1.12.0 - 2019-04-13
I looked a little harder and then found jc[1] which made parsing the ini file easy, and since I didn't need full CRUD support I threw my hands up and used that instead. I _would_ like to find a fast and easy way to convert json/yaml to simple INI file syntax at the command line, or do idempotent modifications to the INI files without writing a command where 99% of it is describing to jq or awk what an INI file looks like.
Why is this a cool setup? B/c I can carry around a little Radxa Zero that looks like a USB-C Ethernet adapter to my iPad, Windows laptop, etc., and gets powered by the same port, and gives me Cockpit on a known local IP, mDNS advert, etc.
It’s a pretty good “hacking on the plane/train/mountain” setup, if you’re ever in the mood to try such a thing. :)
Edit/P.S.: why not just run a VM? See above re: iPad or other locked-down device; also, exposed GPIOs are useful sometimes too.
Cockpit – Integrated, glanceable, web-based interface for servers - https://news.ycombinator.com/item?id=26197510 - Feb 2021 (126 comments)
Cockpit – Web-based interface for Linux servers - https://news.ycombinator.com/item?id=22604560 - March 2020 (1 comment)
Cockpit – Administer Linux servers via a web browser - https://news.ycombinator.com/item?id=16445612 - Feb 2018 (148 comments)
The Cockpit Project - https://news.ycombinator.com/item?id=14417256 - May 2017 (1 comment)
Found it a useful single point of view / administration covering networking, storage, virtualization, containerization, etc. when managing a small group of servers over nebula (overlay network), across home, multiple cloud service providers. Haven't used it at scale though, will dip into it when time comes (it supports FreeIPA).
My sole gripe is that, IIRC, it's really tied into a dependency on Systemd, so I can't use it on any of my current machines which run elogind-based distros like GuixSD or a typical Gentoo installation. I don't happen to have any systemd-based distros installed atm, and if I did, can't imagine I'd use Cockpit regularly unless I could use it everywhere-- but I do wish I could! Maybe the systemd functionality can be factored out and re-implemented, but I'm not sure if anyone's going to decide it's worth their time and effort.
[1]: I did have to set $TERM=linux for the web-shell to behave correctly, but am not convinced that's an issue with Cockpit itself.
[2]: https://cockpit-project.org/applications
[3]: https://github.com/optimans/cockpit-zfs-manager/commit/80190...
Edit: If I keep refreshing the page, it renders correctly sometimes. Like 1 out of 4 or 5 refreshes look correct, with two columns of bullets.
I have an old personal dedicated server that has been running with Webmin for nearly 10 years, and Webmin is pretty thorough and actually helped me learn to manage servers with command line by exposing in a safer way all the config files.
What are the biggest differences between the two ? Besides the fact Cockpit's probably not written in perl :-)
It's very nice for that - it's minimalist, it doesn't get in the way of anything you want to do manually, and it doesn't wreck your VM configs if you just want to use it as a nice way to get console access.
Highly recommend!
Would you say all the features of cockpit work on Debian?
edit: (it was fine on buster too)
I've not tried it on Ubuntu at all - I've not used ubuntu personally since 6.06 or so!
Was very pleasantly surprised, and we used the web interface to configure everything, from VMs to bridging and bonding. Everything just worked really well.
I'll admit though: it does feel a little "AJAX-ey" and it has this weird buggy/cheap feel that I don't get from i.e. Dell iDRAC or Enterprise switch interfaces. I think that is entirely because of the bootstrap-esque styling, and nothing to do with the way it works.
Different strokes for different folks, to this I say THANK GOODNESS.
The output of such a program might look something like this I think: https://man7.org/linux/man-pages/man1/groff.1.html
I.e turn the manpages for curl into a GUI for curl.
The instructions[0] say it's included in Ubuntu 17.04 and later, but I couldn't see any way of enabling it.
I tried installing with apt using the command they listed:
. /etc/os-release
sudo apt install -t ${VERSION_CODENAME}-backports cockpit
But this didn't work. Eventually I read on another website that this is the correct way to install it: sudo apt install cockpit -y
This probably would be obvious for most people - but since this software is all about improving server UX, I thought it was worth mentioning!Yes, you can get it installed and running pretty easy - however because Ubuntu does networking differently it wasn't able to do a bunch of things. Cockpit kept thinking the machine was offline, so wouldn't do software updates. It wouldn't do network management, because networking wasn't done in the way that Cockpit wanted.
Yes, I could manually screw around and move from one type of network manager to another to make it work - but it wasn't easy, and easily broke networking on the machines.
I ended up installing Fedora instead to get Cockpit working nicely.
The first command you ran "sourced" a file - it basically read a file and set some environment variables - because that is what was in that file. The second one ran a command to install stuff and it referenced a variable - that variable was not mentioned in the sourced file.
In general, when you install a package in Ubuntu or Debian you should not do anything more fancy than:
$ sudo apt install <package>
Don't put -y - you can then read any messages and make up your own mind what to do. If you know what you are doing then obviously use -y.
You may find this handy:
$ apt-cache search cockpit
There are loads of web site scrapes these days relating to Linux stuff, just as Windows pioneered them years ago.
Sign up to the forums for say Debian, Ubuntu, Arch and Gentoo and Mint, Fedora too. Don't rely on a general search unless you really know what you are looking for.
I still use ssh for the vast majority of what I need to do (partially out of habit), but my experience with Cockpit has been great. The SELinux app, which is a GUI for things like setroubleshoot, audit2allow, etc is definitely my favorite part.
I wish it had integrated support for containers (Docker, Podman); don't need anything fancy, but I have to set up Portainer as well just for managing those (start, stop, add a new docker, read logs, etc.)
dnf install -y cockpit cockpit-pcp cockpit-podmanBut is it useful for non-RedHat-distributions? It seems quite tailored to that world.
Graphs, logs and stats are nothing actionable and package manager and service manager was kind of broken the last time I tried and it provides nothing better than command line by showing bunch of entries to make it hard to look at.
Not sure what people use it for.
The problem with cockpit is that it doesn't do anything better than specific tools making it rather useless.
A limited GUI certainly causes more pain than the shell everyone uses.