You can setup a Piwigo site on a Raspberry Pi 4 with Virtualmin, which is a virtual hosting platform having a web based interface preventing the use of Unix commands. The benefit is that you can manage one or more websites on your Raspberry Pi4 via a web interface.
Piwigo is an open source photo management software to manage, organize and share your photo easily on the web. Your images can be viewed and managed from a common web browser or from Piwigo mobile applications available for Android and Apple devices.
Before Piwigo is installed it is required to have a Raspberry Pi 4 with Virtualmin (and Webmin) installed, including a virtual server setup for the Piwigo site. See our article Hosting multiple websites on a Raspberry Pi 4 with Virtualmin.
3. Setup the database for Piwigo
Before we install Piwigo a database and corresponding user needs to be created. We could use Webmin for this, but in our case we could not get it working correctly as in the database 2 same users were created of which one did not have a password.
Hence we use use phpMyAdmin to setup the database for Piwigo (has been installed when following our article w.r.t. setting up Virtualmin listed under the requirements section).
- Access phpMyAdmin via https://<domain name>/phpmyadmin
- Go to the Databases tab and enter the database name (we used piwigo). Click on the create button.
- Now we need to setup a database user piwigo will use to access the database. Go back to the home page off phpMyAdmin and select the “User accounts” tab. Click on “Add user account”.
- Enter the username and password. Set host to localhost. Click on the Go button.
- On the screen shown click on “Database”.
- Select the piwigo database and click on the Go button.
- The database privileges screen will be shown. Click on “Check all” and then the “Go” button.
4. Install Piwigo
We use the manual installation method as described on the Piwigo.org site.
- Download the latest Piwigo version from the Piwigo.org site.
- Go to Virtualmin. Make sure the correct virtual server is selected.
- Go to Virtualmin > File Manager and select File > Upload to current directory (there is a Download from remote URL option, but that did not work in our case).
- Select the piwigo installation file to be uploaded and select “Extract Compressed”. Click on the Upload button.
The Piwigo files will have been extracted in a subfolder structure looking the same or similar as in screenshot below.
We want to have these files in the public_html folder and hence move them with the file manager by selecting the files and using cut/paste from the Edit menu. Go back to the piwigo folder and make sure that all files have been moved (in our case they were not!). Remove the empty folders where you moved the files from.
Piwigo is now ready to be configured.
5. Configure Piwigo
Next step is to configure the Piwigo database and administrator. Go to your websites domain name in the browser (https://<domain nam>). Piwigo will see it has not been configured yet and show it’s installation page.
Add your database name, database user and database user password as setup in previous sections. Leave the Host variable set to “localhost”. Click on the “Start installation button”.
Piwigo is now ready for use. Further configuration can now be done inside Piwigo.