Docker/Portainer container config

New to Docker and trying to get davd/docker-ddns container working.
I’m to the point where I need to configure these settings:

docker run -it -d \
    -p 8080:8080 \
    -p 53:53 \
    -p 53:53/udp \
    -e SHARED_SECRET=changeme \
    -e \
    -e RECORD_TTL=3600 \
    --name=dyndns \

I’m at a loss as to where these go or how to set them. I would think it would be under the portainer->containers->command and logging section but it’s not clear.

All the online documentation I can find uses the command line and I’m not sure that’s appropriate when running docker on nethserver.

Simply SSH into your nethserver instance and run the command there
docker run -it -d \ -p 8080:8080 \ -p 53:53 \ -p 53:53/udp \ -e SHARED_SECRET=changeme \ -e \ -e RECORD_TTL=3600 \ --name=dyndns \ davd/docker-ddns:latest
Obviously change details to suit your use case

The only issue I see is a conflict of ports as I can’t remember for certain but I think nethserver installs DNS by default which would use that port

1 Like

Basicaly from what I understand of the package they assume your going to run it on a vps or vm without any other services already installed aside from docker

I mean theoreticaly it should work in nethserver with docker using an alternative port (e.g., 5353) then using a means to externaly map the incoming traffic from port 53 (from the connection that sits outside of your nethserver) to port 5353 and vise versa (e.g., port forwarding on your router)

if you do that then this should work
issue this cmd as root in nethserver terminal

mkdir ./cache && chmod -R a+w ./cache

then issue this cmd in full (remember to change your domain to the correct one for your use case)

docker run -it -d \
-v /cache:/var/cache/bind \
    -p 8080:8080 \
    -p 5353:53 \
    -p 5353:53/udp \
    -e SHARED_SECRET=changeme \
    -e ZONE=yourdomain.tld \
    -e RECORD_TTL=3600 \
    --name=dyndns \

This allows you to keep persist DNS configuration across container recreation

Also make sure nothing else is running on port 8080 if there is change -p 8080:8080 to -p someport:8080

But remember for this to work you need

  1. Domain name

  2. your nethserver (or I should say the router connected to nethserver needs to have a public Static IP and you domain name has to point to that IP)

  3. Port Forwarding Setup correctly

1 Like

Shane_Treweek, thank you for trying to help. I really appreciate it.

When I try to run the commands from the nethserver command line or from ssh I get “docker: invalid reference format”
Googling the error leads down a rabbit hole of possible problems including “don’t use capital letters in your password” and “are you using power shell?”.

I tried copy and paste on the command you provided and just changed the shared_secret and zone entries and I still get the same error. I’ve also tried changing the ports, still same error.

I’m able to run portainer which is actually running in a docker container right? So I think docker is running ok on my nethserver.

I’m at a total loss. :frowning_face:

Also don’t use $ in the password apart from that I’ll take a look and see what’s going wrong

I’m able to add the container using portainer but according to the logs when it tries to run it immediately shuts down with exit code 2. I did find the below common pitfalls section that might be related but to be honest, I’m starting to feel like docker is a bit like the game Jenga.

Common pitfalls
If you’re on a systemd-based distribution, the process systemd-resolved might occupy the DNS port 53. Therefore starting the container might fail. To fix this disable the DNSStubListener by adding DNSStubListener=no to /etc/systemd/resolved.conf and restart the service using sudo systemctl restart systemd-resolved.service but be aware of the implications… Read more here: systemd-resolved.service and

if you have port forwarding setup correctly to use port 5353 instead of 53 and if you have firewall enabled on nethserver you need to open the port 5353 to the ip of the docker container

use portainer to find the ip of the container

Unfortunately, I’m unable to configure the container to change the port because of the “docker: invalid reference format” error.
I really appreciate you trying to help but after waking this morning to find my nethserver web interface unresponsive I’ve decided that docker is more trouble than it’s worth.

yum remove docker-ce
rm -rf /var/lib/docker

1 Like

Sometimes it can be unfortunatley especialy when to things need the same port there are workarounds but workarounds aren’t fixes