nextdns: Unifi UXG Pro does not work

When trying to install it on the Unifi UXG Pro router i get this message (it’s based on the same kernel as UDM (Pro)):

# sh -c 'sh -c "$(curl -sL https://nextdns.io/install)"'
INFO: OS: ubios
INFO: GOARCH: arm64
INFO: GOOS: linux
INFO: NEXTDNS_BIN: /data/nextdns
INFO: LATEST_RELEASE: 1.32.0
i) Install NextDNS
e) Exit
Choice (default=i): i
INFO: Installing NextDNS...
Error: invalid arguments /tmp/nextdns.list, unifi-os:/etc/apt/sources.list.d/nextdns.list you must use just one container
Error: no container with name or ID unifi-os found: no such container
Error: no container with name or ID unifi-os found: no such container
Error: no container with name or ID unifi-os found: no such container

Is there anything specific I can test/do to fix this? 😃 Running UXG Pro firmware 1.9.0-4.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 48 (3 by maintainers)

Most upvoted comments

There is now a total of $225 pledged to solving this issue on BountySource.

Right now thats even more 😀 375, but no updates so far. @rs Maybe you can help?

@rs could this issue be re-opened please?

Thank you! 🙂

Poking around with some of the install script’s FORCE_* ENVs to no avail. Even if the installation seems successful, running the nextdns binary (for any of the subcommands besides version) results in: system not supported. On the plus side, that means the architecture of the binary is correct and that it executes. I think it’s tripping over some of the checks for the ubios platform like: https://github.com/nextdns/nextdns/blob/90dca2ec199308d69578dc5cdfd99046a805ba72/host/service/ubios/service.go#L28-L30

I’ve included a ton of info from my UXG Pro. I’ve also got 2x uSgs at my disposal. Let me know if there anything else I can help with.

# sh -c 'DEBUG=1 sh ./install-nextdns.sh'
INFO: OS: alpine
INFO: GOARCH: arm64
INFO: GOOS: linux
INFO: NEXTDNS_BIN: /usr/bin/nextdns
INFO: INSTALL_RELEASE: 1.37.11
DEBUG: Start install loop with CURRENT_RELEASE=
DEBUG: NextDNS is not installed
i) Install NextDNS
e) Exit
Choice (default=i): i
INFO: Installing NextDNS...
DEBUG: Using bin install type
DEBUG: Installing 1.37.11 binary for linux/arm64 to /usr/bin/nextdns
DEBUG: Downloading https://github.com/nextdns/nextdns/releases/download/v1.37.11/nextdns_1.37.11_linux_arm64.tar.gz
DEBUG: Start configure
DEBUG: Get configuration ID
system not supported
NextDNS Configuration ID: <snip>
DEBUG: Add arg -config=<snip>
Sending your devices name lets you filter analytics and logs by device.
Report device name? [Y|n]: Y
DEBUG: Add arg -report-client-info=true
Accept DNS request from other network hosts.
system not supported
Setup as a router? (y/n): y
DEBUG: Add arg -setup-router=true
Make nextdns CLI cache responses. This improves latency and reduces the amount
of queries sent to NextDNS.
system not supported
Enable caching? [Y|n]: Y
DEBUG: Add arg -cache-size=10MB
Instant refresh will force low TTL on responses sent to clients so they rely
on CLI DNS cache. This will allow changes on your NextDNS config to be applied
on you LAN hosts without having to wait for their cache to expire.
system not supported
Enable instant refresh? (y/n): y
DEBUG: Add arg -max-ttl=5s
Changes DNS settings of the host automatically when nextdns is started.
If you say no here, you will have to manually configure DNS to 127.0.0.1.
Automatically setup local host DNS? [Y|n]: Y
DEBUG: Add arg -auto-activate=true
system not supported

Congratulations! NextDNS is now installed.

To upgrade/uninstall, run this command again and select the approriate option.

You can use the nextdns command to control the daemon.
Here is a few important commands to know:

# Start, stop, restart the daemon:
nextdns start
nextdns stop
nextdns restart

# Configure the local host to point to NextDNS or not:
nextdns activate
nextdns deactivate

# Explore daemon logs:
nextdns log

# For more commands, use:
nextdns help

# nextdns start
system not supported
# nextdns activate
system not supported
# nextdns log
system not supported
# nextdns version
nextdns version 1.37.11

It’s unclear to me what the analog for some of these checks would be for the UXG Pro’s UbiOS as it seems novel compared to the USG.

https://github.com/nextdns/nextdns/blob/90dca2ec199308d69578dc5cdfd99046a805ba72/host/service/ubios/service.go#L45

# cat /proc/1/cgroup

2:devices:/
1:name=systemd:/
0::/

# podman ps

CONTAINER ID  IMAGE                       COMMAND               CREATED       STATUS         PORTS  NAMES
2f512bd9b148  localhost/uxg-setup:latest  nodejs /usr/share...  3 months ago  Up 2 days ago         uxg-setup

# podman image ls

REPOSITORY            TAG       IMAGE ID       CREATED        SIZE     R/O
localhost/uxg-setup   latest    906259128924   3 months ago   316 MB   true
localhost/uxg-setup   default   906259128924   3 months ago   316 MB   true

