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:

image

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.

Hi,
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,
Thodoris

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
Felipe

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 192.168.1.9, and Iā€™ve also assigned 192.168.1.223. 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 http://127.0.0.1

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.