Logging off-device


I am about to start deploying balena devices in the field. For regulatory compliance purposes, I need to be able to keep a permanent, long term record of my application’s log events. The balena console is not an adequate solution here.

I thought that I would do what I do in other docker environments: colocate a fluentd container with my application container, and use a logging: statement in docker-compose to send my application’s logs to fluentd and from there on to my central log store in S3.

I see that docker-compose logging: is explicitly not supported in balena, and googling has really not turned up much in terms of people addressing this problem.

I can’t be the first one, can I?

If I say that balena console logging and schemes around periodically calling journalctl are non-starters, how can I get stdout/stderr from my application off of a balena device and into S3?




You can use the Balena SDK to subscribe to device logs - for example, see this
Would that work for you?