Ubuntu server on RPi, many questions and no clue as always!

Hi all!
Noob here, tried to create a nextcloud instance for about a month now, following various guides and failing.
Found Learn Linux TV’s guide so I installed Ubuntu 21 on my Pi and went to town.
It worked! :smiley:

But I have a few questions and I’m hoping you could help me with it:

  1. In my previous attempts (following addicted2tech.net’s pi guide) I stated an instance of NGINX and linked a certificate for my home domain to cloudflare.
    I’ve installed portainer and Cloudflare DDNS to keep the update of IP so it should work a-ok.
    When I followed learn linux’s guide my domain is still padlocked.
    If i add a certbot and an SSL cert to my apache2 then I can’t connect to my nextcloud as it’s redirecting too many times (I’m assuming - the warning is ‘something went wrong’).
    How can I get rid of the HSTS warning without an SSL certificate?
    I’m assuming my nextcloud is safe thanks to the padlock and the link being proxied through cloudflare but when I add the Header always set Strict-Transport-Security “max-age=15552000; includeSubDomains” it doesn’t get rid of the warning.

Any thoughts?

2)CalDev, Calddar…
If I understand correctly you need to add a redirect to the ssl file again?
TBH I don’t need either a caledar or contacts details - I’ve already removed them - but the warning is still there :#
How can I dismiss them?

  1. SMTP!!
    I don’t want the mail ability to be honest, any password changes will be done locally and I don’t want to provide mail as everyone in my house is happy with gmail for now (that’s different battle that I just don’t have the knowledge to fight! :stuck_out_tongue: ).
    How can I give Nextcloud simple mail access?
    A thunderbird program in my windows desktop?
    My personal GMail account?
    And how would I secure it with no SSL??

4)I would like to add four hard drives in a raid 5 config to store my family’s photos and documents (via nextcloud), could anyone recommend a simple to follow guide for changing the data store path to the raid instance I will create the mdadm?

  1. I also have a HDD I want to use as a backup for everything - the server, the data in nextcloud, everything. Could somone recommend a simple to follow guide for copying the contents of both the HDD of ubuntu and the raid of nextcloud once it’s set?

Sorry for a lot there, but thank you for any help to the above,
All the best. :smile:

1 Like

I also recommend asking on the Ubuntu forums since much of what you’ve mentioned is both in and outside of nextcloud.

On storage - What are you using for raid storage? Something connected to the Pi?

How much ram does your Pi 4 have?

Have you considered installing nextcloud as a docker image? Using docker-compose is even better. That is the only way to fly on a Pi in my opinion.

Hi, thanks for the reply.
ok will do, I’ll head to ubuntu forums now.

Storage -
Yes, it’s going to be a raid 5 connected over USB.
The raid is building now, after which I’ll mount it to a mount point, but how do you point next cloud to that mountpoint?

I have a pi 4 8gb, and I tried docker time after time with various youtube guides but something always failed and left me clueless.
Ubuntu is a little refreshing as there seems to be a wider pool of knowledge (how true that is I don’t know but that’s what it seems like to me).
In all honesty though, I feel too far down the rabbit hole now to turn around and do something else as I’ve managed to get a working database, nextcloud & mobile access - all of which is much, much more than I had in the past!

I see. Your problems stem from not understanding how Linux permissions work. You’ll need to master these.

Permissions for user / group / other

They all go hand in hand. You can confirm your current permissions with

ls -la

Then you can use chown and chgrp to adjust as needed. Look up these commands for more details. Tons of excellent guides online. It depends on your setup.

Mounting disks properly is required. You can do this on your machine by editing fstab. Disks are best identified by their UUID.

Since you are running raid you probably want to consider using OMV or a similar distribution for managing disks in a sane and friendly way. Nextcloud comes later. Ubuntu is also nice, but is just built on top of Debian, so you will find no explicit advantages beyond a different flow.

First learn how to understand permissions, ownership and mounting. Then you can worry about raid, Nextcloud, Docker, whatever else.

Hi, thanks for the reply
Can I ask what do you mean specifically?
my nextcloud folder in /var/www is owned by www-data & my config.php is owned by root:www-data as per the guide.
Is there others I should chown? something in the apache folder?