Pt 2: NextCloud Storage Server on Raspberry Pi Post-Install Configuration

Опубликовано: 25 Октябрь 2024
на канале: Nicholas Henkey
532
12

EXTRACT:
What you need to do after you follow my NextCloud Install guide    • Pt 1: NextCloud Storage Server on Ras...  

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-l...

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

No-IP and DUC Setup
https://www.noip.com/
https://www.noip.com/support/knowledg...

Root Directory for Your Domain
https://www.rootusers.com/how-to-conf...

LetEncrypt Certbot Install (No Port 80)
https://code.luasoftware.com/tutorial...

Review SSL Apache Install
http://hallard.me/enable-ssl-for-apac...

fstab Mounting Raspbian
https://www.bickhaus.net/automounting...

Crontab Sources used
Backups using rsync - https://averagelinuxuser.com/automati...
Delete files older than - https://unix.stackexchange.com/questi...
https://community.letsencrypt.org/t/i...


CRONTAB COFIGURATION:

m h dom mon dow command
Renew SSL Certificate (WARNING: "⋗" below is just a 'lookalike', use the "greater than" symbol)
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 {} \;