I give up - SPECIFIC omv4.X and nextcloud thread

    • OMV 4.x
    • Resolved

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

    • SPECIFIC omv4.X and nextcloud thread

      The purpose here is to separate nextcloud omv3x from omv4x. Not redo thin_x7 work. But also to keep close to it: nginx setup via plugins, MySQL too, minimum manual ssh. Nginx Vhost and specific php-fpm pool, plus MySQL with mariaDB, and nextcloud in a sharefolders.

      Thanks to tinh_x7 guide , following the steps by step i was able to almost make it work for omv4.x, BUT I FAILED !!! MISERY MISERY

      So i am thinking of reworking what he did using the same stepping and vamping his very good work until the blocking step.

      I will use a OracleVM with latest omv4.0.17-1.

      Pre-Installation Steps:
      those omv-plugins are needed: mysql4.1.1, nginx4.0.2,
      extra tools needed --> ssh login do: apt-get install wget zip unzip php7.0-curl php7.0-gd php-apcu

      MYSQL
      Using the mysql4.1.1 plugin, make sure you can access the mywebsql interface ( usually localhost/mysql/ ).
      CREATE a empty nextcloud database ( i used netxcloudDB )
      remember the login/password/ports you will use them later.

      SHARE FOLDER AND ACL ( exactly as tinh_x7, with a little change for files localization )

      Log into your OMV homepage, and go to Share Folders tab, and create a share folder call: www
      for OMV4.x, the localisation is: ./sharedfolders/www


      Via ssh create a folder name nextcloud
      mkdir /sharedfolders/www/nextcloud/
      and use the GUI to give this folder ACL read/write for user/group www-data
      [IMG:https://zupimages.net/up/18/05/two4.jpg]


      NGINX: exactly as thin_x7

      pool
      service/nginx/pools created new pools with:
      name: nextcloud
      comment: if needed
      user: www-data
      group: www-data
      display error OFF
      html error ON
      30/128/8/2
      5/2/1/3/0
      extra option:
      clear_env = no
      env[HOSTNAME] = $HOSTNAME
      env[PATH] = /usr/local/bin:/usr/bin:/bin
      env[TMP] = /tmp
      env[TMPDIR] = /tmp
      env[TEMP] = /tmp

      server
      service/nginx/server create new server with:
      enable ON
      directory device is www
      use a document root ON
      pubic directory OFF
      port ( whatever you want except 80/443 ) 8080
      default server OFF
      ssl OFF ( because i will use letsencrypt plugin later, so your config might change here )
      enable PHP ON
      php-fpm pool ( use your poolname ) nextcloud
      default config ON
      use index html/php ON
      log ON
      EXTRA OPTION: ( i am not trying to mod enything from thin_x7 config, so lets roll, just one small change for max-age. I am aware of some problem with the headers but lets see them later)
      Display Spoiler
      Display Spoiler

      add_header Strict-Transport-Security "max-age=3600; 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;
      }

      END OF EXTRA OPTION




      final nginx step:
      service/nginx/setting
      enable ON



      ps: of course, i suppose you hit the double confirm each time it is needed .

      NEXTCLOUD INSTALL
      nextcloud.com/install/#instructions-server

      Download the .tar.bz2 or .zip archive
      ssh do:
      cd /sharedfolders/www/
      zip: wget https://download.nextcloud.com/server/releases/nextcloud-12.0.5.zip
      unzip nextcloud-12.0.5.zip
      chown -R www-data:www-data nextcloud

      NEXTCLOUD CONFIG
      point your browser to
      192.168.1.58:8080/nextcloud/index.php --> error 503 means you did not do chown -R www-data:www-data nextcloud correctly
      if no error, you will end up with this screen, dont forget to expend it to have full options:

      [IMG:https://zupimages.net/up/18/05/y6ne.jpg]

      create your nextcloud admin/password

      use the mysql credential from the mysql plug in step
      user: omvadmin password:xxxxx database name: nextcloudDB server-ports:yourconfighere


      HERE COME TROUBLES !!!

      just after finishing this setup, i end up in a 404 error 192.168.1.58:8080/nextcloud/index.php/apps/files/

      forget to say i clear cache/reboot nicely omv4x server, offert a cat to the god.

      C'MON, who is going to find my stupid tiny mistake, because i am lost !!! And i am pretty sure this is a tiny stupid mistake !!!!
      ---------------------------------------------------------------------------------------------------------------------
      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.

      The post was edited 2 times, last by stratege1401: add comment to State the purpose of this fork thread ().

    • ok, weird: try something who should work !!! Must say it is an experiment to try to debug stuff.

      did a cp -R /sharefolders/nextcloud/ /var/www/openmediavault/nextcloud
      chmod -R 760 /www/openmediavault/nextcloud

      192.168.1.58:8080/nextcloud/index.php give me now a warning for data directory need to be st on 0770

      did
      chmod -R 0770 /var/www/openmediavault/nextcloud/data/

      but still get:
      Your data directory is readable by other users
      Please change the permissions to 0770 so that the directory cannot be listed by other users.


      this is completely mess up
      ---------------------------------------------------------------------------------------------------------------------
      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.

      The post was edited 4 times, last by stratege1401: Add comment due to akiranai next message ().

    • So basically, you're moving the folder of nextcloud to the same folder as OMV, that mean you will be using the same port and directory and same "server". I read that's not a good idea to use both in the same way (because of php and stuff) and they recommend to separate everything (avoiding bugs on omv).

      Thus It's maybe working but not recommend. Personally, I am still trying to figure it out with separate server.
    • Originally, following tinh_x7 guide, it's supposed to be installed inside a sharefolders, not in openmediavault directory, with a nginx VM host, with a specific php-fpm.
      With that config, I am getting the error 404 describe in the first thread.

      The second thread was an experiment to try to understand why 404 was triggered.

      Now, I understand there is a chmod problem for sure, and surely a nginx missconfiguration. I also understand my /sharefolders/www/nextcloud/ is working (see the difference when pointing my browser to the nextcloud localization ). Also, I know for facts that MySQL mariadb for my nextcloudDB is working because the empty database is now populated...

      Just need more digging.
      ---------------------------------------------------------------------------------------------------------------------
      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.
    • Just checking but nothing yet .Dig dig tonight...

      One of my clients just lost half of one raid 60. The PCI controller card just died for half of the disk array.
      ---------------------------------------------------------------------------------------------------------------------
      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.
    • back home, having a lot of time to try to fix my nextcloud problem.

      If anyone who succeed in anyway to have nextcloud working on omv4.x would drop me their config, i would be gratefull. I am pretty sure i made a tiny mistake but i cant pinpoint it.
      ---------------------------------------------------------------------------------------------------------------------
      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.
    • mybe can you test a othe config:
      change your port for omv 80 anf 443 to other ports
      Than set your nginx config for nextclout to 80 and 443.
      or myby sometimes nextcloud have problems with none https connection. Test it with the https connection if the error is the same.
      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
    • No can do !! omv4.x basic setup already use ports 80 and 443.

      The purpose is to set it up with nginx setup via plugins, MySQL too, minimum manual ssh. Nginx Vhost and specific php-fpm pool, plus MySQL with mariaDB, and nextcloud in a sharefolders. Also to use thin_7x guide as a model to recreate an updated guide and help other to easily reproduce on their omv4.x server.

      also, i want to stick to those step in my config:
      - fresh omv4.x install
      - plug-in update + omx-extra
      - plug-in install ( lvm, mysql, nginx, rsync, duplicati )
      - system upgrade
      - raid array build with lvm
      - filesystem, share, cifs, and extra config
      - mysql setup
      - specific personnal apps via manuel install or apt-get
      - nextcloud install + config
      - letsencrypts

      This is going to be a family+friends production server.

      I have succeed in all steps except nextcloud . Over the 20+ pages from the Q&A about omv3.x and nextcloud, i saw people saying they succeed, but giving no specifics
      ---------------------------------------------------------------------------------------------------------------------
      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.

      The post was edited 1 time, last by stratege1401: add commment ().

    • My cats gave my a hell of a night !!!

      I'll might give a try to the docker but will this be compatible with letsencrypt. Never yet test a docker...
      I am cloning my vm to test your advice...
      ---------------------------------------------------------------------------------------------------------------------
      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.
    • well, only idiots dont change their minds... so lets try with nextcloud in a docker.

      SO, again, vm with omv4.x...

      install-update-plugins ...
      - letsencrypt --> certs generated, https ok
      - mysql --> ok, database nextcloud created
      - nginx --> plugin indtalled
      - docker --> trying to use the nextcloud from the listing ...

      coming back
      ---------------------------------------------------------------------------------------------------------------------
      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.
    • If you have issues, you can use this : [url='https://homputersecurity.com/2018/01/28/guide-d-installation-de-nextcloud-sur-docker/']homputersecurity.com/2018/01/2…-de-nextcloud-sur-docker/[/url] Thank. Unfortunately already tried

      Source Code

      1. Recreating 0287dac63b6d_proxy ... error
      2. ERROR: for 0287dac63b6d_proxy Cannot create container for service proxy: invalid port specification: "86623"
      3. when ports setup is 8080 and 1443 ...
      Concerning docker plugin included with omv, the lack of explanation for the config make me think i will run in the same trouble.

      SOOooooo, i am done with this project.

      Going full debian LAMPS and manual install of everything. At last, i will perfectly managed my stuff ...

      Thank you for helping
      ---------------------------------------------------------------------------------------------------------------------
      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.
    • thank for all, i will continue to play with omv on my vm for fun ...

      Finaly, did my own project:

      Nextcloud server 12.0.5 Raid6 8-6TO based on a A8-6500 16 Go ram
      Debian 9.3 4.9.0-4-amd64 #1 SMP Debian 4.9.65-3+deb9u1 ( upgrade not done yet )
      MDADM-3.4 / LVM-2.02.168/ apache 2.4.25 / php 7.0.27 / 10.1.26-MariaDB / mysqlnd 5.0.12 / phpadmin 4.6.6deb4 / Redis server v=3.2.6 / HTTP2 / Fail2Ban / Munin / external smtp relay.
      ---------------------------------------------------------------------------------------------------------------------
      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.
    • stratege1401 wrote:

      thank for all, i will continue to play with omv on my vm for fun ...

      Finaly, did my own project:

      Nextcloud server 12.0.5 Raid6 8-6TO based on a A8-6500 16 Go ram
      Debian 9.3 4.9.0-4-amd64 #1 SMP Debian 4.9.65-3+deb9u1 ( upgrade not done yet )
      MDADM-3.4 / LVM-2.02.168/ apache 2.4.25 / php 7.0.27 / 10.1.26-MariaDB / mysqlnd 5.0.12 / phpadmin 4.6.6deb4 / Redis server v=3.2.6 / HTTP2 / Fail2Ban / Munin / external smtp relay.
      It should be great if you can share how did you fixe your issue :)
    • Hey Guys, did you tried to install nextcloud on a new OMV4.X install? I have the situation that I had a running nextcloud instance working on OMV3.X based on this Tutorial. Yesterday I spontaneously updated to OMV4.X and now, what a surprise, nextcloud is not running anymore. I get a "internal server error" and the nextcloud.log shows the following:

      Memcache \\OC\\Memcache\\APCu not available for distributed cache

      So my questions are. Do you think it is possible to fix this or do I need to clean my MySQL and nextcloud and starting new?

      And if yes, how can I remove the still existing nextcloud instance and nextcloud MySQL database?
    • Greenkeeper wrote:

      Hey Guys, did you tried to install nextcloud on a new OMV4.X install? I have the situation that I had a running nextcloud instance working on OMV3.X based on this Tutorial. Yesterday I spontaneously updated to OMV4.X and now, what a surprise, nextcloud is not running anymore. I get a "internal server error" and the nextcloud.log shows the following:

      Memcache \\OC\\Memcache\\APCu not available for distributed cache

      So my questions are. Do you think it is possible to fix this or do I need to clean my MySQL and nextcloud and starting new?

      And if yes, how can I remove the still existing nextcloud instance and nextcloud MySQL database?
      Sorry, can't help. What you're experiencing is one of the reasons This is why i gave up.
      ---------------------------------------------------------------------------------------------------------------------
      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.
    • stratege1401 wrote:

      Nextcloud server 12.0.5 Raid6 8-6TO based on a A8-6500 16 Go ram
      Debian 9.3 4.9.0-4-amd64 #1 SMP Debian 4.9.65-3+deb9u1 ( upgrade not done yet )
      MDADM-3.4 / LVM-2.02.168/ apache 2.4.25 / php 7.0.27 / 10.1.26-MariaDB / mysqlnd 5.0.12 / phpadmin 4.6.6deb4 / Redis server v=3.2.6 / HTTP2 / Fail2Ban / Munin / external smtp relay.
      Do your recommend to move from OMV to "clean" debian?