Cockpit on NixOS setup
Introduction
Cockpit is a cutting-edge web-based graphical interface for server management. It allows you to administer servers effortlessly and includes a built-in terminal.
Personally, I utilize the NixOS package to monitor system logs, network settings, services, system resources, and CPU load and all without needing to touch the command line.
While some features, such as the storage, applications, and software sections, do not work out-of-the-box with NixOS, this does not concern me. I simply use the configuration.nix to make the necessary adjustments.
I have also integrated the Cockpit user interface for managing virtual machines and podman containers. For some time now, I have been contemplating replacing Proxmox with NixOS, and incorporating virtual machines and Podman containers is a crucial part of that transition.
Setup
-
Add the Cockpit package to
configuration.nix
In this case I am using the Cockpit package from the default channel. But you can also use a newer version from the unstable channel (if available).
-
Then add the Cockpit settings:
Instructions:
- Required Replace port number
9090
with a port number that is available if needed
- Required Replace port number
-
Switch NixOS configuration
Now you can switch to the new NixOS configuration. Run the following command:
-
Check the results
Now you can browse to Cockpit by opening a web browser and going to:
http://localhost:9090
. Replace localhost with the relevant IP address or FQDN if needed, and adjust the port if you changed it earlier.
No comments found for this note.
Join the discussion for this note on Github. Comments appear on this page instantly.