Nextcloud remote, 405 Method Not Allowed

What is the problem you are having with rclone?

I am trying to connect to my personal Nextcloud server as a non-privileged user on my Alpine backup server. Whenever I try to do so, I receive the following error: ERROR : : error listing: couldn't list files: 405 Method Not Allowed

What version of rclone are you using?

rclone v1.69.3-DEV

  • os/version: alpine 3.22.1 (64 bit)
  • os/kernel: 6.12.38-0-rpi (aarch64)
  • os/type: linux
  • os/arch: arm64 (ARMv8 compatible)
  • go/version: go1.24.7
  • go/linking: dynamic
  • go/tags: none

Which cloud storage system are you using? (eg Google Drive)

Nextcloud.

The command you were trying to run

rclone sync --dry-run my-nextcloud: /home/zfs-user/mount/my-nextcloud

Please run 'rclone config redacted' and share the full output. If you get command not found, please make sure to update rclone.

[my-nextcloud]
type = webdav
url = https://nextcloud.myserver.com/dav/files/myuser
vendor = nextcloud
user = myuser
pass = [app password generated from Nextcloud security settings]

A log from the command that you were trying to run with the -vv flag

/root $ rclone -vv sync --dry-run my-nextcloud: /home/zfs-user/mount/my-nextcloud
2025/09/29 20:55:21 DEBUG : rclone: Version "v1.69.3-DEV" starting with parameters ["rclone" "-vv" "sync" "--dry-run" "my-nextcloud:" "/home/zfs-user/mount/my-nextcloud"]
2025/09/29 20:55:21 DEBUG : Creating backend with remote "my-nextcloud:"
2025/09/29 20:55:21 DEBUG : Using config file from "/home/zfs-user/.config/rclone/rclone.conf"
2025/09/29 20:55:21 DEBUG : found headers: 
2025/09/29 20:55:21 DEBUG : Chunks temporary upload directory: https://nextcloud.myserver.com/dav/uploads/myuser/
2025/09/29 20:55:21 DEBUG : Creating backend with remote "/home/zfs-user/mount/my-nextcloud"
2025/09/29 20:55:22 ERROR : webdav root '': error reading source root directory: couldn't list files: 405 Method Not Allowed
2025/09/29 20:55:22 DEBUG : Local file system at /home/zfs-user/mount/my-nextcloud: Waiting for checks to finish
2025/09/29 20:55:22 DEBUG : Local file system at /home/zfs-user/mount/my-nextcloud: Waiting for transfers to finish
2025/09/29 20:55:22 ERROR : Local file system at /home/zfs-user/mount/my-nextcloud: not deleting files as there were IO errors
2025/09/29 20:55:22 ERROR : Local file system at /home/zfs-user/mount/my-nextcloud: not deleting directories as there were IO errors
2025/09/29 20:55:22 ERROR : Attempt 1/3 failed with 1 errors and: couldn't list files: 405 Method Not Allowed
2025/09/29 20:55:22 ERROR : webdav root '': error reading source root directory: couldn't list files: 405 Method Not Allowed
2025/09/29 20:55:22 DEBUG : Local file system at /home/zfs-user/mount/my-nextcloud: Waiting for checks to finish
2025/09/29 20:55:22 DEBUG : Local file system at /home/zfs-user/mount/my-nextcloud: Waiting for transfers to finish
2025/09/29 20:55:22 ERROR : Local file system at /home/zfs-user/mount/my-nextcloud: not deleting files as there were IO errors
2025/09/29 20:55:22 ERROR : Local file system at /home/zfs-user/mount/my-nextcloud: not deleting directories as there were IO errors
2025/09/29 20:55:22 ERROR : Attempt 2/3 failed with 1 errors and: couldn't list files: 405 Method Not Allowed
2025/09/29 20:55:23 ERROR : webdav root '': error reading source root directory: couldn't list files: 405 Method Not Allowed
2025/09/29 20:55:23 DEBUG : Local file system at /home/zfs-user/mount/my-nextcloud: Waiting for checks to finish
2025/09/29 20:55:23 DEBUG : Local file system at /home/zfs-user/mount/my-nextcloud: Waiting for transfers to finish
2025/09/29 20:55:23 ERROR : Local file system at /home/zfs-user/mount/my-nextcloud: not deleting files as there were IO errors
2025/09/29 20:55:23 ERROR : Local file system at /home/zfs-user/mount/my-nextcloud: not deleting directories as there were IO errors
2025/09/29 20:55:23 ERROR : Attempt 3/3 failed with 1 errors and: couldn't list files: 405 Method Not Allowed
2025/09/29 20:55:23 NOTICE: 
Transferred:   	          0 B / 0 B, -, 0 B/s, ETA -
Errors:                 1 (retrying may help)
Elapsed time:         1.9s

2025/09/29 20:55:23 DEBUG : 5 go routines active
2025/09/29 20:55:23 NOTICE: Failed to sync: couldn't list files: 405 Method Not Allowed

Additional information

I’ve tried every answer I can find to this online. I can’t use this solution, because then I get the error where it insists the URL format should be mydomain.tld/dav/files/myuser. I’ve tried regenerating the app password, I’ve tried using my account;s user password just in case, I’ve deleted the config more times than I can count and started over.

I’ve made certain the that target local directory is owned by zfs-user. This worked perfectly fine yesterday running as root, which I also just tried again with the same result. Apparently I deleted the magic config required to make this work, and now I can’t remember how to recreate it.

Start with using the latest rclone as your outdated and custom build version for sure contains already fixed bugs.

I downloaded the arm64 binary (https://downloads.rclone.org/v1.71.1/rclone-v1.71.1-linux-arm64.zip) from the download page and moved it to /usr/bin/rclone, but I’m getting a segmentation fault now.

It’s owned by root and has chmod permission code 755, so it shouldn’t be a permissions issue. Should I not be using the arm64 binary, or is there a problem with it on Alpine? I assume I put the binary in the right place, since I just re-added it with apk and that’s where it is now.

This indicates wrong binary (for different arch). But it is strange indeed. I would download the same version as you. Unfortunately I do not have this hardware/OS to test. I have never heard about any issues with Alpine. But we can’t rule it out.

FYI - for rpi running Raspberry Pi OS (64-bit) rclone-v1.71.1-linux-arm64.zip works:

$ ./rclone --version
rclone v1.71.1
- os/version: raspbian 12.1 (64 bit)
- os/kernel: 6.12.47-v8+ (aarch64)
- os/type: linux
- os/arch: arm64 (ARMv8 compatible)
- go/version: go1.25.1
- go/linking: static
- go/tags: none 

What I just can’t wrap my head around is the fact that I got it working once before. Are you certain you don’t see any common errors in my config etc., other than being on a lower version than I should be?

I just tried updating my Nextcloud instance to be on the latest version (of the TrueNAS community train app) and that didn’t help. It’s also clear the my device is contacting my Nextcloud server, since I can see when it does.

Great news, I found the magic config here.

Adding

https://url.com**/remote.php**/dav/files/username

Fixed the problem

Would it be possible to update Rclone’s own error reporting to better reflect that remote.php is needed in the URL? Maybe it’s obvious if one is familiar with the methods, but I obviously found the following error message not entirely helpful:

2025/10/01 19:44:54 CRITICAL: Failed to create file system for "my-nextcloud:": the remote url looks incorrect. Note that nextcloud chunked uploads require you to use the /dav/files/USER endpoint instead of /webdav. Please check 'rclone config show remotename' to verify that the url field ends in /dav/files/USERNAME
1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.