[] [Nextcloud] Missing default URI for Photos and Backups breaks Gallery and Backups

REPRODUCIBILITY (% or how often): 100%
HARDWARE (Jolla1, Tablet, XA2,…): XA2
REGRESSION: (compared to previous public release: Yes, No, ?):


Default URI for Photos and Backups are missing and causes double directories in Gallery, missing backups and backup upload failing.


Nextcloud 19.0.3 at server
Sailfish X in phone


  1. Open Gallery
  2. Open Nextcloud -directory
  3. Open Settings
  4. Open Backups
  5. Let SFOS probe server for old backup
  6. Try to create backup manually


See server side directories once in listing
Old backups found from server and new uploaded successfully.


See server side directories doubled in listing
Old backup missing and uploading new backup fails.


I reported both (Gallery and Backup) issues in this same as they’re caused by same reason, missing default URI from account settings. Re-creating an account fixes this, but shouldn’t be needed to do.


I can confirm this behaviour. (Also with Nextcloud 19.0.3)

It should in theory be possible to just set the correct path in the Nextcloud Account under “Extended Settings” (“Erweiterte Einstellungen” in German, don’t know what its called in English, first Option in the Pulley Menu inside the Nextcloud Account). There is an Option for Photos and one for Backups. After recreating the Account the Path for Pictures and Backups looks as follows:

/remote.php/dav/files/<nextcloud username>/Photos

Replace what is after the username with the Folder in your Nextcloud you want to use. Maybe someone can try if it works, I only realized this option after recreating the Account…

1 Like

For Backup I had to enter /remote.php/dav/files/<nextcloud username>/Sailfish OS/Backups. After setting this path, manual backup uploaded as expected.


I have the same issue after updating to, also with Nextcloud 19.0.3.

Seems like the following “fix” from the release notes may cause this:

  • Default WebDAV path of Nextcloud updated

Same here, also with and 19.0.3.

Setting the path to /remote.php/webdav/Photos also works.

So, previously we had hardcoded, non-configurable paths pointing to some directories in the root of the Nextcloud instance.

(This was called preliminary support for Nextcloud (or somesuch), caused some headaches for some users, but basically worked.)

Now we have configurable paths, but non-working defaults which are not mandatory to change in the account settings. So when doing nothing, this makes things not work/break.

What should be the solution?

A) Configure working defaults (like the hard-coded paths in the 3.3 release), but make them changeable
B) Leave the current defaults non-working, but make them mandatory in account settings.
C) Some complicated auto-detection which would be preferred from usability standpoint but ultimately do the wrong thing for most people.

I prefer solution A, because that most likely it doesn’t break anything. If hard coded values were used and worked, then they are good to go.
For me, Contacts and Calendar worked fine, but Gallery and Backups missed the default values.

I finally figured out the correct URI settings:

  1. the default webdav path (at least for Nextcloud 19) is /remote.php/dav/, not /webdav/
  2. the correct path to the root folder of your Nextcloud files is: /remote.php/dav/files/<user_name>/
  3. you have to specify the full path for images and backups, like: /remote.php/dav/files//SFOS/Backup/. I expected SFOS to append the “Backup path” to the “WebDAV path” and thus only specified the subfolder (‘Backup’) at first.

Especially point 3 is unexpected. You wouldn’t expect to have to enter the whole path 3 times.

For everyone who did not yet notice: these settings can be done in the “Advanced settings” of your Nextcloud account.

The new settings came with some surprises.
I use nextcloud with an additional path, e.g. https://server.example.com/nextcloud/. And it uses LDAP integration. Which means the username is mapped to a user uuid.

I had to use the following options:

  • server address: https://server.example.com/nextcloud// (without the two slashes calendar wouldn’t work)
  • webdav path: /nextcloud/remote.php/dav/files/${user_uuid}/
  • addressbook path: empty
  • calendar path: empty (or /nextcloud/remote.php/dav/calendars/${user_uuid}/)
  • picture path: /nextcloud/remote.php/dav/files/${user_uuid}/Photos
  • backup path: /nextcloud/remote.php/dav/files/${user_uuid}/Sailfish OS/Backups

When creating a new account the user and prefix (/nextcloud/) were prefilled in the advanced settings, but it didn’t work because of LDAP integration my user and user id are not same.


Thank you @oates, that more or less did solve the problem for me.

After the update to 3.4 my calendar and contact sync worked as usual, but photo and backup didn’t.

I tried to recreate the account, unsucessfully, until I used https://server.example.com/nextcloud/remote.php/dav//, and the calendar path /nextcloud/remote.php/dav/calendars/“user name”/. Then I could create the account and was able to sync calendar and address book.

When I tried to add a path for backup and photo the connection failed until I removed the extra ‘/’ from the server path, then I could upload pictures and backups.

Wierdly, it semes as if the double ‘/’ only is needed while creating the account, and not when changing account settings.

@jollajo: did not work for me on Gemini pda. After saving … i got the message ‘Error: Cannot upload file’ (or something like that - have german language :wink:).
I did not find an error on the nextcloud log directory :face_with_raised_eyebrow:, but may be i look on the wrong place?
Do you create the directory path first?
But it did not work for me on both ways :thinking:.

Hm, not sure if I can help. Anyway, this is what I did:

  • create directory on your Nextcloud account, eg. SailfishOS/Backup
  • add the path as given above
  • trigger new backup
  • this will create a new directory with your device ID on your Nexcloud such as SailfishOS/Backup/SailfishOS/Backup

Hope this helps.