---
title: 在Openwrt上安装AdguardHome
categories: 技术
cover: https://pic.biss.click/image/63a5c345-cb40-4e92-bc7b-7dc4daaf5b74.webp
tags: 
  - Openwrt 
  - AdguardHome
abbrlink: b57500e9
swiper_index: 2
summary: >-
  这篇文章介绍了在OpenWrt上安装AdguardHome的过程。首先，作者提到由于luci-app-adguardhome软件源的问题，选择了其他途径获取软件包并进行安装。接着，详细说明了安装步骤，包括下载、上传和运行安装命令。在配置部分，作者强调了更新核心版本的重要性，并提供了配置AdguardHome的具体步骤，如关闭路由器自带DNS/DHCP服务器，并建议设置AdguardHome的DHCP服务器。最后，作者提醒用户在完成配置后点击“保存并应用”，并通过AdGuardHome
  Web界面进行验证。
date: 2025-09-28 17:10:18
---

接续前言，`AdguardHome`是一款广告拦截软件，有了一台小软路由后就开始折腾了。

# 安装

首先要下载软件包，但是经过尝试，软件源里面的`luci-app-adguardhome`不太好用~~（也可能是我不会用）~~ ，所以我用的下面的包：

{% link luci-app-adguardhome,rufengsuixing,https://github.com/rufengsuixing/luci-app-adguardhome %}

虽然好几年没更新了，但还是能用。下载之后上传到路由器，使用`opkg install`命令安装，或者可以直接通过网页安装：

<center><img src="https://pic.biss.click/i/2025/10/05/rek0qq.png" alt="image" /></center>

# 配置

如下图所示进行操作，如果更新核心版本失败，考虑更换`升级用的下载链接`，使用镜像源，或者科学上网，错号框内的非必要不修改；
<center><img src="https://pic.biss.click/i/2025/10/05/s46k8g.png" alt="Screenshot of the AdGuard Home configuration page in the OpenWrt web interface. The left sidebar menu is expanded to highlight the Services section and AdGuard Home submenu. The main panel displays configuration options including enable checkbox, web management port, update core version button, executable file path, compressed file option, configuration file path, working directory, and log file path. A large red X marks the configuration file path field, indicating it should not be modified. Visible text includes AdGuard Home, OpenClash, miniDLNA, UPnP IGD and PCP, enable, update core version, executable file path, configuration file path, working directory, log file path, and other related options. The interface is clean and instructional, with a neutral tone." /></center>

最后点击“保存并应用”，然后点击`AdGuardHome Web:3000`，进行安装，建议关闭路由器自带DNS/DHCP服务器，`AdguardHome`直接替代

<center><img src="https://pic.biss.click/i/2025/10/05/s8livw.png" alt="Screenshot of the OpenWrt web interface showing the DHCP/DNS settings page. The left sidebar menu is expanded to highlight the network section and DHCP/DNS submenu. The main panel displays the General tab with options for enabling exclusive authorization and DNS redirect, both with checkboxes. The interface is clean and organized, with navigation tabs for additional settings such as DNS records, filters, logs, and PXE/TFTP. The overall tone is neutral and instructional. Visible text includes DHCP/DNS, 常规, 唯一授权, DNS redirect, 本地解析这些项目, 本地域名, and other configuration options." /></center>

<center><img src="https://pic.biss.click/i/2025/10/05/sa99dn.png" alt="alt=Screenshot of the OpenWrt web interface focused on DHCP/DNS settings. The left sidebar menu highlights the network section and DHCP/DNS submenu. Red arrows guide the user through selecting DHCP/DNS, then the settings and port tab, and finally entering 5353 in the DNS server port field. The main panel displays options for specifying interface addresses, listening interfaces, excluded interfaces, and DNS server port. Visible text includes DHCP/DNS, 设置及端口, 5353, 监听接口, 排除接口, DNS服务器端口, DNS查询端口, and related configuration options. The interface is clean and instructional, with a neutral and helpful tone." /></center>

然后，设置AdguardHome的DHCP服务器，注意要先检查配置，再启用
<center><img src="https://pic.biss.click/i/2025/10/05/scj0h4.png" alt="image" /></center>