The right way to Set up and Use Piwigo on Your Raspberry Pi

There are dozens of picture administration packages to self-host on the Raspberry Pi, and Piwigo is without doubt one of the finest, providing a good looking interface, multi-user administration, and delightful themes. Whereas it isn’t fairly a slot-in substitute for Google Pictures, it permits you’re taking management of your snapshots, and entry and show them over the web.


What Is Piwigo, and Why Ought to You Self-Host It on Your Raspberry Pi?

Over the previous decade, smartphone customers turned accustomed to limitless free storage for images taken on their handsets. They may relaxation assured that the numerous pictures of seaside holidays, household gatherings, and main occasions would stay secure and safe (albeit with a decrease high quality than the unique) within the palms of tech giants comparable to Google—free eternally.

That assurance was shaken in 2021 with the information that Google was to discontinue its free, limitless storage choice, and doubtlessly delete images and albums if sure situations had been met. This has left customers looking for an alternate that they’ll run, with out restrictions, on their very own {hardware}, and in their very own houses.

Piwigo is one such answer. The software program is significantly older than Google Pictures, having been first launched as PhpWebGallery in 2001, and re-released beneath a GNU Normal Public License in 2002. The license signifies that customers are free to run, examine, share, and modify the software program for their very own functions. PhpWebGallery was renamed Piwigo in 2009.

Piwigo presents a straightforward means so that you can add, handle, and think about your images on-line, and comes with stunning theming choices, cell shoppers, and extensions. Piwigo will fortunately serve images over the net on fashions way back to the unique Raspberry Pi.

See also  Set Up a Cloudflare Tunnel to Expose Native Servers to the Web

The right way to Set up Piwigo on Your Raspberry Pi

The very first thing you’ll want to do is to arrange your Raspberry Pi to be used as a server. As soon as the software program is put in and dealing because it ought to, replace and improve any put in packages:

sudo apt replace
sudo apt improve

As with most superior self-hosting tasks, Piwigo requires a database to perform and preserve observe of your images, their areas, names, dates, and any modifications you make. Run MariaDB:

sudo mariadb

…and enter the next, one line at a time, to create a brand new database and database person for Piwigo:


CREATE DATABASE piwigo;
CREATE USER piwigo IDENTIFIED BY 'supertopsecretpassword';
GRANT USAGE ON *.* TO [email protected] IDENTIFIED BY 'supertopsecretpassword';
GRANT ALL privileges ON piwigo.* TO [email protected];
FLUSH PRIVILEGES;
give up;

Go to your Registrar’s Superior DNS web page and create a brand new report of the kind A, the host @, and the worth as your public IP deal with. When you plan on utilizing a subdomain, the host must be the specified subdomain by itself, with out the remainder of the area title.

Change listing and use nano to create a brand new Apache conf file for Piwigo:

cd /and so forth/apache2/sites-available/
sudo nano piwigo.conf

Within the file, specify port 80; set the ServerName to your area or subdomain, and DocumentRoot to the listing the place you propose to retailer Piwigo.

<VirtualHost *:80>
ServerName your-domain-name.tld
DocumentRoot /var/www/piwigo/
</VirtualHost>

Save and exit nano with Ctrl + O, then Ctrl + X.

Allow the configuration file, then restart Apache:

sudo a2ensite
sudo service apache2 restart

You’ve got directed Apache to simply accept incoming requests to your area or subdomain, and to serve content material from /var/www/piwigo/. This listing would not but exist; create it and transfer into the brand new location with:

sudo mkdir /var/www/piwigo/
cd /var/www/piwigo/

Obtain and rename the Piwigo internet installer:

sudo curl https:

Give possession of the present listing and its contents to the Apache person:

sudo chown -R www-data:www-data .

Set up the Piwigo Photograph Server

You are actually prepared to put in the Piwigo picture server. Open a browser and navigate to your-domain-name.tld/set up.php.

See also  How you can Set up a USB Energy Outlet

You can be requested to pick out a language, and to set a vacation spot for the Piwigo archive. When you plan to entry Piwigo by your base area or subdomain title, delete every little thing after the /, and go away this subject clean.

Click on Retrieve and unzip Piwigo, and the installer will do precisely what it promised. You’ll be able to test what was retrieved with:

ls -a /var/www/piwigo/

Return to the browser for an assurance that “All the things went high-quality. You are actually prepared to start out the set up process.” Click on the Set up Piwigo now button.

On the following display screen, fill within the database configuration; the Host and Database tables prefix fields ought to already be populated, so that you solely must fill out the database title and person fields (each piwigo), and your password.

Full the Administration configuration part to create an admin person, and click on Begin set up. Nearly immediately, you’ll obtain the message, “Congratulations, Piwigo set up is accomplished”. Straightforward peasy.

Now the administrator account is ready up, it is best to safe your web site with TLS, and improve connections from HTTP to HTTPS.

sudo certbot

Enter your electronic mail deal with when requested, and choose your area or subdomain from a listing. Certbot will fetch safety certificates and keys from Let’s Encrypt, and deploy them in your Raspberry Pi.

Utilizing Piwigo on Your Raspberry Pi

Now you can go to your Piwigo library by visiting your area or subdomain, however as you don’t have any images uploaded you may be informed that “your Piwigo picture gallery is empty”.

The builders helpfully present a big I need to add images button, which flashes orange whenever you mouse over it. Click on on this after which Create a brand new album. From inside the album, you may both click on the Add images button, or drag your information into the browser. Begin add will, predictably, begin the add. Relying on the standard and variety of images you need to add, this may increasingly take a very long time.

See also  Raspberry Pi 3 vs. 4: What is the Distinction?


Pictures are paginated inside albums, and you may entry albums by the principle web page of your Piwigo set up.

Piwigo has an ideal many configuration choices, together with the choice so as to add and handle a number of customers, set default picture sizes, watermark pictures with your individual stamp, and allow feedback. These settings could be accessed by clicking Admin > Configuration. One other good contact is the Piwigo theme gallery, with which you’ll utterly change the feel and appear of your albums.

Piwigo on the Go

Importing images out of your cellphone to your laptop, after which importing to Piwigo by the net interface, is a chore. Fortuitously, the Piwigo builders have created cell apps to take out among the effort. The Piwigo app is offered for iOS units by Apple’s App Retailer, for Android units by the Google Play Retailer, and since Piwigo and its related Android app are open supply, by F Droid.

You Can Now Use Piwigo to Host and Add Photos on Your Raspberry Pi!

In addition to being a private archive for household footage, your Piwigo on-line gallery can act as a showcase by which you exhibit your expertise to the world! Grow to be a greater photographer by studying about gentle and shadow or focus on explicit kinds of shot!