NextCloud Installation Q & A

    • OMV 3.x

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

    • I have NextCloud installed on OMV 3.0.96 running from a 16GB USB Stick on Microserver Gen10, everything is working fine except when I want to upload big files.
      The problem is that the file is uploaded to a temp folder somewhere on USB drive and I heave only 10Gb free space and I can't upload files bigger thatn 10GB and eventually that drive will wear out from R/W.
      Can I change that temp folder to point to another SATA disk?
    • I have tried to configure it like this:
      env[TMP] = /srv/52559f90-1d49-4c27-93a2-63f2a2abff5b/www/nextcloud/tmp
      env[TMPDIR] = /srv/52559f90-1d49-4c27-93a2-63f2a2abff5b/www/nextcloud/tmp
      env[TEMP] = /srv/52559f90-1d49-4c27-93a2-63f2a2abff5b/www/nextcloud/tmp

      But it still uses USB Drive (sde1) to temporarily save files.
      Images
      • OMV.JPG

        59.44 kB, 1,443×334, viewed 127 times
    • Hello,
      I'm a bit confused: I've tried to install nextcloud on my raspberry using this excellent guide. No problem unitl I've passed the initial install webpage from nc. After this, I'm redirected to a https page which gives ERR_SSL_PROTOCOL_ERROR since I have no certificate (yet) . When trying to reach the same page but with http I get error 503: too many redirects.

      So, is it necessary to have an certificate when setting up nc? The guide states the following in this regards:

      Display Spoiler
      Note: It would easier to begin the setup with HTTP than HTTPS. After the installation is done, you can change it to HTTPS, and use Let's Encrypt for your encryption if you want.


      thanks for the advice
    • For fresh installs i use already https, but with a self signed cert and replace it afterwards with letsencrypt. But it should make no difference. You can start with letsencrypt or even with plain http.
      Chaos is found in greatest abundance wherever order is being sought.
      It always defeats order, because it is better organized.
      Terry Pratchett
    • Well, If it's possible to start with plain http, why do I get a 503: ERR_TOO_MANY_REDIRECTS?

      I've read through this bugrepport, but I'f I'm right the nginx.conf as described in the guide does have the correct order of fastcgi_split_path_info ^(.+\.php)(/.*)$; & include fastcgi_params; (see at the bottom).

      So: could it be there is something wrong with my nginx.conf? Here it is (the same as in the guide):

      Display Spoiler
      add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload;";
      add_header X-Content-Type-Options nosniff;
      add_header X-Frame-Options "SAMEORIGIN";
      add_header X-XSS-Protection "1; mode=block";
      add_header X-Robots-Tag none;
      add_header X-Download-Options noopen;
      add_header X-Permitted-Cross-Domain-Policies none;
      location = /robots.txt {
      log_not_found off;
      allow all;
      access_log off;
      }
      # The following 2 rules are only needed for the user_webfinger app.
      # Uncomment it if you're planning to use this app.
      #rewrite ^/.well-known/host-meta /public.php?service=host-meta last;
      #rewrite ^/.well-known/host-meta.json /public.php?service=host-meta-json
      # last;
      location = /.well-known/carddav {
      return 301 $scheme://$host/remote.php/dav;
      }
      location = /.well-known/caldav {
      return 301 $scheme://$host/remote.php/dav;
      }
      # set max upload size
      client_max_body_size 50G;
      fastcgi_buffers 64 4K;
      # Disable gzip to avoid the removal of the ETag header
      gzip off;
      # Uncomment if your server is build with the ngx_pagespeed module
      # This module is currently not supported.
      #pagespeed off;
      error_page 403 /core/templates/403.php;
      error_page 404 /core/templates/404.php;
      location / {
      rewrite ^ /index.php$uri;
      }
      location ~ ^/(?:build|tests|config|lib|3rdparty|templates|data)/ {
      deny all;
      }
      location ~ ^/(?:\.|autotest|occ|issue|indie|db_|console) {
      deny all;
      }
      location ~ ^/(?:index|remote|public|cron|core/ajax/update|status|ocs/v[12]|updater/.+|ocs-provider/.+|core/templates/40[34])\.php(?:$|/) {
      fastcgi_split_path_info ^(.+\.php)(/.*)$;
      include fastcgi_params;
      fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
      fastcgi_param PATH_INFO $fastcgi_path_info;
      fastcgi_param HTTPS on;
      #Avoid sending the security headers twice
      fastcgi_param modHeadersAvailable true;
      fastcgi_param front_controller_active true;
      fastcgi_pass $socket;
      fastcgi_intercept_errors on;
      }
      location ~ ^/(?:updater|ocs-provider)(?:$|/) {
      try_files $uri/ =404;
      index index.php;
      }
      # Adding the cache control header for js and css files
      # Make sure it is BELOW the PHP block
      location ~* \.(?:css|js|woff|svg|gif)$ {
      try_files $uri /index.php$uri$is_args$args;
      add_header Cache-Control "public, max-age=7200";
      add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload;";
      add_header X-Content-Type-Options nosniff;
      add_header X-Frame-Options "SAMEORIGIN";
      add_header X-XSS-Protection "1; mode=block";
      add_header X-Robots-Tag none;
      add_header X-Download-Options noopen;
      add_header X-Permitted-Cross-Domain-Policies none;
      # Optional: Don't log access to assets
      access_log off;
      }
      location ~* \.(?:png|html|ttf|ico|jpg|jpeg)$ {
      try_files $uri /index.php$uri$is_args$args;
      # Optional: Don't log access to other assets
      access_log off;
      }
    • I reinstalled OMV and had a hard time to get nextcloud working. Here are a few things I had to change:
      • I got the error The "X-Frame-Options" HTTP header is not configured to equal to "SAMEORIGIN". This is a potential security or privacy risk and we recommend adjusting this setting. Solved this by commenting out both lines of add_header X-Frame-Options "SAMEORIGIN";
      • To get letsencrypt working I had to add location ^~ /.well-known/acme-challenge/ { } to extra options.
      • For creating a new server nginx has to be enabled. I thought I could enable it afterwards.


      Will the renewal of the letsencrypt certificate work if I enable fastcgi_param HTTPS? In extra options there is the command

      Source Code

      1. location = /.well-known/carddav {
      2. return 301 $scheme://$host/remote.php/dav;
      3. }
      and right under it a second time. Is this necessary?
    • The setup guide is too long, so it won't allow me to do anymore update.
      Not everybody use Let's Encrypt, so they have to read this thread.
      Reading is really important if you want to learn :)

      Maybe when I use OMV4 in the future, I'll post another installation guide.
      OMV v4.0
      Asus Z97-A/3.1; i3-4370
      32GB RAM Corsair Vengeance Pro
      4x3TB RAID10
    • This guide helped me a lot but I'm not familiar with nginx. So it took me hours to get a letsencrypt certificate. I didn't even know what the problem was. Searching for "challenge failed" revealed no working solution. I don't think that it has to be mentioned in this guide but it should be mentioned somewhere in the forum. I hope that if someone has the same problem he will find this thread.

      Btw I think that nextcloud + letsencrypt is a relatively common combination. ;)
    • my opinion for letsencrypt was a sharedfolder it names "vhosts". In this i make a direktorry with mydns.com
      The rights for the folders are:
      vhosts:
      owner www-data with right/write/execute
      groop: user with right/write/execute
      other write/ execute
      mydns.com:
      owner root with right/write/execute
      groop: www-data with right/write/execute
      other write/ execute

      in the nginx options you must add:
      location /.well-known {
      alias /srv/dev-disk-by-label-data1/vhosts/mydns.com/.well-known;}

      and put in the Letsencrypt options in Webroot:
      /srv/dev-disk-by-label-data1/vhosts/mydns.com

      Thats work on my omv4
      omv 4.0.19 | 64 bit | omvextrasorg 4.1.2 | kernel 4.14
      used plugins: nginx | mysql | docker-gui |rsnapshot | antivirus | apt tool | letsEncrypt |
      used other: netxtcloud | logitechmediaserver | emby
    • suisujin wrote:

      This guide helped me a lot but I'm not familiar with nginx. So it took me hours to get a letsencrypt certificate. I didn't even know what the problem was. Searching for "challenge failed" revealed no working solution. I don't think that it has to be mentioned in this guide but it should be mentioned somewhere in the forum. I hope that if someone has the same problem he will find this thread.

      Btw I think that nextcloud + letsencrypt is a relatively common combination. ;)
      Hello, have you search correctly ? read Let's Encrypt Plugin
      ---------------------------------------------------------------------------------------------------------------------
      French, so forgive my english
      Personal Rig: valid.x86.fr/v72uek as a test bench with Oracle VM.
      And YES, my avatar is real, i am flying "parapentes" in St Hilaire du Touvet and at la coupe icare.
    • Users Online 1

      1 Guest