How to install Pi-Hole and unbound on CasaOS using BigBearCasaOS

You can edit the docker compose with:

Awesome, going to add this to my list of commands, thank you.

You’re welcome. Checkout out the other big-bear-scripts might help as well:

You can alway suggest ideas for new scripts here:


When I try to update gravity, appears 2 errors on CasaOS on Zimaboard :

  • [✗] DNS resolution is currently unavailable*
  • [✗] DNS resolution is not available*
    what was the issue in hear and can you fix it please?


I’ve implemented a modification in the most recent Docker Compose file within big-bear-casaos, which should resolve this issue.

I made a post on this change:

Hello -

I migrated from a rPi to CasaOS and found that I can install your Pi-Hole / Unbound container and was awesome to see. I am however having an issue. When I try to add some lists from Firebog’s list of stuff, I cannot add additional Adlists as it keeps providing the following error:

(While executing: attempt to write a readonly database)

Does anyone having any suggestions as to where to add these lists at this point? Or, is there a setting I forgot to add to the container to allow myself to add / change databases? I enabled privileges in the container settings. Sorry, I am still learning how everything works within containers / linux.

Can you try running

docker exec big-bear-pihole-unbound pihole -g


Thought I typed it wrong twice, but I guess not. This was using the terminal in the container itself.

SSH into the CasaOS server and run this:

docker exec big-bear-pihole-unbound pihole -g

or if you go directly inside the container just run:

pihole -g

If I run the command via ssh, I ran it with Sudo but would not execute without.

When you execute docker exec or any Docker command and find yourself needing to use sudo, it typically means the current user doesn’t have the necessary permissions to interact with the Docker daemon. By default, Docker requires root privileges, which is why using sudo grants you the access you need.

However, for convenience and to avoid the security risks associated with constantly using sudo, Docker allows you to add users to a special group called docker. Any user in the docker group is granted permissions to run Docker commands without needing to prefix them with sudo.

Add Your User to the Docker Group

This method allows your user to run Docker commands without needing root access. You can do this by running:

sudo usermod -aG docker $USER

After this, log out and log back in to apply the group changes. This is generally the recommended approach for development environments.

1 Like

I ran the code then logged out. I then logged back in and went into the web-panel and tried to add an entry into the adlist and still had the same error message. (Sorry, new to docker for the most part.)

When I ssh’d back into the server box, I ran “docker exec big-bear-pihole-unbound pihole -g” and it ran without needing sudo.

Can you try running:

docker exec big-bear-pihole-unbound chown -R www-data:pihole /etc/pihole

Ran the command, it didn’t do anything. I did notice something off though about the container.

Under the /etc/ directory, there isn’t a folder listed “pihole”.

I removed and reinstalled the container from scratch and it is showing the same thing. The only thing I am seeing folder wise is “migration_backup” and severalf files. That in itself I feel like may cause some issues…

When you run the command, it’s not supposed to have any output. After you run it, go back in and try to add a list.

Alright, sorry. Still learning how this works. Again for some reason, never had this issue while running it bare metal by itself outside of a container.

The command worked. I am now able to add lists through the web interface. I very much appreciate it.

It seems to be an issue with Pi-Hole, so every time you reboot the container, you will need to run that command.

Will make note of that and keep this in mind. I guess it’s time for me to start doing more learning for Docker now. Again, I appreciate the help!

You can add this to the Docker Compose file:

command: ["/bin/sh", "-c", "chown -R www-data:pihole /etc/pihole"]

I might look at adding it to BigBearCasaOS.

You’re welcome! I go over quite a bit in my videos.