Automate your Plex Media Server updates with precision and reliability
- Overview
- Features
- Requirements
- Installation
- Configuration
- Usage
- How It Works
- Limitations
- Use Cases
- Contributing
- License
- Resources
Plex Media Server Updater is a professional Bash automation script designed to streamline the update process for Plex Media Server on Linux systems. Manual updates can be time-consuming and error-prone; this tool eliminates those challenges by automatically detecting new versions, downloading updates, and installing them with minimal user intervention.
Built with system administrators and home media server enthusiasts in mind, this script ensures your Plex installation stays current with the latest stable releases while maintaining system stability and reliability.
- Automatic Version Detection: Intelligently checks for the latest Plex Media Server version available
- One-Click Updates: Streamlined update process with a single command execution
- Error Handling: Comprehensive error detection and logging for troubleshooting
- Download Verification: Validates downloaded packages to ensure integrity
- Service Management: Seamless integration with systemd for service control
- Rollback Support: Ability to revert to previous versions if needed
- Cron Compatibility: Perfect for scheduled automated updates
- Minimal Dependencies: Requires only standard Linux tools
- Detailed Logging: Complete audit trail of all update operations
- Non-Interactive Mode: Suitable for automated deployment scenarios
- Operating System: Debian-based Linux (Ubuntu, Debian, Linux Mint)
- Architecture: x86_64 (AMD64)
- Bash Version: 4.0 or higher
- Privileges: sudo/root access for package installation
wgetorcurlfor downloading packagesdpkgfor package managementsystemctlfor service control (systemd-based systems)- Internet connectivity for version checks and downloads
# Clone the repository
git clone https://github.com/ZarTek-Creole/plexmediaserver_updater.git
# Navigate to the directory
cd plexmediaserver_updater
# Make the script executable
chmod +x plexmediaserver_updater.sh# Download directly
wget https://raw.githubusercontent.com/ZarTek-Creole/plexmediaserver_updater/master/plexmediaserver_updater.sh
# Make executable
chmod +x plexmediaserver_updater.shThe script works out-of-the-box with default settings. For advanced users, you can customize behavior by modifying variables at the top of the script:
# Example configuration options
DOWNLOAD_DIR="/tmp/plex_updates" # Temporary download location
LOG_FILE="/var/log/plex_update.log" # Log file path
BACKUP_CONFIG=true # Backup configuration before updatePLEX_UPDATE_LOG: Override default log locationPLEX_DOWNLOAD_MIRROR: Use alternative download sourcePLEX_SKIP_SERVICE_RESTART: Skip automatic service restart
# Run the updater
sudo ./plexmediaserver_updater.shAdd to your crontab for automatic weekly updates:
# Edit crontab
crontab -e
# Add this line for weekly updates (every Sunday at 3 AM)
0 3 * * 0 /path/to/plexmediaserver_updater.sh >> /var/log/plex_update.log 2>&1# Check for updates without installing
./plexmediaserver_updater.sh --check-onlyThe updater follows a systematic approach to ensure safe and reliable updates:
- Version Check: Queries Plex's update API to determine the latest available version
- Comparison: Compares installed version against the latest release
- Download: If an update is available, downloads the appropriate package
- Verification: Validates the downloaded package integrity
- Backup: Creates a backup of current configuration (optional)
- Installation: Uses dpkg to install the new package
- Service Restart: Restarts the Plex Media Server service
- Cleanup: Removes temporary files
- Logging: Records all operations for audit purposes
βββββββββββββββββββ
β Version Check β
ββββββββββ¬βββββββββ
β
βΌ
βββββββββββ
β Update? ββββNoβββ> Exit
ββββββ¬βββββ
β Yes
βΌ
ββββββββββββββββ
β Download β
ββββββββ¬ββββββββ
β
βΌ
ββββββββββββββββ
β Install β
ββββββββ¬ββββββββ
β
βΌ
βββββββββββ
β Success β
βββββββββββ
- Platform Specific: Currently supports Debian-based distributions only
- Package Format: Designed for .deb packages (not RPM)
- Internet Required: Needs active internet connection for updates
- Root Access: Requires sudo privileges for package installation
- Systemd Dependency: Assumes systemd for service management
- Manual Rollback: Automatic rollback not implemented for failed updates
Perfect for home lab enthusiasts who want their Plex server always up-to-date without manual intervention.
Ideal for managing multiple Plex instances across different machines with consistent update policies.
Integrate into CI/CD workflows for automated media server infrastructure management.
Maintain Plex installations in educational settings with minimal administrative overhead.
Keep enterprise media servers current without dedicated IT resources.
Contributions are welcome! If you'd like to improve this project:
- Fork the repository
- Create a feature branch (
git checkout -b feature/improvement) - Commit your changes (
git commit -am 'Add new feature') - Push to the branch (
git push origin feature/improvement) - Open a Pull Request
Please ensure your code follows existing style conventions and includes appropriate documentation.
This project is licensed under the MIT License. See the LICENSE file for full details.
The MIT License is a permissive license that allows you to use, modify, and distribute this software freely, with minimal restrictions.
Maintained by ZarTek-Creole | Star this project if you find it useful!