NextCloud Private Cloud Setup PT2

by Nicholas Henkey — on  , 

Other things you will need to do if you set up NextCloud also. This is more documentation but if you are deGoogling like me it will be super helpful!

Check out part 1 here!

Time stamps listed below:

0:00 - Title Slide 0:45 - Question from last video VirtualBox 3:15 - Intro / Agenda 6:00 - Increase upload limit so Nextcloud will support larger file upload 8:30 - Security issues, where to find issues that need to be cleaned up 9:30 - Set up DUC for dynamic DNS service routhing 14:00 - Change URL to not require “/nextcloud” appended at the end of your URL 16:10 - LetsEncrypt SSL without port 80 21:35 - Review of document for SSL install 22:40 - Reliable external drive mounting on Raspberry Pi (cron section is important) 27:45 - Crontab basic explanation and config 32:15 - System tour for cron auto-delete files and how it works 34:30 - External drive caveats 36:40 - Closing: work still needed and changes for future set-ups 41:05 - Thanks for watching!

WEB LINKS (SOURCES):

NextCloud Memory and Upload Limits Supposedly Nextcloud breaks things up into smaller chunks during upload. This is also where you increase PHP system memory available which may come up under your system warnings. https://help.nextcloud.com/t/memory-limit-post-max-size-and-upload-max-filesize-which-values-are-recommended/93357

Security Warnings https://help.nextcloud.com/

No-IP and DUC Setup https://www.noip.com/ https://www.noip.com/support/knowledgebase/install-ip-duc-onto-raspberry-pi/

Root Directory for Your Domain https://www.rootusers.com/how-to-configure-an-apache-virtual-host/

LetEncrypt Certbot Install (No Port 80) https://code.luasoftware.com/tutorials/lets-encrypt/obtain-lets-encrypt-ssl-using-manual-dns-verification/

Review SSL Apache Install http://hallard.me/enable-ssl-for-apache-server-in-5-minutes/

fstab Mounting Raspbian https://www.bickhaus.net/automounting-a-usb-drive-in-raspbian/

Crontab Sources used Backups using rsync - https://averagelinuxuser.com/automatically-backup-linux/ Delete files older than - https://unix.stackexchange.com/questions/155184/how-to-find-and-delete-files-older-than-specific-days-in-unix https://community.letsencrypt.org/t/i-am-not-getting-it-crontab-certbot-renew/90866

CRONTAB COFIGURATION:

'# m h dom mon dow command'

'# Renew SSL Certificate'

'0 0 1 JAN,APR,JUL,OCT * /usr/bin/certbot renew >> /var/log/letsencrypt/renew.log'

'# Mount all drives on boot'

'@reboot mount -a'

'## Backs up database and data on SD Card to both 1TB and 3TB disk'

'## Backs up 1TB disk to the 1TB disk. Only ~500GB of space actually available for storage'

'00 23 * * * rsync -aAX --delete --exclude '*.Trash-1000' /var/ /media/backupcore/daily/'

'00 00 * * * rsync -aAX --delete --exclude '*.Trash-1000' /var/ /media/backupstorage/daily-core-files/'

'00 1 * * * rsync -aAX --delete --exclude '*.Trash-1000' /media/backupcore/data/ /media/backupstorage/daily-external-files/'

'00 4 1 * * rsync -aAX --delete --exclude '*.Trash-1000' /var/ /media/backupstorage/monthly-core-files/'

'00 7 * * 6 rsync -aAX --delete --exclude '*.Trash-1000' /var/ /media/backstorage/weekly-core-files/'

'03 7 * * 7 rsync -aAX --delete --exclude '*.Trash-1000' /media/backupcore/data/ /media/backupstorage/weekly-external-files/'

'# Keeps Nextcloud access relevant in case of OS file merge'

'55 22 * * * chown -R www-data:www-data /media/backupcore/data/'

'55 11 * * * chmod 750 /media/backupcore/data/'

'# Delete protocol for USB3.0 flash disk (never backed up). Notes:'

'11 9 * * * find /media/temp/data/1)\ 1\ Day/* -mtime +1 -exec rm {} \;'

'11 21 * * * find /media/temp/data/2)\ 1\ Week/* -mtime +9 -exec rm {} \;'

'33 3 * * * find /media/temp/data/3)\ 1\ Month/* -mtime +33 -exec rm {} \;'

'11 11 * * * find /media/temp/data/4)\ 1\ Year/* -mtime +366 -exec rm {} \;'