What is the problem you are having with rclone?
I'm using a RS422+ Synology NAS to store persistent data from my Docker Swarm nodes. I store the connection data (host, username, pass, ...) in a .env file I inject during the deployment with Docker Compose.
It works perfectly with Samba but I need SFTP volume for some of my services. So I'm trying to mount this kind of volume with rclone.
An example of my Docker Compose volume section.
volumes:
my_awesome_volume:
driver: rclone
driver_opts:
type: sftp
path: "/path/to/my/node/folder"
sftp_host: "${HOST}"
sftp_port: "${SSH_PORT}"
sftp_user: "${SERVICE_ACCOUNT_USERNAME}"
sftp_pass: "${SERVICE_ACCOUNT_PASSWORD}"
Also tried with variants like:
sftp-xxxinstead ofsftp_xxx,xxxinstead ofsftp_xxx,- Unquoted variables,
- Combining
pathandtypeintoremoteas mentionned in the docker plugin "Connection string" documentation section.
But after all my attemps, my service is stuck into the preparation state and so cannot start because it's not able to mount the volume.
Also, please consider:
- I base64 encoded my NAS account password in the
.envfile as mentionned in password obscuration (even if I also tried first without any kind of transformation), - By using
docker service inspect my-awsesome-service, I confirm my credentials are correctly injected during the deployment of the service, - I also installed
fusewith the following command:apt-get -y install fuse3, - I can connect to the NAS through SFTP from the same node I'm trying to mount the volume on with password authentication,
Run the command 'rclone version' and share the full output of the command.
Not using rclone executable, but the rclone/docker-volume-rclone:arm-v6-1.71.2 Docker plugin.
Which cloud storage system are you using? (eg Google Drive)
SFTP on a RS422+ Synology NAS server, using DSM 7.3-81180 version.
The command you were trying to run (eg rclone copy /tmp remote:tmp)
I don't know if I'm able to execute such command with the Docker plugin. If so, could you please tell my how?
Please run 'rclone config redacted' and share the full output. If you get command not found, please make sure to update rclone.
I don't know if I'm able to execute such command with the Docker plugin. If so, could you please tell my how?
A log from the command that you were trying to run with the -vv flag
While executing my deploy command:
set -a; . my-service.env; set +a; docker stack deploy -c /path/to/my/compose/file.yml my_awesome_stack
Nov 20 20:21:30 <swarm_node> dockerd[512]: time="2025-11-20T20:21:30.658833146Z" level=info msg="initialized VXLAN UDP port to 4789 " module=node node.id=dx1q2x5q9ttskoof9frt70kl6
Nov 20 20:21:31 <swarm_node> dockerd[512]: time="2025-11-20T20:21:31Z" level=error msg="2025/11/20 20:21:31 DEBUG : /VolumeDriver.Get: Request returned error: volume not found" plugin=332ccabf5700861309509295b7f4ac6369d2728fea4ee10c7db576c70618d150
Nov 20 20:21:31 <swarm_node> dockerd[512]: time="2025-11-20T20:21:31Z" level=error msg="2025/11/20 20:21:31 DEBUG : Create volume \"<volume_name>\"" plugin=332ccabf5700861309509295b7f4ac6369d2728fea4ee10c7db576c70618d150
Nov 20 20:21:31 <swarm_node> dockerd[512]: time="2025-11-20T20:21:31Z" level=error msg="2025/11/20 20:21:31 DEBUG : Setup volume \"<volume_name>\" as \":sftp,host='<nas_ip_address>',pass='<nas_base64_encoded_password>',port='<nas_ssh_port>',user='<nas_username>':<nas_folder_path>\" at path /mnt/<volume_name>" plugin=332ccabf5700861309509295b7f4ac6369d2728fea4ee10c7db576c70618d150
Nov 20 20:21:31 <swarm_node> dockerd[512]: time="2025-11-20T20:21:31Z" level=error msg="2025/11/20 20:21:31 DEBUG : Creating backend with remote \":sftp,host='<nas_ip_address>',pass='<nas_base64_encoded_password>',port='<nas_ssh_port>',user='<nas_username>':<nas_folder_path>\"" plugin=332ccabf5700861309509295b7f4ac6369d2728fea4ee10c7db576c70618d150
Nov 20 20:21:31 <swarm_node> dockerd[512]: time="2025-11-20T20:21:31Z" level=error msg="2025/11/20 20:21:31 NOTICE: Config file \"/data/config/rclone.conf\" not found - using defaults" plugin=332ccabf5700861309509295b7f4ac6369d2728fea4ee10c7db576c70618d150
Nov 20 20:21:31 <swarm_node> dockerd[512]: time="2025-11-20T20:21:31Z" level=error msg="2025/11/20 20:21:31 DEBUG : :sftp: detected overridden config - adding \"{rfx88}\" suffix to name" plugin=332ccabf5700861309509295b7f4ac6369d2728fea4ee10c7db576c70618d150
Nov 20 20:21:40 <swarm_node> dockerd[512]: time="2025-11-20T20:21:40Z" level=error msg="2025/11/20 20:21:40 DEBUG : pacer: low level retry 1/10 (error couldn't connect SSH: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none password], no supported methods remain)" plugin=332ccabf5700861309509295b7f4ac6369d2728fea4ee10c7db576c70618d150
Nov 20 20:21:40 <swarm_node> dockerd[512]: time="2025-11-20T20:21:40Z" level=error msg="2025/11/20 20:21:40 DEBUG : pacer: Rate limited, increasing sleep to 200ms" plugin=332ccabf5700861309509295b7f4ac6369d2728fea4ee10c7db576c70618d150
Nov 20 20:21:49 <swarm_node> dockerd[512]: time="2025-11-20T20:21:49Z" level=error msg="2025/11/20 20:21:49 DEBUG : pacer: low level retry 2/10 (error couldn't connect SSH: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none password], no supported methods remain)" plugin=332ccabf5700861309509295b7f4ac6369d2728fea4ee10c7db576c70618d150
Nov 20 20:21:49 <swarm_node> dockerd[512]: time="2025-11-20T20:21:49Z" level=error msg="2025/11/20 20:21:49 DEBUG : pacer: Rate limited, increasing sleep to 400ms" plugin=332ccabf5700861309509295b7f4ac6369d2728fea4ee10c7db576c70618d150
Nov 20 20:21:59 <swarm_node> dockerd[512]: time="2025-11-20T20:21:59Z" level=error msg="2025/11/20 20:21:59 DEBUG : pacer: low level retry 3/10 (error couldn't connect SSH: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none password], no supported methods remain)" plugin=332ccabf5700861309509295b7f4ac6369d2728fea4ee10c7db576c70618d150
Nov 20 20:21:59 <swarm_node> dockerd[512]: time="2025-11-20T20:21:59Z" level=error msg="2025/11/20 20:21:59 DEBUG : pacer: Rate limited, increasing sleep to 800ms" plugin=332ccabf5700861309509295b7f4ac6369d2728fea4ee10c7db576c70618d150
Nov 20 20:22:03 <swarm_node> dockerd[512]: time="2025-11-20T20:22:03Z" level=error msg="2025/11/20 20:22:03 DEBUG : pacer: low level retry 4/10 (error couldn't connect SSH: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none password], no supported methods remain)" plugin=332ccabf5700861309509295b7f4ac6369d2728fea4ee10c7db576c70618d150
Nov 20 20:22:03 <swarm_node> dockerd[512]: time="2025-11-20T20:22:03Z" level=error msg="2025/11/20 20:22:03 DEBUG : pacer: Rate limited, increasing sleep to 1.6s" plugin=332ccabf5700861309509295b7f4ac6369d2728fea4ee10c7db576c70618d150
Nov 20 20:22:13 <swarm_node> dockerd[512]: time="2025-11-20T20:22:13Z" level=error msg="2025/11/20 20:22:13 DEBUG : pacer: low level retry 5/10 (error couldn't connect SSH: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none password], no supported methods remain)" plugin=332ccabf5700861309509295b7f4ac6369d2728fea4ee10c7db576c70618d150
Nov 20 20:22:13 <swarm_node> dockerd[512]: time="2025-11-20T20:22:13Z" level=error msg="2025/11/20 20:22:13 DEBUG : pacer: Rate limited, increasing sleep to 2s" plugin=332ccabf5700861309509295b7f4ac6369d2728fea4ee10c7db576c70618d150
Nov 20 20:22:22 <swarm_node> dockerd[512]: time="2025-11-20T20:22:22Z" level=error msg="2025/11/20 20:22:22 DEBUG : pacer: low level retry 6/10 (error couldn't connect SSH: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none password], no supported methods remain)" plugin=332ccabf5700861309509295b7f4ac6369d2728fea4ee10c7db576c70618d150
Nov 20 20:22:24 <swarm_node> dockerd[512]: time="2025-11-20T20:22:24.008768096Z" level=info msg="NetworkDB stats <swarm_node>(0cdcf916f728) - netID:0ca1ktyc1fswdgnc6cv0nu3n0 leaving:false netPeers:3 entries:20 Queue qLen:0 netMsg/s:0"
Nov 20 20:22:24 <swarm_node> dockerd[512]: time="2025-11-20T20:22:24.009130614Z" level=info msg="NetworkDB stats <swarm_node>(0cdcf916f728) - netID:b7eyrso22l1grlhsvq1kskdsk leaving:false netPeers:3 entries:3 Queue qLen:0 netMsg/s:0"
Nov 20 20:22:27 <swarm_node> dockerd[512]: time="2025-11-20T20:22:27Z" level=error msg="2025/11/20 20:22:27 DEBUG : pacer: low level retry 7/10 (error couldn't connect SSH: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none password], no supported methods remain)" plugin=332ccabf5700861309509295b7f4ac6369d2728fea4ee10c7db576c70618d150
Nov 20 20:22:36 <swarm_node> dockerd[512]: time="2025-11-20T20:22:36Z" level=error msg="2025/11/20 20:22:36 DEBUG : pacer: low level retry 8/10 (error couldn't connect SSH: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none password], no supported methods remain)" plugin=332ccabf5700861309509295b7f4ac6369d2728fea4ee10c7db576c70618d150
Nov 20 20:22:41 <swarm_node> dockerd[512]: time="2025-11-20T20:22:41Z" level=error msg="2025/11/20 20:22:41 DEBUG : pacer: low level retry 9/10 (error couldn't connect SSH: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none password], no supported methods remain)" plugin=332ccabf5700861309509295b7f4ac6369d2728fea4ee10c7db576c70618d150
Nov 20 20:22:45 <swarm_node> dockerd[512]: time="2025-11-20T20:22:45Z" level=error msg="2025/11/20 20:22:45 DEBUG : pacer: low level retry 10/10 (error couldn't connect SSH: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none password], no supported methods remain)" plugin=332ccabf5700861309509295b7f4ac6369d2728fea4ee10c7db576c70618d150
Nov 20 20:22:45 <swarm_node> dockerd[512]: time="2025-11-20T20:22:45Z" level=error msg="2025/11/20 20:22:45 DEBUG : /VolumeDriver.Create: Request returned error: NewFs: couldn't connect SSH: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none password], no supported methods remain" plugin=332ccabf5700861309509295b7f4ac6369d2728fea4ee10c7db576c70618d150
The log above is an extract during the service preparation stop. It loops multiple times from /VolumeDriver.Get: Request returned error: volume not found to /VolumeDriver.Create: Request returned error: NewFs: ...
Thank you very much for your help!