There's an iOS app you can configure to automatically upload your photos to your nextcloud so they're available from anywhere (
https://apps.apple.com/us/app/nextcloud/id1125420102). You might want to set up Backblaze or similar for external storage, though, if you're using a small VPS you might fill up the storage pretty quickly.