- Install Raspbian
- Put ssh empty file at root
- connect with pi/raspberry
- connect to wifi with network={ ssid="" psk="" }
- Install nextcloud https://linuxconfig.org/how-to-install-nextcloud-on-debian-10-buster-linux
- Format USB Drive in ext4
- Plug it
- https://raspberrytips.com/mount-usb-drive-raspberry-pi/
sudo fdisk -l
- Find path /dev/xxx
sudo ls -l /dev/disk/by-uuid/
- Find the UUID
sudo nano /etc/fstab
UUID=******** /path/to/mount ext4 defaults 0 0
sudo mount -a
or just reboot
- Edit the /var/www/html/nextcloud/config/config.php
- Change datadirectory path by the one of your USB drive
sudo chown www-data:www-data -R path/of/usb
- Move files from the old path to the new one. Old path is /var/www/html/nextcloud/data
sudo /etc/init.d/apache2 restart
cd /var/www/html/nextcloud/
sudo -u www-data php occ maintenance:mode --off
- It will disable maintenance mode in case it was activated and check if all the access are ok
- Check on the UI if everything is ok
- Download the mobile APP and remember to be in the same network as the Rasp
- Open the port in your router (NAT). Open Port 80 and 443
- Edit /var/www/html/nextcloud/config/config.php
- Add in the array of hosts the public IP of your router