How to Install and Configure Cockpit on AnonVM for Server Monitoring

Cockpit is a lightweight, web-based server monitoring and management tool that provides real-time stats, logs, and easy access to manage system services. With Cockpit, you can monitor system performance, view and analyze logs, start/stop services, and more, all from a user-friendly dashboard.


Step 1: Access Your AnonVM Server

  1. Log in to your AnonVM VPS through SSH:
     
    ssh root@your-vps-ip
    Replace your-vps-ip with the IP address of your server.

Step 2: Install Cockpit

Cockpit is available in the default repositories of most Linux distributions, making it easy to install.

  1. For Debian/Ubuntu-based systems: Update your package list and install Cockpit:

     
    sudo apt update sudo apt install cockpit -y
  2. For CentOS/RHEL systems: On RHEL/CentOS 8 and later, Cockpit comes pre-installed. If not, enable the EPEL repository and install it:

     
    sudo yum install cockpit -y
  3. For Fedora systems: Cockpit is available by default, so you can install it directly:

     
    sudo dnf install cockpit -y

Step 3: Start and Enable Cockpit

  1. Enable the Cockpit service to start automatically on boot:

     
    sudo systemctl enable --now cockpit
  2. Verify that Cockpit is running:

     
    sudo systemctl status cockpit

    If the service is active, you’re ready to access the web interface.


Step 4: Configure Firewall Rules

To access Cockpit's web interface, ensure that port 9090 is open on your server.

  1. For UFW (Ubuntu):

     
    sudo ufw allow 9090/tcp sudo ufw reload
  2. For Firewalld (CentOS/RHEL):

     
    sudo firewall-cmd --permanent --zone=public --add-port=9090/tcp sudo firewall-cmd --reload

Step 5: Access the Cockpit Web Interface

  1. Open a web browser and go to:
    arduino
     
    http://your-vps-ip:9090
  2. Log in with your server credentials (root or any sudo-enabled user).

Step 6: Explore Cockpit Features

Once logged in, you can start monitoring and managing your server. Key features include:

  • System Overview: Monitor CPU, memory, and disk usage in real-time.
  • Logs: View and analyze system logs directly from the dashboard.
  • Networking: Monitor network interfaces, bandwidth usage, and open ports.
  • Storage: Manage disks, partitions, and mounted file systems.
  • Services: Start, stop, and restart services, making it easy to manage daemons.
  • Terminal: Access a web-based terminal to execute commands directly on your server.

Step 7: Optional Plugins and Extensions

Cockpit supports several plugins for enhanced functionality, including:

  • Cockpit Dashboard: For multi-server monitoring.
  • Cockpit PackageKit: For package updates and installation management.
  • Cockpit NetworkManager: For detailed network configuration.

To install plugins, use your package manager, for example:

 
sudo apt install cockpit-dashboard cockpit-packagekit -y

Conclusion

Cockpit provides an intuitive, powerful interface for managing and monitoring your AnonVM server. With real-time metrics and easy-to-use controls, it simplifies server maintenance and enhances productivity, especially when managing multiple servers or services remotely.

Was this answer helpful? 0 Users Found This Useful (0 Votes)

Powered by WHMCompleteSolution