Skip to content

Admonstrator/glinet-adguard-updater

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

49 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

GL.iNet AdGuard Home Logo

AdGuard Home Updater for GL.iNet Routers

Keep AdGuard Home up-to-date on your GL.iNet router with ease!

Latest Release License Stars


πŸ’– Support the Project

If you find this tool helpful, consider supporting its development:

GitHub Sponsors Buy Me A Coffee Ko-fi PayPal


πŸ“– About

This script automatically fetches and installs the latest AdGuard Home version, optimized specifically for GL.iNet routers. Keep your AdGuard Home installation current with just one command!

Created by Admon for the GL.iNet community. Tested on nearly all GL.iNet routers with firmware 4.x.

πŸŽ–οΈ Community Maintained – Part of the GL.iNet Toolbox project ⚠️ Independent Project – Not officially affiliated with GL.iNet or AdGuard


✨ Features

  • πŸš€ Automatic Updates – Fetches and installs the latest AdGuard Home version
  • πŸ“¦ Tiny Version Support – Uses pre-compressed binaries optimized for GL.iNet routers (6 MB vs 32 MB)
  • 🎯 Version Selection – Install specific AdGuard Home versions
  • πŸ’Ύ Query Logging Control – Optionally enable query logging to file
  • πŸ”„ Persistence Support – Make installations survive firmware upgrades
  • πŸ›‘οΈ Safe Backups – Automatic backup of original files before updates
  • ⚑ Flexible Options – Multiple flags for customized installations

πŸ“‹ Requirements

Requirement Details
Router GL.iNet router with firmware 4.x (including MT-6000 Flint 2 and GL-BE9300 Flint 3)
Free Space At least 15 MB (can be bypassed with --ignore-free-space)
AdGuard Home Pre-installed via GL.iNet firmware (deeply integrated)

πŸš€ Quick Start

Run the updater without cloning the repository:

wget -q https://get.admon.me/adguard -O update-adguardhome.sh ; sh update-adguardhome.sh

⚠️ Important: Do not run this script as a cron job! Manual execution is recommended.


πŸŽ›οΈ Arguments

The update-adguardhome.sh script supports the following arguments:

Argument Description
--ignore-free-space Bypasses the free space check and disables backup creation. Use with caution on low-storage devices! ⚠️ Not recommended - could break your router if there's insufficient space!
--select-release Displays available releases and lets you choose a specific version to install.

πŸ“š Usage Examples

Standard Update

Update to the latest stable release:

wget -q https://get.admon.me/adguard -O update-adguardhome.sh ; sh update-adguardhome.sh

Select a Specific Version

Install a specific AdGuard Home version:

wget -q https://get.admon.me/adguard -O update-adguardhome.sh ; sh update-adguardhome.sh --select-release

The script will display available releases for you to choose from.

Low Storage Devices

For devices with limited free space (⚠️ use with caution):

wget -q https://get.admon.me/adguard -O update-adguardhome.sh ; sh update-adguardhome.sh --ignore-free-space

⚠️ Warning: This disables safety checks and backup creation. Could potentially break your router if there's not enough free space!


πŸ” Key Features Explained

πŸ“¦ Tiny-AdGuardHome

By default, the script uses pre-compressed AdGuard Home binaries that:

  • πŸ”Ή Save significant storage space (6 MB vs 32 MB)
  • πŸ”Ή Are optimized specifically for GL.iNet routers
  • πŸ”Ή Maintain full functionality
  • πŸ”Ή Are recommended for all GL.iNet devices

πŸ’Ύ Query Logging

By default, AdGuard Home on GL.iNet routers disables query logging to file to:

  • πŸ”Ή Prevent running out of storage space
  • πŸ”Ή Prevent flash memory wear
  • πŸ”Ή Optimize performance

The script will ask if you want to enable query logging after the update.

Manual Query Logging Control

Enable query logging to file:

sed -i '/^querylog:/,/^[^ ]/ s/^  file_enabled: .*/  file_enabled: true/' /etc/AdGuardHome/config.yaml
/etc/init.d/adguardhome restart

Disable query logging to file:

sed -i '/^querylog:/,/^[^ ]/ s/^  file_enabled: .*/  file_enabled: false/' /etc/AdGuardHome/config.yaml
/etc/init.d/adguardhome restart

πŸ”„ Persistence Support

The script offers to make the installation persistent across firmware upgrades by:

  • βœ… Adding necessary files to /etc/sysupgrade.conf
  • βœ… Setting up automatic update checks via /etc/rc.local
  • βœ… Preserving your AdGuard Home configuration and settings

⚠️ Important: Factory reset will NOT revert persistent installations!


πŸ”™ Reverting Changes

Since AdGuard Home is deeply integrated into GL.iNet firmware, reverting changes requires manual steps. Factory reset will NOT revert changes if you made the installation persistent!

Manual Revert Steps

  1. Remove the update check script from startup:

    sed -i '/enable-adguardhome-update-check/d' /etc/rc.local
  2. Remove the update check script:

    rm /usr/bin/enable-adguardhome-update-check
  3. Remove persistence entries from /etc/sysupgrade.conf:

    • /root/AdGuardHome_backup.tar.gz
    • /etc/AdGuardHome
    • /usr/bin/AdGuardHome
    • /usr/bin/enable-adguardhome-update-check
    • /etc/rc.local
  4. Stop AdGuard Home:

    /etc/init.d/adguardhome stop
  5. ⚠️ Reset configuration (removes all settings and blocklists!):

    rm -rf /etc/AdGuardHome
  6. Start AdGuard Home:

    /etc/init.d/adguardhome start

Restore from Backup

A backup of the original files is located at /root/AdGuardHome_backup.tar.gz (if created).

If issues persist after manual revert, you can restore AdGuard Home to its original state by re-flashing the firmware.


πŸ’‘ Getting Help

Need assistance or have questions?


⚠️ Disclaimer

This script is provided as-is without any warranty. Use it at your own risk.

It may potentially:

  • πŸ”₯ Break your router, computer, or network
  • πŸ”₯ Cause unexpected system behavior
  • πŸ”₯ Even burn down your house (okay, probably not, but you get the idea)

You have been warned!

Always read the documentation carefully and understand what a script does before running it.


πŸ‘₯ Contributors

Special thanks to:

  • All the testers and feedback providers in the GL.iNet forum!
  • Copilot – Yeah, I am using AI to help write code. But I review and test everything thoroughly!

Want to contribute? Pull requests are welcome!


🀝 Sponsors

This project is proudly supported by:

Termius Logo

Termius - The SSH client that works everywhere

Termius provides powerful SSH client solutions for developers and system administrators. Perfect for managing your GL.iNet router and other infrastructure from anywhere.


πŸ“œ License

This project is licensed under the MIT License – see the LICENSE file for details.


🧰 Part of the GL.iNet Toolbox

This project is part of a comprehensive collection of tools for GL.iNet routers.

Explore more tools and utilities:

GL.iNet Toolbox

Discover Tailscale Updater, ACME Certificate Manager, and more community-driven projects!


Made with ❀️ by Admon for the GL.iNet Community

⭐ If you find this useful, please star the repository!