# podman info

host:
  BuildahVersion: 1.11.2
  CgroupVersion: v2
  Conmon:
    package: Unknown
    path: /usr/libexec/podman/conmon
    version: 'conmon version 2.0.1, commit: 890392262a258b98e49f94827e150ab55b758914'
  Distribution:
    distribution: ubios
    version: v1.11.0.3923-8903922
  MemFree: 859222016
  MemTotal: 2096848896
  OCIRuntime:
    package: Unknown
    path: /usr/bin/runc
    version: |-
      runc version commit: v1.0.0-rc6
      spec: 1.0.1-dev
  SwapFree: 3669483520
  SwapTotal: 3669483520
  arch: arm64
  cpus: 4
  eventlogger: file
  hostname: UXGPro
  kernel: 4.19.152-al-linux-v10.2.0-v1.11.0.3923-8903922
  os: linux
  rootless: false
  uptime: 59h 8m 19.72s (Approximately 2.46 days)
registries:
  blocked: null
  insecure: null
  search:
  - docker.io
  - quay.io
  - registry.fedoraproject.org
store:
  ConfigFile: /etc/containers/storage.conf
  ContainerStore:
    number: 1
  GraphDriverName: overlay
  GraphOptions:
    .imagestore: /var/lib/containers/storage
    .mountopt: nodev
    .skip_mount_home: "false"
  GraphRoot: /mnt/data/podman/storage
  GraphStatus:
    Backing Filesystem: extfs
    Native Overlay Diff: "true"
    Supports d_type: "true"
    Using metacopy: "false"
  ImageStore:
    number: 1
  RunRoot: /var/run/containers/storage
  VolumePath: /mnt/data/podman/storage/volumes

# uname -a

Linux UXGPro 4.19.152-al-linux-v10.2.0-v1.11.0.3923-8903922 #1 SMP Mon Dec 20 16:52:42 UTC 2021 aarch64 GNU/Linux

# cat /etc/os-release

NAME=UbiOS
VERSION=UXG.alpinev2.v1.11.0.8903922.211220.1547
ID=ubios
VERSION_ID=v1.11.0.3923-8903922
PRETTY_NAME="UbiOS 1.11.0.3923"
BUILD_ID=211220.1547
VARIANT=UXG.alpinev2
"sh -x -c 'DEBUG=1 sh -x ./install-nextdns.sh'"
+ DEBUG=1 sh -x ./install-nextdns.sh
+ umask 0022
+ main
+ detect_os
+ '['  ]
+ uname -s
+ uname -o
+ grep -q -e ^EdgeRouter -e ^UniFiSecurityGateway /etc/version
+ uname -u
+ grep -q ^synology
+ . /etc/os-release
+ NAME=UbiOS
+ VERSION=UXG.alpinev2.v1.11.0.8903922.211220.1547
+ ID=ubios
+ VERSION_ID=v1.11.0.3923-8903922
+ PRETTY_NAME='UbiOS 1.11.0.3923'
+ BUILD_ID=211220.1547
+ VARIANT=UXG.alpinev2
+ echo ubios
+ dist=ubios
+ command -v podman
+ '[' -z /usr/bin/podman ]
+ echo ubios
+ return 0
+ OS=ubios
+ detect_goarch
+ '['  ]
+ uname -m
+ uname -o
+ echo arm64
+ GOARCH=arm64
+ detect_goos
+ '['  ]
+ uname -s
+ echo linux
+ GOOS=linux
+ bin_location
+ echo /data/nextdns
+ NEXTDNS_BIN=/data/nextdns
+ get_release
+ '['  ]
+ command -v curl
+ break
+ cmd='curl -A curl -s'
+ grep '"tag_name":'
+ curl+ sed -e s/^v//
 -A+  curlesed -s https://api.github.com/repos/nextdns/nextdns/releases/latest 's/.*"([^"]+)".*/\1/'

+ echo+ sed -E

