I really like Seafile for this functionality. I host my own server using podman to run their docker container and it works super well. Their app has the ability to back up any photos/videos taken on your phone, in addition to other things it can do. Highly recommend!
Just curious, when people say selfhosted does it imply they control the hardware at their home? Or does buying a VM from an operator count as self hosting?