Today I finished setting up my own home cloud server – on a Raspberry Pi 4. I did that using the software provided by Nextcloud. It’s relatively easy to set up once you have it installed. The installation includes setting up a firewall, a webserver (using LAMP), a self signed certificate, a lot of fiddling… Therefore it’s a lot of fun, but not for the faint of heart!
Have a look here to see how it could be done, including links to a couple of instruction pages I found online.