(Random notes that may help - This doc handles the Nextcloud bug and bogus OpenAI instructions)
Components:
Unusuals: This might be unique to my config, so just a heads up.
Step 1 - Wiped Windows 11 Pro and installed Linux Mint 22, which is based off of Ubuntu which in turn is based off debian (Debian / Ubuntu will work just as well)
Step 2- Installed USB Drives and made them part of my /etc/fstab
Type blkid to get the UUID of the device.. One drive was already EXT2 file system while I ran an MKFS on the larger drive and created an EXT4 file system. Side note: The 6TB drive was a data center drive and partitioned. I needed to remove sdb1 and sdb2 and just have /dev/sdb before creating the file system.
Step 3 - Create the following groups; nextcloud, fileshare and smbuser
Step 4 - Created the user nextcloud and smbuser and added them to the group fileshare
sudo usermod -aG fileshare smbuser sudo usermod -aG fileshare nextcloud
Step 5 - Ran an apt update/upgrade on the machine
Step 6 - Installed Apache2 and MariabDB via apt install (See appendix A for Apache Configuration)
Step 7 - Followed the Nextcloud documentation, including Mariadb instructions, but here are some clarifications:
Step 8 - NOTE !!!!! There are BUGS IN NEXTCLOUD AND OPENAI JUST GIVES BS ANSWERS, so this works when creating shareable drives on USB. The GUI DOES NOT WORK !!!!
The following are instructions on mounting the external drive to nextcloud, have it managed by group ‘admin’ and be shareable
Add the drive via occ command
sudo -u www-data php /var/www/html/nextcloud/occ files_external:create \ "public" \ local \ null::null \ -c datadir=/usb-1000G/nextcloud
Get the mount number
sudo -u www-data php /var/www/html/nextcloud/occ files_external:list
Make “admin” own the drive, not public (this is what I wanted)
sudo -u www-data php /var/www/html/nextcloud/occ files_external:applicable 7 --add-group admin
Make it so admin can share directories on the drive
sudo -u www-data php /var/www/html/nextcloud/occ files_external:option 7 enable_sharing true
I want to run SAMBA alongside Nextcloud, so with that, here’s my 2 cents.
NOTE: Certs are handled on the front-end proxy
Alias /nextcloud "/var/www/html/nextcloud/"
<Directory /var/www/html/nextcloud/>
Require all granted
AllowOverride All
Options FollowSymLinks MultiViews
<IfModule mod_dav.c>
Dav off
</IfModule>
</Directory>
<VirtualHost *:80>
ServerName cloud.xxxxx.com
DocumentRoot /var/www/html/nextcloud/
<Directory /var/www/html/nextcloud/>
Require all granted
AllowOverride All
Options FollowSymLinks MultiViews
<IfModule mod_dav.c>
Dav off
</IfModule>
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
server {
if ($host = cloud.xxxxx.com) {
return 301 https://$host$request_uri;
} # managed by Certbot
listen 80;
server_name cloud.xxxxx.com;
location / {
proxy_ssl_certificate /etc/nginx/client.pem;
proxy_ssl_certificate_key /etc/nginx/client.key;
proxy_ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
proxy_ssl_ciphers HIGH:!aNULL:!MD5;
proxy_ssl_trusted_certificate /etc/nginx/trusted_ca_cert.crt;
proxy_ssl_verify on;
proxy_ssl_verify_depth 2;
proxy_ssl_session_reuse on;
}
}
server {
listen 443 ssl;
server_name cloud.xxxxxx.com;
client_max_body_size 10G;
client_body_buffer_size 400M;
location / {
proxy_pass http://xxx.xxx.xxx.xxx
proxy_set_header X-Forwarded-Proto https;
}
error_log /var/log/nginx/xxxxx_cloud_error.log;
access_log /var/log/nginx/xxxxx_cloud_access.log;
ssl_certificate /etc/letsencrypt/live/cloud.xxxxx.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/cloud.xxxxx.com/privkey.pem; # managed by Certbot
}