Skip to content
Valéry Letroye edited this page Feb 18, 2021 · 44 revisions

This Repository contains a list of "Package Folders" that I have created for my own purpose:

  • by modifying existing Synology Packages (Ex.: 'MODS SSPKS' which is a modification of Julien Del-Piccolo's Simple SPK Server)
  • by creating my own Packages (Ex.: 'MODS Package Manager' which is a package to help in moving packages from a volume to another)
  • by packaging existing applications (Ex.: 'MODS Server Monitor' is a package to deploy Php Server Monitor on Synology)

Those 'Package Folders' can be opened with "Mods Packager", a Windows UI I wrote to build SPK files (Synology Packages). Briefly said: run "Mods Packager" and open any of the folders available here, either by using the menu "File > Open" or by drag&dropping the folder or the .spk file onto Mods Packager's Main UI.

They should theoretically all be published on my own 'Simple SPK server' Accessible here.

If you want to start your own package from a sample, I suggest to look at "MODS Dummy" if you are using a DSM 6.x or lower. If you are using a DSM 7.x Beta, look at "MODS Dummy 7.x"

As Packages for DSM 6.x and older are not supported anymore by DSM 7.x, I have created two lists:

  1. Packages for DSM 6.x (and older)
  2. Packages for DSM 7.x

Most of my Packages are using a "CGI router". This is a trick used to run php scripts (web pages) without any dependency on the Synology Web Station and the Package Init_3rdparty (A package enabling applications to run php scripts outside the root web folder). While Init_3rdparty runs the php scripts as 'root', my CGI router runs them as 'http'.

By default, Web Applications such as WordPress must be deployed under the www folder (web root): /<volumex>/web. They can be accessed via http(s)://<synology>/ But Packages are deployed under /var/packages/<package>/target (with a symbolic link under //@appstore/<package>) where php scripts may not be run by default. Once authorized (with Init_3rdparty or my CGI router trick), they can be accessed via http(s)://<synology>:/webman/3rdparty/<package>

My CGI router is based on a post of Rob Van Aarle: the idea is to use the command 'php-cgi' to execute all php pages instead of 'php-fpm'. For that purpose, Rob wrote a central cgi (a bash script) that handles all requests to any php page in the same folder. Redirecting all requests for php pages to that central cgi is made with an .htaccess file when using apache or with a config file when using nginx (the default since DSM 6.x). The cgi script retrieves the name of the requested pages and executes them with 'php-cgi'.

In order to use my CGI router, the packages have to link a config file under the nginx etc/conf/ folder during installation. This requires root access. It was not an issue with DSM 6.x and older as the Packages were installed as root per default. But since DSM 7.x, Packages are installed with their own technical account. But there are workarounds (See DSM-7.x)

Clone this wiki locally