Where to get Balena Supervisor API Key?

I am sure that I am missing something simple, but where do I get the where do I get the
$BALENA_SUPERVISOR_API_KEY ?

I am trying to set the hostname of our application, but I am missing this key piece.

I did set: io.balena.features.supervisor-api: ‘1’

Can somebody please give me a clue? :slight_smile:

thank you,

Hello,

From what I have read, It seems that BALENA_SUPERVISOR_KEY should be generated when a container starts provided the io.balena.features.supervisor-api is set in the docker-file:

Here is an excerpt of the docker-compose.yml file:

services:
  monitor:
    build: ./monitor
    ...   
    labels:
      io.balena.features.supervisor-api: '1'

When I try to run curl as in the example it fails due to the variable not being set, here I am trying to dereference the variable which appears to be empty…

root@c791b447efb6:/usr/src/app# echo $BALENA_SUPERVISOR_API_KEY

root@c791b447efb6:/usr/src/app# 

I ran this command in the ‘monitor’ service, which is the same as labeled in the docker-compose.yml. I expected to see the actual API key revealed…

I need to change the hostname of the device… I am probably missing something simple (hopefully :).

Thank In Advance!

  • rusty

Hi

  • If you’ve set the io.balena.features.supervisor-api indeed you should be able to get the key for your multicontainer app. Just to confirm, you’ve set that for each service that you are going to need it for right?
  • Can you share support access to your device? Once you have shared it, can you share the device UUID
1 Like

Hello,

Thank You for the response @anujdeshpande!

Turns out it works as expected. I must have gotten myself out of sync. I most likely did not properly restart the appropriate container while updating the docker-compose.yml file.

At any rate it works great.

Thank You!
rusty

Good to hear that it works fine now.

1 Like