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.
Objective
To install Cockpit on a primary Linux Mint server and connect other Linux Mint servers to manage them from a single web interface.
Prerequisites
- Primary Server: Linux Mint XFCE (e.g., LinuxServer)
- Secondary Servers: Linux Mint XFCE (e.g., MediaServer, LinuxServer3)
- Unsupported: Home Assistant OS (HAOS) cannot host Cockpit directly.
Step 1: Install Cockpit on the Primary Server
Run these commands on the computer you want to use as your main controller:
- Install the software:
sudo apt update && sudo apt install cockpit -y - Enable the service:
sudo systemctl enable --now cockpit.socket - Open the firewall:
sudo ufw allow 9090
Step 2: Troubleshooting Installation Errors
Issue: apt failed due to a broken "synosnap" (Synology Active Backup) package.
Fix: Use a dummy script to trick the system into removing the broken package.
- Create the dummy script structure:
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:
sudo apt -f install - Purge the broken package:
sudo dpkg --purge synosnap
Step 3: Prepare Secondary Servers
Issue: "Unable to contact... port 22" when adding a host.
Cause: Linux Mint does not have the SSH server enabled by default.
Run these commands on every secondary server you want to control:
- Install and enable SSH:
sudo apt install openssh-server -y sudo systemctl enable --now ssh - Allow SSH through firewall:
sudo ufw allow ssh - Install Cockpit packages (for metrics):
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. - Note: Accept the "Not Secure" / SSL warning (Advanced -> Proceed).
- Log in: Use your Linux username and password.
- Add Host:
- Click the dropdown menu in the top-left (or "Overview").
- Click "Add new host".
- Enter the IP of the secondary server.
- Check "Log in automatically" to save credentials.
Step 5: Enabling Metrics & History
Issue: Missing graphs/history.
Fix: The cockpit-dashboard package is deprecated. Use PCP (Performance Co-Pilot) instead.
Run this on all servers to enable history recording:
sudo apt install cockpit-pcp -y
sudo systemctl enable --now pmlogger
sudo systemctl enable --now pmproxy
Known Limitations
- Home Assistant: Cannot be added to Cockpit (unless running as a VM inside Linux).
- "Single Pane" Dashboard: The old grid view of all servers at once has been deprecated.
- Navigation: Use the dropdown menu to switch between servers.
No comments to display
No comments to display