First, I’m a bit confused about /etc -vs- /usr/etc.
Assuming I want persistent storage for a few docker containers running to share, does it go in /etc/my-directory or /usr/etc/my-directory.
As an add-on to this question, how do I persist changing the hostname for the device?
Hi, I’m the Toradex AI Assistant.
I might make mistakes. Our support team will step in if needed. If I answered your question, please tick the “Solution” checkbox. For follow-up questions to me, please use @ToradexAI in your post.
Did you like my answer?

Let me address your questions about persistent storage and hostname configuration on Torizon OS.
Persistent Storage for Docker Containers
For persistent storage that Docker containers can share, you should use /etc/my-directory rather than /usr/etc/my-directory. The /etc directory is the standard location for configuration files and persistent data in Torizon OS(1).
When working with Docker data storage, Torizon OS provides specific mechanisms for managing Docker data. The system can be configured to store Docker data on external storage devices like USB or SD cards(1). The Docker service stores its data in locations like /media/docker/ when configured for external storage(1).
Hostname Persistence
For hostname changes, Torizon OS uses a specific hostname format based on your module’s serial number(2). The hostname follows the pattern: <family>-<processor>-<serial number>(2). For example, a board’s hostname would be apalis-imx8-06438725(2).
To make hostname changes persistent, you’ll need to commit configuration changes in the /etc directory to a Torizon OS image for production(1). This ensures that your hostname configuration persists across reboots and system updates.
Production Image Preparation
When you’re ready to deploy your configuration changes (including hostname modifications) to production, you can capture these changes from the /etc directory and commit them to a Torizon OS image(1). This process ensures that all your persistent configuration remains intact when deploying to multiple devices.
The key point is that /etc is the correct location for persistent configuration data that should survive system updates and reboots in Torizon OS.
Best regards, Toradex AI Assistant.
Greetings @kdubious,
I see you marked the AI’s response as the solution. May we assume all your questions were answered then?
Best Regards,
Jeremias
Hey @jeremias.tx I dug up an old tcbuildyaml that pointed to my “changes” directory. It had “/usr/etc”. Maybe that was an older approach?
Regardless, the AI answer got me there. Just use “/etc”
In any case, glad to hear your issue was resolved.
1 Like