Serve multiple sftp remotes Docker

What is the problem you are having with rclone?

Hey, I recently started using rclone, I have read most of the rclone documentation.Firstly I want to congratulate rclone team for coming up with such a wonderful solution.
My question here is

  1. I want to serve multiple SFTP servers using the same rclone.conf file using Docker Container. I want to parameterize the rclone command below:
    rclone serve sftp $REMOTE_NAME:$FOLDER_NAME -v --no-auth --addr :2022 --rc-web-gui --rc-serve -v --rc-addr localhost:5572 --rc

  2. I also need some references to create a config on fly and how to use environment variables of rclone with Docker

Thank you very much in Advance

What is your rclone version (output from rclone version)

rclone v1.56.0-beta.5587.94b143929

  • os/version: Microsoft Windows 10 Pro 2009 (64 bit)
  • os/kernel: 10.0.19043.1237 (x86_64)
  • os/type: windows
  • os/arch: 386
  • go/version: go1.16.5
  • go/linking: dynamic
  • go/tags: cmount

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

Microsoft Azure Blob Container

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

rclone serve sftp $RCLONE_REMOTE_NAME:$RCLONE_FOLDER_NAME -vv --no-auth --addr :2022 --rc-web-gui --rc-serve -v --rc-addr localhost:5572 --rc

The rclone config contents with secrets removed.

[sftp]
type = sftp
host = localhost
user = ****
port = 22
pubkey_file = *****
disable_hashcheck = true
key_use_agent = false

[rclone-sftp]
type = azureblob
account = <Azure Storage Account Name>
sas_url = <Azure SAS URL>

A log from the command with the -vv flag

These are the logs rom my local windows system:

2021/09/29 10:12:57 DEBUG : rclone: Version "v1.56.0-beta.5587.94b143929" starting with parameters ["C:\\Program Files\\rclone\\rclone.exe" "serve" "sftp" 
"rclone-sftp:rclone" "-vv" "--no-auth" "--addr" ":2022" "--rc-web-gui" "--rc-serve" "-v" "--rc-addr" "localhost:5572" "--rc"]
2021/09/29 10:12:58 DEBUG : Current tag: v2.0.5, Release tag: v2.0.5
2021/09/29 10:12:58 NOTICE: Web GUI exists. Update skipped.
2021/09/29 10:12:58 INFO  : No username specified. Using default username: gui
2021/09/29 10:12:58 INFO  : No password specified. Using random password: NukUWxNc6KYhsgoRDJjgAg 
2021/09/29 10:12:58 NOTICE: Serving Web GUI
2021/09/29 10:12:58 INFO  : Using --user gui --pass XXXX as authenticated user
2021/09/29 10:12:58 NOTICE: Serving remote control on http://localhost:5572/
2021/09/29 10:12:58 DEBUG : login_token "Z3VpOk51a1VXeE5jNktZaHNnb1JESmpnQWc="
2021/09/29 10:12:58 DEBUG : Creating backend with remote "rclone-sftp:rclone"
2021/09/29 10:12:58 DEBUG : Using config file from C:\\Users\\***\\.config\\rclone\\rclone.conf"
2021/09/29 10:12:58 INFO  : Azure container rclone: poll-interval is not supported by this remote
2021/09/29 10:12:58 NOTICE: Loaded 0 authorized keys from "C:\\Users\\***\\.ssh\\authorized_keys"
2021/09/29 10:12:58 DEBUG : Loaded private key from "C:\\Users\\***\\AppData\\Local\\rclone\\serve-sftp\\id_rsa"
2021/09/29 10:12:58 NOTICE: SFTP server listening on [::]:2022

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