Piwigo is a free, open-source photo gallery software that can be installed on your own web server. In this tutorial, we will guide you through the process of installing Piwigo on EndeavourOS.
Before we start, make sure that your EndeavourOS server meets the following requirements:
You can install these prerequisites using the following commands:
sudo pacman -S apache php mariadb ftp
To download Piwigo, go to the official Piwigo website and download the latest version. You can download the file using your web browser or using wget
in the terminal:
cd ~
wget https://piwigo.org/download/dlcounter.php?code=latest
This will download the Piwigo archive to your home directory.
Once the file has been downloaded, extract it using the following command:
tar -zxvf piwigo-*.tgz
This will create a new directory called piwigo
in your home directory.
The next step is to configure your web server to serve the Piwigo files. If you are using Apache, create a new virtual host file in /etc/httpd/conf/extra/
:
sudo nano /etc/httpd/conf/extra/piwigo.conf
Add the following virtual host configuration to the file:
<VirtualHost *:80>
ServerAdmin your-email@example.com
DocumentRoot /home/your-username/piwigo
ServerName your-domain.com
<Directory "/home/your-username/piwigo">
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
Allow from all
</Directory>
ErrorLog /var/log/httpd/piwigo-error_log
CustomLog /var/log/httpd/piwigo-access_log common
</VirtualHost>
Make the necessary changes to the configuration file (e.g., replace your-email@example.com
with your email address and your-domain.com
with your domain name), then save and exit the file.
If you are using Nginx, create a new server block in /etc/nginx/sites-available/
:
sudo nano /etc/nginx/sites-available/piwigo
Add the following server block configuration to the file:
server {
listen 80;
server_name your-domain.com;
root /home/your-username/piwigo;
index index.php index.html index.htm;
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php$ {
try_files $uri /index.php =404;
fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
access_log /var/log/nginx/piwigo.access.log;
error_log /var/log/nginx/piwigo.error.log;
}
Make the necessary changes to the configuration file (e.g., replace your-email@example.com
with your email address and your-domain.com
with your domain name), then save and exit the file.
Activate the virtual host or server block with the following command:
sudo a2ensite piwigo.conf # For Apache
sudo ln -s /etc/nginx/sites-available/piwigo /etc/nginx/sites-enabled/piwigo # For Nginx
Finally, restart your web server with the following command:
sudo systemctl restart httpd # For Apache
sudo systemctl restart nginx # For Nginx
Before we can install Piwigo, we need to create a new database for it. You can do this using the following commands:
sudo mariadb
This will start the MariaDB console. Create a new database and user with the following commands:
MariaDB [(none)]> CREATE DATABASE piwigo;
MariaDB [(none)]> GRANT ALL PRIVILEGES ON piwigo.* TO 'piwigo_user'@'localhost' IDENTIFIED BY 'your-password';
MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> exit;
Make sure to replace piwigo_user
and your-password
with your own username and password.
Open your web browser and navigate to the URL of your Piwigo installation (e.g., http://your-domain.com
). Follow the installation wizard to install Piwigo.
When prompted for the database settings, enter the database name, username, and password that you created in the previous step.
When prompted for the installation folder, enter the path to the piwigo
directory that you extracted earlier (e.g., /home/your-username/piwigo
).
Follow the rest of the installation wizard to configure your Piwigo installation.
Once the installation is complete, remove the install
directory from the piwigo
folder using the following command:
rm -r ~/piwigo/install/
Make sure that the piwigo
directory has the correct ownership and permissions:
sudo chown -R apache:apache /home/your-username/piwigo # For Apache
sudo chown -R nginx:nginx /home/your-username/piwigo # For Nginx
sudo chmod -R 755 /home/your-username/piwigo
You can now access your Piwigo installation by visiting your domain name in a web browser.
Congratulations, you have successfully installed Piwigo on your EndeavourOS server!
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!
Alternatively, for the best virtual desktop, try Shells!