Sftp serve keeps hanging at 100%

STOP and READ USE THIS TEMPLATE NO EXCEPTIONS - By not using this, you waste your time, our time and really hate puppies. Please remove these two lines and that will confirm you have read them.

What is the problem you are having with rclone?

I’m using rclone serve sftp with --vfs-cache-mode full and --vfs-write-back 1s. When uploading files via SFTP clients (such as FileZilla or WinSCP), the progress often gets stuck at 100% for a long time. At that point, the file has already been fully written to the local VFS cache, but rclone is still flushing the data to the backend (safe: remote).

Because rclone only signals completion to the SFTP client after the backend upload/commit finishes, the client assumes the transfer is stalled or incomplete. In some cases, it retries the upload, leading to duplicate transfers.

Question:
Is there a way to configure rclone so that the SFTP client receives a success response immediately after the file is written to the VFS cache (before the backend flush), or is the current behavior intended by design?

Run the command 'rclone version' and share the full output of the command.

C:\Windows\system32>"C:\Users\johnpork\Documents\rclone.exe" version
rclone v1.71.1

  • os/version: Microsoft Windows 10 Enterprise N LTSC 2021 21H2 21H2 (64 bit)
  • os/kernel: 10.0.19044.6332 (x86_64)
  • os/type: windows
  • os/arch: amd64
  • go/version: go1.25.1
  • go/linking: static
  • go/tags: cmount
    C:\Windows\system32>

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

webdav

The command you were trying to run (eg rclone copy /tmp remote:tmp)

start "Rclone SFTP Server" cmd /k ^"C:\Users\johnpork\Documents\rclone.exe serve sftp safe: --addr :1400 --user vulcanocraft --pass password --vfs-cache-mode full --vfs-cache-max-size 200G --vfs-cache-max-age 720h --vfs-cache-poll-interval 10m --vfs-refresh --cache-dir F:\rclone-cache --exclude "*.partial" --sftp-disable-concurrent-writes --vfs-write-back 1s --transfers 1 --buffer-size 128M^"

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

C:\Windows\system32>"C:\Users\johnpork\Documents\rclone.exe" config redacted
[ets2mods]
type = internetarchive
access_key_id = XXX
secret_access_key = XXX

[localsftp]
type = sftp
host = XXX
user = XXX
port = 1400
pass = XXX
shell_type = unix
md5sum_command = none
sha1sum_command = none

[safe]
type = crypt
remote = F:\webdav_mount
filename_encryption = obfuscate
password = XXX
password2 = XXX

[safe_no_partial]
type = alias
remote = safe:
filter = - *.partial

[tgfsdav]
type = webdav
url = http://127.0.0.1:1900/webdav
user = XXX
pass = XXX
### Double check the config for sensitive info before posting publicly

C:\Windows\system32>

safe: is a local crypt, not sftp??


if your goal is to upload files only, not streaming, not editing,
then might not need the vfs file cache.
can do a test, read the rclone debug log.

If you are using --vfs-cache-mode writes or full then it should be working exactly like this already unless you set --vfs-write-back 0.

If it isn't working like this then I guess the SFTP server could be hanging on to the connection.

Are you sure it is waiting for the upload to finish and not something else? You can see in the debug log when the upload starts and stops.

i think the connection isn’t an issue as the sftp file transfer happens over LAN. i added –vfs-write-back 0 and this doesn’t make any difference. it still keeps hanging at 100%

Post a log with -vv of a single upload which hangs and I'll take a look to see if I can work out what is happening.

the comand i ran:

C:\Users\johnpork\Documents\rclone.exe serve sftp safe: --addr :1400 --user vulcanocraft --pass password --vfs-cache-mode full --vfs-cache-max-size 200G --vfs-cache-max-age 720h --vfs-cache-poll-interval 10m --vfs-refresh --cache-dir F:\rclone-cache --exclude "*.partial" --sftp-disable-concurrent-writes --vfs-write-back 0 --transfers 1 --buffer-size 128M -vv 2>&1 | Tee-Object -FilePath F:\rclone-debug.txt

log:
https://github.com/VulcanoSoftware/fileupload/releases/download/rclone/rclone-debug.txt

@ncw take a look at this

Thanks for that.

According to the log the SFTP client started uploading the file at 15:32:47 and finished at 15:36:53 rclone started uploading the file at 15:36:54 and it was finished at 15:37:27.

That was with --vfs-write-back 0 which looks absolutely fine. Can you try with --vfs-write-back 60s so a deliberately long time before it starts uploading. This should let you see definitely if the SFTP client is waiting for the upload or not. If the SFTP client does wait for the upload, I'd like to see a log with -vv of that please.

video of transfer proces:
https://github.com/VulcanoSoftware/fileupload/releases/download/rclone/2025-10-22.12-14-50.mp4

log:

https://github.com/VulcanoSoftware/fileupload/releases/download/rclone/rclone-debug2.txt

@ncw please take a look at this. i guess everything is fine, but maybe you still find something.

As far as I can see that is working properly. The SFTP client finishes at 100% and then moves on to the next file. You can see the uploads starting 1 minute later in the log and the timestamps agree with those in the video.

i ran into an issue when uploading 100 GB.

log:

https://archive.org/download/rclone-debug/rclone-debug.txt

some files failed to upload

  • maybe start with a much simpler command using dos cmd, not powershell
    and make sure to delete the log file before running rclone.

  • might want to test without a crypt remote. just point rclone serve to a set of normal files

rclone.exe serve sftp f:\path\to\files --addr :1400 --user vulcanocraft --pass password --log-level=DEBUG --log-file=f:\rclone-debug.txt

i just want to work with crypt using sftp. i deleted the log file before running rclone, do you maybe know a simple cmd command then? if you know that i am running the following command in powershell?:

C:\Users\johnpork\Documents\rclone.exe serve sftp safe: --addr :1400 --user vulcanocraft --pass password --vfs-cache-mode full --vfs-cache-max-size 200G --vfs-cache-max-age 720h --vfs-cache-poll-interval 10m --vfs-refresh --cache-dir F:\rclone-cache --exclude "*.partial" --sftp-disable-concurrent-writes --vfs-write-back 60s --transfers 1 --buffer-size 128M -vv 2>&1 | Tee-Object -FilePath F:\rclone-debug.txt

I already shared my suggestion.

@ncw can you please help me with this?

@ncw i think you know more about this tbh

@ncw please answer me

A 4G UTF-16 log fle!

Anyway I don't see any issues in your log file at all. All the files got uploaded successfully.