Description
I decided to create a guide to install pydio 8 community edition using the nginx (websites) plug-in for OMV 3.X. I found a guide for OMV 2.X in the forum but it's tideous and I think it doesn't use the full power of OMV and the nginx plug-in. This guide do not require the use of a terminal nor an SSH remote connexion. Oh and by the way, I'm not an OMV or a linux expert... I got my experience from curiosity and online search so this guide may not be the optimal way to achieve what it is meant to do. So if you have any suggestions or recommendations to optimise this guide, feel free to do it! I will gladly update this guide and learn something new!
FYI, each Inline-Code and code box represent an input from the user either by entering values, selecting an option from a list box, clicking something or adding a code.
Sources
Pydio for OMV 2.X guide in this Forum : here
Pydio community website : Installing on Debian+Nginx
Pydio administration Guides : Administration Guides
Preparing the Shared Folder and installing Pydio
First, we'll create the root folder to host the pydio website to be able install Pydio in it.
1. In OMV WebUI, go to Access Rights Management > Shared Folders ;
2. Click Add, Name : pydio ; Device : the_device_you_want and Save ;
3. Go to Access Rights Management > User ;
4. Select a User and click Privileges, give Read/Write permission to the "pydio" shared folder, Save , Apply changes ;
5. We'll now download pydio 8 and extract the zip at the root of the shared folder so, I like to create a temporary SMB Share to extract the file, but you could use an FTP Share also if you prefer;
6. Go to Services > SMB/CIFS , under the Settings tab, Enable the service if not already Enabled , Apply changes ;
7. Under the Shares tab, click Add, Shared folder : pydio , leave the rest to default, Save , Apply changes ;
8. Go to Pydio website and download the latest community zip package : https://pydio.com/en/get-pydio ;
9. Once the download is complete, from your computer, access the "pydio" SMB share and extract the content of the pydio zip at the root of the share ;
We are now ready to install the ngninx (websites) plug-in and configure our webserver to access the pydio website!
Installing and configuring our Nginx server
1. Download the OMVEXTRA deb package (for OMV 3.X) from here
2. In OMV WebUI, go to System > Plugins, click on Upload and browse to the downloaded deb package, click Ok;
3. After the page has refreshed, return to System > Plugins , under the section Utilities , select the openmediavault-omvextraorg 3.4.26 plugin (version at the time of writing) and Install , Close when done ;
4. After the page has refreshed, go to System > OMV-Extras, select OMV-Extra.org , click Edit, Enablethe repository, Save , Applychanges ;
5. Return to System > Plugins, under the Network section, select openmediavault-mysql 3.0.4 and openmediavault-nginx 3.0.11 plug-ins, and Install, Closewhen done ;
6. Go to Services > Nginx (websites), under Settings tab Enable the service ;
7. Under Pools tab, click Add , Name : pydio-php ; User : www-data ; Group : www-data ; Memory limit : Choose_depending_on_available_RAM ; Max Post size : 2048 ; Max upload filesize : 2048 ;
7.1 In the Extra options section, add the following lines, this is required by Pydio to perform better :
Notes on the php pool configuration
Upload wise, the Max Pot Size value would mean the maximum amount of data you can upload at the same time, 2GB in this case. The Max Upload Filesise mean the maximum filesize of a single file, 2GB in this case. And, obviously, the max_file_uploads value means the maximum number of file you can upload at the same time. If any of these criterias are met, the upload will fail. Change the values to your needs. I like to keep things neat and I don't think I will upload more than 2GB of data at the same time via the pydio website. If my files are larger, I'll use an SMB share and upload them locally.
7.2 Save , Apply changes ;
8. Under the Servers tab, click Add , Enable ; Directory : pydio ; Port : Choose_any_except_80 (used by OMV WebUI) ; Enable SSL if you have and SSL certificate ; Enable PHP ; PHP-FPM pool : pydio-php ; Enable index.php ; in the Extra options, paste this code, which is adapted from the code presented in the OMV 2.X guide, without overwriting the configurations automatically made by OMV 3.X (root folder, logs, etc.)
### If you changed the maximum upload size in PHP.ini, also change it below
client_max_body_size 20G;
# Prevent Clickjacking
add_header X-Frame-Options "SAMEORIGIN";
# This settings are destined to limit the supported crypto suites, this is optional and may restrict the availability of your website.
ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH';
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
add_header Strict-Transport-Security "max-age=16070400; includeSubdomains";
keepalive_requests 10;
keepalive_timeout 60 60;
client_body_buffer_size 128k;
# All non existing files are redirected to index.php
if (!-e $request_filename){
# For old links generated from Pydio 6
rewrite ^/data/public/([a-zA-Z0-9_-]+)$ /public/$1?;
rewrite ^(.*)$ /index.php last;
}
# Manually deny some paths to ensure Pydio security
location ~* ^/(?:\.|conf|data/(?:files|personal|logs|plugins|tmp|cache)|plugins/editor.zoho/agent/files) {
deny all;
}
# Forward PHP so that it can be executed
location ~ \.php$ {
fastcgi_param GATEWAY_INTERFACE CGI/1.1;
fastcgi_param SERVER_SOFTWARE nginx;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param REQUEST_URI $request_uri;
fastcgi_param DOCUMENT_URI $document_uri;
fastcgi_param DOCUMENT_ROOT $document_root;
fastcgi_param SERVER_PROTOCOL $server_protocol;
fastcgi_param REMOTE_ADDR $remote_addr;
fastcgi_param REMOTE_PORT $remote_port;
fastcgi_param SERVER_ADDR $server_addr;
fastcgi_param SERVER_PORT $server_port;
fastcgi_param SERVER_NAME $server_name;
try_files $uri =404;
fastcgi_pass unix:/run/php/php5-fpm.sock ;
}
# Enables Caching
location ~* \.(ico|css|js)$ {
expires 7d;
add_header Pragma public;
add_header Cache-Control "public, must-revalidate, proxy-revalidate";
}
Alles anzeigen
8.1 Save , Apply changes
9. We now have to set the folder access in the pydio share for the webserver to function properly, go to Access Rights Management > Shared Folders ;
10. Click pydio , Click on ACL ;
11. In the Directory Pane, select the data folder, under the Extra option , set the Owner to www-data , the Group to www-data , Apply permissions to files and subfolders , click Apply ;
12. We should now be able to access the pydio website! Go to Services > Nginx (websites) , click on the URL of the pydio website, a new tab opens and you should see the Pydio Diagnostic Tool, you should see 2-3 warnings, an SSL Encryption warning if you didn't use an SSL certificate, and PHP-GD and PHP-INTL warnings for the missing packages, DO NOT click on "CONTINUE TO PYDIO INSTALLATION" yet, there is still things to do! ;
13. Let's install those missing packages, to avoid SSHing into the server, I like to create temporary jobs to execute small commands (or you could use the Shellinabox plug-in to run those commands too), go to System > Scheduled Jobs ;
14. Click Add , Command : apt-get update && apt-get --yes --force-yes install php5-gd php5-intl php5-curl php5-apcu , Save , Apply changes.
15. Select the job, click Run ,click Start , click Close when done. You can now Delete the Job, Apply changes
16. Return to Services > Nginx (websites) , under Servers tab, click on the pydio URL , the warnings should have dissapeared (except for the SSL warning if you don't have an SSL certificate), close the Pydio Diagnostic Tool window.
See the next steps in the following post!