Hello everyone,
I’m using the official Openfire Docker image and I’m struggling with persistence. If I recreate the container (e.g., docker compose up -d --force-recreate), I lose all my settings and users.
I am using bind mounts specifically because I need my data visible in /opt/containers/ for my backup workflow.
Here is my docker compose:
x-logging: &default-logging
driver: "json-file"
options:
max-size: "50m"
max-file: "3"
services:
openfire:
image: ghcr.io/igniterealtime/openfire:v5.0.2
container_name: openfire
logging: *default-logging
restart: unless-stopped
ports:
- "9090:9090"
- "5222:5222"
- "7443:7443"
volumes:
- ./data/lib:/var/lib/openfire
- ./data/logs:/var/log/openfire
The Issue:
-
I run
docker compose up -d. -
I complete the Setup Wizard (Embedded Database).
-
I create a test user.
-
To test persistence I run
docker compose up -d --force-recreate. -
Result: The test user is gone, and I am back to the default admin password.
Questions for the experts:
-
Is
/var/lib/openfirethe correct and only path I need to persist for a full standalone setup? -
Are there any required environment variables to ensure the internal Openfire process respects the
/var/lib/openfiremount point for itsopenfire.xml?
Any feedback on my Compose structure would be greatly appreciated!
-Schwach