Help by setting Unbound + Pihole on Portainer.

Expected Behaviour

I want to run Pi-hole with Unbound (recursive, no external upstreams) using Docker and Portainer and I’m unsure about the recommended architecture.

I already have Pi-hole running successfully in its own Docker container, and now want to add Unbound in the correct way.

Specifically, I’m confused about:

  • running Pi-hole and Unbound as two separate containers vs one combined container

  • using individual containers vs a Docker stack (docker-compose) in Portainer

My goal is a clean, maintainable, best-practice setup without unnecessary complexity.


System Details

  • OS: Debian (Raspberry Pi OS)

  • Hardware: Raspberry Pi (8GB)

  • Docker: Docker standalone (Portainer, not Swarm)


Actual Behaviour

Pi-hole works fine as a container, but when adding Unbound I find conflicting advice:

  • some guides use two containers

  • some combine everything into one container

  • some insist on docker-compose stacks

Portainer handles stacks and containers differently, which adds to the confusion.


Main Question

What is the recommended and supported way today to run Pi-hole + Unbound with Docker?

  • Separate containers or one container?

  • Stack or individual containers?

  • Is there any tutorial?

There is no right or wrong answer for these questions.

  • Separate containers or one container?
    Pi-hole only has official images for Pi-hole. No images containing Unbound.
    If you want to use a single image for both servers, then you will need to use a third party image.

  • Stack or individual containers?
    This is a personal choice. Use what feels comfortable.
    You can use:

    • docker run command, on the command line.
    • docker compose command, on the command line.
    • use a single Portainer "stack" (a compose file containing both services) or
    • use 2 separate Portainer "stacks"
  • Is there any tutorial?
    Since this is an user's choice, each user has a personal way to do it.
    Suggestion: check the example from this answer: Best way to add unbound to existing Docker pihole? - #2 by rdwebdesign

1 Like