File editor container

I am developing a project and will need to let the end users configure a number of things.
For early stages of development, we are proposing to load this configuration from yaml files.
I am wondering is there a recommended way to do this - an existing container or balena block that would let us edit configuration files on the other containers running on the device.

The requirements are similar to the Home Assistant hass-configurator add on - GitHub - danielperna84/hass-configurator: Configuration UI for Home Assistant

Hi there,
if I understand correctly and if you haven’t already taken it into consideration, using the environment and service variables section ( Environment and service variables - Balena Documentation ) from the dashboard could be a good way to do it. This would allow you to provide runtime configuration to all your application services.
Could it be a solution for you ?

Thanks for the suggestion. I know about environment variables but hadn’t considered setting them programmatically with the SDK. In theory we could download a set of configuration variables from the end user’s cloud account and use the python SDK to apply them?

@JSReds what is the best way to apply environment variables to the device programmatically from the device itself? Using the Python SDK sounds like it would work well, but that needs authentication, right?

Hello,

You can use the python SDK to add device variables. If you want to use the sdk from the device itself, you can use the devices own API key to authenticate - if you take a look at the table here: Communicate outside the container - Balena Documentation at the BALENA_API_KEY entry, it will give more details. Hope this helps!

1 Like