A comprehensive bash script to automate the installation, update, and optimization of the TP-Link Omada Software Controller on various Linux distributions.
This script is designed for both fresh installations and in-place upgrades. It automatically fetches the latest release directly from the official TP-Link servers and configures all necessary dependencies, including MongoDB 8.0 and OpenJDK 21.
- Automated OS Detection: Seamlessly supports
apt(Ubuntu/Debian) anddnf(Fedora) package managers. - Auto-Fetch Latest Version: Scrapes the official TP-Link download page to always install or update to the most recent version.
- Smart Update Mode: Detects existing installations and safely stops the service to perform an in-place upgrade.
- Nginx Reverse Proxy & SSL:
- Option to install Nginx to expose the controller on standard ports (80/443) instead of
8043. - Generates a 365-day Self-Signed Certificate out of the box.
- Fully automated Let's Encrypt integration via
certbotfor valid SSL certificates (requires a valid domain pointing to the server).
- Option to install Nginx to expose the controller on standard ports (80/443) instead of
- Advanced System Tweaks (Optional):
- Swap Management: Automatically creates a 2GB swap file if the system has less than 4GB of RAM to prevent Out-Of-Memory (OOM) crashes.
- Firewall Configuration: Automatically opens all required Omada and Nginx ports via
ufworfirewalld. - Log Management: Sets up
logrotateto compress and clean up Omada logs weekly, saving disk space. - Security: Installs and configures
fail2banto protect the Nginx login portal from bot scanners.
- Ubuntu: 20.04 (Focal), 22.04 (Jammy), 24.04 (Noble)
- Debian: 11 (Bullseye), 12 (Bookworm)
- Fedora: 39, 40+
Note: Your CPU must support the AVX instruction set, as this is a strict requirement for MongoDB 5.0 and newer. The script will check for this automatically.