Backup
The CertGuardian Docker files are usually located in the home directory of the root user or user that manages CertGuardian
For example:
/home/<user>/certguardian-docker-imagesYou can check the current user's home directory with:
echo $HOMEThe CertGuardian folder is usually named certguardian-docker-images.
Before creating the backup, make sure you are working with the correct CertGuardian installation directory.
Check CertGuardian and Backoffice Versions
Before creating the backup, record the currently deployed CertGuardian and Backoffice versions:
printf 'Certguardian version: %s\n' "$(docker inspect --format '{{ index .Config.Labels "certguardian.version" }}' gitea.entorno.es:3000/certguardian/certguardian:latest)" > certguardian_version
printf 'Backoffice version: %s\n' "$(docker inspect --format '{{ index .Config.Labels "certguardian.backoffice.version" }}' gitea.entorno.es:3000/certguardian/certguardian-backoffice:latest)" >> certguardian_version
docker image inspect redis:alpine --format '{{range .Config.Env}}{{if eq (index (split . "=") 0) "REDIS_VERSION"}}{{println .}}{{end}}{{end}}' >> certguardian_versionThis creates a certguardian_version file containing the versions of both components.
Certguardian version: v0.12.4
Backoffice version: v0.6.3
REDIS_VERSION=8.10.2Backup folder
After recording the versions, back up the certguardian-docker-images to the designated backup location. Example:
tar -czf "certguardian-docker-images_$(date +%Y%m%d_%H%M).zip" ./certguardian-docker-images
cp "certguardian-docker-images_$(date +%Y%m%d_%H%M).zip" /backup/destinationRestore
To restore CertGuardian, follow the steps below.
Stop the existing CertGuardian containers
Navigate to the original CertGuardian folder and run:
docker compose downRestore the CertGuardian folder
Restore the CertGuardian folder from your backup.
tar -xzf certguardian-docker-images.zip -C ./certguardian-docker-images_restoredOnce the folder has been restored, navigate to the restored directory.
Check the CertGuardian version
If you want to restore to the exact version of CertGuardian included in the backup, check the version stored in the certguardian_version file:
cat certguardian_versionTake note of the version number returned by this command.
Update the Docker image versions
Open the docker-compose.yml file and locate the backoffice and certguardian services.
backoffice:
restart: unless-stopped
image: gitea.entorno.es:3000/certguardian/certguardian-backoffice:latest
container_name: certguardian_backoffice
volumes:
- ./backoffice/config.js:/usr/share/nginx/html/config.js
depends_on:
- certguardian
certguardian:
image: gitea.entorno.es:3000/certguardian/certguardian:latest
volumes:
- ./backend/logs:/var/www/certguardian/storage/logs
- ./backend/certificates:/certguardian/certificates
- ./backend/data/:/data
- ./backend/.ssh:/var/www/certguardian/ssh-keys
container_name: certguardian_backend
restart: unless-stoppedReplace latest with the version obtained from the certguardian_version file.
Pull the required Docker images
Run:
docker compose pullThis downloads the specified versions of the CertGuardian images.
Recreate the containers
The run:
docker compose up --force-recreateCheck the logs
To see the logs, run:
docker compose logsIf CertGuardian has started successfully, you should see log entries similar to:
certguardian-1 | ### Running all services ###
certguardian-1 | 2026-09-29 09:14:19,053 INFO supervisord started with pid 1
certguardian-1 | 2026-09-29 09:14:20,054 INFO spawned: 'apache2' with pid 149
certguardian-1 | 2026-09-29 09:14:20,057 INFO spawned: 'reverb' with pid 150
certguardian-1 | 2026-09-29 09:14:20,058 INFO spawned: 'scheduler' with pid 151
certguardian-1 | 2026-09-29 09:14:20,059 INFO spawned: 'worker' with pid 152
certguardian-1 | 2026-09-29 09:14:21,344 INFO success: apache2 entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
certguardian-1 | 2026-09-29 09:14:21,344 INFO success: reverb entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
certguardian-1 | 2026-09-29 09:14:21,344 INFO success: scheduler entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
certguardian-1 | 2026-09-29 09:14:21,344 INFO success: worker entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)