Setting Up Cockpit for Multi-Server Management (Linux Mint)
This knowledge base article summarizes the steps taken to get Cockpit running, including specific fixes for errors encountered. [cite: 1, 2]
Objective
To install Cockpit on a primary Linux Mint server and connect other Linux Mint servers to manage them from a single web interface. [cite: 4]
Prerequisites
- Primary Server: Linux Mint XFCE (e.g., LinuxServer) [cite: 6]
- Secondary Servers: Linux Mint XFCE (e.g., MediaServer, LinuxServer3) [cite: 7]
- Unsupported: Home Assistant OS (HAOS) cannot host Cockpit directly. [cite: 8]
Step 1: Install Cockpit on the Primary Server
Run these commands on the computer you want to use as your main controller: [cite: 10]
- Install the software:
[cite: 13]sudo apt update && sudo apt install cockpit -y - Enable the service:
[cite: 16]sudo systemctl enable --now cockpit.socket - Open the firewall:
[cite: 19]sudo ufw allow 9090
Step 2: Troubleshooting Installation Errors
Issue: apt failed due to a broken "synosnap" (Synology Active Backup) package. [cite: 21]
Fix: Use a dummy script to trick the system into removing the broken package. [cite: 22]
- Create the dummy script structure:
[cite: 25]sudo mkdir -p /opt/synosnap/hooks/ sudo touch /opt/synosnap/hooks/dpkg-post-hook.sh sudo chmod +x /opt/synosnap/hooks/dpkg-post-hook.sh - Force the install to finish:
[cite: 28]sudo apt -f install - Purge the broken package:
[cite: 31]sudo dpkg --purge synosnap
Step 3: Prepare Secondary Servers
Issue: "Unable to contact... port 22" when adding a host. [cite: 33]
Cause: Linux Mint does not have the SSH server enabled by default. [cite: 34]
Run these commands on every secondary server you want to control: [cite: 35]
- Install and enable SSH:
[cite: 38]sudo apt install openssh-server -y sudo systemctl enable --now ssh - Allow SSH through firewall:
[cite: 41]sudo ufw allow ssh - Install Cockpit packages (for metrics):
[cite: 44]sudo apt install cockpit cockpit-pcp -y
Step 4: Connect Servers in the GUI
- Access the Web Interface: Open a browser and go to
https://<PRIMARY_IP>:9090. [cite: 47] - Note: Accept the "Not Secure" / SSL warning (Advanced -> Proceed). [cite: 48]
- Log in: Use your Linux username and password. [cite: 49]
- Add Host:
- Click the dropdown menu in the top-left (or "Overview"). [cite: 51]
- Click "Add new host". [cite: 52]
- Enter the IP of the secondary server. [cite: 53]
- Check "Log in automatically" to save credentials. [cite: 54]
Step 5: Enabling Metrics & History
Issue: Missing graphs/history. [cite: 56]
Fix: The cockpit-dashboard package is deprecated. Use PCP (Performance Co-Pilot) instead. [cite: 57]
Run this on all servers to enable history recording: [cite: 58]
sudo apt install cockpit-pcp -y
sudo systemctl enable --now pmlogger
sudo systemctl enable --now pmproxy
[cite: 60]
Known Limitations
- Home Assistant: Cannot be added to Cockpit (unless running as a VM inside Linux). [cite: 62]
- "Single Pane" Dashboard: The old grid view of all servers at once has been deprecated. [cite: 63]
- Navigation: You must use the dropdown menu to switch between servers. [cite: 64]