NextCloud Installation Q & A

    • OMV 3.x
    • Hello All,

      After I upgraded from OMV3 to OMV4, I struggle to log into OMV web page.
      I couldn't find any solution.
      So, I start a fresh installation.


      Ensure you install: redis-server php-redis

      This is for OMV4 PHP7 only:

      I've spent 40 mins. to found out the issue that many users have 502 Bad Gateway error at the installation process due to the Nginx code.

      Change this: fastcgi_pass $socket; to this: fastcgi_pass unix:/run/php/php7.0-fpm.sock;

      Restart your Nginx service: sudo service nginx restart
      And try again.
      OMV v4.0
      Asus Z97-A/3.1; i3-4370
      32GB RAM Corsair Vengeance Pro
      4x3TB RAID10

      The post was edited 3 times, last by tinh_x7 ().

    • Ok i do have a question: this guide seems to be geared toward having nextcloud running on the root directory of the listed website. I would like for it to run in a subdirectory. I did review the subdir code on the nextcloud page but for some reason I cannot get it to work. I get a login page but when I click logon, it doesn't work.

      I guess I can start over but I would like some advice for whomever attempted this

      EDIT: I tried following this docs.nextcloud.com/server/13/a…l/installation/nginx.html and I used those SubDir settings from add_header X-Content-Type-Options nosniff; on down, and its working now. I used the gzip off and fast-cgi settings from @tinh_x7 guide. Also the server is pointing to www instead of nextcloud.

      I swear I did this already and It was working, but then broke. So I'll see how long it lasts

      EDIT2: I guess if i do have a question, it would be how can i get the URL to point to openmediavault.local:{port}/nextcloud instead of it being localhostopenmediavault.local:{port}

      The post was edited 3 times, last by z-vap ().

    • No, after the installation is done.

      /nextcloud/config/config.php

      Source Code

      1. 'trusted_domains' =>
      2. array (
      3. 0 => '192.168.1.12',
      4. 1 => 'abc.dfe.com',
      5. 2 => 'localhost',
      6. ),
      7. 'datadirectory' => '/srv/dev-disk-by-label-Data/www/nextcloud/data',
      8. 'overwrite.cli.url' => 'https://abc.dfe.com',
      OMV v4.0
      Asus Z97-A/3.1; i3-4370
      32GB RAM Corsair Vengeance Pro
      4x3TB RAID10
    • Hi. Im running OMV3 on AMD e-350 2 cores 2 threads 1,6GHz, 15W TDP, 4GB of RAM and 2x500GB mirror ZFS pool. 82% of RAM is taken by ZFS and services (samba, nfs and transmission). I have public but variable external IP (binded with noip.org to some domain). Also i can have free domain on some hosting server (my sister has 2 sites there).

      1. How much ram Nextcloud needs? I can change the ammount of RAM ZFS takes (now it takes 2,5GB).
      2. Im more familiar with apache but nginx is less resource hungry, wont need proxy module and AFAIK OMV is using it. Should i stick with it or choose apache anyway for NC?
      3. (Nginx choice) Did anyone try those configs? If not do you know any nginx configs that work on OMV?
      docs.nextcloud.com/server/12/a…l/installation/nginx.html
      4. Is PHP 7 neccesary for NC 11?
      5. I self-signed SSL enough for some basic security (im the only one who will use this cloud)?
      6. I know the answer but ill ask anyway to be 100% sure: is there any way to use this free domain i have (on my sisters hosting server) instead of ddns domain i got from noip.org and use some SSL for it?
    • 1.

      Source Code

      1. Memory requirements for running an Nextcloud server are greatly variable, depending on the numbers of users and files, and volume of server activity. Nextcloud needs a minimum of 128MB RAM, and we recommend a minimum of 512MB
      2. OMV using Nginx, so it would be easy to use the same engine.
      Nginx uses less resource than Apache.

      3. The vhost config is already posted in this forum.

      4. No. However, Nextcloud v14 will require PHP 7.

      5. yes

      6. Yes
      OMV v4.0
      Asus Z97-A/3.1; i3-4370
      32GB RAM Corsair Vengeance Pro
      4x3TB RAID10
    • Ive installed Nextcloud with SSL. And i have questions about OPcache.

      Here you suggested to put it in main php.ini in fpm module.

      NextCloud Installation Q & A

      But each php module have its conf.d directory with its config files. And each of them have opcache.ini file with this content.


      Source Code: 05-opcache.ini

      1. ; configuration for php ZendOpcache module
      2. ; priority=05
      3. zend_extension=opcache.so
      So ...

      1. Is there a good reason to put opcache settings in fpm/php.ini when there is separate config file in fpm/conf.d/05-opcache.ini for it?
      2. Or wont be better to put those settings in separate ini file AFTER existing file. For example in 06-opcache.ini.
    • I have created a 10-opcache.ini

      nano /etc/php/7.0/fpm/conf.d/10-opcache.ini
      at the end i added

      opcache.enable=1
      opcache.enable_cli=1
      opcache.interned_strings_buffer=8
      opcache.max_accelerated_files=10000
      opcache.memory_consumption=128
      opcache.save_comments=1
      opcache.revalidate_freq=1


      then
      service php7.0-fpm restart
      service nginx restart

      done
    • tinh_x7 wrote:

      Hello All,

      After I upgraded from OMV3 to OMV4, I struggle to log into OMV web page.
      I couldn't find any solution.
      So, I start a fresh installation.


      Ensure you install: redis-server php-redis

      This is for OMV4 PHP7 only:

      I've spent 40 mins. to found out the issue that many users have 502 Bad Gateway error at the installation process due to the Nginx code.

      Change this: fastcgi_pass $socket; to this: fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;

      Restart your Nginx service: sudo service nginx restart
      And try again.
      I ran into this issue very recently (502 Bad Gateway). I started over with my nextcloud install and could not understand why i suddenly was getting this. the fastcgi_pass was set as fastcgi_pass $socket but the socket variable (above in the /etc/nginx/sites-available/zzz-omv-nginx) was now set to a non-existent .sock file.

      Source Code

      1. set $socket "unix:/var/run/fpm-1f5eeee0-742c-4158-93ec-babe9f746212.sock";



      I located my sock file (/var/run/php5-fpm.sock;) and set my code to that

      Source Code

      1. fastcgi_pass unix:/var/run/php5-fpm.sock;
      Like I said it did work at first, but for some reason when I started over (deleting everything) it broke, as the $socket variable was not set accurately.

      Does anyone know why that is?
    • set $socket "unix:/var/run/fpm-xxxxxxxxxxxx.sock
      +
      fastcgi_pass $socket;

      should work for OVM4... either a bad gateway error occurs or nginx won't start if there are problems in your conf file. That doesn't have to be related to sock

      I'll attach my conf for you to try (spent some time as well till I got it working, afterwards I've found that thread ;) )

      Source Code

      1. server {
      2. listen 443 ssl;
      3. listen [::]:443 ssl;
      4. ssl_certificate /etc/ssl/certs/openmediavault-ebc8f928-92d8-4c17-a344-f2565cb3cb76.crt;
      5. ssl_certificate_key /etc/ssl/private/openmediavault-ebc8f928-92d8-4c17-a344-f2565cb3cb76.key;
      6. set $root_path "/srv/dev-disk-by-label-hdddata/@Nextcloud/nextcloud";
      7. root $root_path;
      8. index index.php;
      9. set $socket "unix:/var/run/fpm-bab6bd38-ed2d-41a6-a959-c428f826348a.sock";
      10. access_log /var/log/nginx/d6f706c6-0e3b-46cd-bb1c-c6a6bdc6f48b-access.log;
      11. error_log /var/log/nginx/d6f706c6-0e3b-46cd-bb1c-c6a6bdc6f48b-error.log;
      12. large_client_header_buffers 4 16k;
      13. add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload;";
      14. client_max_body_size 10G; # set max upload size
      15. fastcgi_buffers 64 4K;
      16. rewrite ^/caldav(.*)$ /remote.php/caldav$1 redirect;
      17. rewrite ^/carddav(.*)$ /remote.php/carddav$1 redirect;
      18. rewrite ^/webdav(.*)$ /remote.php/webdav$1 redirect;
      19. error_page 403 /core/templates/403.php;
      20. error_page 404 /core/templates/404.php;
      21. location = /robots.txt {
      22. allow all;
      23. log_not_found off;
      24. access_log off;
      25. }
      26. location ~ ^/(data|config|\.ht|db_structure\.xml|README) {
      27. deny all;
      28. }
      29. location / {
      30. rewrite ^/.well-known/host-meta /public.php?service=host-meta last;
      31. rewrite ^/.well-known/host-meta.json /public.php?service=host-meta-json last;
      32. rewrite ^/.well-known/carddav /remote.php/carddav/ redirect;
      33. rewrite ^/.well-known/caldav /remote.php/caldav/ redirect;
      34. rewrite ^(/core/doc/[^\/]+/)$ $1/index.html;
      35. try_files $uri $uri/ index.php;
      36. }
      37. location ~ ^(.+?\.php)(/.*)?$ {
      38. try_files $1 = 404;
      39. include fastcgi_params;
      40. fastcgi_param SCRIPT_FILENAME $document_root$1;
      41. fastcgi_param PATH_INFO $2;
      42. fastcgi_param HTTPS on;
      43. fastcgi_pass $socket;
      44. }
      45. # Optional: set long EXPIRES header on static assets
      46. location ~* ^.+\.(jpg|jpeg|gif|bmp|ico|png|css|js|swf)$ {
      47. expires 30d;
      48. # Optional: Don't log access to assets
      49. access_log off;
      50. }
      51. }
      Display All
      adapt certs path/ and name + root path etc

      The post was edited 1 time, last by Stramm ().