A Go-based utility application for headless Debian systems to manage network interfaces and WiFi connections through a web interface.
- Network Interface Management: List all network interfaces with their IP addresses and status
- WiFi Network Scanning: Scan and display available WiFi networks with signal strength and security information
- WiFi Connection: Connect to WiFi networks with password and security type selection
- Modern Web UI: Clean, responsive interface built with Tailwind CSS and modern design patterns
- Single Executable: Compiles to a single binary file for easy deployment
- Node.js (v22 or higher) - for Tailwind CSS compilation
- npm - for package management
nmcli- NetworkManager command line interface (recommended)iwlist- for WiFi network scanning (fallback)iwconfig- for WiFi configuration (WEP networks)wpa_supplicant- for WPA/WPA2 networksdhclient- for DHCP client functionality
sudo apt update
sudo apt install wireless-tools wpasupplicant isc-dhcp-client- Install Node.js and npm (for Tailwind CSS compilation)
- Install Go (v1.19 or higher)
# Clone the repository
git clone <repository-url>
cd control-mate-utils
# Install Node.js dependencies
npm install
# Development mode (watch CSS changes)
npm run dev
# Build everything (CSS + Go binary)
npm run build# Build everything (CSS + Go binary) - outputs to ./build/
npm run build
# Build CSS only (for development)
npm run build-css
# Build Go binary only
npm run build-go
# Clean build artifacts
npm run cleanAll built files are placed in the ./build/ directory:
build/
├── control-mate-utils-linux-arm64 # Go binary (Linux ARM64) - contains embedded static files
└── static/
├── css/
│ └── styles.css # Compiled Tailwind CSS (embedded in binary)
└── js/
└── app.js # JavaScript file (embedded in binary)
Note: The static files (CSS and JS) are embedded into the Go binary during compilation, so the binary is completely self-contained and doesn't require external static files to run.
# Add permissions for development
sudo setcap 'cap_net_raw,cap_net_admin=eip' ./release/cm-utils-linux-arm64
# Run the application
sudo ./release/cm-utils-linux-arm64
# The web interface will be available at http://localhost:8080Deployment: The binary is completely self-contained. You only need to copy the control-mate-utils-linux-arm64 file to your target Linux ARM64 system - no additional static files are required.
- Network Interfaces: View all network interfaces, their IP addresses, and status
- WiFi Networks: Scan for available WiFi networks and view their details
- Connect to WiFi: Click "Connect" on any WiFi network to enter credentials
GET /- Main web interfaceGET /api/interfaces- Get network interfaces (JSON)GET /api/wifi/scan- Scan WiFi networks (JSON)POST /api/wifi/connect- Connect to WiFi network (JSON)
curl -X POST http://localhost:8080/api/wifi/connect \
-H "Content-Type: application/json" \
-d '{
"ssid": "NetworkName",
"password": "password123",
"security": "WPA2"
}'- Open: No password required
- WEP: Wired Equivalent Privacy
- WPA/WPA2: Wi-Fi Protected Access
- WPA2: Wi-Fi Protected Access 2
control-mate-utils/
├── src/
│ ├── main.go # Main application code
│ ├── server/
│ │ ├── discovery/ # Discovery agent
│ │ │ └── agent.go
│ │ └── localio/ # Local IO card management
│ │ ├── index.go
│ │ ├── manager.go
│ │ ├── models.go
│ │ └── port.go
│ └── web/
│ ├── static/
│ │ ├── app.js # Frontend JavaScript
│ │ └── styles.css # Tailwind CSS source
│ ├── templates/ # HTML templates
│ │ ├── local-io.html
│ │ ├── index.html
│ │ ├── processes.html
│ │ └── system.html
│ └── styles.css
├── go.mod # Go module file
├── package.json # Node.js dependencies
└── README.md # This file
The application compiles to a single executable file (~9.8MB) that includes:
- All Go dependencies
- HTML templates (embedded)
- CSS and JavaScript assets (embedded)
- No external file dependencies required at runtime
The executable is completely self-contained - simply copy the control-mate-utils binary to your target system and run with appropriate permissions. No need to copy template or static files separately.
If you installed ControlMate Utils using the install script, you can uninstall it using:
curl -sL https://raw.githubusercontent.com/controlx-io/control-mate-utils/refs/heads/main/scripts/install_to_linux.sh | sudo -E bash -s -- uninstallThis will:
- Stop and disable the systemd service
- Remove the service file
- Remove the binary from
/var/lib/cm-utils/ - Remove the symlink from
/usr/local/bin/cm-utils - Remove polkit rule files
- Remove sudoers configuration
- Optionally remove the
cm-utilssystem user (with confirmation)
If you installed the binary manually (without the install script):
-
Stop any running instances:
# If running as a systemd service sudo systemctl stop cm-utils sudo systemctl disable cm-utils sudo rm /etc/systemd/system/cm-utils.service sudo systemctl daemon-reload -
Remove the binary:
# Remove the binary file (adjust path if different) sudo rm /path/to/cm-utils # Remove symlink if created sudo rm /usr/local/bin/cm-utils
-
Remove configuration files (if any):
# Remove application directory sudo rm -rf /var/lib/cm-utils # Remove polkit rules (if created) sudo rm /etc/polkit-1/rules.d/55-allow-full-network-management.rules sudo rm /etc/polkit-1/rules.d/56-allow-power-management.rules # Remove sudoers file (if created) sudo rm /etc/sudoers.d/99-cm-utils-reboot
-
Remove system user (optional):
sudo userdel -r cm-utils
The application requires root privileges to:
- Access network interface information
- Scan WiFi networks
- Configure WiFi connections
- Modify network settings
- Ensure
iwlistis installed - Check that WiFi adapter is enabled
- Verify proper permissions (run as root)
- Ensure
wpa_supplicantis installed for WPA networks - Check that
dhclientis available for IP assignment - Verify network credentials are correct
- Ensure network interfaces are properly configured
- Check system network configuration
This project is open source. Feel free to modify and distribute as needed.