Updating Balena-PiHole

Hi All,

How do I go about updating the version of PiHole already deployed on my devices in BalenaCloud (or at least using BalenaOS)?

Thank you in advance.

Hi @kr33 - welcome to the forums!

To update, you can download the latest version of the project again and push it again. You don’t need to download the OS or reflash the SD card, just download the latest from GitHub and use the balena CLI to push it again in the same way you did the first time.

1 Like

I’m afraid I’m not a Docker or a Balena OS expert. I successfully installed PiHole over a year ago, but did not take meticulous notes, so “the same way I did last time” won’t work for me. Can you point me to the instructions where one uses Balena CLI to push a new OS?

@BKFC it’s actually a lot easier than that now; you can go to the Pi-hole repo and click the Deploy with balena button. This will let you deploy the latest version onto your existing device, just make sure to select ‘Use an existing application instead’ when it takes you to the dashboard. :+1:

Thanks for the tip. I went to the repository and clicked Deploy, which brought me to the balena dashboard. At that point I could not see any action to take except to create an application. I did not find a “use an existing application instead” in any view that I could see.

Hi @BKFC, to be clear, you already have an existing application, right?
(asking in case you deleted the previous one).

You are supposed to see this screen:

If you are not seeing it, could you please look for errors on your browser’s developer console?

Also it’d help if you could give us info about the browser you use: https://www.whatismybrowser.com/

First - Yes, I’m running pi-hole now on a Raspberry Pi 3, and in fact I’m reluctant to do the upgrade for fear I will lose what I have.

I see this:


Then when I click on it, I see this:

I’m afraid I don’t know which is the developer’s console.

I’m running the balena interface on a Mac with OS Mojave, browser is Safari.

I think I’m missing something since I don’t see the window you’ve posted.

Since the pi-hole project is configured to use named volumes to hold all the configuration, updating the version running should not cause concerns about losing the current state.
If you later decide that you do not like the new version, you can pin the device to run the previous release from the device list or the device summary page.

It’s weird that you do not get the aforementioned modal after you use the deploy with balena button.
Can you provide us a link with your browser version using https://www.whatsmybrowser.org/ ?

In order to enable the developer console in Safari you can follow these instructions:

After that you should be able to open the developer console by clicking “Develop” and then “Show Javascript Console”.
Any errors found in there would help to further investigate this.

As an alternative, I would also suggest you to use a different browser (eg Chome) in case you have it already installed on your system.

Kind regards,

It worked using Chrome!

Here is what I was using before:

I note that it took close to an hour to build and update, but otherwise seems to work.

Thanks very much for your help.

That said, I just discovered that I cannot connect to the device at the assigned (static) IP address, with either browser. I tried rebooting the router as well as the device; still no connection. I can connect to sites in the outside world but not the pi-hole console.

Also, I’ve noticed that connections now are extremely slow, so I’ve taken pi-hole out of the DNS looped and am simply using the DNS from my ISP. And I still can’t connect to the pi-hole console even though it’s in the subnetwork.

Hi again,

Thanks for sharing your browser info. Could you also try getting the logs from the Safari developer console after you click the ‘Deploy with Balena’ button ? We would love to get to the bottom of this and that information is essential to diagnose.

I’m also glad that you managed to get the application installed on your device. Regarding the issue accessing the device. Can you reach the device through the local network using ping or balena ssh <IP address>.

Thanks again for your help

I just tried “deploy with balena” using Safari. Here is a screenshot of the javascript console log:

On the access issue: I can ping the device from the local network, though I cannot get in via balena ssh because I don’t know the administrative password. I can get a login shell on the device using the balena console, but it behaves like the device is refusing web-based connections. I’ve restarted the router and the device, to no effect.

Hi again. Thanks for sharing the console info.

You don’t need an administrative password to log in using balena ssh, you only need to setup a public key in the dashboard. Here are some instructions on how to do that

By refusing web based connections you mean you cannot access the web dashboard through the local network?

I followed those directions, and discovered that there already was a set of keys for my Mac. But when I ran balena ssh on the Mac, it still asked for a password, which I don’t know. So I deleted the keys in the balena cloud dashboard (a mistake). Now when I try to get new ones from GitHub it says “an error has occurred”

The IP address of the device is, and I’ve also assigned When I type either of these (with or without http://) in the browser, I get a “connection refused” or a “cannot connect” message.

As noted before, I can

  • ping it from the Mac
  • run a shell from the balena console
  • see it in the list of connected devices to the router

I should add that I didn’t have any of these problems before running the upgrade. Pi-hole was running correctly and I could connect to its console.

Hi again, regarding the SSH keys. If you are still getting the issue with Github it would again be useful to get the console output to see if we get any more info there. Otherwise you can get your computer public SSH key running the following command from a terminal.

cat ~/.ssh/id_rsa.pub

You can use the output from the command to manually add the SSH key in the dashboard.

Regarding the problem reaching the pihole dashboard, when SSH’ing into the device, can you connect to the pihole server using curl

If not I’d recommend checking that you have the correct values for the device variables described in https://github.com/klutchell/balena-pihole#device-variables. Looking at the output of the pihole service might give you an indication of where the problem might be.

Finally, regarding the issue with the Deploy with Balena button. Can you tell us if you have any AdBlocker installed for Safari

Thanks again for your help.

I put the SSH key in manually. When I ran balena ssh to the device, it asks for a password as it did before, which I don’t know.

I can’t ssh into the device.