Piwigo - Manual Setup on DSM 7 / Synology DS218j¶
This guide was written specifically for low end Synology DS218j NAS where Docker installation is not possible. For new NAS, Docker type installation is simpler and and more widely preferred.
For newer NAS with more RAM, PHP’s memory_limit
value in step 4 could be increased.
Step 9 is only required for NAS with 32-bit CPU such as DS218j, which is very uncommon nowadays.
Prerequisites¶
- Access to DSM web portal
- SSH to DSM (preferred/optional, used in STEP 8)
Preparing DSM¶
-
Install the following packages through the DSM Package Center.
- Web Station
- Apache HTTP Server 2.4.51
- PHP 7.4.24
- phpMyAdmin 4.9.7
- MariaDB 10.3.32
Attention
Once you install the MariaDB 10 package, you will have to set a root password. You will need this root password when logging in MariaDB using phpMyAdmin later.
-
Download the latest Piwigo version 12.2.0 from the official Piwigo website and put the zip file under your web root folder (
/volume1/web/
). Right click the zip and extract it to/volume1/web/piwigo
. -
Open File Station, right click on the piwigo folder and click Properties, go to Permissions tab and click Create, in the User or Group dropdown menu choose SYSTEM then check all Read and Write permissions. Click Done, check Apply to this folder, sub-folders and files, click Save.
-
Configure PHP. Open Web Station, Go to Script Language Settings and click Create.
-
Settings tab: Enter following information:
- Profile Name: Piwigo (or any name you like)
- Description: Piwigo PHP 7.4 Profile (or any name you like)
- PHP version: PHP 7.4
- Select Enable PHP Cache
Tip
Optionally select Enable display_errors to display PHP error message to show php errors to help debugging.
-
Extension tab: Enable the following extensions:
bcmath
,bz2
,curl
,exif
,ftp
,gd
,gettext
,gmp
,iconv
,imagick
,intl
,mailparse
,mysqli
,openssl
,pdo_mysql
,posix
,soap
,sockets
,sodium
,xmlrpc
,zip
,zlib
- Core tab: Search the following values and change them accordingly:
memory_limit= 128M
upload_max_filesize= 4096M (Allows uploading of bigger file size up to 4GB)
post_max_size= 4096M
opcache.enable= 1
opcache.enable_cli= 1
opcache.interned_strings_buffer= 64
opcache.max_accelerated_files= 32531
opcache.memory_consumption= 128
opcache.save_comments= 1
opcache.revalidate_freq= 240
Click save.
-
-
Open Web Station, Go to Web Service Portal, Enter the following information:
- HTTP back-end server : Apache HTTP Server 2.4
- Choose the PHP profile created (e.g. Piwigo PHP 7.4 Profile)
Click Save.
-
Open phpMyAdmin, log in with MariaDB 10 root credentials. Go to Databases tab, create a new database with name “piwigo_db” (or any name you like).
-
After the database was successfully created, select it from the left panel, then go to the Privileges tab, click Add user account, enter the following information:
- Username: your-username
- Host name: Local, localhost
- Password: your-password
- Re-type: your-password
Select Grant all privileges on database piwigo_db, click Go.
-
Set permissions. Personally I prefer SSH and execute the following commands (instead of using DSM’s Task Scheduler).
Note
If you prefer the DSM’s Task Scheduler way, refer Managing Tasks > To create a scheduled task under at Synology KB, or STEP 22 & 23 from this guide on mariushosting.com.
-
(32-bit CPU only) Patch Piwigo’s
admin/include/pclzip.lib.php
andinclude/template.class.php
with 32-bit CRC32 function. Edit the two files and update them according to this pull request.Attention
This step is only required if your NAS has a 32-bit CPU.
-
Visit http://your-server-ip/piwigo from your browser to start installation. Use the information you provided in step 7 when asked.
Notes¶
- phpmailer is not working on my installation.
- Please see configurations to see my preferred Piwigo settings and plugins.
Credits¶
- Nextcloud installation guide from mariushosting.com