[HOW-TO] - Install Pydio 8.0.1 using the nginx (websites) plug-in

    • OMV 3.x
    • 3rd-party

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • [HOW-TO] - Install Pydio 8.0.1 using the nginx (websites) plug-in

      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 : 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 :

      Source Code

      1. php_value[output_buffering] = Off
      2. php_value[max_file_uploads] = 20

      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.)

      Source Code

      1. ### If you changed the maximum upload size in PHP.ini, also change it below
      2. client_max_body_size 20G;
      3. # Prevent Clickjacking
      4. add_header X-Frame-Options "SAMEORIGIN";
      5. # This settings are destined to limit the supported crypto suites, this is optional and may restrict the availability of your website.
      6. ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH';
      7. ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
      8. add_header Strict-Transport-Security "max-age=16070400; includeSubdomains";
      9. keepalive_requests 10;
      10. keepalive_timeout 60 60;
      11. client_body_buffer_size 128k;
      12. # All non existing files are redirected to index.php
      13. if (!-e $request_filename){
      14. # For old links generated from Pydio 6
      15. rewrite ^/data/public/([a-zA-Z0-9_-]+)$ /public/$1?;
      16. rewrite ^(.*)$ /index.php last;
      17. }
      18. # Manually deny some paths to ensure Pydio security
      19. location ~* ^/(?:\.|conf|data/(?:files|personal|logs|plugins|tmp|cache)|plugins/editor.zoho/agent/files) {
      20. deny all;
      21. }
      22. # Forward PHP so that it can be executed
      23. location ~ \.php$ {
      24. fastcgi_param GATEWAY_INTERFACE CGI/1.1;
      25. fastcgi_param SERVER_SOFTWARE nginx;
      26. fastcgi_param QUERY_STRING $query_string;
      27. fastcgi_param REQUEST_METHOD $request_method;
      28. fastcgi_param CONTENT_TYPE $content_type;
      29. fastcgi_param CONTENT_LENGTH $content_length;
      30. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
      31. fastcgi_param SCRIPT_NAME $fastcgi_script_name;
      32. fastcgi_param REQUEST_URI $request_uri;
      33. fastcgi_param DOCUMENT_URI $document_uri;
      34. fastcgi_param DOCUMENT_ROOT $document_root;
      35. fastcgi_param SERVER_PROTOCOL $server_protocol;
      36. fastcgi_param REMOTE_ADDR $remote_addr;
      37. fastcgi_param REMOTE_PORT $remote_port;
      38. fastcgi_param SERVER_ADDR $server_addr;
      39. fastcgi_param SERVER_PORT $server_port;
      40. fastcgi_param SERVER_NAME $server_name;
      41. try_files $uri =404;
      42. fastcgi_pass unix:/run/php/php5-fpm.sock ;
      43. }
      44. # Enables Caching
      45. location ~* \.(ico|css|js)$ {
      46. expires 7d;
      47. add_header Pragma public;
      48. add_header Cache-Control "public, must-revalidate, proxy-revalidate";
      49. }
      Display All
      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!

      The post was edited 13 times, last by blais708: Corrected some typos, added the "--yes --force-yes" options to the job command since we're not in a terminal. ().

    • New

      Configuring the MySQL Database

      1. Go to Services - MySQL , Click Enable, at the bottom Enable the SQL management site, click Save , Apply changes ;
      2. Click on the Show button, in the new tab User ID : root ; Password : leave_the_field_empty ;
      3. For extra security, I recommend adding a password for the root user, at the top bar, choose Tools > User Manager , at the Select a User dropdown menu choose root@localhost , add a password in the password field, then click Update User ;
      4. At the top bar choose Database > Create new..., Database name : pydio , Create Database ;
      PS. If you encounter an error access page during the creation of the database, simply reboot your server and repeat the step 4 ;)
      5. Log out and return to the OMV WebUI ;
      6. Go to Services > Nginx (webites) , click on the Pydio URL, Now click on CONTINUE TO PYDIO INSTALLATION!

      Pydio Setup Wizard

      1. Select language, Start Wizard ;
      2. Follow the Authentification forms ;
      3. At the Database Connection form, Host : localhost ; Databse : pydio ; user : root ; Password : mysql_root_password ;
      4. Detected Server URL : http://localhost:pydio_port/
      5. Select the default language ;
      6. Click Install Pydio !!!
      PS. You may see a screen where it tell you that it could not update the .htaccess file, select the code and modify the .htaccess file with a text editor in you pydio SMB share, then refresh the page!

      DONE!

      The post was edited 7 times, last by blais708 ().