Nextcloud credentials#
You can use these credentials to authenticate the following nodes:
Supported authentication methods#
- Basic auth
- OAuth2
Related resources#
Refer to Nextcloud's API documentation for more information about the service.
Refer to Nextcloud's user manual for more information on installing and configuring Nextcloud.
Using basic auth#
To configure this credential, you'll need a Nextcloud account and:
- Your Web DAV URL
- Your User name
- Your Password or an app password
To set it up:
- To create your Web DAV URL: If Nextcloud is in the root of your domain: Enter the URL you use to access Nextcloud and add
/remote.php/dav/
. For example, if you access Nextcloud athttps://cloud.n8n.com
, your WebDAV URL ishttps://cloud.n8n.com/remote.php/dav
.- If you have Nextcloud installed in a subdirectory, enter the URL you use to access Nextcloud and add
/<subdirectory>/remote.php/dav/
. Replace<subdirectory>
with the subdirectory Nextcloud's installed in. - Refer to Nextcloud's Third-party WebDAV clients documentation for more information on constructing your WebDAV URL.
- If you have Nextcloud installed in a subdirectory, enter the URL you use to access Nextcloud and add
- Enter your User name.
- For the Password, Nextcloud recommends using an app password rather than your user password. To create an app password:
- In the Nextcloud Web interface, select your avatar in the top right and select Personal settings.
- In the left menu, choose Security.
- Scroll to the bottom to the App Password section and create a new app password.
- Copy that app password and enter it in n8n as your Password.
Using OAuth2#
To configure this credential, you'll need a Nextcloud account and:
- An Authorization URL and Access Token URL: These depend on the URL you use to access Nextcloud.
- A Client ID: Generated once you add an OAuth2 client application in Administrator Security Settings.
- A Client Secret: Generated once you add an OAuth2 client application in Administrator Security Settings.
- A Web DAV URL: This depends on the URL you use to access Nextcloud.
To set it up:
- In Nextcloud, open your Administrator Security Settings.
- Find the Add client section under OAuth 2.0 clients.
- Enter a Name for your client, like
n8n integration
. - Copy the OAuth Callback URL from n8n and enter it as the Redirection URI.
- Then select Add in Nextcloud.
- In n8n, update the Authorization URL to replace
https://nextcloud.example.com
with the URL you use to access Nextcloud. For example, if you access Nextcloud athttps://cloud.n8n.com
, the Authorization URL ishttps://cloud.n8n.com/apps/oauth2/authorize
. -
In n8n, update the Access Token URL to replace
https://nextcloud.example.com
with the URL you use to access Nextcloud. For example, if you access Nextcloud athttps://cloud.n8n.com
, the Access Token URL ishttps://cloud.n8n.com/apps/oauth2/api/v1/token
.Pretty URL configuration
The Authorization URL and Access Token URL assume that you've configured Nextcloud to use Pretty URLs. If you haven't, you must add
/index.php/
between your Nextcloud URL and the/apps/oauth2
portion, for example:https://cloud.n8n.com/index.php/apps/oauth2/api/v1/token
. -
Copy the Nextcloud Client Identifier for your OAuth2 client and enter it as the Client ID in n8n.
- Copy the Nextcloud Secret and enter it as the Client Secret in n8n.
- In n8n, to create your Web DAV URL: If Nextcloud is in the root of your domain, enter the URL you use to access Nextcloud and add
/remote.php/dav/
. For example, if you access Nextcloud athttps://cloud.n8n.com
, your WebDAV URL ishttps://cloud.n8n.com/remote.php/dav
.- If you have Nextcloud installed in a subdirectory, enter the URL you use to access Nextcloud and add
/<subdirectory>/remote.php/dav/
. Replace<subdirectory>
with the subdirectory Nextcloud's installed in. - Refer to Nextcloud's Third-party WebDAV clients documentation for more information on constructing your WebDAV URL.
- If you have Nextcloud installed in a subdirectory, enter the URL you use to access Nextcloud and add
Refer to the Nextcloud OAuth2 Configuration documentation for more detailed instructions.