standardnotes / filesafe-relay

Relay server used to communicate between FileSafe client extension and server destination (Dropbox, Google Drive, WebDAV)
14 stars 9 forks source link

FileSafe with Nextcloud #36

Open mattivilho opened 3 years ago

mattivilho commented 3 years ago

Hello standardnotes-team!

I'm having problems connecting my Nextcloud server as the Standard Notes FileSafe integration. I tested it with Dropbox and everything worked fine.

I tried both of the URL combinations mentioned here: https://github.com/standardnotes/forum/issues/308.

I ran into this problem using NextCloud and wanted to share my solution for others. The NextCloud documentation says to use the URL example.com/nextcloud/remote.php/dav/files/USERNAME/ however this does not work in StandardNotes. Instead, use the URL example.com/remote.php/dav/files/USERNAME/

I have 2FA enabled on my Nextcloud so tried with a new created app password and my admin account password. I also tried disabling 2FA and then enabling the integration but I'm still not getting it to work.

The only error I get is "Error uploading file."

I left the "Directory" empty as I wasn't sure how to type the director there but as it said optional I thought it would not matter.

Thanks for any help!

JaspalSuri commented 3 years ago

Hi @mattivilho,

I'm afraid that currently no one on the team has experience with using Nextcloud. Perhaps information from this thread could be of some use. Please note that you might run into this issue that one user encountered, where they couldn't upload files larger than 30kb.

Tonbery7 commented 3 years ago

Hello,

i successfully integrated my own Nextcloud server with Standard Notes via the FileSafe Extension. What works for me is the following:

Server-URL: https://{Your domain-/hostname}/nextcloud/remote.php/dav

Username/Password: Don't use your actual login credentials, use app-credentials.

Directory: files/{Your subfolder}

I hope that helps anyone having trouble with this!

ghost commented 3 years ago

Sorry I'm not able to get it working

When I enter no folder it works fine but when I enter like suggested files/standardnotes Into the last formular field I get an error in the desktop app

Do I have to look into anythink special in recards of ' characters or something else I'm not able to get something from the error messages

Tonbery7 commented 3 years ago

Sorry I'm not able to get it working

When I enter no folder it works fine but when I enter like suggested files/standardnotes Into the last formular field I get an error in the desktop app

Do I have to look into anythink special in recards of ' characters or something else I'm not able to get something from the error messages

Hey there,

i tested it again with my setup and it still works as described.

So just to make sure:

ghost commented 3 years ago

When you don't add the folder "files/standardnotes", you can successfully attach files?

Yes

Does the folder "standardnotes" already exist on your Nextcloud? Because it has to be an existing folder.

Yes

The only thing I realise now you always put a " " arround the folder location: I wrote files/standardnotes But do I need to put "files/standardnotes" into the formular field?

Thanks for the quick reply!

Tonbery7 commented 3 years ago

The only thing I realise now you always put a " " arround the folder location: I wrote files/standardnotes But do I need to put "files/standardnotes" into the formular field?

No, the quotation marks are only for readability.

It's odd...you do seem to do everything right, so it should work. I'm not sure how to help you without any kind of error-message that could give me a hint.

Alternatively, if you have your own Nextcloud-Server, you could create a separate account (just for standard-notes) and let it save the attachments in the root folder. It's not a perfect solution, but it would probably work and you don't really need to access the files outside of standard-notes anyway.

ghost commented 3 years ago

Thanks for your help I found the issue.

For me it is not working with the serveradress mentioned above. I used the link provided by Nextcloud https://your.domain.tls/remote.php/dav/files/username

And added only the folder {Your folder/Subdirectory}

scottwernervt commented 3 years ago

This setup worked for me using Hetzner's hosted NextCloud:

  1. NextCloud Instance > User > Settings > Security
  2. At bottom of page click Create new app password button
  3. Standard Notes > New Integration > WebDAV
    • Server: https://NXSERVER.your-storageshare.de/remote.php/dav/files/USERNAME/
    • User: USERNAME
    • Password APP-PASSWORD
    • Directory: PATH-TO_DIR e.g. apps/standard-notes/file-safe