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

Discover How to Install Pi-Hole and Unbound on CasaOS using our App Store BigBearCasaOS! :sparkles: In this tutorial, we’ll walk you through the process, step by step, ensuring you’re set up and ready to go in no time.

Great instructional video on this one. Wanted to know if the image can be upgraded to the latest without breaking any of the configurations you’ve made?

Thank you, and yes, it has been updated. Thanks for letting me know.

Thank you. I will export and delete, then reinstall from the store.

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:

Hi!

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?

@dkny2000

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:

image
(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

image

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.