docker nextcloud?

    • OMV 3.x

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

    • In order to run Nextcloud you need a database and Docker installed.
      Assume you have both components, do the following:

      Installation of Nextcloud via Docker:
      1. SSH to your machine (I dont't like the Web GUI)
      2. Do the following things:

      Shell-Script

      1. sudo docker volume create nextcloud-data
      2. sudo docker run --name nextcloud -d -v nextcloud-data:/var/www/html -p 8080:80


      3. Now Docker begins to run Nextcloud as deamon (-d) with the volume for persistent data named nextcloud-data(-v) and listens on port 8080 (which is redirected to the containers port 80).
      4. Access IP-OF-YOUR-OMV:8080
      5. Install Nextcloud
      5.1 Please set up a MariaDB/MySQL database and not use the included one. It's too slow.
      6. Your files are now stored (persistent, in case of container update or crash or whatever) in: /var/lib/docker/openmediavault/volumes/nextcloud-data

      Setup the NGINX redirection:
      1. SSH to your machine again
      2. Do the following:

      Source Code

      1. cd /etc/nginx/sites-available/
      2. sudo nano nextcloud

      3. Fill in the following:

      Source Code

      1. server {
      2. listen 80;
      3. server_name nextcloud.YOURDOMAIN.org;
      4. root /var/www/nextcloud;
      5. index index.html;
      6. # Raise file upload size
      7. client_max_body_size 512m;
      8. # Limit download size
      9. proxy_max_temp_file_size 4096m;
      10. # Proxy for nextcloud docker
      11. location / {
      12. # Headers are already set via https://github.com/nextcloud/server under lib/private/legacy/response.php#L242 (addSecurityHeaders())
      13. # We only need to set headers that aren't already set via nextcloud's addSecurityHeaders()-function
      14. add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload";
      15. add_header Referrer-Policy "same-origin";
      16. # Secure Cookie / Allow cookies only over https
      17. # https://en.wikipedia.org/wiki/Secure_cookies
      18. # https://maximilian-boehm.com/hp2134/NGINX-as-Proxy-Rewrite-Set-Cookie-to-Secure-and-HttpOnly.htm
      19. proxy_cookie_path / "/; secure; HttpOnly";
      20. # And don't forget to include our proxy parameters
      21. #include /etc/nginx/proxy_params;
      22. proxy_set_header Host $http_host;
      23. proxy_set_header X-Real-IP $remote_addr;
      24. proxy_set_header X-Forwarded-Host $host;
      25. proxy_set_header X-Forwarded-Server $host;
      26. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
      27. proxy_set_header X-Forwarded-Proto $scheme;
      28. # Connect to local port
      29. proxy_pass http://127.0.0.1:8080;
      30. }
      31. }
      Display All
      4. Hit CTRL+X and save with 'y'
      5. ln -s /etc/nginx/sites-enabled/nextcloud /etc/nginx/sites-available/nextcloud
      5. sudo service nginx restart
      6. Access your nextcloud via nextcloud.YOURDOMAIN.org

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