Piwigo on Nethserver 7


(Dan) #1

Piwigo is an open-source web photo gallery application running under PHP and MySQL. As with many such applications, it can be easily installed on Nethserver. Here’s how:


Piwigo requires a web server, PHP (at least version 5.3), MySQL (at least version 5), and strongly recommends ImageMagick. All of these except for ImageMagick can be installed using the Software Center in the server manager. To install ImageMagic, SSH in to your Neth server and run yum install ImageMagick.

If you want Piwigo to be in its own virtual host, create that now. Disable FTP access, and set the other options as appropriate for your installation.

For better performance, you can use a more recent version of PHP. To do that, follow the instructions to install PHP Software Collections, and then set PHP 7.2 for the virtual host where you’ll be installing Piwigo.

Create the database

While you’re logged in via SSH, you’ll need to create a database for Piwigo. Take the following steps:

# mysql
mysql> create database piwigodb;
mysql> grant all on piwigodb.* to piwigouser@localhost identified by 'SuperStrongPassword';
mysql> flush privileges;
mysql> exit

(obviously, replace SuperStrongPassword with a secure password of your own choosing).

Install Piwigo

Change to the directory where you want to install Piwigo. If you’re placing it in its own virtual host, that will be in /var/lib/nethserver/vhost/vhost_name. If you’re placing it in the default virtual host, you’ll use a directory in /var/www/html/. Note that the installer will create a subdirectory of /piwigo in the installation directory.

Download the Netinstall script:

curl "http://piwigo.org/download/dlcounter.php?code=netinstall" > piwigo_install.php

Then, using your web browser, browse to that file. You’ll see this page:

Click the Retrieve and unzip button. You’ll then see this:

Surprise surprise, you’ll click Install Piwigo now. You’ll then see this page:

The fields should be self-explanatory. Once you’ve completed the form, click Start Installation. You’ll then see this page:

Installation is complete.


As noted above, the Netinstall process creates a subdirectory of /piwigo wherever you run it, which means you’ll need to add that to the URL. To automate this, create a file called index.html with the following contents:

<meta charset="UTF-8">
<meta http-equiv="refresh" content="1; url=piwigo/">
  window.location.href = "piwigo/"
<title>Page Redirection</title>
<!-- Note: don't tell people to `click` the link, just tell them that it is a link. -->
If you are not redirected automatically, follow the <a href='piwigo/'>link</a>.


  • As noted above, the Netinstall process creates a subdirectory of /piwigo wherever you run it, which means you’ll need to add that to the URL. It’d be pretty simple to prepare an index.html file to take care of a redirect.
  • Investigate using the LDAP Login plugin

NethServer vs NAS Server
(Ralf Jeckel) #2

Congrats @danb35 !!
The fastest HowTo I can remeber !! :+1: :smile:

(Dan) #3

Thanks, but in this case it’s a pretty straightforward web app, and the installation process is pretty much the same as many others:

  • Create a database
  • Drop the files in a web-accessible directory
  • Fill in the details on a web form

But it looks like it’ll make for a nice gallery app.



Whaouh… @danb35, I don’t know what to said to show how great is this how to ( more when we know the delay).

Really thank you, for your work, and simply to be heremin this comunity, on this forum.

If I was in the @alefattorini place, I will make a special and crazy badge only for you :wink:

(Alessio Fattorini) #5

Check his profile. He has already a loooot of badges :slight_smile:
But he deserves another one like this.