Awesome Cockpit 🚀
· 3 min read
Cockpit is a web-based graphical interface for servers, making Linux server administration more accessible through a modern web browser.
🌟 Top 10 Cool Use Cases
-
Multi-Server Dashboard
- Monitor multiple servers from a single interface
- Real-time resource usage and system status
- Quick access to all managed machines
-
Container Management
- Pull, run, and manage Docker containers
- Monitor container resources and logs
- Easy Podman integration for rootless containers
-
Storage Management
- Create and manage LVM volumes
- Monitor disk usage and health
- Format and mount new drives on the fly
-
Service Control Center
- Start/stop/restart systemd services
- Monitor service logs in real-time
- Enable/disable services on boot
-
Network Management
- Configure network interfaces
- Manage firewall rules
- Monitor network traffic and connections
-
Terminal Access
- Browser-based terminal access
- Multiple terminal sessions
- Copy-paste support between local and remote
-
Performance Monitoring
- CPU, Memory, Disk I/O graphs
- Process monitoring and management
- Resource usage alerts
-
User Management
- Create and manage user accounts
- SSH key management
- Group permissions control
-
Software Updates
- System updates management
- Package installation/removal
- Update history tracking
-
Log Analysis
- Centralized log viewer
- Real-time log monitoring
- Log search and filtering
🛠 Key Features
- Zero Dependencies: Just install and go
- Responsive Design: Works on mobile devices
- Role-Based Access: Fine-grained access control
- API Access: RESTful API for automation
- SSL Support: Secure communication out of the box
- Multi-Language: Supports multiple languages
- Plugin System: Extensible with additional modules
- SELinux Integration: Works with security policies
- Active Directory: Enterprise authentication support
- Metrics History: Historical performance data
🚀 Getting Started
On Ubuntu/Debian:
```bash sudo apt install cockpit sudo systemctl enable --now cockpit.socket ```
On RHEL/CentOS/Fedora:
```bash sudo dnf install cockpit sudo systemctl enable --now cockpit.socket ```
Access Cockpit:
- Open https://your-server:9090
- Login with your system credentials
💻 Using Cockpit for Personal Machines
Desktop Setup
- Install Cockpit package
- Enable HTTPS access (optional):
```bash
sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048
-keyout /etc/cockpit/ws-certs.d/0-self-signed.key
-out /etc/cockpit/ws-certs.d/0-self-signed.crt ``` - Configure firewall: ```bash sudo firewall-cmd --add-service=cockpit --permanent sudo firewall-cmd --reload ```
Laptop Configuration
- Install and enable: ```bash sudo apt install cockpit sudo systemctl enable --now cockpit.socket ```
- Set up dynamic DNS (optional)
- Configure port forwarding if behind NAT
VPS Integration
- Install Cockpit
- Secure with SSL certificate (Let's Encrypt recommended)
- Set up authentication: ```bash sudo cockpit-ws --port=9090 --no-tls ```
- Configure SSH key authentication
🔄 Alternatives
Web-Based Alternatives
- Webmin: More traditional interface, extensive module system
- Ajenti: Modern Python-based panel
- Portainer: Container-focused management
- Pterodactyl: Game server management panel
Self-Hosted Dashboards
- Grafana: Advanced metrics and monitoring
- Netdata: Real-time performance monitoring
- Zabbix: Enterprise monitoring solution
- Prometheus + Grafana: Metrics collection and visualization
🔗 Useful Links
🛡️ Security Tips
- Always use HTTPS
- Enable 2FA when possible
- Use strong passwords
- Regularly update Cockpit
- Monitor access logs
- Use custom ports
- Implement IP whitelisting
- Keep system updated
- Use SSH keys instead of passwords
- Regular security audits
🎯 Best Practices
- Regular backups of Cockpit configuration
- Monitor resource usage
- Use separate admin accounts
- Document custom configurations
- Test updates in staging
- Set up monitoring alerts
- Use configuration management
- Regular log rotation
- Network segmentation
- Performance benchmarking
