thingsboard-gateway icon indicating copy to clipboard operation
thingsboard-gateway copied to clipboard

[HELP] Bootstrap config per file, but allow remote config

Open apachler opened this issue 1 month ago • 1 comments

Describe the issue Actually I roll out gateways by CI/CD pipeline with file based configuration and pre-configured

  • logging via `logs.json´
  • access token & connectors via tb_gateway.json
  • related connector json configs

To make use of the remote configuration for some gateways, I would like to know:

  • if it is possible to provide the gateway with a bootstrap configuration via files, especially the logs.json and tb_gateway.json
    • this bootstrap config defines the self provisioning credentials, an empty list of connectors and remoteConfiguration set to true

My goal is to provide a gateway that could be managed via Thingboard but bootstraps itself with some sane configurations. After provisioning of the gateway, the bootstrap configuration should be reflected to Thingsboard. This bootstrap configuration can be changed by the user in Thingsboard afterwards.

What I am also interested in, if using remote configuration is the config ever written to disk or does it only life in the attributes of the gateway device in Thingsboard?

If such a bootstrapping is not possible by now, is there a chance to get it implemented? Or does it even make sense to have that functionality? If not, why not? ;)

Is there any other way to do such kind of bootstrapping?

Versions (please complete the following information):

  • OS: SLES 15 with Docker Swarm
  • Thingsboard IoT Gateway version: v3.8.0 via Docker image
  • Python version: default from Docker image

apachler avatar Dec 01 '25 14:12 apachler

@apachler

Hi, it looks like you are facing the same issue. I've encountered a similar problem as well: https://github.com/thingsboard/thingsboard-gateway/issues/2041

JamesLebron avatar Dec 10 '25 03:12 JamesLebron

@JamesLebron yes, that seems somehow related to my questions. Hopefully TBGW team will come up with a fix for that ;)

apachler avatar Dec 12 '25 08:12 apachler

Hi @apachler, thanks for your interest in ThingsBoard IoT Gateway!

What I am also interested in, if using remote configuration is the config ever written to disk or does it only life in the attributes of the gateway device in Thingsboard?

Yes, all configurations are saved to the local disk. General configuration is saved to the tb_gateway.json file, and connector configuration to the connectorName.json file.

If you are using Docker gateway image, you can use env variables to set host, port, access token, etc. You can read more about ENV variables in the official documentation.

samson0v avatar Dec 12 '25 09:12 samson0v