Guides /

Update

/

Docker Image Update

Docker Image Update

This guide only apply to the official Piwigo image, if you are using a Linux server container please use their documentation instead.

If you want to switch to the official image you can follow this guide

Step 1 - Checking for updates

Containers' version numbers will always match the Piwigo version, starting from 16.3.0 they will have an extra letter after to allow container specific updates

For container version 16.3 and higher

You should already be able to see if any update is available in the update interface, if you want to update to the minor version use the first number the tag has (eg: 16)

For container version 16.2 and lower

Go to the taglist and search the tag you want to update to

Step 2 - Create a backup

To make sure updating is risk free, you should make a backup of both the database and the files of your Piwigo instance

Database backup

You can create a backup of your database using the following command:

docker exec -it piwigo-db-1 mariadb-dump -u piwigodb_user -p "piwigodb" | tee db_dump.sql

The database password should be the same as the one you put in .env (be sure to subsitue the container name so it matches yours)

You can now stop your container by running docker compose down

Files backup

To backup any image/photo uploaded to your Piwigo, copy the following folders:


      ./piwigo-data/piwigo/
      ├── galleries
      ├── local
      └── upload
    

Backup compose and env files

Rename your compose and env files by adding a .bak at the end (eg: .env.bak)

Step 3 - Pulling the new compose file and updating .env

You can fetch the latest version of the compose.yaml file using the following command:

curl -O "https://raw.githubusercontent.com/Piwigo/piwigo-docker/refs/heads/main/compose.yaml"

Check the GitHub wiki to get the .env file matching your version

Step 4 - Updating and restarting the container

Pull the image with docker compose pull and restart it with docker compose up.

Once you have confirmed everything works you can detatch the terminal by pressing d

Still got some unanswered questions?

You can get some help on the forum or find your own answers in the documentation