Skip to main content

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]

  1. Install the software:
    sudo apt update && sudo apt install cockpit -y
    [cite: 13]
  2. Enable the service:
    sudo systemctl enable --now cockpit.socket
    [cite: 16]
  3. Open the firewall:
    sudo ufw allow 9090
    [cite: 19]

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]

  1. 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
    [cite: 25]
  2. Force the install to finish:
    sudo apt -f install
    [cite: 28]
  3. Purge the broken package:
    sudo dpkg --purge synosnap
    [cite: 31]

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]

  1. Install and enable SSH:
    sudo apt install openssh-server -y
    sudo systemctl enable --now ssh
    [cite: 38]
  2. Allow SSH through firewall:
    sudo ufw allow ssh
    [cite: 41]
  3. Install Cockpit packages (for metrics):
    sudo apt install cockpit cockpit-pcp -y
    [cite: 44]

Step 4: Connect Servers in the GUI

  1. Access the Web Interface: Open a browser and go to https://<PRIMARY_IP>:9090. [cite: 47]
  2. Note: Accept the "Not Secure" / SSL warning (Advanced -> Proceed). [cite: 48]
  3. Log in: Use your Linux username and password. [cite: 49]
  4. 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 useUse the dropdown menu to switch between servers. [cite: 64]