Pihole - newbie problems due to lack of understanding general principles

Hi All, I’m new to the forum and relatively new to Pi - very new to balenacloud!

I am following the pi hole tutorial steps and have an application/device running in balena cloud. I’m getting stuck at a couple of points so would really appreciate some help.

  1. When trying to add Service variables, I’m seeing an error telling me that ‘services are defined when I deploy my fleet’ - do I need to add all these as environment variables which will then be added when I deploy, or is it an option that becomes available (note I don’t actually know how to deploy my fleet)

  2. Stuck at pushing the package from balena cli. I have installed NPM and node.js etc (Win10 environment) and can log in to balena via Powershell running as admin.
    There appears to be a balena-pihole folder in my system32 folder, and the powershell is at that directory (system32, no deeper).
    When I run balena push pihole, I get errors - the package thingy tries to run but I ‘don’t have enough privileges’.

Can anyone suggest how I can progress beyond these stages, please? Thanks in advance!

Edit to add: I did install the MinGW packages and edit the PATH - what I don’t understand is how to add SSH keys to %homedrive%%homepath\.ssh .

Hello @M7PUG, welcome to the forums! :slight_smile:

1 - You need to deploy one device to the application in order for the Service Variables to become available to be added.

Have you already downloaded the image file and flashed the SD Card with Etcher?

For the CLI, I would suggest downloading the standalone version, which you get the latest version from https://github.com/balena-io/balena-cli/releases/latest. For Windows, you would download this file and unzip on your computer to somewhere easy to access via the terminal, let’s say C:\balena

Then from powershell, go to the Pi-Hole project folder and type C:\balena\balena login, and select Web authorization.

Once logged, you can then push the code to the device with C:\balena\balena push <project-name>.

Please let me know how it goes and we can get you up and running.


I have the exact same problem. Device is added to fleet but add Service Variables is still greyed out.

Hey @simonnelli, can you confirm that you have deployed a device to your balenaCloud application and it is showing as Online?

Thank you

Yes, the device is online and deployed to the application.

@simonnelli, I’ve send you a private message, let’s see if I can help you from there. Thank you

1 Like

Just to post the solution here, @simonnelli was trying to change the variables without having a device with containers running on the platform. After having containers online, you will be able to change the variables.

Thank you

1 Like

Yes, thank you @dansku for the quick help.

This is my first project with balena and I was following this guide step by step: https://www.balena.io/blog/deploy-network-wide-ad-blocking-with-pi-hole-and-a-raspberry-pi/

Maybe the steps could be adjusted to be in the right order for other novice users to follow?

@simonnelli, that is a good point, will do! Cheers

hi @dansku , can you help out?

I’ve followed: A guide and got stuck at Variables stage also.

How do I add them? I flashed SD card, Raspberry W Zero is online. I can see it on Dashboard.

Hello galapagos,
you should be able to add these from the application page in the dashboard. There is a box called Environment variables E(x) on the left, which will allow you to configure the application environment variables as described in the guide.
Let me know if this works for you

thanks! does it look good?

@galapagos the page is the correct one, as in the blog post, but I’m not sure whether the TZ setting will be properly detected. If you face issues, please consider using a more verbose value, like in the blog post.

As an extra after you get this working, if you have several devices in different timezones, then you can also use the respective Device Environment Variable page, to specify a different TZ values for each device.

guys, how to set up normal cli in balena? How do I git clone the repo?


@ thgreasi @nazrhom

Update: I’ve created Docker container that was pulled via DockerHub

Hey @galapagos, the error above is saying that git is not installed on your system, you first need to install it. I think you’re better off however installing the standalone version of the CLI as described here: https://github.com/balena-io/balena-cli/blob/master/INSTALL.md

just did, and here what it does:


does it seem right to you?

it looks like it get stuck and then logs out

unbelievable, i got it done :slight_smile:

and Dashboard:

1 Like

is it working for you on a zero W?