OpenDNS updater for Raspberry Pi 3

Hi, I have already installed pihole and dnscrypt proxy in Rasp Pi 3B+, and its running fantastically. (Instructions: ).
I also want to add a ddclient service to the same device/application to update my OpenDNS host. I tried to ‘balena push’ the rpi-ddclient by Alan Kay (github: but it erases the above pihole & dnscrypt-proxy service. But it works fine too.
How can I have all three services on the same application? Is there a better alternative for a DDNS udpdate client?

@jeevasaeyan Hey!

Thanks for giving the PiHole project a go. Looking at the 2 projects you should be able to include the rpi-ddclient service in the docker-compoe.yml of the PiHole source. Take a look here ( to see how the main PiHole service is defined and built. You should be able to duplicate this service, make the relevant changes to the build path resulting in an extra service in your application.

I hope this helps.

the ddclient failed to install with the following error:
Failed to install service ‘rpi-ddclient sha256:0018ef0b29b50af8aecec75d7dc0710b3e98272ac8a6d9915569575ec4f4ac04’ due to '(HTTP code 500) server error - readdirent: not a directory ’

My docker-compose.yml:


build: ./pihole
privileged: true
- ‘pihole_config:/etc/pihole’
- ‘dnsmasq_config:/etc/dnsmasq.d’
- ‘’
- ‘’
network_mode: host

optional upstream resolver: GitHub - DNSCrypt/dnscrypt-proxy: dnscrypt-proxy 2 - A flexible DNS proxy, with support for encrypted DNS protocols.

set pihole DNS1 and DNS2 service variables to to use this for upstream DNS

otherwise comment out this block to completely remove the service

image: klutchell/dnscrypt-proxy:2.0.19-arm
- ‘5300:53/tcp’
- ‘5300:53/udp’
- ‘’
- ‘’
build: ./pihole
privileged: true
- ‘ddclient_config:/etc/ddclient.conf’
network_mode: host
- PUID=1000
- PGID=1000
restart: always

Dockerfile inside ./pihole:
FROM balenalib/raspberrypi3-debian:latest-build AS build

WORKDIR /usr/src

RUN install_packages cmake libraspberrypi-dev

RUN curl -sSL -O
RUN curl -sSL -O

WORKDIR /usr/src/build

RUN cmake .. && make

FROM pihole/pihole:4.2.2-1_armhf

WORKDIR /usr/src

COPY --from=build /opt/vc/lib/* /opt/vc/lib/
COPY --from=build /usr/src/build/fbcp /usr/src/
COPY services/ /etc/services.d/
COPY init/ /etc/cont-init.d/

RUN sed -i '/$AUTHORIZED_HOSTNAMES = array(/ a "",' /var/www/html/admin/scripts/pi-hole/php/auth.php

# force dnsmasq to really bind only the interfaces it is listening on
# otherwise dnsmasq will fail to start since balena is using 53 on some interfaces
RUN echo "bind-interfaces" >> /etc/dnsmasq.conf

RUN curl -fsSL -O \
	&& chmod +x

# use wally3k's ticked list from
RUN curl -sSL -o /etc/pihole/adlists.list

FROM resin/rpi-raspbian:stretch
LABEL maintainer=""

USER root

# Install ddclient
RUN apt-get update \
    && apt-get install -y ddclient libio-socket-ssl-perl \
    && apt-get clean \
    && rm -rf /var/lib/apt/lists/*

COPY ddclient.conf /etc/ddclient.conf

# Use ddclient
CMD ["/usr/sbin/ddclient","-foreground"]

I’m actually a newbie, so some detailed fix will go a long way please!!

Hi ! Looking at your config - you’re almost there :slight_smile:

docker-compose takes multiple Docker-based applications and allows them to be deployed together as a single stack. It needs to know either about the image to pull for a specific app (you did this with dns proxy in the example above) or about a Dockerfile that tells it how to build an image - this is what the build keyword tells it about. I think both of your service definitions are pointing to pihole directory - try creating a new directory, with contents of the rpi-ddclient repo and then change the rpi-ddclient service build section to point to that directory. This would tell docker compose to build a new application image from the contents of that directory. It will find a Dockerfile there that would tell it how to build it and then Dockerfile can pull in more files if it needs to :slight_smile: hope this helps and let us know how it went :slight_smile: