Skip to content

Instantly share code, notes, and snippets.

@kangarie
Last active July 28, 2025 12:28
Show Gist options
  • Save kangarie/72d8d606d2084eb7d5ce8e2109b0adc3 to your computer and use it in GitHub Desktop.
Save kangarie/72d8d606d2084eb7d5ce8e2109b0adc3 to your computer and use it in GitHub Desktop.
mikrotik container adguard home script installation
/system/device-mode/update container=yes
/interface veth add address=172.17.0.1/24 gateway=172.17.0.254 name=agh
/interface bridge add name=dockers
/interface bridge port add bridge=dockers interface=agh
/ip address add address=172.17.0.254/24 interface=dockers network=172.17.0.0
/ip firewall nat add action=masquerade chain=srcnat
/container config set registry-url=https://registry-1.docker.io tmpdir=/disk1/tmp
/container mounts add dst=/opt/adguardhome/conf name=agh_conf src=/disk1/conf/agh
/container add remote-image=adguard/adguardhome:latest interface=agh logging=yes mounts=agh_conf start-on-boot=yes workdir=/opt/adguardhome/work root-dir="/disk1/agh" cmd="-c /opt/adguardhome/conf/AdGuardHome.yaml -h 0.0.0.0 -w /opt/adguardhome/work" dns=8.8.8.8 entrypoint=/opt/adguardhome/AdGuardHome
/container start number=0
@MeJIuFaRo
Copy link

MeJIuFaRo commented Mar 28, 2023

hello!
I have "exec format error" in logs... ros 7.8

/container
add cmd="--no-check-update -c /opt/adguardhome/conf/AdGuardHome.yaml -h 0.0.0.0 -w /opt/adguardhome/work" entrypoint=/opt/adguardhome/AdGuardHome interface=veth1 logging=yes root-dir=/usb1/adguard start-on-boot=yes workdir=\
    /opt/adguardhome/work

@llity
Copy link

llity commented Mar 12, 2024

hello! I have "exec format error" in logs... ros 7.8

/container
add cmd="--no-check-update -c /opt/adguardhome/conf/AdGuardHome.yaml -h 0.0.0.0 -w /opt/adguardhome/work" entrypoint=/opt/adguardhome/AdGuardHome interface=veth1 logging=yes root-dir=/usb1/adguard start-on-boot=yes workdir=\
    /opt/adguardhome/work

Does it work properly?

@calum-mcfarlane
Copy link

calum-mcfarlane commented Jul 28, 2025

hello! I have "exec format error" in logs... ros 7.8

/container
add cmd="--no-check-update -c /opt/adguardhome/conf/AdGuardHome.yaml -h 0.0.0.0 -w /opt/adguardhome/work" entrypoint=/opt/adguardhome/AdGuardHome interface=veth1 logging=yes root-dir=/usb1/adguard start-on-boot=yes workdir=\
    /opt/adguardhome/work

Does it work properly?

You only need this part I think

-c /opt/adguardhome/conf/AdGuardHome.yaml -h 0.0.0.0 -w /opt/adguardhome/work

The dns and entrypoint information goes in separate fields, if you are using Winbox

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment