/rclone_serve_sftp
Serve the remote over SFTP.
$ npx -y skills add sickn33/agentic-awesome-skills --agent claude-codeHow it fires
How this command gets triggered: by you, by Claude, or both.
- Fires itselfClaude auto-loads it when your prompt matches the work.
- You can call itInvoke it directly when you want it.
- Slash command
/rclone_serve_sftp
Context preview
What this command does when you run it.
Serve the remote over SFTP.
Command definition
rclone_serve_sftp.mdtitle: "rclone serve sftp"
description: "Serve the remote over SFTP."
versionIntroduced: v1.48
# autogenerated - DO NOT EDIT, instead edit the source code in cmd/serve/sftp/ and as part of making a release run "make commanddocs"
> **Official documentation:** [https://rclone.org/commands/rclone_serve_sftp/](https://rclone.org/commands/rclone_serve_sftp/)
rclone serve sftp
Serve the remote over SFTP.
Synopsis
Run an SFTP server to serve a remote over SFTP. This can be used with an SFTP client or you can make a remote of type [sftp](/sftp) to use with it.
You can use the [filter](/filtering) flags (e.g. `--include`, `--exclude`) to control what is served.
The server will respond to a small number of shell commands, mainly md5sum, sha1sum and df, which enable it to provide support for checksums and the about feature when accessed from an sftp remote.
Note that this server uses standard 32 KiB packet payload size, which means you must not configure the client to expect anything else, e.g. with the [chunk_size](/sftp/#sftp-chunk-size) option on an sftp remote.
The server will log errors. Use `-v` to see access logs.
`--bwlimit` will be respected for file transfers. Use `--stats` to control the stats printing.
You must provide some means of authentication, either with `--user`/`--pass`, an authorized keys file (specify location with `--authorized-keys` - the default is the same as ssh), an `--auth-proxy`, or set the `--no-auth` flag for no authentication when logging in.
If you don't supply a host `--key` then rclone will generate rsa, ecdsa and ed25519 variants, and cache them for later use in rclone's cache directory (see `rclone help flags cache-dir`) in the "serve-sftp" directory.
By default the server binds to localhost:2022 - if you want it to be reachable externally then supply `--addr :2022` for example.
This also supports being run with socket activation, in which case it will listen on the first passed FD. It can be configured with .socket and .service unit files as described in <https://www.freedesktop.org/software/systemd/man/latest/systemd.socket.html>.
Socket activation can be tested ad-hoc with the `systemd-socket-activate`command:
systemd-socket-activate -l 2222 -- rclone serve sftp :local:vfs/
This will socket-activate rclone on the first connection to port 2222 over TCP.
Note that the default of `--vfs-cache-mode off` is fine for the rclone sftp backend, but it may not be with other SFTP clients.
If `--stdio` is specified, rclone will serve SFTP over stdio, which can be used with sshd via ~/.ssh/authorized_keys, for example:
restrict,command="rclone serve sftp --stdio ./photos" ssh-rsa ...
On the client you need to set `--transfers 1` when using `--stdio`. Otherwise multiple instances of the rclone server are started by OpenSSH which can lead to "corrupted on transfer" errors. This is the case because the client chooses indiscriminately which server to send commands to while the servers all have different views of the state of the filing system.
The "restrict" in authorized_keys prevents SHA1SUMs and MD5SUMs from being used. Omitting "restrict" and using `--sftp-path-override` to enable checksumming is possible but less secure and you could use the SFTP server provided by OpenSSH in this case.
VFS - Virtual File System
This command uses the VFS layer. This adapts the cloud storage objects that rclone uses into something which looks much more like a disk filing system.
Cloud storage objects have lots of properties which aren't like disk files - you can't extend them or write to the middle of them, so the VFS layer has to deal with that. Because there is no one right way of doing this there are various options explained below.
The VFS layer also implements a directory cache - this caches info about files and directories (but not the data) in memory.
VFS Directory Cache
Using the `--dir-cache-time` flag, you can control how long a directory should be considered up to date and not refreshed from the backend. Changes made through the VFS will appear immediately or invalidate the cache.
--dir-cache-time duration Time to cache directory entries for (default 5m0s)
--poll-interval duration Time to wait between polling for changes. Must be smaller than dir-cache-time. Only on supported remotes. Set to 0 to disable (default 1m0s)However, changes made directly on the cloud storage by the web interface or a different copy of rclone will only be picked up once the directory cache expires if the backend configured does not support polling for changes. If the backend supports polling, changes will be picked up within the polling interval.
You can send a `SIGHUP` signal to rclone for it to flush all directory caches, regardless of how old they are. Assuming only one rclone instance is running, you can reset the cache like this:
kill -SIGHUP $(pidof rclone)
If you configure rclone with a [remote control](/rc) then you can use rclone rc to flush the whole directory cache:
rclone rc vfs/forget
Or individual files or directories:
rclone rc vfs/forget file=path/to/file dir=path/to/dir
VFS File Buffering
The `--buffer-size` flag determines the amount of memory, that will be used to buffer data in advance.
Each open file will try to keep the specified amount of data in memory at all times. The buffered data is bound to one open file and won't be shared.
This flag is a upper limit for the used memory per open file. The buffer will only use memory for data that is downloaded but not not yet read. If the buffer is empty, only a small amount of memory will be used.
The maximum memory used by rclone for buffering can be up to `--buffer-size * open files`.
VFS File Caching
These flags control the VFS file caching options. File caching is necessary to make the VFS layer appear compatible with a normal file system. It can be disabled at the c
Read more
title: "rclone serve sftp" description: "Serve the remote over SFTP." versionIntroduced: v1.48 # autogenerated - DO NOT EDIT, instead edit the source code in cmd/serve/sftp/ and as part of making a release run "make commanddocs"
> **Official documentation:** [https://rclone.org/commands/rclone_serve_sftp/](https://rclone.org/commands/rclone_serve_sftp/)
rclone serve sftp
Serve the remote over SFTP.
Synopsis
Run an SFTP server to serve a remote over SFTP. This can be used with an SFTP client or you can make a remote of type [sftp](/sftp) to use with it.
You can use the [filter](/filtering) flags (e.g. `--include`, `--exclude`) to control what is served.
The server will respond to a small number of shell commands, mainly md5sum, sha1sum and df, which enable it to provide support for checksums and the about feature when accessed from an sftp remote.
Note that this server uses standard 32 KiB packet payload size, which means you must not configure the client to expect anything else, e.g. with the [chunk_size](/sftp/#sftp-chunk-size) option on an sftp remote.
The server will log errors. Use `-v` to see access logs.
`--bwlimit` will be respected for file transfers. Use `--stats` to control the stats printing.
You must provide some means of authentication, either with `--user`/`--pass`, an authorized keys file (specify location with `--authorized-keys` - the default is the same as ssh), an `--auth-proxy`, or set the `--no-auth` flag for no authentication when logging in.
If you don't supply a host `--key` then rclone will generate rsa, ecdsa and ed25519 variants, and cache them for later use in rclone's cache directory (see `rclone help flags cache-dir`) in the "serve-sftp" directory.
By default the server binds to localhost:2022 - if you want it to be reachable externally then supply `--addr :2022` for example.
This also supports being run with socket activation, in which case it will listen on the first passed FD. It can be configured with .socket and .service unit files as described in <https://www.freedesktop.org/software/systemd/man/latest/systemd.socket.html>.
Socket activation can be tested ad-hoc with the `systemd-socket-activate`command:
systemd-socket-activate -l 2222 -- rclone serve sftp :local:vfs/
This will socket-activate rclone on the first connection to port 2222 over TCP.
Note that the default of `--vfs-cache-mode off` is fine for the rclone sftp backend, but it may not be with other SFTP clients.
If `--stdio` is specified, rclone will serve SFTP over stdio, which can be used with sshd via ~/.ssh/authorized_keys, for example:
restrict,command="rclone serve sftp --stdio ./photos" ssh-rsa ...
On the client you need to set `--transfers 1` when using `--stdio`. Otherwise multiple instances of the rclone server are started by OpenSSH which can lead to "corrupted on transfer" errors. This is the case because the client chooses indiscriminately which server to send commands to while the servers all have different views of the state of the filing system.
The "restrict" in authorized_keys prevents SHA1SUMs and MD5SUMs from being used. Omitting "restrict" and using `--sftp-path-override` to enable checksumming is possible but less secure and you could use the SFTP server provided by OpenSSH in this case.
VFS - Virtual File System
This command uses the VFS layer. This adapts the cloud storage objects that rclone uses into something which looks much more like a disk filing system.
Cloud storage objects have lots of properties which aren't like disk files - you can't extend them or write to the middle of them, so the VFS layer has to deal with that. Because there is no one right way of doing this there are various options explained below.
The VFS layer also implements a directory cache - this caches info about files and directories (but not the data) in memory.
VFS Directory Cache
Using the `--dir-cache-time` flag, you can control how long a directory should be considered up to date and not refreshed from the backend. Changes made through the VFS will appear immediately or invalidate the cache.
--dir-cache-time duration Time to cache directory entries for (default 5m0s)
--poll-interval duration Time to wait between polling for changes. Must be smaller than dir-cache-time. Only on supported remotes. Set to 0 to disable (default 1m0s)However, changes made directly on the cloud storage by the web interface or a different copy of rclone will only be picked up once the directory cache expires if the backend configured does not support polling for changes. If the backend supports polling, changes will be picked up within the polling interval.
You can send a `SIGHUP` signal to rclone for it to flush all directory caches, regardless of how old they are. Assuming only one rclone instance is running, you can reset the cache like this:
kill -SIGHUP $(pidof rclone)
If you configure rclone with a [remote control](/rc) then you can use rclone rc to flush the whole directory cache:
rclone rc vfs/forget
Or individual files or directories:
rclone rc vfs/forget file=path/to/file dir=path/to/dir
VFS File Buffering
The `--buffer-size` flag determines the amount of memory, that will be used to buffer data in advance.
Each open file will try to keep the specified amount of data in memory at all times. The buffered data is bound to one open file and won't be shared.
This flag is a upper limit for the used memory per open file. The buffer will only use memory for data that is downloaded but not not yet read. If the buffer is empty, only a small amount of memory will be used.
The maximum memory used by rclone for buffering can be up to `--buffer-size * open files`.
VFS File Caching
These flags control the VFS file caching options. File caching is necessary to make the VFS layer appear compatible with a normal file system. It can be disabled at the c
Local, agent-owned skill stacks for coding agents—from complete catalog access to a reproducible, reviewable plan. Codex or Claude inspects your project and chooses exact skills from the complete local AAS catalog.
Other commands on agentic-awesome-skills.
- /rclone
Show help for rclone commands, flags and backends.
Open command - /rclone_about
Get quota information from the remote.
Open command - /rclone_archive
Perform an action on an archive.
Open command - /rclone_archive_create
Archive source file(s) to destination.
Open command - /rclone_archive_extract
Extract archives from source to destination.
Open command - /rclone_archive_list
List archive contents from source.
Open command

