AIoT.IO.VN
AIoT.IO.VN
Tutorial SERIES
🌐 VI • EN

Manually Install AdGuard Home in a MikroTik Container (Method 2)

Ng Nghia Phan • • ⚡ 2 min read • -- views • --
VI EN
TABLE OF CONTENTS (Nhấn để xem)

In the previous guide, I installed an AdGuard Home container using a ready-made Docker image.

That approach is fast, but some installations fail even after repeated attempts. This guide uses a blank Docker image with no service installed, then installs AdGuard Home inside it.

The offline image can reduce image-pull failures and allows other services to be added. The trade-off is more setup work.

I. Enable Container support

  • Open Terminal and run /system/device-mode/update container=yes.
    0
    0
  • When prompted, power-cycle the router.
  • After reboot, run /system/device-mode/print and confirm container: yes.
    0.1
    0.1

II. Prepare container networking and install the blank image

II.A. Prepare networking

  1. Create a bridge named dockers.
    1
    1
  2. Assign an IP address.
    2
    2
  3. Create a VETH interface.
    3
    3
  4. Add the port to the dockers bridge.
    4
    4

II.B. Install the blank Docker image

This image was built for x86_64. Do not use it on ARM, ARM64, or 32-bit x86 routers.
  1. Download the blank image from Google Drive or the Mega mirror.
    • It is based on Alpine Linux 3.17 Slim.
    • It uses Supervisor to start services.
    • It contains no personal customization or harmful scripts.
    • If you do not trust a prebuilt image, build your own.
  2. Upload the image to MikroTik through Files in WinBox.
    B1
    B1
    B1_1
    B1_1
  3. Open Container, click Add, and configure:
FieldValue
FileThe Docker image filename (file.tar)
InterfaceThe VETH created in II.A
Root DirThe container storage directory
LoggingShow logs in WinBox; enable while troubleshooting
Start On BootStart after MikroTik boots

B2
B2

Click Apply. If the image is installed correctly, the result should look like the screenshot.

B2_1
B2_1

Click Start and confirm Status changes to Running.

B2_2
B2_2

III. Install AdGuard Home in the blank image

  1. Open WinBox Terminal:
/container/shell 0

0 is the container ID. Run /container print if the ID is different.

B3_0
B3_0

  1. Download AdGuard Home:
cd /opt
wget https://github.com/AdguardTeam/AdGuardHome/releases/download/v0.107.38/AdGuardHome_linux_amd64.tar.gz
Check the AdGuard Home releases page for the newest version and update the URL before installing.

B4_0
B4_0

  1. Extract it:
tar -vxzf AdGuardHome_linux_amd64.tar.gz

B4
B4

  1. Configure Supervisor to start AdGuard Home:
vi /etc/supervisord.conf

Add:

[program:adguardhome]
command=/opt/AdGuardHome/AdGuardHome

B5
B5

Save with ESC, then :wq! and Enter.

B5_1
B5_1

Stop and start the container again.

B7
B7
B7_1
B7_1

Open http://10.0.0.2:3000/ to configure AdGuard Home.

B8
B8

IV. Set DHCP DNS to AdGuard Home

Set AdGuard Home as the DNS server under IP > DHCP Server > Network. Do not set it as the MikroTik router’s own DNS under IP > DNS unless you understand the impact.
  • Open IP > DHCP Server > Network.
    8
    8

Good luck.

TAGS: #mikrotik

Discussion & Feedback 0

Share your questions, feedback or insights with the community