+ sed -E 's/.*"([^"]+)".*/\1/'
+ v=1.37.11
+ '[' -z 1.37.11 ]
+ echo 1.37.11
+ INSTALL_RELEASE=1.37.11
+ export 'NEXTDNS_INSTALLER=1'
+ log_info 'OS: ubios'
+ printf 'INFO: %s\n' 'OS: ubios'
INFO: OS: ubios
+ log_info 'GOARCH: arm64'
+ printf 'INFO: %s\n' 'GOARCH: arm64'
INFO: GOARCH: arm64
+ log_info 'GOOS: linux'
+ printf 'INFO: %s\n' 'GOOS: linux'
INFO: GOOS: linux
+ log_info 'NEXTDNS_BIN: /data/nextdns'
+ printf 'INFO: %s\n' 'NEXTDNS_BIN: /data/nextdns'
INFO: NEXTDNS_BIN: /data/nextdns
+ log_info 'INSTALL_RELEASE: 1.37.11'
+ printf 'INFO: %s\n' 'INSTALL_RELEASE: 1.37.11'
INFO: INSTALL_RELEASE: 1.37.11
+ '[' -z ubios ]
+ '[' -z arm64 ]
+ '[' -z linux ]
+ '[' -z /data/nextdns ]
+ '[' -z 1.37.11 ]
+ true
+ get_current_release
+ '[' -x /data/nextdns ]
+ CURRENT_RELEASE=
+ log_debug 'Start install loop with CURRENT_RELEASE='
+ '[' 1 '=' 1 ]
+ printf '\033[30;1mDEBUG: %s\033[0m\n' 'Start install loop with CURRENT_RELEASE='
DEBUG: Start install loop with CURRENT_RELEASE=
+ '['  ]
+ log_debug 'NextDNS is not installed'
+ '[' 1 '=' 1 ]
+ printf '\033[30;1mDEBUG: %s\033[0m\n' 'NextDNS is not installed'
DEBUG: NextDNS is not installed
+ menu i 'Install NextDNS' install e Exit exit
+ true
+ n=0
+ default=
+ key=i
+ '[' -z  ]
+ default=i
+ n=1
+ echo 'i) Install NextDNS'
i) Install NextDNS
+ n=2
+ n=3
+ key=e
+ '[' -z i ]
+ n=4
+ echo 'e) Exit'
e) Exit
+ n=5
+ n=6
+ print 'Choice (default=%s): ' i
+ format='Choice (default=%s): '
+ '[' 2 -gt 0 ]
+ shift
+ printf 'Choice (default=%s): ' i
Choice (default=i): + read -r choice
i
+ '[' -z i ]
+ n=0
+ key=i
+ n=1
+ n=2
+ '[' i '=' i ]
+ install
+ get_current_release
+ '[' -x /data/nextdns ]
+ '['  ]
+ install_type
+ '['  ]
+ echo ubios
+ type=ubios
+ log_info 'Installing NextDNS...'
+ printf 'INFO: %s\n' 'Installing NextDNS...'
INFO: Installing NextDNS...
+ log_debug 'Using ubios install type'
+ '[' 1 '=' 1 ]
+ printf '\033[30;1mDEBUG: %s\033[0m\n' 'Using ubios install type'
DEBUG: Using ubios install type
+ install_ubios
+ ubios_install_source
+ echo 'deb [signed-by=/usr/share/keyrings/nextdns.gpg] https://repo.nextdns.io/deb stable main'
+ podman exec unifi-os mv /data/nextdns.list /etc/apt/sources.list.d/nextdns.list
Error: no container with name or ID unifi-os found: no such container
+ rm -f /tmp/nextdns.list
+ podman exec unifi-os apt-get install -y gnupg1 curl
Error: no container with name or ID unifi-os found: no such container
+ podman exec unifi-os curl -sfL https://repo.nextdns.io/nextdns.gpg -o /usr/share/keyrings/nextdns.gpg
Error: no container with name or ID unifi-os found: no such container
+ podman exec unifi-os apt-get update -o 'Dir::Etc::sourcelist=sources.list.d/nextdns.list' -o 'Dir::Etc::sourceparts=-' -o 'APT::Get::List-Cleanup=0'
Error: no container with name or ID unifi-os found: no such container
+ podman exec unifi-os apt-get install -y nextdns
Error: no container with name or ID unifi-os found: no such container
+ break 2
+ true
+ get_current_release
+ '[' -x /data/nextdns ]
+ CURRENT_RELEASE=
+ log_debug 'Start install loop with CURRENT_RELEASE='
+ '[' 1 '=' 1 ]
+ printf '\033[30;1mDEBUG: %s\033[0m\n' 'Start install loop with CURRENT_RELEASE='
DEBUG: Start install loop with CURRENT_RELEASE=
+ '['  ]
+ log_debug 'NextDNS is not installed'
+ '[' 1 '=' 1 ]
+ printf '\033[30;1mDEBUG: %s\033[0m\n' 'NextDNS is not installed'
DEBUG: NextDNS is not installed
+ menu i 'Install NextDNS' install e Exit exit
+ true
+ n=0
+ default=
+ key=i
+ '[' -z  ]
+ default=i
+ n=1
+ echo 'i) Install NextDNS'
i) Install NextDNS
+ n=2
+ n=3
+ key=e
+ '[' -z i ]
+ n=4
+ echo 'e) Exit'
e) Exit
+ n=5
+ n=6
+ print 'Choice (default=%s): ' i
+ format='Choice (default=%s): '
+ '[' 2 -gt 0 ]
+ shift
+ printf 'Choice (default=%s): ' i
Choice (default=i): + read -r choice
e
+ '[' -z e ]
+ n=0
+ key=i
+ n=1
+ n=2
+ '[' i '=' e ]
+ n=3
+ key=e
+ n=4
+ n=5
+ '[' e '=' e ]
+ exit

No i just used the defaults, with Router I said yes. After that I rebooted and it worked. However, since I dont ‘trust’ it keeps working I have removed it now and went for the normal DNS via IP in the UI.

My friends, firmware UXG Pro 3.0.7 allowed me to install sh` -c ‘sh -c “$(curl -sL https://nextdns.io/install)”’ without any workarounds, NextDNS after almost 2 years is now running on my UXG Pro!