Docker: how to change folder for persiting data

54 views
Skip to first unread message

Chris Schneider

unread,
Jun 24, 2024, 11:39:03 AM6/24/24
to Wazuh | Mailing List
Dear community,

I try to implement Wazuh bei starting the docker container. If I take the default docker-compose.yaml, everthing is fine.

The default docker-compose.yaml defines Volumes, which get created somewhere within the docker folders. I like to have them all at one place. If I change the folder mapping to a different folder in my host, I get some errors in the indexer-, manager- and dashboard-container-logs.

I assume, this is due to folder permssions going wring. (by default, the containers run with non-root privilidges, but some folders get created with root-privilidges). Changing the folder permissions after the first start of the containers does not help.

Can anybody explain, how to change to folders for persisting data?

Thank you very much,
Chris

Emiliano Jorge Bottazzi

unread,
Jun 24, 2024, 5:27:02 PM6/24/24
to Wazuh | Mailing List
Hi Chris.

To better assist you I would like to replicate exactly the case.

When you mention, "I like to have them all in one place," are you referring to organizing all the folders under a specific path, such as "/custom-path"?

/custom-path/var/ossec/api/configuration
/custom-path/var/ossec/logs
/custom-path/...

Could you please specify which line you altered in the docker-compose? This information will help me better understand what might have occurred and what permissions can be applied to try to modify to solve the problem.

I look forward to your comments.
EJ  

Chris Schneider

unread,
Jun 25, 2024, 3:16:41 PM6/25/24
to Wazuh | Mailing List
Hi Emiliano,

thank you for your response. Please take my aplogies for having opened up serval discussions. I did not realise that it takes a couple of days, until my initial post and the subsequent replies are published.
I was able to solve the issue. My backup strategy needs to have all persistent data in the folders /home/[user]/Docker/Wazuh/... I wanted to move all data into that folder structure and was very much struggling with it. Finally, I got it solved with the help of the docker community.



take care,
Chris

Emiliano Jorge Bottazzi

unread,
Jun 26, 2024, 6:21:29 PM6/26/24
to Wazuh | Mailing List
Hi Chris, 

Thank you for your response. It's wonderful to know that this information will benefit the entire community.
I'm glad to hear that you were able to resolve the concern and successfully implement it into your backup strategy.

If you need any further assistance, please don't hesitate to reach out. I'm happy to help.

Best regards,
EJ

Reply all
Reply to author
Forward
0 new messages