{"id":1481,"date":"2020-10-05T13:47:06","date_gmt":"2020-10-05T05:47:06","guid":{"rendered":"https:\/\/eligiblestore.com\/blog\/?p=1481"},"modified":"2021-03-15T11:35:10","modified_gmt":"2021-03-15T03:35:10","slug":"complete-guide-rasp-pi-4-for-nextcloud-redis-mysql-ext-ntfs-nginx-proxy-manager","status":"publish","type":"post","link":"https:\/\/eligiblestore.com\/blog\/2020\/10\/05\/complete-guide-rasp-pi-4-for-nextcloud-redis-mysql-ext-ntfs-nginx-proxy-manager\/","title":{"rendered":"Complete Guide Rasp Pi 4 for NextCloud + Redis + MySQL + Ext NTFS + Nginx Proxy Manager"},"content":{"rendered":"<p><strong>NOTE<\/strong>:<\/p>\n<p>Use below Guide for <strong>Raspberry Pi 4 <\/strong>and <strong>OS Ubuntu 20.04 (64 bit only)<\/strong>. If you are using <strong>older hardware<\/strong> &lt;= Raspberry Pi 3 use this guide instead <a href=\"https:\/\/eligiblestore.com\/blog\/2020\/09\/18\/complete-guide-nextcloud-external-hdd-ntfs-nginx-proxy-manager\/\">Complete guide NextCloud + External HDD NTFS + Nginx Proxy Manager<\/a>.<\/p>\n<p>If you are looking for self-host-dropbox-like you are coming to the right place, I am using OS Ubuntu 20.04 LTS and one 6TB HDD ext which is <span style=\"text-decoration: underline;\">not ideal<\/span>, if you possible, use minimum 2 HDD and setup RAID 1 using mdam tools for data safety. With this setup you can stream video normally.<\/p>\n<h2>Step 1 &#8211; Install PiHole + DNSCrypt-Proxy + Samba (optional)<\/h2>\n<p>Why? I will tell you later, follow along this step, however the additional is to install <strong>SAMBA<\/strong> when you configure dockstarter <a href=\"https:\/\/eligiblestore.com\/blog\/2020\/08\/20\/simplest-pihole-dnscrypt-proxy-implementation-on-raspberry-pi-4\/\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/eligiblestore.com\/blog\/2020\/08\/20\/simplest-pihole-dnscrypt-proxy-implementation-on-raspberry-pi-4\/<\/a><\/p>\n<h2>Step 2 &#8211; Install Nginx Proxy Manager<\/h2>\n<p>You can follow below this blog <a href=\"https:\/\/dbtechreviews.com\/2020\/06\/install-nginx-proxy-manager-on-a-raspberry-pi-4\/\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/dbtechreviews.com\/2020\/06\/install-nginx-proxy-manager-on-a-raspberry-pi-4\/<\/a> or watch this <a href=\"https:\/\/www.youtube.com\/watch?v=2oi4IQF7VnE\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/www.youtube.com\/watch?v=2oi4IQF7VnE<\/a><\/p>\n<h2>Step 3 &#8211; Mount your HDD ext<\/h2>\n<p>Open your terminal and SSH\/Mosh your Pi and find your mountable drive:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">$ sudo fdisk -l<\/pre>\n<p>or<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">$ lsblk -fp<\/pre>\n<p>Mount your ext drive (in my case it&#8217;s located at <strong>\/dev\/sda1 <\/strong>and I am going to mount it to <strong>\/mnt\/hdd<\/strong>):<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n$ sudo mkdir \/mnt\/hdd\r\n$ sudo mount \/dev\/sda1 \/mnt\/hdd\r\n<\/pre>\n<p>That&#8217;s it, now try to list the directory and confirm everything is nice and make nextcloud directory inside the hdd<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n$ ls \/mnt\/hdd\r\n$ mkdir \/mnt\/hdd\/nextcloud\r\n<\/pre>\n<p>and since nextcloud will be using user www-data for the directory (otherwise will not be able to configure nextcloud) let&#8217;s add user <strong>pi<\/strong> to group <strong>www-data<\/strong><\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n$ sudo usermod -a -G www-data pi\r\n<\/pre>\n<p>Confirm that user pi is under group 33(www-data)<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n$ id pi\r\n<\/pre>\n<p>Finally let&#8217;s make sure everytime Raspberry Pi reboot, you will not lose the mount or mount manually<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n#make backup for fstab first in case anything wrong you can revert back\r\n$ sudo cp \/etc\/fstab \/etc\/fstab-bak\r\n\r\n#find and copy the UUID of your external HDD\r\n$ lsblk -fp\r\n\r\n#edit fstab\r\n$ sudo nano \/etc\/fstab\r\n<\/pre>\n<p>Copy below to the last line of fstab don&#8217;t forget to modify UUID to your UUID otherwise you will not be able to boot your Pi<\/p>\n<pre>UUID=TH1S1SY0URUD1DN0 \/mnt\/hdd ntfs-3g async,big_writes,noatime,nodiratime,nofail,uid=33,gid=33,permissions,umask=007 0 0<\/pre>\n<p>Next reboot your Pi, fingercross everthing is fine, after reboot try listing the directory, to confirm everything is tight.<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">sudo reboot<\/pre>\n<h2>Step 4 &#8211; Install Nextcloud<\/h2>\n<p>Create below directory if not exists:<\/p>\n<pre>\/home\/ubuntu\/.config\/nextcloud\/<\/pre>\n<p>Go to that directory and create a file called docker-compose.yml inside that directory:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\ncd \/home\/ubuntu\/.config\/nextcloud\/\r\nnano docker-compose.yml\r\n<\/pre>\n<p>Insert below, don&#8217;t forget to change the password.<\/p>\n<pre>version: '3'\r\n\r\nservices:\r\n  db:\r\n    image: yobasystems\/alpine-mariadb:latest\r\n    command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW\r\n    restart: always\r\n    volumes:\r\n      - \/home\/ubuntu\/.config\/appdata\/nextcloud\/mysql:\/var\/lib\/mysql\r\n      - \/etc\/localtime:\/etc\/localtime:ro\r\n    environment:\r\n      - MYSQL_ROOT_PASSWORD=[<strong>COMPLEX_ROOT_PASSWORD<\/strong>]\r\n      - MYSQL_PASSWORD=[<strong>COMPLEX_DB_PASSWORD<\/strong>]\r\n    env_file:\r\n      - db.env\r\n\r\n  redis:\r\n    image: redis:alpine\r\n    command: redis-server --requirepass [<strong>COMPLEX_REDIS_PASSWORD<\/strong>]\r\n    restart: always\r\n    volumes:\r\n      - \/home\/ubuntu\/.config\/appdata\/nextcloud\/data:\/data\r\n      - \/etc\/localtime:\/etc\/localtime:ro\r\n\r\n  app:\r\n    image: nextcloud:latest\r\n    restart: always\r\n    ports:\r\n      - 8081:80\r\n    volumes:\r\n      - \/mnt\/hdd\/nextcloud\/html:\/var\/www\/html\r\n      - \/home\/ubuntu\/.config\/appdata\/nextcloud\/conf.d:\/usr\/local\/etc\/php\/conf.d\r\n      - \/etc\/localtime:\/etc\/localtime:ro\r\n    environment:\r\n      - MYSQL_HOST=db\r\n      - REDIS_HOST=redis\r\n      - REDIS_HOST_PASSWORD=[<strong>COMPLEX_REDIS_PASSWORD<\/strong>]\r\n    env_file:\r\n      - db.env\r\n    depends_on:\r\n      - db\r\n      - redis\r\n\r\n  cron:\r\n    image: nextcloud:latest\r\n    restart: always\r\n    volumes:\r\n      - \/mnt\/hdd\/nextcloud\/html:\/var\/www\/html\r\n    entrypoint: \/cron.sh\r\n    depends_on:\r\n      - db\r\n      - redis\r\n\r\nvolumes:\r\n  db:\r\n  nextcloud:\r\n<\/pre>\n<p>and then create &#8220;db.env&#8221; file inside same directory:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\ncd \/home\/ubuntu\/.config\/nextcloud\/\r\nnano db.env\r\n<\/pre>\n<pre>MYSQL_DATABASE=nextcloud\r\nMYSQL_USER=nextcloud\r\n<\/pre>\n<p>Once finished just run below command:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">docker-compose up -d<\/pre>\n<h2>Step 5 &#8211; Setup NextCloud<\/h2>\n<p>If everything setup correctly you should be able to go to <a href=\"http:\/\/raspberrypi:8081\" target=\"_blank\" rel=\"noopener noreferrer\">http:\/\/raspberrypi:8081<\/a> from there you can configure the admin user &amp; password, leave data folder as it is since we already link it in docker to the external hdd, for database:<\/p>\n<ul>\n<li><strong>Database user<\/strong>: nextcloud<\/li>\n<li><strong>Database password<\/strong>: #yourdbpassword#<\/li>\n<li><strong>Database name<\/strong>: nextcloud<\/li>\n<li><strong>Database host<\/strong>: db<\/li>\n<\/ul>\n<p><a href=\"https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-18-at-15.49.49.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1438\" data-permalink=\"https:\/\/eligiblestore.com\/blog\/2020\/09\/18\/complete-guide-nextcloud-external-hdd-ntfs-nginx-proxy-manager\/screen-shot-2020-09-18-at-15-49-49\/\" data-orig-file=\"https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-18-at-15.49.49.png?fit=834%2C1322&amp;ssl=1\" data-orig-size=\"834,1322\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Screen Shot 2020-09-18 at 15.49.49\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-18-at-15.49.49.png?fit=646%2C1024&amp;ssl=1\" class=\"aligncenter wp-image-1438\" src=\"https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-18-at-15.49.49.png?resize=385%2C610&#038;ssl=1\" alt=\"\" width=\"385\" height=\"610\" srcset=\"https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-18-at-15.49.49.png?w=834&amp;ssl=1 834w, https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-18-at-15.49.49.png?resize=189%2C300&amp;ssl=1 189w, https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-18-at-15.49.49.png?resize=646%2C1024&amp;ssl=1 646w, https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-18-at-15.49.49.png?resize=768%2C1217&amp;ssl=1 768w\" sizes=\"auto, (max-width: 385px) 100vw, 385px\" \/><\/a><\/p>\n<p>That&#8217;s it your nextcloud is basically up and running!<\/p>\n<h2>Step 6 &#8211; Make NextCloud in the cloud with triple proxies!<\/h2>\n<p>Of course you need to have domain for this step. The proxy that we are going to use:<\/p>\n<ul>\n<li>FRP to reverse proxy (recommended with Oracle Cloud or any VPS)<\/li>\n<li>Nginx Proxy Manager for HTTPS and better cert management<\/li>\n<li>Cloudflare to hide your original oracle cloud IP for better protection<\/li>\n<\/ul>\n<p>First I need you to setup FRP just follow along my previous blog: <a href=\"https:\/\/eligiblestore.com\/blog\/2020\/09\/07\/how-to-setup-a-forever-free-ssh-access-to-raspberry-pi-without-port-forward\/\">How to Setup a Forever Free SSH access to Raspberry Pi without port forward<\/a><\/p>\n<p>However for the FRPC or the client side copy and paste and add below text to your frpc config file:<\/p>\n<pre>[nextcloud-http]\r\ntype = http\r\nlocal_ip = 127.0.0.1\r\nlocal_port = 80\r\ncustom_domains = cloud.yourdomain.com\r\n\r\n[nextcloud-https]\r\ntype = https\r\nlocal_ip = 127.0.0.1\r\nlocal_port = 443\r\nuse_compression = false\r\ncustom_domains = cloud.yourdomain.com\r\n<\/pre>\n<p>Don&#8217;t forget to restart your frpc service to apply the changes<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">$ sudo service frpc restart<\/pre>\n<p>You can change the subdomain from &#8220;cloud&#8221; to anything you like. Next on cloudflare you need to setup A record for that subdomain point to your Oracle Cloud \/ your VPS public IP address make sure Proxy status is <strong>DNS only<\/strong> for now.<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-19-at-10.29.19.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1451\" data-permalink=\"https:\/\/eligiblestore.com\/blog\/2020\/09\/18\/complete-guide-nextcloud-external-hdd-ntfs-nginx-proxy-manager\/screen-shot-2020-09-19-at-10-29-19\/\" data-orig-file=\"https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-19-at-10.29.19.png?fit=1996%2C298&amp;ssl=1\" data-orig-size=\"1996,298\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Screen Shot 2020-09-19 at 10.29.19\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-19-at-10.29.19.png?fit=1024%2C153&amp;ssl=1\" class=\"aligncenter wp-image-1451\" src=\"https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-19-at-10.29.19.png?resize=735%2C110&#038;ssl=1\" alt=\"\" width=\"735\" height=\"110\" srcset=\"https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-19-at-10.29.19.png?w=1996&amp;ssl=1 1996w, https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-19-at-10.29.19.png?resize=300%2C45&amp;ssl=1 300w, https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-19-at-10.29.19.png?resize=1024%2C153&amp;ssl=1 1024w, https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-19-at-10.29.19.png?resize=768%2C115&amp;ssl=1 768w, https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-19-at-10.29.19.png?resize=1536%2C229&amp;ssl=1 1536w\" sizes=\"auto, (max-width: 735px) 100vw, 735px\" \/><\/a>next open nginx proxy manager in your browser: <a href=\"http:\/\/raspberrypi.local:81\" target=\"_blank\" rel=\"noopener noreferrer\">http:\/\/raspberrypi.local:81<\/a> go to <strong>Hosts<\/strong> &#8211; <strong>Proxy Hosts &#8211; Add Proxy Host<\/strong><\/p>\n<p><a href=\"https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-19-at-10.34.46.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1452\" data-permalink=\"https:\/\/eligiblestore.com\/blog\/2020\/09\/18\/complete-guide-nextcloud-external-hdd-ntfs-nginx-proxy-manager\/screen-shot-2020-09-19-at-10-34-46\/\" data-orig-file=\"https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-19-at-10.34.46.png?fit=876%2C418&amp;ssl=1\" data-orig-size=\"876,418\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Screen Shot 2020-09-19 at 10.34.46\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-19-at-10.34.46.png?fit=876%2C418&amp;ssl=1\" class=\"aligncenter wp-image-1452\" src=\"https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-19-at-10.34.46.png?resize=541%2C258&#038;ssl=1\" alt=\"\" width=\"541\" height=\"258\" srcset=\"https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-19-at-10.34.46.png?w=876&amp;ssl=1 876w, https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-19-at-10.34.46.png?resize=300%2C143&amp;ssl=1 300w, https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-19-at-10.34.46.png?resize=768%2C366&amp;ssl=1 768w\" sizes=\"auto, (max-width: 541px) 100vw, 541px\" \/><\/a><\/p>\n<p>On details tab fill in:<\/p>\n<ul>\n<li>Domain Names: your sub domain<\/li>\n<li>Forward Hostname \/ IP: your raspberry pi IP address<\/li>\n<li>Forward Port: 8081<\/li>\n<li>Block common exploits: Active<\/li>\n<\/ul>\n<p><a href=\"https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-19-at-10.37.14.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1454\" data-permalink=\"https:\/\/eligiblestore.com\/blog\/2020\/09\/18\/complete-guide-nextcloud-external-hdd-ntfs-nginx-proxy-manager\/screen-shot-2020-09-19-at-10-37-14\/\" data-orig-file=\"https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-19-at-10.37.14.png?fit=994%2C1088&amp;ssl=1\" data-orig-size=\"994,1088\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Screen Shot 2020-09-19 at 10.37.14\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-19-at-10.37.14.png?fit=936%2C1024&amp;ssl=1\" class=\"aligncenter wp-image-1454\" src=\"https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-19-at-10.37.14.png?resize=599%2C656&#038;ssl=1\" alt=\"\" width=\"599\" height=\"656\" srcset=\"https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-19-at-10.37.14.png?w=994&amp;ssl=1 994w, https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-19-at-10.37.14.png?resize=274%2C300&amp;ssl=1 274w, https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-19-at-10.37.14.png?resize=936%2C1024&amp;ssl=1 936w, https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-19-at-10.37.14.png?resize=768%2C841&amp;ssl=1 768w\" sizes=\"auto, (max-width: 599px) 100vw, 599px\" \/><\/a><\/p>\n<p>Then click on SSL Tab and fill in:<\/p>\n<ul>\n<li>SSL Certificate: Request a new SSL Certificate<\/li>\n<li>Force SSL: Active<\/li>\n<li>Email address for Let&#8217;s encrypt: your email address<\/li>\n<li>I agree to &#8230; : Active<\/li>\n<\/ul>\n<p><a href=\"https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-19-at-10.46.53.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1455\" data-permalink=\"https:\/\/eligiblestore.com\/blog\/2020\/09\/18\/complete-guide-nextcloud-external-hdd-ntfs-nginx-proxy-manager\/screen-shot-2020-09-19-at-10-46-53\/\" data-orig-file=\"https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-19-at-10.46.53.png?fit=1000%2C1102&amp;ssl=1\" data-orig-size=\"1000,1102\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Screen Shot 2020-09-19 at 10.46.53\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-19-at-10.46.53.png?fit=929%2C1024&amp;ssl=1\" class=\"aligncenter wp-image-1455\" src=\"https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-19-at-10.46.53.png?resize=617%2C680&#038;ssl=1\" alt=\"\" width=\"617\" height=\"680\" srcset=\"https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-19-at-10.46.53.png?w=1000&amp;ssl=1 1000w, https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-19-at-10.46.53.png?resize=272%2C300&amp;ssl=1 272w, https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-19-at-10.46.53.png?resize=929%2C1024&amp;ssl=1 929w, https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-19-at-10.46.53.png?resize=768%2C846&amp;ssl=1 768w\" sizes=\"auto, (max-width: 617px) 100vw, 617px\" \/><\/a><\/p>\n<p>Click on save it will takes time to generate the SSL certificate then edit the connection again and open the SSL tab you will find everything is disabled, please enable: <strong>Force SSL<\/strong>, <strong>HSTS Enabled<\/strong> and <strong>HTTP\/2 Support<\/strong><\/p>\n<p><a href=\"https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-19-at-11.05.52.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1458\" data-permalink=\"https:\/\/eligiblestore.com\/blog\/2020\/09\/18\/complete-guide-nextcloud-external-hdd-ntfs-nginx-proxy-manager\/screen-shot-2020-09-19-at-11-05-52\/\" data-orig-file=\"https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-19-at-11.05.52.png?fit=994%2C766&amp;ssl=1\" data-orig-size=\"994,766\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Screen Shot 2020-09-19 at 11.05.52\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-19-at-11.05.52.png?fit=994%2C766&amp;ssl=1\" class=\"aligncenter wp-image-1458\" src=\"https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-19-at-11.05.52.png?resize=719%2C554&#038;ssl=1\" alt=\"\" width=\"719\" height=\"554\" srcset=\"https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-19-at-11.05.52.png?w=994&amp;ssl=1 994w, https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-19-at-11.05.52.png?resize=300%2C231&amp;ssl=1 300w, https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-19-at-11.05.52.png?resize=768%2C592&amp;ssl=1 768w\" sizes=\"auto, (max-width: 719px) 100vw, 719px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>and then on advanced tab, copy paste below:<\/p>\n<pre>location \/.well-known\/carddav {\r\n  return 301 https:\/\/[cloud.example.com]\/remote.php\/dav;\r\n}\r\n\r\nlocation \/.well-known\/caldav {\r\n  return 301 https:\/\/[cloud.example.com]\/remote.php\/dav;\r\n}<\/pre>\n<p><a href=\"https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-23-at-11.56.11.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1466\" data-permalink=\"https:\/\/eligiblestore.com\/blog\/2020\/09\/18\/complete-guide-nextcloud-external-hdd-ntfs-nginx-proxy-manager\/screen-shot-2020-09-23-at-11-56-11\/\" data-orig-file=\"https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-23-at-11.56.11.png?fit=996%2C1054&amp;ssl=1\" data-orig-size=\"996,1054\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Screen Shot 2020-09-23 at 11.56.11\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-23-at-11.56.11.png?fit=968%2C1024&amp;ssl=1\" class=\"aligncenter wp-image-1466\" src=\"https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-23-at-11.56.11.png?resize=605%2C640&#038;ssl=1\" alt=\"\" width=\"605\" height=\"640\" srcset=\"https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-23-at-11.56.11.png?w=996&amp;ssl=1 996w, https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-23-at-11.56.11.png?resize=283%2C300&amp;ssl=1 283w, https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-23-at-11.56.11.png?resize=968%2C1024&amp;ssl=1 968w, https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-23-at-11.56.11.png?resize=768%2C813&amp;ssl=1 768w\" sizes=\"auto, (max-width: 605px) 100vw, 605px\" \/><\/a><\/p>\n<p>*poof* your nextcloud goes online!<\/p>\n<p>[<strong>NOTE<\/strong>: Don\u2019t do this if you are using the free account of cloudflare, since it will limit the upload and download size which will give an error if you have big size file.]<\/p>\n<p>Next since it goes online you can now proxy the connection by going Cloudflare and edit the subdomain and change the Proxy Status to Proxied. It will takes time to propagate however next time you ping cloud.subdomain.com it will change the IP address every time making both your oracle cloud and raspberry pi more secure.<\/p>\n<h2>Step 7 &#8211; Configuring NextCloud<\/h2>\n<p>If you go to <strong>Setting<\/strong> &#8211; <strong>Systems<\/strong> you will find that the max upload size by default is 2MB that&#8217;s a joke right? here&#8217;s how to up the limit including the memory so you get the best performance into this:<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-18-at-16.00.51.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1439\" data-permalink=\"https:\/\/eligiblestore.com\/blog\/2020\/09\/18\/complete-guide-nextcloud-external-hdd-ntfs-nginx-proxy-manager\/screen-shot-2020-09-18-at-16-00-51\/\" data-orig-file=\"https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-18-at-16.00.51.png?fit=1102%2C392&amp;ssl=1\" data-orig-size=\"1102,392\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Screen Shot 2020-09-18 at 16.00.51\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-18-at-16.00.51.png?fit=1024%2C364&amp;ssl=1\" class=\"aligncenter wp-image-1439\" src=\"https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-18-at-16.00.51.png?resize=503%2C179&#038;ssl=1\" alt=\"\" width=\"503\" height=\"179\" srcset=\"https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-18-at-16.00.51.png?w=1102&amp;ssl=1 1102w, https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-18-at-16.00.51.png?resize=300%2C107&amp;ssl=1 300w, https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-18-at-16.00.51.png?resize=1024%2C364&amp;ssl=1 1024w, https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-18-at-16.00.51.png?resize=768%2C273&amp;ssl=1 768w\" sizes=\"auto, (max-width: 503px) 100vw, 503px\" \/><\/a><\/p>\n<p>Open your terminal and SSH\/Mosh your Pi, remember that in the docker compose we mount conf.d volume now let&#8217;s go to that directory.<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n$ cd \/mnt\/hdd\/nextcloud\/conf.d\r\n$ nano upload-max-filesize.ini\r\n<\/pre>\n<p>it should create a new file just copy below:<\/p>\n<pre>upload_max_filesize = 16G<\/pre>\n<p>Save it and done.<\/p>\n<p>Next for the memory<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n$ cd \/mnt\/hdd\/nextcloud\/conf.d\r\n$ nano memory-limit.ini\r\n<\/pre>\n<p>We cannot setup more that 2GB since our OS is 32 bit so copy this instead.<\/p>\n<pre>memory_limit=1536M<\/pre>\n<p>Save it and exit. Restart both your Nextcloud App and DB from the portainer and check the system from settings again. Booyah!<\/p>\n<p>Then since https proxy is being setup you need to configure your nextcloud config file by editing <strong>\/mnt\/hdd\/nextcloud\/html\/config\/config.php <\/strong>and add below to config:<\/p>\n<pre>'overwrite.cli.url' =&gt; 'https:\/\/cloud.yourdomain.com',\r\n'overwritehost' =&gt; 'cloud.yourdomain.com',\r\n'overwriteprotocol' =&gt; 'https',\r\n'trusted_domains' =&gt; array (\r\n  0 =&gt; '192.168.XX.XX:8081', \/\/Raspberry PI local IP address\r\n  1 =&gt; 'raspberrypi.local:8081',\r\n  2 =&gt; 'cloud.yourdomain.com:8081',\r\n),\r\n'trusted_proxies' =&gt; array (\r\n  0 =&gt; '172.XX.XX.XX\/16', \/\/Container IP address\r\n  1 =&gt; '192.168.XX.XX\/24', \/\/Raspberry Pi Local IP address\r\n  2 =&gt; 'XX.XX.XX.XX\/16', \/\/VPS Public IP address\r\n),<\/pre>\n<p>Next we need to make sure cronjob are running properly, from <strong>nextcloud<\/strong> &#8211; <strong>Settings<\/strong> &#8211; <strong>Basic Settings <\/strong>make sure that you selected <span style=\"text-decoration: underline;\"><strong>cron<\/strong><\/span> like below:<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-23-at-12.04.17.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1467\" data-permalink=\"https:\/\/eligiblestore.com\/blog\/2020\/09\/18\/complete-guide-nextcloud-external-hdd-ntfs-nginx-proxy-manager\/screen-shot-2020-09-23-at-12-04-17\/\" data-orig-file=\"https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-23-at-12.04.17.png?fit=2462%2C1300&amp;ssl=1\" data-orig-size=\"2462,1300\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Screen Shot 2020-09-23 at 12.04.17\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-23-at-12.04.17.png?fit=1024%2C541&amp;ssl=1\" class=\"aligncenter size-full wp-image-1467\" src=\"https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-23-at-12.04.17.png?resize=1088%2C574&#038;ssl=1\" alt=\"\" width=\"1088\" height=\"574\" srcset=\"https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-23-at-12.04.17.png?w=2462&amp;ssl=1 2462w, https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-23-at-12.04.17.png?resize=300%2C158&amp;ssl=1 300w, https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-23-at-12.04.17.png?resize=1024%2C541&amp;ssl=1 1024w, https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-23-at-12.04.17.png?resize=768%2C406&amp;ssl=1 768w, https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-23-at-12.04.17.png?resize=1536%2C811&amp;ssl=1 1536w, https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-23-at-12.04.17.png?resize=2048%2C1081&amp;ssl=1 2048w, https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-23-at-12.04.17.png?w=2176&amp;ssl=1 2176w\" sizes=\"auto, (max-width: 1088px) 100vw, 1088px\" \/><\/a><br \/>\nThen we can run the cron outside the container wo if watchtower update the image it won&#8217;t affected our nextcloud cron job, from your raspberry terminal edit crontab:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">$ crontab -e<\/pre>\n<p>and add below:<\/p>\n<pre># Only do this if you mostly copy paste data from FTP or SMB it will scan the file based on profile \/ username\r\n#0 *\/1 * * * \/usr\/bin\/docker exec --user www-data nextcloud_app_1 php -f \/var\/www\/html\/occ files:scan profile_name &gt;\/dev\/null\r\n# Recommended to do at least once a week, this will run at 2am\r\n0 2 * * *\/7 \/usr\/bin\/docker exec --user www-data nextcloud_app_1 php -f \/var\/www\/html\/occ files:scan --all &gt;\/dev\/null\r\n# Recommended to do at least once a week, this will run at 3am\r\n0 3 * * *\/7 \/usr\/bin\/docker exec --user www-data nextcloud_app_1 php -f \/var\/www\/html\/occ files:scan-app-data &gt;\/dev\/null\r\n# Only enable if you have app preview generator installed\r\n#0 *\/12 * * * \/usr\/bin\/docker exec --user www-data nextcloud_app_1 php -f \/var\/www\/html\/occ preview:pre-generate &gt;\/dev\/null<\/pre>\n<h2>Step 8 &#8211; Accessing the domain in same LAN as LAN<\/h2>\n<p>You don&#8217;t want to access your nextcloud over the internet when you are in fact in the same LAN right? Confuse? Okay, Imagine your are in the bedroom and you want to go to the bathroom next your bedroom, but, instead you go outside the house then go back through the gate to the front door and to your bedroom and then finally arrived in the bathroom, that&#8217;s stupid right? So you need to tell your DNS where is the bathroom door when you are in LAN, I hope that answer why we need the Step 1 in this guide, now, open pihole by going to <a href=\"http:\/\/raspberrypi.local:8008\/admin\" target=\"_blank\" rel=\"noopener noreferrer\">http:\/\/raspberrypi.local:8008\/admin<\/a> and then go to Local DNS Records add below:<\/p>\n<ul>\n<li>Domain: your subdomain for nextcloud<\/li>\n<li>IP address: Raspberry pi local address<\/li>\n<\/ul>\n<p><a href=\"https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-19-at-10.58.55.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1456\" data-permalink=\"https:\/\/eligiblestore.com\/blog\/2020\/09\/18\/complete-guide-nextcloud-external-hdd-ntfs-nginx-proxy-manager\/screen-shot-2020-09-19-at-10-58-55\/\" data-orig-file=\"https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-19-at-10.58.55.png?fit=2512%2C880&amp;ssl=1\" data-orig-size=\"2512,880\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Screen Shot 2020-09-19 at 10.58.55\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-19-at-10.58.55.png?fit=1024%2C359&amp;ssl=1\" class=\"aligncenter size-full wp-image-1456\" src=\"https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-19-at-10.58.55.png?resize=1088%2C381&#038;ssl=1\" alt=\"\" width=\"1088\" height=\"381\" srcset=\"https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-19-at-10.58.55.png?w=2512&amp;ssl=1 2512w, https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-19-at-10.58.55.png?resize=300%2C105&amp;ssl=1 300w, https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-19-at-10.58.55.png?resize=1024%2C359&amp;ssl=1 1024w, https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-19-at-10.58.55.png?resize=768%2C269&amp;ssl=1 768w, https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-19-at-10.58.55.png?resize=1536%2C538&amp;ssl=1 1536w, https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-19-at-10.58.55.png?resize=2048%2C717&amp;ssl=1 2048w, https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-19-at-10.58.55.png?w=2176&amp;ssl=1 2176w\" sizes=\"auto, (max-width: 1088px) 100vw, 1088px\" \/><\/a><\/p>\n<p>Don&#8217;t forget to go to Pi-Hole <strong>settings<\/strong> and <strong>restart DNS resolver<\/strong><\/p>\n<p>That&#8217;s it accessing and uploading files inside LAN is gigabit speed now (depends on your hardware)<\/p>\n<h2>Step 9 &#8211; Checking if NextCloud happy with our setup<\/h2>\n<p>Open your https:\/\/cloud.yourdomain.com go to <strong>Settings<\/strong> &#8211; <strong>Overview <\/strong>make sure <strong>All checks passed<\/strong><\/p>\n<p><a href=\"https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-19-at-11.13.31.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1460\" data-permalink=\"https:\/\/eligiblestore.com\/blog\/2020\/09\/18\/complete-guide-nextcloud-external-hdd-ntfs-nginx-proxy-manager\/screen-shot-2020-09-19-at-11-13-31\/\" data-orig-file=\"https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-19-at-11.13.31.png?fit=1418%2C704&amp;ssl=1\" data-orig-size=\"1418,704\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Screen Shot 2020-09-19 at 11.13.31\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-19-at-11.13.31.png?fit=1024%2C508&amp;ssl=1\" class=\"aligncenter size-full wp-image-1460\" src=\"https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-19-at-11.13.31.png?resize=1088%2C540&#038;ssl=1\" alt=\"\" width=\"1088\" height=\"540\" srcset=\"https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-19-at-11.13.31.png?w=1418&amp;ssl=1 1418w, https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-19-at-11.13.31.png?resize=300%2C149&amp;ssl=1 300w, https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-19-at-11.13.31.png?resize=1024%2C508&amp;ssl=1 1024w, https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-19-at-11.13.31.png?resize=768%2C381&amp;ssl=1 768w\" sizes=\"auto, (max-width: 1088px) 100vw, 1088px\" \/><\/a><\/p>\n<p>you can also open nextcloud security scan and then check out how it goes<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/10\/Screen-Shot-2021-03-15-at-11.33.47.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1585\" data-permalink=\"https:\/\/eligiblestore.com\/blog\/2020\/10\/05\/complete-guide-rasp-pi-4-for-nextcloud-redis-mysql-ext-ntfs-nginx-proxy-manager\/screen-shot-2021-03-15-at-11-33-47\/\" data-orig-file=\"https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/10\/Screen-Shot-2021-03-15-at-11.33.47.png?fit=1760%2C1000&amp;ssl=1\" data-orig-size=\"1760,1000\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Screen Shot 2021-03-15 at 11.33.47\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/10\/Screen-Shot-2021-03-15-at-11.33.47.png?fit=1024%2C582&amp;ssl=1\" class=\"aligncenter wp-image-1585 size-large\" src=\"https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/10\/Screen-Shot-2021-03-15-at-11.33.47.png?resize=1024%2C582&#038;ssl=1\" alt=\"\" width=\"1024\" height=\"582\" srcset=\"https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/10\/Screen-Shot-2021-03-15-at-11.33.47.png?resize=1024%2C582&amp;ssl=1 1024w, https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/10\/Screen-Shot-2021-03-15-at-11.33.47.png?resize=300%2C170&amp;ssl=1 300w, https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/10\/Screen-Shot-2021-03-15-at-11.33.47.png?resize=768%2C436&amp;ssl=1 768w, https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/10\/Screen-Shot-2021-03-15-at-11.33.47.png?resize=1536%2C873&amp;ssl=1 1536w, https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/10\/Screen-Shot-2021-03-15-at-11.33.47.png?w=1760&amp;ssl=1 1760w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/p>\n<h2>Step 10 &#8211; BONUS: Install Scrunity to monitor your HDD health<\/h2>\n<p>Prepare a directory for scrunity docker:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n$ sudo mkdir \/home\/pi\/.config\/appdata\/scrunity\r\n$ sudo chown pi:pi \/home\/pi\/.config\/appdata\/scrunity\r\n$ sudo chmod 775 \/home\/pi\/.config\/appdata\/scrunity\r\n<\/pre>\n<p>and then execute below command:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n$ docker run --name scrutiny -p 8282:8080 \\\r\n--privileged \\\r\n-v \/run\/udev:\/run\/udev:ro \\\r\n-v \/dev\/disk:\/dev\/disk:ro \\\r\n-v \/home\/pi\/.config\/appdata\/scrutiny\/config:\/config \\\r\n-e PUID=1000 \\\r\n-e PGID=1000 \\\r\n-e UMASK=002 \\\r\n-e TZ=&quot;Asia\/Singapore&quot; \\\r\n-e ARGS=&quot;&quot; \\\r\n-e DEBUG=&quot;yes&quot; \\\r\n-e INTERVAL=86400 \\\r\n-e API_ENDPOINT=&quot;http:\/\/localhost:8080&quot; \\\r\n-e MODE=&quot;both&quot; \\\r\n--restart always \\\r\n-d hotio\/scrutiny\r\n<\/pre>\n<p>Open your raspberrypi for port 8282 in a browser http:\/\/raspberrypi.local:8282\/<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-23-at-12.22.31.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1471\" data-permalink=\"https:\/\/eligiblestore.com\/blog\/2020\/09\/18\/complete-guide-nextcloud-external-hdd-ntfs-nginx-proxy-manager\/screen-shot-2020-09-23-at-12-22-31\/\" data-orig-file=\"https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-23-at-12.22.31.png?fit=2802%2C1602&amp;ssl=1\" data-orig-size=\"2802,1602\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Screen Shot 2020-09-23 at 12.22.31\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-23-at-12.22.31.png?fit=1024%2C585&amp;ssl=1\" class=\"aligncenter size-full wp-image-1471\" src=\"https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-23-at-12.22.31.png?resize=1088%2C622&#038;ssl=1\" alt=\"\" width=\"1088\" height=\"622\" srcset=\"https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-23-at-12.22.31.png?w=2802&amp;ssl=1 2802w, https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-23-at-12.22.31.png?resize=300%2C172&amp;ssl=1 300w, https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-23-at-12.22.31.png?resize=1024%2C585&amp;ssl=1 1024w, https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-23-at-12.22.31.png?resize=768%2C439&amp;ssl=1 768w, https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-23-at-12.22.31.png?resize=1536%2C878&amp;ssl=1 1536w, https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-23-at-12.22.31.png?resize=2048%2C1171&amp;ssl=1 2048w, https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-23-at-12.22.31.png?w=2176&amp;ssl=1 2176w\" sizes=\"auto, (max-width: 1088px) 100vw, 1088px\" \/><\/a><\/p>\n<h2>STEP 11 &#8211; MEGA BONUS: Tips on manually upload \/ copying files<\/h2>\n<p>Always do manually copy from SMB or through sftp whenever you can, it will be much faster and then you can have nextcloud to read and update the files structure in database later. Your files should be located at:<\/p>\n<pre>\/mnt\/hdd\/nextcloud\/html\/data\/[username]\/files\/<\/pre>\n<p>if you want to update nextcloud for certain folder only:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">$ docker exec -it --user www-data nextcloud_app_1 php occ files:scan --path=&quot;\/&#x5B;username]\/files\/&#x5B;folder_name]&quot; --verbose<\/pre>\n<p>or if you want to update all the folder within the profile, simply:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">$ docker exec -it --user www-data nextcloud_app_1 php occ files:scan &#x5B;username] --verbose<\/pre>\n<p>If you are happy with the guide kindly donate to keep this blog alive. If you need any help with this guide or want me to setup for you, kindly contact me at <a href=\"https:\/\/eligiblestore.com\/blog\/contact-us\/\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/eligiblestore.com\/blog\/contact-us\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>NOTE: Use below Guide for Raspberry Pi 4 and OS Ubuntu 20.04 (64 bit only). If you are using older hardware &lt;= Raspberry Pi 3 use this guide instead Complete guide NextCloud + External HDD NTFS + Nginx Proxy Manager. If you are looking for self-host-dropbox-like you are coming to the right place, I am [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":1437,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[32],"tags":[69,65,67,68,63,66,70],"class_list":["post-1481","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorial","tag-hdd","tag-nextcloud","tag-nginx","tag-nginx-proxy-manager","tag-ntfs","tag-redis","tag-scrutiny"],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8pg5H-nT","jetpack-related-posts":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/eligiblestore.com\/blog\/wp-content\/uploads\/2020\/09\/Screen-Shot-2020-09-18-at-15.45.11.png?fit=2874%2C1164&ssl=1","_links":{"self":[{"href":"https:\/\/eligiblestore.com\/blog\/wp-json\/wp\/v2\/posts\/1481","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/eligiblestore.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/eligiblestore.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/eligiblestore.com\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/eligiblestore.com\/blog\/wp-json\/wp\/v2\/comments?post=1481"}],"version-history":[{"count":4,"href":"https:\/\/eligiblestore.com\/blog\/wp-json\/wp\/v2\/posts\/1481\/revisions"}],"predecessor-version":[{"id":1586,"href":"https:\/\/eligiblestore.com\/blog\/wp-json\/wp\/v2\/posts\/1481\/revisions\/1586"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/eligiblestore.com\/blog\/wp-json\/wp\/v2\/media\/1437"}],"wp:attachment":[{"href":"https:\/\/eligiblestore.com\/blog\/wp-json\/wp\/v2\/media?parent=1481"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/eligiblestore.com\/blog\/wp-json\/wp\/v2\/categories?post=1481"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/eligiblestore.com\/blog\/wp-json\/wp\/v2\/tags?post=1481"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}