Piwigo on OpenMediaVault


Today, I am taking Techno Dad Life (TDL) challenge. I am going to attempt to install Piwigo an open source photo management server on my OMV. I am going to assume that TDL’s challenge is to use Docker container. I am going to update this post and make it look a bit more organized in a few days. I just need to get this info out for TDL video.

So here we go now!

I just want to address the PUID and PGID. Please see this post https://www.networkshinobi.com:443/docker-containers-puid-and-pgid/ regarding PUID and PGID.

SSH to the OMV server and create two directories. One for Piwigo and the other for mariadb. If you have not created a directory named appdata, this is the time to do so. The command mkdir -p will make the directories that have not existed along the path

root@openmediavault:~# mkdir -p /sharedfolders/appdata/piwigo
root@openmediavault:~# mkdir -p /sharedfolders/appdata/mariadb-photo
root@openmediavault:~# cd /sharedfolders/appdata
root@openmediavault:/sharedfolders/appdata# ls -lh
total 8.0K
drwxr-xr-x 2 root root 4.0K Jun  6 20:16 mariadb-photo
drwxr-xr-x 2 root root 4.0K Jun  6 20:16 piwigo
  1. Assuming you already installed the Docker UI on your OMV, navigate to Services > Docker
  2. Search for piwigo in the search box. If there are multiple ones, select the one from Linuxserver repository
Figure 1

Click Start to pull the Piwigo image from Docker Hub. Once the Close button is clickable, click the Close button.


The time it would take to pull an image depends on its size and your Internet speed.

Figure 2

Search for mariaDB and make sure that it is from Linuxserver repository as shown in Figure 3.

Figure 3

Again, click on Start to pull the mariaDB Docker image. Click Close, when it is done downloading.

Figure 4

Verify the Docker images by clicking the Refresh button

Figure 5

Now we need to configure the Docker containers. We are going to start with mariaDB. Click on mariadb image then click on Run Image.

Figure 6

Under the General Settings section, fill out the following fields as shown in the table below. See Figure 7 for reference.


You can give your container any name you want, but in my use case, I may install a new container that requires a database; therefore, I named mine mariadb-photo, so that if I need to, I could create a new database instead of spinning up a new one.

Container namemariadb-photo
Restart Policyalways

Under the Networking, Port forwarding section, enter the following as shown in table below. Make sure click on the + sign to add the config. See Figure 7 for reference.

Host IPHost PortExposed Port
Figure 7

Under the Environment variables section, add the following as shown in the table below. Check this link for databse timezone. See Figure 8 for reference.


Adjust the TZ to meet your own Timezone. Timezone is very sensitive; if this doesn’t match your other containers, you are going to have a bad day. also, for PUID and PGID value, you can use your admin or whoever managing your Docker containers.

For example: in the terminal, type in id <your-username>

Figure 8

Under the Volumes and Bind mounts section, locate the directory mariadb-photo we created earlier. See Figure 9 for reference.

Figure 9

Under the Volumes and Bind mounts section, the Host path and Container path should look like as shown in the table below. Click Save to start the mariadb container. See Figure 10 for reference

Host pathContainer path
Figure 10

If you disconnected your SSH session earlier, you will need to SSH again to your OMV server. We are going to configure the mariadb and create a database for Piwigo.

# We need to bash-in mariadb container
root@openmediavault:~# docker container exec -it mariadb-photo bash

# As you can see above, the prompt changed from root@openmediavault to
# root@06b18968d2fe. This tells us that we are inside of the container.
# We are going to create the piwigo database. Please replace the username 
# 'piwigo' with your desired username. Same with the database 'piwigo'.
# Also, generate a better password than what I have in this example. 
mysql -u root -p
# You will get prompted with the mariadb password we set-up in the web UI

# Create a user 'piwigo' with a password of 'StrongDatabasePassword'
CREATE USER 'piwigo' IDENTIFIED by 'StrongDatabasePassword';

# Create a database for piwigo

# Grant all privileges 
GRANT ALL PRIVILEGES ON piwigo.* TO 'piwigo' IDENTIFIED BY 'StrongDatabasePassword';

# Exit mariadb

# Exit mariadb container

Back to OMV web UI. Navigate back to Services > Docker > Docker images. we are going to run the Piwigo image that we pulled earlier. Click on Piwigo Docker image then click on Run image

Under the General section, fill out the following fields:

Container namepiwigo
Restart PolicyAlways

Under the Networking section, and fill out the following fields. Don’t forget to click on the + plus sign. When done, scroll down for more settings.


OMV uses port 80/tcp. Thefore, the Host Port has to be changed. You can choose any port you desired for Host Port. However, choose the port that doesn’t overlap with your other containers’ Host Port.

Host IPHost PortExposed Port
Figure 11

Under the Environment variables, add the following information as shown in the table below. See Figure 12 for reference.

Note: Adjust the value based on your own use case


Under the Volumes and Bind mounts, fill out the following. Do not forget to click on the + sign. Click Save to start the Piwigo container. See Figure 12 for reference.


The second line /config/www/gallery/upload/ is optional. I only did this so that my photos are located outside of the appdata. Therefore, if I decided to switch to a different platform. I have my photos outside of Piwigo.

Host pathContainer path
/sharefolders/appdata/piwigo /config
/sharefolders/Photos/piwigo /config/www/gallery/upload/
Figure 12

Open a new browser tab and navigate to http://omv-ip-addr:82. You will be greeted by the Piwigo installation page.

Basic Configuration
Default gallery languageEnglish [US]
Database configuration
Database namepiwigo
Administration configuration
Confirm Passwordweb-ui-admin-password
Email addressyour-email-address
Figure 13

If everything is configured correctly, you should get the page similar to Figure 14.

Figure 14

You can either Start the tour or skip it. It is your choice and choose wisely 🙂

Figure 15

This is it. This is the admin gallery page. You can start configuring your instance of Piwigo.

Figure 16


Notify of

1 Comment
Newest Most Voted
Inline Feedbacks
View all comments
5 years ago

Thank you for useful tutorial.
One question, please: In which folder are pictures: /sharefolders/Photos/piwigo or
config/www/gallery/upload/ ?
Did Techno Dad send you a sticker? 🙂

Would love your thoughts, please comment.x