Backup and Sync of macOS Photos via NextCloud

What is the most appropriate way in order to use NextCloud for backup and syncing Apples Photos.app with macOS devices and iOS devices and for sharing pictures with frieds and relatives?

Install the Nextcloud app and let the Apple devices sync their photos to your Nextcloud server. Next, use the Nextcloud app to create share links which you send to your friends and relatives. This allows you to keep all of your data on your server and grand selective access to it. All persons you’ve shared your data with, are able to view it on any device they want using a web browser.