Raspberry Pi

How to install PiWigo on Raspberry Pi

PiWigo is an open-source photo management software that allows you to easily manage, organize and share your photo on the web server. It includes powerful features such as a Batch manager to filter photos from your collection, Geolocate photos on the map, different themes to change the environment and much more.

In this tutorial, you will learn how to install PiWigo on Raspberry Pi.

How to install PiWigo on Raspberry Pi

As PiWigo is an open-source web server, you will need to set up an Apache server, PHP and MySQL server before moving forward and running PiWigo on the web. The following step by step instructions will let you install PiWigo on Raspberry Pi:

Step 1: Update Raspberry Pi packages

Initially, you will require to update Raspberry Pi packages using the following command:

$ sudo apt update && sudo apt upgrade

Step 2: Install Apache Server, Php and MySQL server

Next, you will need to install Apache server, PHP (install upgraded version) and MySQL server on Raspberry Pi. Follow our published article instructions (Step 1 to Step 6) to install these services on Raspberry Pi.

Step 3: Configure MySQL for PiWigo

After completing Step 2, it’s now time to configure the server setting for PiWigo. To do this step, follow the below-mentioned guidelines:

i: Login into MySQL using the below-given command:

sudo mysql -u root

ii: Create a database with the name PiWigo using the following statement:

create database piwigo;

iii: Next, grant all privileges on PiWigo through the following statement that will need your username and password.

grant all privileges on piwigo.* to <piwigo_user>@localhost identified by '<piwigo_password>';

iv: Next use the following statements to flush the privileges table and exit the database.

flush privileges;

Step 4: Install Piwigo on Raspberry Pi

After configuring the settings for PiWigo server, you can now proceed towards the installation of PiWigo using the following netinstall script:

$ curl https://piwigo.org/download/dlcounter.php?code=netinstall -o piwigo-netinstall.php

Move the install script to Apache public folder using the following command:

$ sudo mv piwigo-netinstall.php /var/www/html/

Then allow the permission for the public folder using the following command so that it will enable the PiWigo installer to do the assigned job.

$ sudo chown -R www-data:www-data /var/www/html/

Step 5: Opening PiWigo Web server

In the final step, use the address ”http://<Pi_IPaddress>/piwigo-netinstall.php” to open the PiWigo server on the browser.

To find the IP address, issue the following command:

$ hostname -I

After finding the address, you can then replace <Pi_IPaddress> with your Raspberry Pi IP address. This will open up the PiWigo netinstall page.

Select “Retrieve and unzip Piwigo” option.

Click on the “Install Piwigo now” button to install PiWigo on the browser.

In the Database configuration, provide your database username and password as well as complete the Administration configuration according to your choice and then click on the “Start installation” button to complete the PiWigo installation.

After the installation go to the address “”.

As soon as you click on the “I want to add photos” button, it will proceed you towards the PiWigo gallery dashboard where you can upload your photos and organize them according to your choice.

This completes the installation of PiWigo.


PiWigo is a handy photo management platform that provides you the freedom to organize and share your photos on the web. You can install it easily on Raspberry Pi through proper configuration of Apache server, PHP and MySQL, whose details are provided in the above description. After the configuration, you will then be able to use the PiWigo server on your browser using your Raspberry Pi IP address and start uploading your favorite photos onto the web.

About the author

Awais Khan

I'm an Engineer and an academic researcher by profession. My interest for Raspberry Pi, embedded systems and blogging has brought me here to share my knowledge with others.