NextCloud Installation Q & A

    • OMV 3.x

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

    • Stramm wrote:

      In LE the web root is
      /var/www/openmediavault/
      the domain your noip domain

      In nginx extra options the server_name is your noip domain.
      The rest as described in this thread.
      Yes, i've done it in that way. Only other thing i have changed in nginx options is the access permission for the '.well-known' directory otherwise i received a 403 permission denied error.
      I added these lines before generating certificate ;


      Display Spoiler

      location ^~ /.well-known/ {
      [*]allow all;
      [*]root /var/www/openmediavault;
      [*]try_files $uri =404;
      [*]}
    • Just to recap on 404 Not Found issue
      if you get something like this:
      2018/04/11 14:34:03 [error] 2292#0: *1057 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 192.168.1.100, server: , request: "GET /setup-nextcloud.php HTTP/1.1", upstream: "fastcgi://unix:/run/fpm-32a2476e-7999-4df4-99b9-53432153b9b2.sock:", host: "192.168.1.27:81"
      with file name that you are looking for that can be sorted with changing PHP Default seting turning ON and OFF, strangely i had to try few times, and for me it works with setting turned ON.
      if you get something like this:
      2018/04/10 18:39:24 [error] 29588#0: *4 open() "/srv/dev-disk-by-id-md-name-openmediavault-0/www/nextcloud/robots.txt" failed (13: Permission denied), client: 192.168.1.100, server: , request: "GET /robots.txt HTTP/1.1", host: "192.168.1.27:90"
      or
      2018/04/11 07:26:17 [crit] 23485#0: *4 stat() "/srv/dev-disk-by-id-md-name-openmediavault-0/www/nextcloud/favicon.ico" failed (13: Permission denied), client: 192.168.1.100, server: , request: "GET /favicon.ico HTTP/1.1", host: "192.168.1.27:81"20
      that is permission issue, www-data:www-data has to have permission on entire path to Nextcloud folder. you can chek that by issiuing:
      sudo -g www-data stat /path/to/your/nextcloud
      for group and
      sudo -u www-data stat /path/to/your/nextcloud
      for user
      I had
      root@openmediavault:~# sudo -u www-data stat /srv/dev-disk-by-id-md-name-openmediavault-0/www/nextcloud

      stat: cannot stat '/srv/dev-disk-by-id-md-name-openmediavault-0/www/nextcloud': Permission denied
      for user
      and
      root@openmediavault:~# sudo -g www-data stat /srv/dev-disk-by-id-md-name-openmediavault-0/www/nextcloud
      File: /srv/dev-disk-by-id-md-name-openmediavault-0/www/nextcloud

      Size: 432 Blocks: 0 IO Block: 4096 directory

      Device: 2ch/44d Inode: 319444 Links: 1

      Access: (2775/drwxrwsr-x) Uid: ( 33/www-data) Gid: ( 33/www-data)

      Access: 2018-04-15 20:27:24.195046030 +0200

      Modify: 2018-03-31 19:52:47.175290573 +0200

      Change: 2018-04-15 21:47:41.786165039 +0200

      Birth: -
      for group
      the solution is to change permission for each folder in the path:
      chmod +x /path
      chmod +x /path/to
      chmod +x /path/to/your
      chmod +x /path/to/your/nextcloud
      you can use g+x for group and u+x for user
      unfortunately for me none of those worked and i have created new place for nextcloud, it doesnt have to be in www folder.
    • mrperfektone wrote:

      I've followed your guide and I can access nextcloud locally via http :) How do I get it to work with lets encrypt (Https) - Have a domain :)? Can not find it anywhere in the guide besides you say it easily :)
      I think it's easier to troubleshoot if you would describe the problem you are facing a little bit more. Did you activate SSL and created a certificate like it's written in chapter 1f?
    • wouterve wrote:

      Stramm wrote:

      In LE the web root is
      /var/www/openmediavault/
      the domain your noip domain

      In nginx extra options the server_name is your noip domain.
      The rest as described in this thread.
      Yes, i've done it in that way. Only other thing i have changed in nginx options is the access permission for the '.well-known' directory otherwise i received a 403 permission denied error.I added these lines before generating certificate ;


      Display Spoiler

      location ^~ /.well-known/ {
      allow all;
      root /var/www/openmediavault;
      try_files $uri =404;
      }

      Okay, I had made a stupid error. The root of my nextcloud was not /var/www/openmediavault but /srv/XXXX (my external drive pool).

      Anyway, to sum things up: I changed openmediavault to another port and put nextcloud on 80 (no need anyway for openmediavault to be externally available or not through https anyway). So I followed the guidelines for letsencrypt and everything works now with ssl certificate :-).
    • Yesterday I upgraded to OMV4. Everything works fine except for nextcloud. When I try to open the nextcloud page I get

      Source Code

      1. Internal Server Error
      2. The server encountered an internal error and was unable to complete your request.
      3. Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report.
      4. More details can be found in the server log.
      Does anybody has the same issue or a clue how I can troubleshoot this?
    • tinh_x7 wrote:

      Check your Nextcloud dir permissions, and vhost config.
      My permissions are
      drwxrwsr-x+ 14 www-data www-data 4.0K May 7 20:22 nextcloud

      and the Extra Options of nginx

      Source Code

      1. add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload;";
      2. add_header X-Content-Type-Options nosniff;
      3. # add_header X-Frame-Options "SAMEORIGIN";
      4. add_header X-XSS-Protection "1; mode=block";
      5. add_header X-Robots-Tag none;
      6. add_header X-Download-Options noopen;
      7. add_header X-Permitted-Cross-Domain-Policies none;
      8. location = /robots.txt {
      9. log_not_found off;
      10. allow all;
      11. access_log off;
      12. }
      13. # The following 2 rules are only needed for the user_webfinger app.
      14. # Uncomment it if you're planning to use this app.
      15. #rewrite ^/.well-known/host-meta /public.php?service=host-meta last;
      16. #rewrite ^/.well-known/host-meta.json /public.php?service=host-meta-json
      17. # last;
      18. location = /.well-known/carddav {
      19. return 301 $scheme://$host/remote.php/dav;
      20. }
      21. location = /.well-known/caldav {
      22. return 301 $scheme://$host/remote.php/dav;
      23. }
      24. location ^~ /.well-known/acme-challenge/ { }
      25. # set max upload size
      26. client_max_body_size 50G;
      27. fastcgi_buffers 64 4K;
      28. # Disable gzip to avoid the removal of the ETag header
      29. gzip off;
      30. # Uncomment if your server is build with the ngx_pagespeed module
      31. # This module is currently not supported.
      32. #pagespeed off;
      33. error_page 403 /core/templates/403.php;
      34. error_page 404 /core/templates/404.php;
      35. location / {
      36. rewrite ^ /index.php$uri;
      37. }
      38. location ~ ^/(?:build|tests|config|lib|3rdparty|templates|data)/ {
      39. deny all;
      40. }
      41. location ~ ^/(?:\.|autotest|occ|issue|indie|db_|console) {
      42. deny all;
      43. }
      44. location ~ ^/(?:index|remote|public|cron|core/ajax/update|status|ocs/v[12]|updater/.+|ocs-provider/.+|core/templates/40[34])\.php(?:$|/) {
      45. fastcgi_split_path_info ^(.+\.php)(/.*)$;
      46. include fastcgi_params;
      47. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
      48. fastcgi_param PATH_INFO $fastcgi_path_info;
      49. fastcgi_param HTTPS on;
      50. #Avoid sending the security headers twice
      51. fastcgi_param modHeadersAvailable true;
      52. fastcgi_param front_controller_active true;
      53. fastcgi_pass $socket;
      54. fastcgi_intercept_errors on;
      55. }
      56. location ~ ^/(?:updater|ocs-provider)(?:$|/) {
      57. try_files $uri/ =404;
      58. index index.php;
      59. }
      60. # Adding the cache control header for js and css files
      61. # Make sure it is BELOW the PHP block
      62. location ~* \.(?:css|js|woff|svg|gif)$ {
      63. try_files $uri /index.php$uri$is_args$args;
      64. add_header Cache-Control "public, max-age=7200";
      65. add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload;";
      66. add_header X-Content-Type-Options nosniff;
      67. # add_header X-Frame-Options "SAMEORIGIN";
      68. add_header X-XSS-Protection "1; mode=block";
      69. add_header X-Robots-Tag none;
      70. add_header X-Download-Options noopen;
      71. add_header X-Permitted-Cross-Domain-Policies none;
      72. # Optional: Don't log access to assets
      73. access_log off;
      74. }
      75. location ~* \.(?:png|html|ttf|ico|jpg|jpeg)$ {
      76. try_files $uri /index.php$uri$is_args$args;
      77. # Optional: Don't log access to other assets
      78. access_log off;
      79. }
      Display All

      Sorry. I just saw that this tutorial doesn't work with php7. Maybe I should try the nextcloud docker image.
      I really appreciate your work here but I don't want to spend hours maintaining a private cloud in my free time.
    • Hey!

      Which user is used to write in the data path? Nextcloud tells me :


      nextcloud wrote:

      Your data directory is not writable
      I tried www-data and my own user as owner and gave it full permission on the data folder.

      edit: error log shows this:


      errorlog wrote:

      "remoteAddr":"[IP-adress]","user":"--"... tried to connect...
      It seems no user is used to try to access the site.

      Please help me!

      The post was edited 1 time, last by flist: Update ().

    • flist wrote:

      Hey!

      Which user is used to write in the data path? Nextcloud tells me :


      nextcloud wrote:

      Your data directory is not writable
      I tried www-data and my own user as owner and gave it full permission on the data folder.
      edit: error log shows this:

      It telling you that the owner of the Nextcloud dir doesn't have write permission.

      Double check it.
      Or you can start a clean installation.
      OMV v4.0
      Asus Z97-A/3.1; i3-4370
      32GB RAM Corsair Vengeance Pro
      4x3TB RAID10
    • Users Online 6

      6 Guests