How can I keep a folder on a remote server in sync with a local folder in iOS accessible via Files?
I asked the maintainer of the snap package, and learned how to do this with Nextcloud:


  The way I've done this in the past is to move files into
  the files directory of the user's slice of the datadir, make sure
  permissions were the same, and then run occ files:scan --all. In the
  snap it's the same, and the command is nextcloud.occ files:scan --all.
  Unless you've put the data elsewhere, the data is
  in /var/snap/nextcloud/common/nextcloud/data/.