Piwigo on OMV5 via Portainer - Quick Install

  • I've seen so many installs of piwigo and I could not get any of them to really work properly on OMV5.


    There are different ways to install this and you can upload your photos outside of the piwigo container, but I did not want to mess with symbolic links. I am totally ok with having piwigo and all my photos in one directory. This is just the quickest and easiest way to get piwigo up and running on OMV5.


    - This tutorial assumes you have OMV5 installed and running properly.

    - This tutorial assumes you have Portainer installed and running properly.

    - This tutorial assumes you know how to use OMV5 and Portaineer.




    1) Open portainer in your web browser.


    - Click on Stacks --> Add Stack

    - Give it a name such as piwigostack

    - Copy and paste the code below and add it to the stack's Web Editor section. You will need to change the environment and volume parameters to suit your system. I have noted the main points you need to edit. Take out the comments before you deploy the stack.



    ##remeber to remove the comments before you deploy the stack.


    - disable the "enable access control"

    - Click "Deploy the stack"


    You will now see 2 new containers named "piwidb" and "piwigo"


    2) If everything went as planned open a web browser and point to your OMV5 ip at port 8125


    for example, mine is : http://192.168.1.5:8125


    You should have the piwigo instaltion screen in front of you.


    17139-piwigoinstall-png



    3) Before you move forward you need to know the ip of your piwigo database.


    - Go back to Portainer and under containers you should see the new "piwidb" container. Under the "quick actions" column open the exec_console for piwidb then connect.



    17137-consolexec-png



    - Once connected type in "hostname -I" without the quotation marks. This will give you your host database IP address.


    - you see in my example below mine is 172.17.0.3




    17138-hostname-png



    4) Go back to the piwigo installation install screen in your web browser and fill in the fields.


    In the "Database Configuration" section:


    - enter the host ip address of your database

    - User is piwigo

    - Password is piwigo

    - database name is piwigo

    - database tables prefix is piwigo_


    In the "Administration Configuration" section:


    - you enter whatever you want in this section


    17139-piwigoinstall-png


    When you have all the fields filled in then click on "start installation"


    If all goes well then you will get " Congratulations. Piwigo installation is completed"



    17140-installcomplete-png


    That's it.


    Note: I installed piwigo files to where my media files are housed because piwigo saves everything in one directory. The uploaded photos are saved in \www\gallery\upload.

  • reverendspam

    Changed the title of the thread from “Piwigo on OMV5 - Quick Install” to “Piwigo on OMV5 via Portainer - Quick Install”.
  • Hi there,


    This is a great tutorial and I got Piwigo up and running nicely with it - thanks very much for writing this guide.


    I was couple of hours into using it though and I lost the connection to it. I rebooted the server but now get the following error when I try to load Piwigo:


    I've never used docker or portainer before, so I have no idea how I'd go about fixing this error.


    Thanks,

    Nick.

  • I've never used docker or portainer before, soI have no idea how I'd go about fixing this error.

    This seems now the best time to learn new skill.

    Did you consider to search the internet for your issue?

    When you have specific question, someone might be inclined to answer them

    omv 5.5.23-1 (usul) on RPi4 with Kernel 5.10.x and WittyPi 3 RTC HAT

    2x 6TB HDD formatted with ext4 in Icy Box IB-RD3662-C31 / hardware supported RAID1

    For Read/Write performance of SMB shares hosted on this hardware see forum here

  • Hi there,


    Yes, I did search the internet but since I am so unfamiliar with Docker and Portainer, most of the information didn't make a whole load of sense to me. I thought I'd been specific enough with the error messages, I'm not sure how much more specific I need to be.


    Thanks,

    Nick.


    EDIT: I'm guessing that I need to edit mysqli.inc.php with the correct information, but I have no idea how that information might have changed, or how to navigate to it in order to change it back!

  • Nick0 post the yml you inserted in the Stack. Make sure not to reveal any sensitive info such as passwords, emails, etc.

    Simple and sure backup and restore: In a Scheduled Job: rsync -av --delete /srv/dev-disk-by-label-SOURCE/ /srv/dev-disk-by-label-DESTINATION/ (HT: Getting Started with OMV5)
    OMV 5 (current) - Hardware: Thinkserver TS140, Nextcloud, Plex, Airsonic, Navidrome, Ubooquity, Digikam, & Heimdall - NanoPi M4 (v.1), backup - Odroid XU4, Pi-Hole (DietPi) - Testing/Playing: hc2, xu4, Pi 3B+, Odroid H2. Mac user trying to convert to Linux on a HP dx2400, Debian 10 XFCE.

  • Hey, Agricola, thanks!


    I guess that means this!


    I am currently wading my way through the CL with lots of cd cd / cd .. ls commands, trying to find that damn mysqli.inc.php file!


    Your help is is going to be greatly appreciated!!


    Nick.

  • Oh, sorry - my fault!


    So we now have:


  • EDIT: I'm guessing that I need to edit mysqli.inc.php with the correct information, but I have no idea how that information might have changed, or how to navigate to it in order to change it back!

    I hope the issue is fixed by correcting the user that is running the container, but for future reference.


    The file


    /config/www/gallery/include/dblayer/functions_mysqli.inc.php


    is in the config folder of the container, which you have bind mounted to a shared folder on your host (server). So you just need to replace "config" by the path on your server.


    /sharedfolders/appdata/mariadb-photo/www/gallery/include/dblayer/functions_mysqli.inc.php

  • I hope the issue is fixed by correcting the user that is running the container...

    OK, it doesn't seemed to have fixed the issue, do I need to restart the stack or containers, or something?

    Ha! I had literally just found it when I got the notification for your reply, but I don't see it in the mariadb-photo subdirectory, mine is here:


    /sharedfolders/appdata/piwigo/www/gallery/include/dblayer/functions_mysqli.inc.php


    So I will go and learn how to download, edit and upload that.

    Looks good. Check if the stack is deployed without issue. Also check the log files of each container after they are running.

    Nothing obviously wrong here.


    Many thanks again!

    Nick.

  • macom I'm confused: I thought the use of /sharedfolders had been deprecated in favor of /srv/dev-disk-by-label/diskname, but also that since 5.5.20 even that has changed to /srv/dev-disk-by-UUID. I haven't set up a docker since the update, so I haven't encountered this.


    Also Nick0 I don't see a volume bind for your data folder. I looked at the linuxserver/piwigo page and it doesn't show a data volume there either. Are the images stored in AppData somewhere? I remember trying PiWigo some time back and not caring for it because of something like this. I don't want to side track you, but somewhere down the line you might give Plex or even Digikam a try. Digikam is more of an editing/managing server than a display server such as Plex. I use both from the same data folder.


    EDIT: Looking through the instructions above I see it now that the images are stored at /www/gallery/upload. So it is in the AppData folder.

    Simple and sure backup and restore: In a Scheduled Job: rsync -av --delete /srv/dev-disk-by-label-SOURCE/ /srv/dev-disk-by-label-DESTINATION/ (HT: Getting Started with OMV5)
    OMV 5 (current) - Hardware: Thinkserver TS140, Nextcloud, Plex, Airsonic, Navidrome, Ubooquity, Digikam, & Heimdall - NanoPi M4 (v.1), backup - Odroid XU4, Pi-Hole (DietPi) - Testing/Playing: hc2, xu4, Pi 3B+, Odroid H2. Mac user trying to convert to Linux on a HP dx2400, Debian 10 XFCE.

    Edited once, last by Agricola: Edited. ().

  • OK, it doesn't seemed to have fixed the issue, do I need to restart the stack or containers, or something?

    Yes, after you made the change in the docker-compose you have to redeploy the container.

    If you have not deployed the stack, you probably have to do the changes again.


    Edit: you might even have to delete the config folders on the host

  • 'm confused: I thought the use of /sharedfolders had been deprecated in favor of /srv/dev-disk-by-label/diskname, but also that since 5.5.20 even that has changed to /srv/dev-disk-by-UUID. I haven't set up a docker since the update, so I haven't encountered this.

    Right, sharedfolders are not used as default in OMV5. Nich is using OMV4 and OMV5, so I assumed that this is on OMV4 (or sharedfolders have been enabled manually by Nick on OMV5). Good point.

    Newly mounted filesystems are mounted by UUID, but filesystems that have been mounted on 5.5.19 or before will stay mounted by label.

  • Thank you both, guys - all up and running again after redeploying the stack and restarting the containers; I am really pleased with this!


    I have about 20 years worth of photos that we never look at and this will allow us all to root through them all easily. Its brilliant for organising, too.


    Re the shared folders, I am using OMV5 for this and I should have seen my error here but I was using this guide, and, typical me, I just followed along blindly! Do you guys think I need to move stuff, will this be okay going forwards?


    Anyway, thank you both very much again - I am really delighted with this!

  • Play with it a while and see how you like it. You should keep a safe copy of your photos somewhere ele for a while till you decide for sure.

    Simple and sure backup and restore: In a Scheduled Job: rsync -av --delete /srv/dev-disk-by-label-SOURCE/ /srv/dev-disk-by-label-DESTINATION/ (HT: Getting Started with OMV5)
    OMV 5 (current) - Hardware: Thinkserver TS140, Nextcloud, Plex, Airsonic, Navidrome, Ubooquity, Digikam, & Heimdall - NanoPi M4 (v.1), backup - Odroid XU4, Pi-Hole (DietPi) - Testing/Playing: hc2, xu4, Pi 3B+, Odroid H2. Mac user trying to convert to Linux on a HP dx2400, Debian 10 XFCE.

  • Hi Agricola,


    Thanks - I am messing about with it and I really do like it. I have all of my photos backed on two other servers, so they should be safe! Do you know if it would be safe to set this up outside the LAN, so that friends and family can access it, or would this not be recommended for someone like me that's quite new to all this?


    All the best!

    Nick.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!