Cockpit: Browser-Based Linux Server Management for Your Homelab
The command line is powerful, but not always what you want at 11pm when you're trying to figure out why a server is slow. Cockpit is a web-based server management console that's already installed (or available) on most Linux distributions — and it's genuinely useful for homelab management.
Photo by Compagnons on Unsplash
Unlike Portainer (Docker-focused) or Proxmox (virtualization platform), Cockpit is a general Linux system console. It handles disk management, network interfaces, system logs, user management, and more — all from a browser.
What Cockpit Covers
Cockpit's core features out of the box:
- System overview: CPU, memory, disk I/O, and network graphs updated in real time
- Storage: Create and manage partitions, LVM volumes, RAID arrays, and NFS mounts
- Networking: Configure interfaces, bonding, bridges, VLANs, and firewall rules
- Logs: Journal viewer with filtering by service, severity, and time range
- Services: Start/stop/restart systemd units, enable/disable services
- User management: Create users, manage SSH keys, modify groups
- Software updates: Apply system updates with one click (on supported distros)
- Terminal: Full browser-based terminal (nice fallback when SSH isn't convenient)
Installation
Cockpit ships by default on Fedora and RHEL/Rocky. For Ubuntu/Debian:
# Ubuntu 22.04/24.04
sudo apt install cockpit
# Enable and start
sudo systemctl enable --now cockpit.socket
Access it at https://your-server-ip:9090. Cockpit generates a self-signed certificate on first run — you can replace this with a proper cert later.
Log in with your existing Linux username and password. Cockpit uses PAM authentication — no separate user database.
For Debian:
# Add backports for newer version
echo 'deb http://deb.debian.org/debian bookworm-backports main' | \
sudo tee /etc/apt/sources.list.d/backports.list
sudo apt update
sudo apt install -t bookworm-backports cockpit
sudo systemctl enable --now cockpit.socket
Extensions (Applications)
Cockpit's power comes from its extension system. Install additional modules for expanded functionality:
Container management (Podman):
sudo apt install cockpit-podman # Debian/Ubuntu
sudo dnf install cockpit-podman # Fedora/Rocky
Adds a Containers tab for managing Podman containers — start/stop, view logs, inspect images.
Storage with Stratis:
sudo apt install cockpit-storaged
Enhanced storage management with Stratis pools and LVM management.
Network manager:
sudo apt install cockpit-networkmanager
Full NetworkManager integration for managing network interfaces, bonds, and VLANs.
Virtual machines (via libvirt):
sudo apt install cockpit-machines
Create and manage QEMU/KVM VMs — useful on bare metal servers running VMs directly.
Files (experimental):
# Available as a third-party extension
# cockpit-files provides a basic file browser
Like what you're reading? Subscribe to HomeLab Starter — free weekly guides in your inbox.
Configuring TLS with Let's Encrypt
Replace the self-signed certificate with a real one from Let's Encrypt:
# Install certbot
sudo apt install certbot
# Get certificate (use DNS challenge if no port 80)
sudo certbot certonly --standalone -d cockpit.yourdomain.com
# Configure Cockpit to use it
sudo bash -c 'cat /etc/letsencrypt/live/cockpit.yourdomain.com/fullchain.pem \
/etc/letsencrypt/live/cockpit.yourdomain.com/privkey.pem \
> /etc/cockpit/ws-certs.d/yourdomain.cert'
sudo systemctl restart cockpit
Or use a certificate from your internal CA if Cockpit is on your local network.
Restricting Access
By default Cockpit is accessible on port 9090 from any IP. For homelab security:
Firewall restriction (allow only local network):
# UFW
sudo ufw allow from 192.168.1.0/24 to any port 9090
# Firewalld
sudo firewall-cmd --permanent --add-rich-rule='rule family="ipv4" source address="192.168.1.0/24" port protocol="tcp" port="9090" accept'
sudo firewall-cmd --reload
Disable root login: By default, Cockpit allows root login if your system does. To disable:
echo "root" | sudo tee /etc/cockpit/disallowed-users
Reverse proxy access (if you want to access remotely): Put Cockpit behind your reverse proxy with authentication. Cockpit handles its own WebSocket connections, so you need WebSocket proxying enabled.
Managing Multiple Servers (Dashboard)
Cockpit can connect to and manage multiple servers from a single interface. From the Overview page, click the server selector in the top-left to add remote hosts.
Cockpit connects to remote hosts via SSH using the logged-in user's credentials. You'll need:
- SSH access from the Cockpit host to the remote server
- Cockpit installed on the remote server (but not necessarily running as a public service)
This gives you a single browser tab to jump between servers — useful for managing 3–10 homelab nodes without opening separate SSH sessions.
Storage Management in Practice
Cockpit's storage UI is one of its most useful features. You can:
- View all disks and partitions with capacity and usage
- Create LVM volume groups and logical volumes
- Set up software RAID (RAID 1, RAID 5, RAID 6)
- Manage NFS mounts — add, edit, and verify NFS shares
- Monitor SMART data — disk health status
For a homelab NAS or file server, being able to manage volumes, check SMART status, and add mounts from a browser is significantly more convenient than juggling multiple commands.
Terminal Access
The built-in terminal is a valuable fallback. It's a full xterm.js terminal running in the browser — useful when:
- Your SSH client isn't available
- You're working from a machine without SSH configured
- You want quick access without opening a separate terminal window
The terminal runs in your browser session as the logged-in user. Sudo works normally if your account has sudo access.
Cockpit vs Alternatives
| Tool | Best For |
|---|---|
| Cockpit | General Linux system management |
| Proxmox UI | VM and container virtualization |
| Portainer | Docker/Kubernetes container management |
| Webmin | Legacy web admin (older but broader plugin ecosystem) |
| Netdata | Monitoring and observability |
Cockpit fills the gap between "raw SSH command line" and "specialized tool for one thing." For day-to-day server management — checking logs, restarting services, reviewing storage — it's the most convenient tool available.
Summary
Cockpit is an underappreciated homelab tool. It's maintained by Red Hat, ships with most major Linux distributions, and covers the tasks you actually do when managing servers: checking resource usage, reviewing logs, managing services, and handling storage.
Install it on your primary servers (apt install cockpit), open port 9090, and you have a usable system console within minutes. Add the Podman or virtual machines extension if you need container or VM management alongside.
