Photographer and open source software fan.
I’ve also made a few tutorials at http://youtube.com/@AnAustralianPhotographer
Blog: https://anaustralianphotographer.wordpress.com/
Webshop: https://anaustralianphotographer.threadless.com/ where you can buy prints and other merch featuring my photos.
Edit; now I went back and reread the question, I saw opens source. I will leave the comment as it could be a turnkey solution and stepping stone option to going full open source.
Something like a server on a raspberry pi could be what your after, but I don’t have specific software recommendations for it.
…
I’ve just started dabbling, so don’t consider this an expert, but a suggestion.
Synology nas’s have a focus on data sovereignty . They have Android apps that communicate from your phone to the Nas for media.
They can also be setup as a private cloud drive initially accessible by VPN to access and a email / web interface as well as instant messager and webdrive
I gave some though to setting up a small private ‘corporate’ style server where people could access . There’s no subscription fees after the initial hardware purchase as your self hosting.