Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

3.8 MB
Raw Blame
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang="">
<head>
  <meta charset="utf-8" />
  <meta name="generator" content="pandoc" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
  <meta name="author" content="Nick Craig-Wood" />
  <title>rclone(1) User Manual</title>
  <style>
    html {
      color: #1a1a1a;
      background-color: #fdfdfd;
    }
    body {
      margin: 0 auto;
      max-width: 36em;
      padding-left: 50px;
      padding-right: 50px;
      padding-top: 50px;
      padding-bottom: 50px;
      hyphens: auto;
      overflow-wrap: break-word;
      text-rendering: optimizeLegibility;
      font-kerning: normal;
    }
    @media (max-width: 600px) {
      body {
        font-size: 0.9em;
        padding: 12px;
      }
      h1 {
        font-size: 1.8em;
      }
    }
    @media print {
      html {
        background-color: white;
      }
      body {
        background-color: transparent;
        color: black;
        font-size: 12pt;
      }
      p, h2, h3 {
        orphans: 3;
        widows: 3;
      }
      h2, h3, h4 {
        page-break-after: avoid;
      }
    }
    p {
      margin: 1em 0;
    }
    a {
      color: #1a1a1a;
    }
    a:visited {
      color: #1a1a1a;
    }
    img {
      max-width: 100%;
    }
    h1, h2, h3, h4, h5, h6 {
      margin-top: 1.4em;
    }
    h5, h6 {
      font-size: 1em;
      font-style: italic;
    }
    h6 {
      font-weight: normal;
    }
    ol, ul {
      padding-left: 1.7em;
      margin-top: 1em;
    }
    li > ol, li > ul {
      margin-top: 0;
    }
    blockquote {
      margin: 1em 0 1em 1.7em;
      padding-left: 1em;
      border-left: 2px solid #e6e6e6;
      color: #606060;
    }
    code {
      font-family: Menlo, Monaco, Consolas, 'Lucida Console', monospace;
      font-size: 85%;
      margin: 0;
      hyphens: manual;
    }
    pre {
      margin: 1em 0;
      overflow: auto;
    }
    pre code {
      padding: 0;
      overflow: visible;
      overflow-wrap: normal;
    }
    .sourceCode {
     background-color: transparent;
     overflow: visible;
    }
    hr {
      background-color: #1a1a1a;
      border: none;
      height: 1px;
      margin: 1em 0;
    }
    table {
      margin: 1em 0;
      border-collapse: collapse;
      width: 100%;
      overflow-x: auto;
      display: block;
      font-variant-numeric: lining-nums tabular-nums;
    }
    table caption {
      margin-bottom: 0.75em;
    }
    tbody {
      margin-top: 0.5em;
      border-top: 1px solid #1a1a1a;
      border-bottom: 1px solid #1a1a1a;
    }
    th {
      border-top: 1px solid #1a1a1a;
      padding: 0.25em 0.5em 0.25em 0.5em;
    }
    td {
      padding: 0.125em 0.5em 0.25em 0.5em;
    }
    header {
      margin-bottom: 4em;
      text-align: center;
    }
    #TOC li {
      list-style: none;
    }
    #TOC ul {
      padding-left: 1.3em;
    }
    #TOC > ul {
      padding-left: 0;
    }
    #TOC a:not(:hover) {
      text-decoration: none;
    }
    code{white-space: pre-wrap;}
    span.smallcaps{font-variant: small-caps;}
    div.columns{display: flex; gap: min(4vw, 1.5em);}
    div.column{flex: auto; overflow-x: auto;}
    div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
    /* The extra [class] is a hack that increases specificity enough to
       override a similar rule in reveal.js */
    ul.task-list[class]{list-style: none;}
    ul.task-list li input[type="checkbox"] {
      font-size: inherit;
      width: 0.8em;
      margin: 0 0.8em 0.2em -1.6em;
      vertical-align: middle;
    }
    .display.math{display: block; text-align: center; margin: 0.5rem auto;}
    /* CSS for syntax highlighting */
    pre > code.sourceCode { white-space: pre; position: relative; }
    pre > code.sourceCode > span { line-height: 1.25; }
    pre > code.sourceCode > span:empty { height: 1.2em; }
    .sourceCode { overflow: visible; }
    code.sourceCode > span { color: inherit; text-decoration: inherit; }
    div.sourceCode { margin: 1em 0; }
    pre.sourceCode { margin: 0; }
    @media screen {
    div.sourceCode { overflow: auto; }
    }
    @media print {
    pre > code.sourceCode { white-space: pre-wrap; }
    pre > code.sourceCode > span { text-indent: -5em; padding-left: 5em; }
    }
    pre.numberSource code
      { counter-reset: source-line 0; }
    pre.numberSource code > span
      { position: relative; left: -4em; counter-increment: source-line; }
    pre.numberSource code > span > a:first-child::before
      { content: counter(source-line);
        position: relative; left: -1em; text-align: right; vertical-align: baseline;
        border: none; display: inline-block;
        -webkit-touch-callout: none; -webkit-user-select: none;
        -khtml-user-select: none; -moz-user-select: none;
        -ms-user-select: none; user-select: none;
        padding: 0 4px; width: 4em;
        color: #aaaaaa;
      }
    pre.numberSource { margin-left: 3em; border-left: 1px solid #aaaaaa;  padding-left: 4px; }
    div.sourceCode
      {   }
    @media screen {
    pre > code.sourceCode > span > a:first-child::before { text-decoration: underline; }
    }
    code span.al { color: #ff0000; font-weight: bold; } /* Alert */
    code span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
    code span.at { color: #7d9029; } /* Attribute */
    code span.bn { color: #40a070; } /* BaseN */
    code span.bu { color: #008000; } /* BuiltIn */
    code span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
    code span.ch { color: #4070a0; } /* Char */
    code span.cn { color: #880000; } /* Constant */
    code span.co { color: #60a0b0; font-style: italic; } /* Comment */
    code span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
    code span.do { color: #ba2121; font-style: italic; } /* Documentation */
    code span.dt { color: #902000; } /* DataType */
    code span.dv { color: #40a070; } /* DecVal */
    code span.er { color: #ff0000; font-weight: bold; } /* Error */
    code span.ex { } /* Extension */
    code span.fl { color: #40a070; } /* Float */
    code span.fu { color: #06287e; } /* Function */
    code span.im { color: #008000; font-weight: bold; } /* Import */
    code span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
    code span.kw { color: #007020; font-weight: bold; } /* Keyword */
    code span.op { color: #666666; } /* Operator */
    code span.ot { color: #007020; } /* Other */
    code span.pp { color: #bc7a00; } /* Preprocessor */
    code span.sc { color: #4070a0; } /* SpecialChar */
    code span.ss { color: #bb6688; } /* SpecialString */
    code span.st { color: #4070a0; } /* String */
    code span.va { color: #19177c; } /* Variable */
    code span.vs { color: #4070a0; } /* VerbatimString */
    code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
  </style>
</head>
<body>
<header id="title-block-header">
<h1 class="title">rclone(1) User Manual</h1>
<p class="author">Nick Craig-Wood</p>
<p class="date">Nov 06, 2026</p>
</header>
<h1 id="name">NAME</h1>
<p>rclone - manage files on cloud storage</p>
<h1 id="synopsis">SYNOPSIS</h1>
<pre><code>Usage:
  rclone [flags]
  rclone [command]

Available commands:
  about       Get quota information from the remote.
  archive     Perform an action on an archive.
  authorize   Remote authorization.
  backend     Run a backend-specific command.
  bisync      Perform bidirectional synchronization between two paths.
  cat         Concatenates any files and sends them to stdout.
  check       Checks the files in the source and destination match.
  checksum    Checks the files in the destination against a SUM file.
  cleanup     Clean up the remote if possible.
  completion  Output completion script for a given shell.
  config      Enter an interactive configuration session.
  convmv      Convert file and directory names in place.
  copy        Copy files from source to dest, skipping identical files.
  copyto      Copy files from source to dest, skipping identical files.
  copyurl     Copy the contents of the URL supplied content to dest:path.
  cryptcheck  Cryptcheck checks the integrity of an encrypted remote.
  cryptdecode Cryptdecode returns unencrypted file names.
  dedupe      Interactively find duplicate filenames and delete/rename them.
  delete      Remove the files in path.
  deletefile  Remove a single file from remote.
  gendocs     Output markdown docs for rclone to the directory supplied.
  gitannex    Speaks with git-annex over stdin/stdout.
  gui         Open the web based GUI.
  hashsum     Produces a hashsum file for all the objects in the path.
  help        Show help for rclone commands, flags and backends.
  index       Write static directory listings into a remote.
  link        Generate public link to file/folder.
  listremotes List all the remotes in the config file and defined in environment variables.
  ls          List the objects in the path with size and path.
  lsd         List all directories/containers/buckets in the path.
  lsf         List directories and objects in remote:path formatted for parsing.
  lsjson      List directories and objects in the path in JSON format.
  lsl         List the objects in path with modification time, size and path.
  md5sum      Produces an md5sum file for all the objects in the path.
  mkdir       Make the path if it doesn&#39;t already exist.
  mount       Mount the remote as file system on a mountpoint.
  move        Move files from source to dest.
  moveto      Move file or directory from source to dest.
  ncdu        Explore a remote with a text based user interface.
  nfsmount    Mount the remote as file system on a mountpoint.
  obscure     Obscure password for use in the rclone config file.
  purge       Remove the path and all of its contents.
  rc          Run a command against a running rclone.
  rcat        Copies standard input to file on remote.
  rcd         Run rclone listening to remote control commands only.
  rmdir       Remove the empty directory at path.
  rmdirs      Remove empty directories under the path.
  selfupdate  Update the rclone binary.
  serve       Serve a remote over a protocol.
  settier     Changes storage class/tier of objects in remote.
  sha1sum     Produces an sha1sum file for all the objects in the path.
  size        Prints the total size and number of objects in remote:path.
  sync        Make source and dest identical, modifying destination only.
  test        Run a test command
  touch       Create new file or change file modification time.
  tree        List the contents of the remote in a tree like fashion.
  version     Show the version number.

Use &quot;rclone [command] --help&quot; for more information about a command.
Use &quot;rclone help flags&quot; for to see the global flags.
Use &quot;rclone help backends&quot; for a list of supported services.
</code></pre>
<h1 id="rclone-syncs-your-files-to-cloud-storage">Rclone syncs your
files to cloud storage</h1>
<!-- markdownlint-disable-next-line line-length -->
<p><img width="50%" src="https://rclone.org/img/logo_on_light__horizontal_color.svg" dark-src="/img/logo_on_dark__horizontal_color.svg" alt="rclone logo" style="float:right; padding: 5px;" class="hide-mobile" ></p>
<ul>
<li><a href="#about">About rclone</a></li>
<li><a href="#what">What can rclone do for you?</a></li>
<li><a href="#features">What features does rclone have?</a></li>
<li><a href="#providers">What providers does rclone support?</a></li>
<li><a href="https://rclone.org/downloads/">Download</a></li>
<li><a href="https://rclone.org/install/">Install</a></li>
<li><a href="https://rclone.org/donate/">Donate.</a></li>
</ul>
<h2 id="about">About rclone</h2>
<p>Rclone is a command-line program to manage files on cloud storage. It
is a feature-rich alternative to cloud vendors' web storage interfaces.
<a href="#providers">Over 70 cloud storage products</a> support rclone
including S3 object stores, business &amp; consumer file storage
services, as well as standard transfer protocols.</p>
<p>Rclone has powerful cloud equivalents to the unix commands rsync, cp,
mv, mount, ls, ncdu, tree, rm, and cat. Rclone's familiar syntax
includes shell pipeline support, and <code>--dry-run</code> protection.
It is used at the command line, in scripts or via its <a
href="/rc">API</a>.</p>
<p>Users call rclone <em>"The Swiss army knife of cloud storage"</em>,
and <em>"Technology indistinguishable from magic"</em>.</p>
<p>Rclone really looks after your data. It preserves timestamps and
verifies checksums at all times. Transfers over limited bandwidth;
intermittent connections, or subject to quota can be restarted, from the
last good file transferred. You can <a
href="https://rclone.org/commands/rclone_check/">check</a> the integrity
of your files. Where possible, rclone employs server-side transfers to
minimise local bandwidth use and transfers from one provider to another
without using local disk.</p>
<p>Virtual backends wrap local and cloud file systems to apply <a
href="https://rclone.org/crypt/">encryption</a>, <a
href="https://rclone.org/compress/">compression</a>, <a
href="https://rclone.org/chunker/">chunking</a>, <a
href="https://rclone.org/hasher/">hashing</a> and <a
href="https://rclone.org/union/">joining</a>.</p>
<p>Rclone <a href="https://rclone.org/commands/rclone_mount/">mounts</a>
any local, cloud or virtual filesystem as a disk on Windows, macOS,
linux and FreeBSD, and also serves these over <a
href="https://rclone.org/commands/rclone_serve_sftp/">SFTP</a>, <a
href="https://rclone.org/commands/rclone_serve_http/">HTTP</a>, <a
href="https://rclone.org/commands/rclone_serve_webdav/">WebDAV</a>, <a
href="https://rclone.org/commands/rclone_serve_ftp/">FTP</a> and <a
href="https://rclone.org/commands/rclone_serve_dlna/">DLNA</a>.</p>
<p>Rclone is mature, open-source software originally inspired by rsync
and written in <a href="https://golang.org">Go</a>. The friendly support
community is familiar with varied use cases. Official Ubuntu, Debian,
Fedora, Brew and Chocolatey repos. include rclone. For the latest
version <a href="https://rclone.org/downloads/">downloading from
rclone.org</a> is recommended.</p>
<p>Rclone is widely used on Linux, Windows and Mac. Third-party
developers create innovative backup, restore, GUI and business process
solutions using the rclone command line or API.</p>
<p>Rclone does the heavy lifting of communicating with cloud
storage.</p>
<h2 id="what">What can rclone do for you?</h2>
<p>Rclone helps you:</p>
<ul>
<li>Backup (and encrypt) files to cloud storage</li>
<li>Restore (and decrypt) files from cloud storage</li>
<li>Mirror cloud data to other cloud services or locally</li>
<li>Migrate data to the cloud, or between cloud storage vendors</li>
<li>Mount multiple, encrypted, cached or diverse cloud storage as a
disk</li>
<li>Analyse and account for data held on cloud storage using <a
href="https://rclone.org/commands/rclone_lsf/">lsf</a>, <a
href="https://rclone.org/commands/rclone_lsjson/">ljson</a>, <a
href="https://rclone.org/commands/rclone_size/">size</a>, <a
href="https://rclone.org/commands/rclone_ncdu/">ncdu</a></li>
<li><a href="https://rclone.org/union/">Union</a> file systems together
to present multiple local and/or cloud file systems as one</li>
</ul>
<h2 id="features">Features</h2>
<ul>
<li>Transfers
<ul>
<li>MD5, SHA1 hashes are checked at all times for file integrity</li>
<li>Timestamps are preserved on files</li>
<li>Operations can be restarted at any time</li>
<li>Can be to and from network, e.g. two different cloud providers</li>
<li>Can use multi-threaded downloads to local disk</li>
</ul></li>
<li><a href="https://rclone.org/commands/rclone_copy/">Copy</a> new or
changed files to cloud storage</li>
<li><a href="https://rclone.org/commands/rclone_sync/">Sync</a> (one
way) to make a directory identical</li>
<li><a href="https://rclone.org/bisync/">Bisync</a> (two way) to keep
two directories in sync bidirectionally</li>
<li><a href="https://rclone.org/commands/rclone_move/">Move</a> files to
cloud storage deleting the local after verification</li>
<li><a href="https://rclone.org/commands/rclone_check/">Check</a> hashes
and for missing/extra files</li>
<li><a href="https://rclone.org/commands/rclone_mount/">Mount</a> your
cloud storage as a network disk</li>
<li><a href="https://rclone.org/commands/rclone_serve/">Serve</a> local
or remote files over <a
href="https://rclone.org/commands/rclone_serve_http/">HTTP</a>/<a
href="https://rclone.org/commands/rclone_serve_webdav/">WebDav</a>/<a
href="https://rclone.org/commands/rclone_serve_ftp/">FTP</a>/<a
href="https://rclone.org/commands/rclone_serve_sftp/">SFTP</a>/<a
href="https://rclone.org/commands/rclone_serve_dlna/">DLNA</a></li>
<li>Experimental <a href="https://rclone.org/gui/">Web based
GUI</a></li>
</ul>
<h2 id="providers">Supported providers</h2>
<p>(There are many others, built on standard protocols such as WebDAV or
S3, that work out of the box.)</p>
<!-- markdownlint-capture -->
<!-- markdownlint-disable line-length no-bare-urls -->
<ul>
<li>1Fichier</li>
<li>Akamai Netstorage</li>
<li>Alibaba Cloud (Aliyun) Object Storage System (OSS)</li>
<li>Amazon S3</li>
<li>Autonomys Auto Drive</li>
<li>Bizfly Cloud Simple Storage</li>
<li>Backblaze B2</li>
<li>Box</li>
<li>Ceph</li>
<li>China Mobile Ecloud Elastic Object Storage (EOS)</li>
<li>Arvan Cloud Object Storage (AOS)</li>
<li>Citrix ShareFile</li>
<li>Clever Cloud Cellar</li>
<li>Cloudflare R2</li>
<li>Cloudinary</li>
<li>Cubbit DS3</li>
<li>DigitalOcean Spaces</li>
<li>Digi Storage</li>
<li>dosya.dev</li>
<li>Dreamhost</li>
<li>Drime</li>
<li>Dropbox</li>
<li>Enterprise File Fabric</li>
<li>Exaba</li>
<li>Fastly Object Storage</li>
<li>Fastmail Files</li>
<li>FileLu Cloud Storage</li>
<li>FileLu S5 (S3-Compatible Object Storage)</li>
<li>Filen</li>
<li>Files.com</li>
<li>FlashBlade</li>
<li>FTP</li>
<li>Gofile</li>
<li>Google Cloud Storage</li>
<li>Google Drive</li>
<li>Google Photos</li>
<li>HDFS</li>
<li>Hetzner Object Storage</li>
<li>Hetzner Storage Box</li>
<li>HiDrive</li>
<li>Hitachi Content Platform (HCP)</li>
<li>HTTP</li>
<li>Huawei Drive</li>
<li>Huawei OBS</li>
<li>iCloud Drive</li>
<li>ImageKit</li>
<li>Internet Archive</li>
<li>Internxt</li>
<li>Jottacloud</li>
<li>IBM COS S3</li>
<li>IDrive e2</li>
<li>Impossible Cloud</li>
<li>Infomaniak Swiss Backup (S3)</li>
<li>Infomaniak Swiss Backup (Swift)</li>
<li>Intercolo Object Storage</li>
<li>IONOS Cloud</li>
<li>kDrive</li>
<li>Koofr</li>
<li>Leviia Object Storage</li>
<li>Liara Object Storage</li>
<li>Linkbox</li>
<li>Linode Object Storage</li>
<li>Magalu</li>
<li>Mail.ru Cloud</li>
<li>Memset Memstore</li>
<li>MEGA</li>
<li>MEGA S4</li>
<li>Memory</li>
<li>Microsoft Azure Blob Storage</li>
<li>Microsoft Azure Files Storage</li>
<li>Microsoft OneDrive</li>
<li>Minio</li>
<li>Neon Object Storage</li>
<li>Nextcloud</li>
<li>Blomp Cloud Storage</li>
<li>OpenDrive</li>
<li>OpenStack Swift</li>
<li>Oracle Cloud Storage Swift</li>
<li>Oracle Object Storage</li>
<li>Outscale</li>
<li>OVHcloud Object Storage (Swift)</li>
<li>OVHcloud Object Storage (S3-compatible)</li>
<li>ownCloud</li>
<li>pCloud</li>
<li>Petabox</li>
<li>PikPak</li>
<li>Pixeldrain</li>
<li>premiumize.me</li>
<li>put.io</li>
<li>Proton Drive</li>
<li>QingStor</li>
<li>Qiniu Cloud Object Storage (Kodo)</li>
<li>Quatrix by Maytech</li>
<li>Rabata Cloud Storage</li>
<li>RackCorp Object Storage</li>
<li>Rackspace Cloud Files</li>
<li>Rclone Serve S3</li>
<li>RelAix.Storage</li>
<li>rsync.net</li>
<li>Scaleway</li>
<li>Scality (RING / ARTESCA)</li>
<li>Seafile</li>
<li>Seagate Lyve Cloud</li>
<li>SeaweedFS</li>
<li>Selectel</li>
<li>Servercore Object Storage</li>
<li>SFTP</li>
<li>Shade</li>
<li>Sia</li>
<li>SMB / CIFS</li>
<li>Spectra Logic</li>
<li>Storj</li>
<li>Synology</li>
<li>SugarSync</li>
<li>Tencent Cloud Object Storage (COS)</li>
<li>Uloz.to</li>
<li>US3</li>
<li>Wasabi</li>
<li>WebDAV</li>
<li>Yandex Disk</li>
<li>Zadara Object Storage</li>
<li>Zero Services (ZERO-Z3)</li>
<li>Zoho WorkDrive</li>
<li>Zata</li>
<li>The local filesystem</li>
</ul>
<!-- markdownlint-restore -->
<h2 id="virtual-providers">Virtual providers</h2>
<p>These backends adapt or modify other storage providers:</p>
<!-- markdownlint-capture -->
<!-- markdownlint-disable line-length no-bare-urls -->
<ul>
<li>Alias: Rename existing remotes</li>
<li>Archive: Read archive files</li>
<li>Cache: Cache remotes (DEPRECATED)</li>
<li>Chunker: Split large files</li>
<li>Combine: Combine multiple remotes into a directory tree</li>
<li>Compress: Compress files</li>
<li>Crypt: Encrypt files</li>
<li>Hasher: Hash files</li>
<li>Union: Join multiple remotes to work together</li>
</ul>
<!-- markdownlint-restore -->
<h2 id="links">Links</h2>
<ul>
<li><a href="https://rclone.org/">Home page</a></li>
<li><a href="https://github.com/rclone/rclone">GitHub project page for
source and bug tracker</a></li>
<li><a href="https://forum.rclone.org">Rclone Forum</a></li>
<li><a href="https://rclone.org/downloads/">Downloads</a></li>
</ul>
<h1 id="install">Install</h1>
<p>Rclone is a Go program and comes as a single binary file.</p>
<h2 id="quickstart">Quickstart</h2>
<ul>
<li><a href="https://rclone.org/downloads/">Download</a> the relevant
binary.</li>
<li>Extract the <code>rclone</code> executable, <code>rclone.exe</code>
on Windows, from the archive.</li>
<li>Run <code>rclone config</code> to setup. See <a
href="https://rclone.org/docs/">rclone config docs</a> for more
details.</li>
<li>Optionally configure <a href="#autostart">automatic
execution</a>.</li>
</ul>
<p>See below for some expanded Linux / macOS / Windows instructions.</p>
<p>See the <a href="https://rclone.org/docs/">usage</a> docs for how to
use rclone, or run <code>rclone -h</code>.</p>
<p>Already installed rclone can be easily updated to the latest version
using the <a
href="https://rclone.org/commands/rclone_selfupdate/">rclone
selfupdate</a> command.</p>
<p>See <a href="https://rclone.org/release_signing/">the release signing
docs</a> for how to verify signatures on the release.</p>
<h2 id="script-installation">Script installation</h2>
<p>To install rclone on Linux/macOS/BSD systems, run:</p>
<pre class="console"><code>sudo -v ; curl https://rclone.org/install.sh | sudo bash</code></pre>
<p>For beta installation, run:</p>
<pre class="console"><code>sudo -v ; curl https://rclone.org/install.sh | sudo bash -s beta</code></pre>
<p>Note that this script checks the version of rclone installed first
and won't re-download if not needed.</p>
<h2 id="linux">Linux installation</h2>
<h3 id="linux-precompiled">Precompiled binary</h3>
<p>Fetch and unpack</p>
<pre class="console"><code>curl -O https://downloads.rclone.org/rclone-current-linux-amd64.zip
unzip rclone-current-linux-amd64.zip
cd rclone-*-linux-amd64</code></pre>
<p>Copy binary file</p>
<pre class="console"><code>sudo cp rclone /usr/bin/
sudo chown root:root /usr/bin/rclone
sudo chmod 755 /usr/bin/rclone</code></pre>
<p>Install manpage</p>
<pre class="console"><code>sudo mkdir -p /usr/local/share/man/man1
sudo cp rclone.1 /usr/local/share/man/man1/
sudo mandb</code></pre>
<p>Run <code>rclone config</code> to setup. See <a
href="https://rclone.org/docs/">rclone config docs</a> for more
details.</p>
<pre class="console"><code>rclone config</code></pre>
<h2 id="macos">macOS installation</h2>
<h3 id="macos-brew">Installation with brew</h3>
<pre class="console"><code>brew install rclone</code></pre>
<p>NOTE: This version of rclone will not support <code>mount</code> any
more (see <a
href="https://github.com/rclone/rclone/issues/5373">#5373</a>). If
mounting is wanted on macOS, either install a precompiled binary or
enable the relevant option when <a href="#source">installing from
source</a>.</p>
<p>Note that this is a third party installer not controlled by the
rclone developers so it may be out of date. Its current version is as
below.</p>
<p><a href="https://repology.org/project/rclone/versions"><img
src="https://repology.org/badge/version-for-repo/homebrew/rclone.svg"
alt="Homebrew package" /></a></p>
<h3 id="macos-macports">Installation with MacPorts</h3>
<p>On macOS, rclone can also be installed via <a
href="https://www.macports.org">MacPorts</a>:</p>
<pre class="console"><code>sudo port install rclone</code></pre>
<p>Note that this is a third party installer not controlled by the
rclone developers so it may be out of date. Its current version is as
below.</p>
<p><a href="https://repology.org/project/rclone/versions"><img
src="https://repology.org/badge/version-for-repo/macports/rclone.svg"
alt="MacPorts port" /></a></p>
<p>More information on <a
href="https://ports.macports.org/port/rclone/">macports.org</a>.</p>
<h3 id="macos-precompiled">Precompiled binary, using curl</h3>
<p>To avoid problems with macOS gatekeeper enforcing the binary to be
signed and notarized it is enough to download with
<code>curl</code>.</p>
<p>Download the latest version of rclone.</p>
<pre class="console"><code>cd &amp;&amp; curl -O https://downloads.rclone.org/rclone-current-osx-amd64.zip</code></pre>
<p>Unzip the download and cd to the extracted folder.</p>
<pre class="console"><code>unzip -a rclone-current-osx-amd64.zip &amp;&amp; cd rclone-*-osx-amd64</code></pre>
<p>Move rclone to your $PATH. You will be prompted for your
password.</p>
<pre class="console"><code>sudo mkdir -p /usr/local/bin
sudo mv rclone /usr/local/bin/</code></pre>
<p>(the <code>mkdir</code> command is safe to run, even if the directory
already exists).</p>
<p>Remove the leftover files.</p>
<pre class="console"><code>cd .. &amp;&amp; rm -rf rclone-*-osx-amd64 rclone-current-osx-amd64.zip</code></pre>
<p>Run <code>rclone config</code> to setup. See <a
href="https://rclone.org/docs/">rclone config docs</a> for more
details.</p>
<pre class="console"><code>rclone config</code></pre>
<h3 id="macos-precompiled-web">Precompiled binary, using a web
browser</h3>
<p>When downloading a binary with a web browser, the browser will set
the macOS gatekeeper quarantine attribute. Starting from Catalina, when
attempting to run <code>rclone</code>, a pop-up will appear saying:</p>
<pre class="text"><code>&quot;rclone&quot; cannot be opened because the developer cannot be verified.
macOS cannot verify that this app is free from malware.</code></pre>
<p>The simplest fix is to run</p>
<pre class="console"><code>xattr -d com.apple.quarantine rclone</code></pre>
<h2 id="windows">Windows installation</h2>
<h3 id="windows-precompiled">Precompiled binary</h3>
<p>Fetch the correct binary for your processor type by clicking on these
links. If not sure, use the first link.</p>
<ul>
<li><a
href="https://downloads.rclone.org/rclone-current-windows-amd64.zip">Intel/AMD
- 64 Bit</a></li>
<li><a
href="https://downloads.rclone.org/rclone-current-windows-386.zip">Intel/AMD
- 32 Bit</a></li>
<li><a
href="https://downloads.rclone.org/rclone-current-windows-arm64.zip">ARM
- 64 Bit</a></li>
</ul>
<p>Open this file in the Explorer and extract <code>rclone.exe</code>.
Rclone is a portable executable so you can place it wherever is
convenient.</p>
<p>Open a CMD window (or powershell) and run the binary. Note that
rclone does not launch a GUI by default, it runs in the CMD Window.</p>
<ul>
<li>Run <code>rclone.exe config</code> to setup. See <a
href="https://rclone.org/docs/">rclone config docs</a> for more
details.</li>
<li>Optionally configure <a href="#autostart">automatic
execution</a>.</li>
</ul>
<p>If you are planning to use the <a
href="https://rclone.org/commands/rclone_mount/">rclone mount</a>
feature then you will need to install the third party utility <a
href="https://winfsp.dev/">WinFsp</a> also.</p>
<h3 id="windows-chocolatey">Windows package manager (Winget)</h3>
<p><a
href="https://learn.microsoft.com/en-us/windows/package-manager/">Winget</a>
comes pre-installed with the latest versions of Windows. If not, update
the <a href="https://www.microsoft.com/p/app-installer/9nblggh4nns1">App
Installer</a> package from the Microsoft store.</p>
<p>To install rclone</p>
<div class="sourceCode" id="cb17"><pre
class="sourceCode bat"><code class="sourceCode dosbat"><span id="cb17-1"><a href="#cb17-1" aria-hidden="true" tabindex="-1"></a>winget install Rclone.Rclone</span></code></pre></div>
<p>To uninstall rclone</p>
<div class="sourceCode" id="cb18"><pre
class="sourceCode bat"><code class="sourceCode dosbat"><span id="cb18-1"><a href="#cb18-1" aria-hidden="true" tabindex="-1"></a>winget uninstall Rclone.Rclone -<span class="at">-force</span></span></code></pre></div>
<h3 id="windows-chocolatey">Chocolatey package manager</h3>
<p>Make sure you have <a href="https://chocolatey.org/">Choco</a>
installed</p>
<div class="sourceCode" id="cb19"><pre
class="sourceCode bat"><code class="sourceCode dosbat"><span id="cb19-1"><a href="#cb19-1" aria-hidden="true" tabindex="-1"></a>choco search rclone</span>
<span id="cb19-2"><a href="#cb19-2" aria-hidden="true" tabindex="-1"></a>choco install rclone</span></code></pre></div>
<p>This will install rclone on your Windows machine. If you are planning
to use <a href="https://rclone.org/commands/rclone_mount/">rclone
mount</a> then</p>
<div class="sourceCode" id="cb20"><pre
class="sourceCode bat"><code class="sourceCode dosbat"><span id="cb20-1"><a href="#cb20-1" aria-hidden="true" tabindex="-1"></a>choco install winfsp</span></code></pre></div>
<p>will install that too.</p>
<p>Note that this is a third party installer not controlled by the
rclone developers so it may be out of date. Its current version is as
below.</p>
<p><a href="https://repology.org/project/rclone/versions"><img
src="https://repology.org/badge/version-for-repo/chocolatey/rclone.svg"
alt="Chocolatey package" /></a></p>
<h3 id="windows-scoop">Scoop package manager</h3>
<p>Make sure you have <a href="https://scoop.sh/">Scoop</a>
installed</p>
<div class="sourceCode" id="cb21"><pre
class="sourceCode bat"><code class="sourceCode dosbat"><span id="cb21-1"><a href="#cb21-1" aria-hidden="true" tabindex="-1"></a>scoop install rclone</span></code></pre></div>
<p>Note that this is a third party installer not controlled by the
rclone developers so it may be out of date. Its current version is as
below.</p>
<p><a href="https://repology.org/project/rclone/versions"><img
src="https://repology.org/badge/version-for-repo/scoop/rclone.svg"
alt="Scoop package" /></a></p>
<h2 id="package-manager">Package manager installation</h2>
<p>Many Linux, Windows, macOS and other OS distributions package and
distribute rclone.</p>
<p>The distributed versions of rclone are often quite out of date and
for this reason we recommend one of the other installation methods if
possible.</p>
<p>You can get an idea of how up to date or not your OS distribution's
package is here.</p>
<p><a href="https://repology.org/project/rclone/versions"><img
src="https://repology.org/badge/vertical-allrepos/rclone.svg?columns=3"
alt="Packaging status" /></a></p>
<h2 id="docker">Docker installation</h2>
<p>The rclone developers maintain a <a
href="https://hub.docker.com/r/rclone/rclone">docker image for
rclone</a>.</p>
<p>These images are built as part of the release process based on a
minimal Alpine Linux.</p>
<p>The <code>:latest</code> tag will always point to the latest stable
release. You can use the <code>:beta</code> tag to get the latest build
from master. You can also use version tags, e.g. <code>:1.49.1</code>,
<code>:1.49</code> or <code>:1</code>.</p>
<pre class="console"><code>$ docker pull rclone/rclone:latest
latest: Pulling from rclone/rclone
Digest: sha256:0e0ced72671989bb837fea8e88578b3fc48371aa45d209663683e24cfdaa0e11
...
$ docker run --rm rclone/rclone:latest version
rclone v1.49.1
- os/arch: linux/amd64
- go version: go1.12.9</code></pre>
<p>There are a few command line options to consider when starting an
rclone Docker container from the rclone image.</p>
<ul>
<li><p>You need to mount the host rclone config dir at
<code>/config/rclone</code> into the Docker container. Due to the fact
that rclone updates tokens inside its config file, and that the update
process involves a file rename, you need to mount the whole host rclone
config dir, not just the single host rclone config file.</p></li>
<li><p>You need to mount a host data dir at <code>/data</code> into the
Docker container.</p></li>
<li><p>By default, the rclone binary inside a Docker container runs with
UID=0 (root). As a result, all files created in a run will have UID=0.
If your config and data files reside on the host with a non-root
UID:GID, you need to pass these on the container start command
line.</p></li>
<li><p>If you want to access the RC interface (either via the API or the
Web UI), it is required to set the <code>--rc-addr</code> to
<code>:5572</code> in order to connect to it from outside the container.
An explanation about why this is necessary can be found in an old <a
href="https://web.archive.org/web/20200808071950/https://pythonspeed.com/articles/docker-connection-refused/">pythonspeed.com</a>
article.</p>
<ul>
<li>NOTE: Users running this container with the docker network set to
<code>host</code> should probably set it to listen to localhost only,
with <code>127.0.0.1:5572</code> as the value for
<code>--rc-addr</code></li>
</ul></li>
<li><p>It is possible to use <code>rclone mount</code> inside a
userspace Docker container, and expose the resulting fuse mount to the
host. The exact <code>docker run</code> options to do that might vary
slightly between hosts. See, e.g. the discussion in this <a
href="https://github.com/moby/moby/issues/9448">thread</a>.</p>
<p>You also need to mount the host <code>/etc/passwd</code> and
<code>/etc/group</code> for fuse to work inside the container.</p></li>
</ul>
<p>Here are some commands tested on an Ubuntu 18.04.3 host:</p>
<div class="sourceCode" id="cb23"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb23-1"><a href="#cb23-1" aria-hidden="true" tabindex="-1"></a><span class="co"># config on host at ~/.config/rclone/rclone.conf</span></span>
<span id="cb23-2"><a href="#cb23-2" aria-hidden="true" tabindex="-1"></a><span class="co"># data on host at ~/data</span></span>
<span id="cb23-3"><a href="#cb23-3" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb23-4"><a href="#cb23-4" aria-hidden="true" tabindex="-1"></a><span class="co"># add a remote interactively</span></span>
<span id="cb23-5"><a href="#cb23-5" aria-hidden="true" tabindex="-1"></a><span class="ex">docker</span> run <span class="at">--rm</span> <span class="at">-it</span> <span class="dt">\</span></span>
<span id="cb23-6"><a href="#cb23-6" aria-hidden="true" tabindex="-1"></a>    <span class="at">--volume</span> ~/.config/rclone:/config/rclone <span class="dt">\</span></span>
<span id="cb23-7"><a href="#cb23-7" aria-hidden="true" tabindex="-1"></a>    <span class="at">--user</span> <span class="va">$(</span><span class="fu">id</span> <span class="at">-u</span><span class="va">)</span>:<span class="va">$(</span><span class="fu">id</span> <span class="at">-g</span><span class="va">)</span> <span class="dt">\</span></span>
<span id="cb23-8"><a href="#cb23-8" aria-hidden="true" tabindex="-1"></a>    rclone/rclone <span class="dt">\</span></span>
<span id="cb23-9"><a href="#cb23-9" aria-hidden="true" tabindex="-1"></a>    config</span>
<span id="cb23-10"><a href="#cb23-10" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb23-11"><a href="#cb23-11" aria-hidden="true" tabindex="-1"></a><span class="co"># make sure the config is ok by listing the remotes</span></span>
<span id="cb23-12"><a href="#cb23-12" aria-hidden="true" tabindex="-1"></a><span class="ex">docker</span> run <span class="at">--rm</span> <span class="dt">\</span></span>
<span id="cb23-13"><a href="#cb23-13" aria-hidden="true" tabindex="-1"></a>    <span class="at">--volume</span> ~/.config/rclone:/config/rclone <span class="dt">\</span></span>
<span id="cb23-14"><a href="#cb23-14" aria-hidden="true" tabindex="-1"></a>    <span class="at">--user</span> <span class="va">$(</span><span class="fu">id</span> <span class="at">-u</span><span class="va">)</span>:<span class="va">$(</span><span class="fu">id</span> <span class="at">-g</span><span class="va">)</span> <span class="dt">\</span></span>
<span id="cb23-15"><a href="#cb23-15" aria-hidden="true" tabindex="-1"></a>    rclone/rclone <span class="dt">\</span></span>
<span id="cb23-16"><a href="#cb23-16" aria-hidden="true" tabindex="-1"></a>    listremotes</span>
<span id="cb23-17"><a href="#cb23-17" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb23-18"><a href="#cb23-18" aria-hidden="true" tabindex="-1"></a><span class="co"># perform mount inside Docker container, expose result to host</span></span>
<span id="cb23-19"><a href="#cb23-19" aria-hidden="true" tabindex="-1"></a><span class="fu">mkdir</span> <span class="at">-p</span> ~/data/mount</span>
<span id="cb23-20"><a href="#cb23-20" aria-hidden="true" tabindex="-1"></a><span class="ex">docker</span> run <span class="at">--rm</span> <span class="dt">\</span></span>
<span id="cb23-21"><a href="#cb23-21" aria-hidden="true" tabindex="-1"></a>    <span class="at">--volume</span> ~/.config/rclone:/config/rclone <span class="dt">\</span></span>
<span id="cb23-22"><a href="#cb23-22" aria-hidden="true" tabindex="-1"></a>    <span class="at">--volume</span> ~/data:/data:shared <span class="dt">\</span></span>
<span id="cb23-23"><a href="#cb23-23" aria-hidden="true" tabindex="-1"></a>    <span class="at">--user</span> <span class="va">$(</span><span class="fu">id</span> <span class="at">-u</span><span class="va">)</span>:<span class="va">$(</span><span class="fu">id</span> <span class="at">-g</span><span class="va">)</span> <span class="dt">\</span></span>
<span id="cb23-24"><a href="#cb23-24" aria-hidden="true" tabindex="-1"></a>    <span class="at">--volume</span> /etc/passwd:/etc/passwd:ro <span class="at">--volume</span> /etc/group:/etc/group:ro <span class="dt">\</span></span>
<span id="cb23-25"><a href="#cb23-25" aria-hidden="true" tabindex="-1"></a>    <span class="at">--device</span> /dev/fuse <span class="at">--cap-add</span> SYS_ADMIN <span class="at">--security-opt</span> apparmor:unconfined <span class="dt">\</span></span>
<span id="cb23-26"><a href="#cb23-26" aria-hidden="true" tabindex="-1"></a>    rclone/rclone <span class="dt">\</span></span>
<span id="cb23-27"><a href="#cb23-27" aria-hidden="true" tabindex="-1"></a>    mount dropbox:Photos /data/mount <span class="kw">&amp;</span></span>
<span id="cb23-28"><a href="#cb23-28" aria-hidden="true" tabindex="-1"></a><span class="fu">ls</span> ~/data/mount</span>
<span id="cb23-29"><a href="#cb23-29" aria-hidden="true" tabindex="-1"></a><span class="bu">kill</span> %1</span></code></pre></div>
<h2 id="snap">Snap installation</h2>
<p><a href="https://snapcraft.io/rclone"><img
src="https://snapcraft.io/static/images/badges/en/snap-store-black.svg"
alt="Get it from the Snap Store" /></a></p>
<p>Make sure you have <a
href="https://snapcraft.io/docs/installing-snapd">Snapd
installed</a></p>
<pre class="console"><code>sudo snap install rclone</code></pre>
<p>Due to the strict confinement of Snap, rclone snap cannot access real
<code>/home/$USER/.config/rclone</code> directory, default config path
is as below.</p>
<ul>
<li>Default config directory:
<ul>
<li>/home/$USER/snap/rclone/current/.config/rclone</li>
</ul></li>
</ul>
<p>Note: Due to the strict confinement of Snap,
<code>rclone mount</code> feature is <code>not</code> supported.</p>
<p>If mounting is wanted, either install a precompiled binary or enable
the relevant option when <a href="#source">installing from
source</a>.</p>
<p>Note that this is controlled by <a
href="https://github.com/boukendesho/rclone-snap">community
maintainer</a> not the rclone developers so it may be out of date. Its
current version is as below.</p>
<p><a href="https://snapcraft.io/rclone"><img
src="https://snapcraft.io/rclone/badge.svg" alt="rclone" /></a></p>
<h2 id="source">Source installation</h2>
<p>Make sure you have git and <a href="https://golang.org/">Go</a>
installed. Go version 1.26 or newer is required, the latest release is
recommended. You can get it from your package manager, or download it
from <a href="https://golang.org/dl/">golang.org/dl</a>. Then you can
run the following:</p>
<pre class="console"><code>git clone https://github.com/rclone/rclone.git
cd rclone
go build</code></pre>
<p>This will check out the rclone source in subfolder rclone, which you
can later modify and send pull requests with. Then it will build the
rclone executable in the same folder. As an initial check you can now
run <code>./rclone version</code> (<code>.\rclone version</code> on
Windows).</p>
<p>Note that on macOS and Windows the <a
href="https://rclone.org/commands/rclone_mount/">mount</a> command will
not be available unless you specify an additional build tag
<code>cmount</code>.</p>
<pre class="console"><code>go build -tags cmount</code></pre>
<p>This assumes you have a GCC compatible C compiler (GCC or Clang) in
your PATH, as it uses <a href="https://pkg.go.dev/cmd/cgo">cgo</a>. But
on Windows, the <a href="https://github.com/winfsp/cgofuse">cgofuse</a>
library that the cmount implementation is based on, also supports
building <a href="https://github.com/golang/go/wiki/WindowsDLLs">without
cgo</a>, i.e. by setting environment variable CGO_ENABLED to value 0
(static linking). This is how the official Windows release of rclone is
being built, starting with version 1.59. It is still possible to build
with cgo on Windows as well, by using the MinGW port of GCC, e.g. by
installing it in a <a href="https://www.msys2.org">MSYS2</a>
distribution (make sure you install it in the classic mingw64 subsystem,
the ucrt64 version is not compatible).</p>
<p>Additionally, to build with mount on Windows, you must install the
third party utility <a href="https://winfsp.dev/">WinFsp</a>, with the
"Developer" feature selected. If building with cgo, you must also set
environment variable CPATH pointing to the fuse include directory within
the WinFsp installation (normally
<code>C:\Program Files (x86)\WinFsp\inc\fuse</code>).</p>
<p>You may add arguments <code>-ldflags -s</code> to omit symbol table
and debug information, making the executable file smaller, and
<code>-trimpath</code> to remove references to local file system paths.
The official rclone releases are built with both of these.</p>
<pre class="console"><code>go build -trimpath -ldflags -s -tags cmount</code></pre>
<p>If you want to customize the version string, as reported by the
<code>rclone version</code> command, you can set one of the variables
<code>fs.Version</code>, <code>fs.VersionTag</code> (to keep default
suffix but customize the number), or <code>fs.VersionSuffix</code> (to
keep default number but customize the suffix). This can be done from the
build command, by adding to the <code>-ldflags</code> argument value as
shown below.</p>
<pre class="console"><code>go build -trimpath -ldflags &quot;-s -X github.com/rclone/rclone/fs.Version=v9.9.9-test&quot; -tags cmount</code></pre>
<p>On Windows, the official executables also have the version
information, as well as a file icon, embedded as binary resources. To
get that with your own build you need to run the following command
<strong>before</strong> the build command. It generates a Windows
resource system object file, with extension .syso, e.g.
<code>resource_windows_amd64.syso</code>, that will be automatically
picked up by future build commands.</p>
<pre class="console"><code>go run bin/resource_windows.go</code></pre>
<p>The above command will generate a resource file containing version
information based on the fs.Version variable in source at the time you
run the command, which means if the value of this variable changes you
need to re-run the command for it to be reflected in the version
information. Also, if you override this version variable in the build
command as described above, you need to do that also when generating the
resource file, or else it will still use the value from the source.</p>
<pre class="console"><code>go run bin/resource_windows.go -version v9.9.9-test</code></pre>
<p>Instead of executing the <code>go build</code> command directly, you
can run it via the Makefile. The default target changes the version
suffix from "-DEV" to "-beta" followed by additional commit details,
embeds version information binary resources on Windows, and copies the
resulting rclone executable into your GOPATH bin folder
(<code>$(go env GOPATH)/bin</code>, which corresponds to
<code>~/go/bin/rclone</code> by default).</p>
<pre class="console"><code>make</code></pre>
<p>To include mount command on macOS and Windows with Makefile
build:</p>
<pre class="console"><code>make GOTAGS=cmount</code></pre>
<p>There are other make targets that can be used for more advanced
builds, such as cross-compiling for all supported os/architectures, and
packaging results into release artifacts. See <a
href="https://github.com/rclone/rclone/blob/master/Makefile">Makefile</a>
and <a
href="https://github.com/rclone/rclone/blob/master/bin/cross-compile.go">cross-compile.go</a>
for details.</p>
<p>Another alternative method for source installation is to download the
source, build and install rclone - all in one operation, as a regular Go
package. The source will be stored it in the Go module cache, and the
resulting executable will be in your GOPATH bin folder
(<code>$(go env GOPATH)/bin</code>, which corresponds to
<code>~/go/bin/rclone</code> by default).</p>
<pre class="console"><code>go install github.com/rclone/rclone@latest</code></pre>
<p>In some situations, rclone executable size might be too big for
deployment in very restricted environments when all backends with large
SDKs are included. To limit binary size unused backends can be commented
out in <code>backends/all/all.go</code> and unused commands in
<code>cmd/all/all.go</code> before building with <code>go build</code>
or <code>make</code></p>
<h2 id="ansible">Ansible installation</h2>
<p>This can be done with <a
href="https://github.com/stefangweichinger/ansible-rclone">Stefan
Weichinger's ansible role</a>.</p>
<p>Instructions</p>
<ol type="1">
<li><p><code>git clone https://github.com/stefangweichinger/ansible-rclone.git</code>
into your local roles-directory</p></li>
<li><p>add the role to the hosts you want rclone installed to:</p>
<div class="sourceCode" id="cb34"><pre
class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb34-1"><a href="#cb34-1" aria-hidden="true" tabindex="-1"></a><span class="kw">-</span><span class="at"> </span><span class="fu">hosts</span><span class="kw">:</span><span class="at"> rclone-hosts</span></span>
<span id="cb34-2"><a href="#cb34-2" aria-hidden="true" tabindex="-1"></a><span class="at">  </span><span class="fu">roles</span><span class="kw">:</span></span>
<span id="cb34-3"><a href="#cb34-3" aria-hidden="true" tabindex="-1"></a><span class="at">    </span><span class="kw">-</span><span class="at"> rclone</span></span></code></pre></div></li>
</ol>
<h2 id="portable">Portable installation</h2>
<p>As mentioned <a
href="https://rclone.org/install/#quickstart">above</a>, rclone is
single executable (<code>rclone</code>, or <code>rclone.exe</code> on
Windows) that you can download as a zip archive and extract into a
location of your choosing. When executing different commands, it may
create files in different locations, such as a configuration file and
various temporary files. By default the locations for these are
according to your operating system, e.g. configuration file in your user
profile directory and temporary files in the standard temporary
directory, but you can customize all of them, e.g. to make a completely
self-contained, portable installation.</p>
<p>Run the <a
href="https://rclone.org/commands/rclone_config_paths/">config paths</a>
command to see the locations that rclone will use.</p>
<p>To override them set the corresponding options (as command-line
arguments, or as <a
href="https://rclone.org/docs/#environment-variables">environment
variables</a>):</p>
<ul>
<li><a href="https://rclone.org/docs/#config-string">--config</a></li>
<li><a
href="https://rclone.org/docs/#cache-dir-string">--cache-dir</a></li>
<li><a
href="https://rclone.org/docs/#temp-dir-string">--temp-dir</a></li>
</ul>
<h2 id="autostart">Autostart</h2>
<p>After installing and configuring rclone, as described above, you are
ready to use rclone as an interactive command line utility. If your goal
is to perform <em>periodic</em> operations, such as a regular <a
href="https://rclone.org/commands/rclone_sync/">sync</a>, you will
probably want to configure your rclone command in your operating
system's scheduler. If you need to expose <em>service</em>-like
features, such as <a href="https://rclone.org/rc/">remote control</a>,
<a href="https://rclone.org/gui/">GUI</a>, <a
href="https://rclone.org/commands/rclone_serve/">serve</a> or <a
href="https://rclone.org/commands/rclone_mount/">mount</a>, you will
often want an rclone command always running in the background, and
configuring it to run in a service infrastructure may be a better
option. Below are some alternatives on how to achieve this on different
operating systems.</p>
<p>NOTE: Before setting up autorun it is highly recommended that you
have tested your command manually from a Command Prompt first.</p>
<h3 id="autostart-on-windows">Autostart on Windows</h3>
<p>The most relevant alternatives for autostart on Windows are:</p>
<ul>
<li>Run at user log on using the Startup folder</li>
<li>Run at user log on, at system startup or at schedule using Task
Scheduler</li>
<li>Run at system startup using Windows service</li>
</ul>
<h4 id="running-in-background">Running in background</h4>
<p>Rclone is a console application, so if not starting from an existing
Command Prompt, e.g. when starting rclone.exe from a shortcut, it will
open a Command Prompt window. When configuring rclone to run from task
scheduler and windows service you are able to set it to run hidden in
background. From rclone version 1.54 you can also make it run hidden
from anywhere by adding option <code>--no-console</code> (it may still
flash briefly when the program starts). Since rclone normally writes
information and any error messages to the console, you must redirect
this to a file to be able to see it. Rclone has a built-in option
<code>--log-file</code> for that.</p>
<p>Example command to run a sync in background:</p>
<div class="sourceCode" id="cb35"><pre
class="sourceCode bat"><code class="sourceCode dosbat"><span id="cb35-1"><a href="#cb35-1" aria-hidden="true" tabindex="-1"></a>c:\rclone\rclone.exe sync c:\files remote:<span class="at">/files</span> -<span class="at">-no-console</span> -<span class="at">-log-file</span> c:\rclone\logs\sync_files.txt</span></code></pre></div>
<h4 id="user-account">User account</h4>
<p>As mentioned in the <a
href="https://rclone.org/commands/rclone_mount/">mount</a>
documentation, mounted drives created as Administrator are not visible
to other accounts, not even the account that was elevated as
Administrator. By running the mount command as the built-in
<code>SYSTEM</code> user account, it will create drives accessible for
everyone on the system. Both scheduled task and Windows service can be
used to achieve this.</p>
<p>NOTE: Remember that when rclone runs as the <code>SYSTEM</code> user,
the user profile that it sees will not be yours. This means that if you
normally run rclone with configuration file in the default location, to
be able to use the same configuration when running as the system user
you must explicitly tell rclone where to find it with the <a
href="https://rclone.org/docs/#config-string"><code>--config</code></a>
option, or else it will look in the system users profile path
(<code>C:\Windows\System32\config\systemprofile</code>). To test your
command manually from a Command Prompt, you can run it with the <a
href="https://docs.microsoft.com/en-us/sysinternals/downloads/psexec">PsExec</a>
utility from Microsoft's Sysinternals suite, which takes option
<code>-s</code> to execute commands as the <code>SYSTEM</code> user.</p>
<h4 id="start-from-startup-folder">Start from Startup folder</h4>
<p>To quickly execute an rclone command you can simply create a standard
Windows Explorer shortcut for the complete rclone command you want to
run. If you store this shortcut in the special "Startup" start-menu
folder, Windows will automatically run it at login. To open this folder
in Windows Explorer, enter path
<code>%APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup</code>, or
<code>C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp</code>
if you want the command to start for <em>every</em> user that logs
in.</p>
<p>This is the easiest approach to autostarting of rclone, but it offers
no functionality to set it to run as different user, or to set
conditions or actions on certain events. Setting up a scheduled task as
described below will often give you better results.</p>
<h4 id="start-from-task-scheduler">Start from Task Scheduler</h4>
<p>Task Scheduler is an administrative tool built into Windows, and it
can be used to configure rclone to be started automatically in a highly
configurable way, e.g. periodically on a schedule, on user log on, or at
system startup. It can run be configured to run as the current user, or
for a mount command that needs to be available to all users it can run
as the <code>SYSTEM</code> user. For technical information, see <a
href="https://docs.microsoft.com/windows/win32/taskschd/task-scheduler-start-page">Task
Scheduler for developers</a>.</p>
<h4 id="run-as-service">Run as service</h4>
<p>For running rclone at system startup, you can create a Windows
service that executes your rclone command, as an alternative to
scheduled task configured to run at startup.</p>
<h5 id="mount-command-built-in-service-integration">Mount command
built-in service integration</h5>
<p>For mount commands, rclone has a built-in Windows service integration
via the third-party WinFsp library it uses. Registering as a regular
Windows service easy, as you just have to execute the built-in
PowerShell command <code>New-Service</code> (requires administrative
privileges).</p>
<p>Example of a PowerShell command that creates a Windows service for
mounting some <code>remote:/files</code> as drive letter
<code>X:</code>, for <em>all</em> users (service will be running as the
local system account):</p>
<div class="sourceCode" id="cb36"><pre
class="sourceCode powershell"><code class="sourceCode powershell"><span id="cb36-1"><a href="#cb36-1" aria-hidden="true" tabindex="-1"></a><span class="fu">New-Service</span> <span class="op">-</span>Name Rclone <span class="op">-</span>BinaryPathName <span class="st">&#39;c:\rclone\rclone.exe mount remote:/files X: --config c:\rclone\config\rclone.conf --log-file c:\rclone\logs\mount.txt&#39;</span></span></code></pre></div>
<p>The <a
href="https://github.com/billziss-gh/winfsp/wiki/WinFsp-Service-Architecture">WinFsp
service infrastructure</a> supports incorporating services for file
system implementations, such as rclone, into its own launcher service,
as kind of "child services". This has the additional advantage that it
also implements a network provider that integrates into Windows standard
methods for managing network drives. This is currently not officially
supported by Rclone, but with WinFsp version 2019.3 B2 / v1.5B2 or later
it should be possible through path rewriting as described in <a
href="https://github.com/rclone/rclone/issues/3340">#3340</a>.</p>
<h5 id="third-party-service-integration">Third-party service
integration</h5>
<p>To Windows service running any rclone command, the excellent
third-party utility <a href="http://nssm.cc">NSSM</a>, the "Non-Sucking
Service Manager", can be used. It includes some advanced features such
as adjusting process priority, defining process environment variables,
redirect to file anything written to stdout, and customized response to
different exit codes, with a GUI to configure everything from (although
it can also be used from command line ).</p>
<p>There are also several other alternatives. To mention one more, <a
href="https://github.com/winsw/winsw">WinSW</a>, "Windows Service
Wrapper", is worth checking out. It requires .NET Framework, but it is
preinstalled on newer versions of Windows, and it also provides
alternative standalone distributions which includes necessary runtime
(.NET 5). WinSW is a command-line only utility, where you have to
manually create an XML file with service configuration. This may be a
drawback for some, but it can also be an advantage as it is easy to back
up and reuse the configuration settings, without having go through
manual steps in a GUI. One thing to note is that by default it does not
restart the service on error, one have to explicit enable this in the
configuration file (via the "onfailure" parameter).</p>
<h3 id="autostart-on-linux">Autostart on Linux</h3>
<h4 id="start-as-a-service">Start as a service</h4>
<p>To always run rclone in background, relevant for mount commands etc,
you can use systemd to set up rclone as a system or user service.
Running as a system service ensures that it is run at startup even if
the user it is running as has no active session. Running rclone as a
user service ensures that it only starts after the configured user has
logged into the system.</p>
<h4 id="run-periodically-from-cron">Run periodically from cron</h4>
<p>To run a periodic command, such as a copy/sync, you can set up a cron
job.</p>
<h1 id="usage">Usage</h1>
<p>Rclone is a command line program to manage files on cloud storage.
After <a href="https://rclone.org/downloads/">download</a> and <a
href="/install">install</a>, continue here to learn how to use it:
Initial <a href="#configure">configuration</a>, what the <a
href="#basic-syntax">basic syntax</a> looks like, describes the various
<a href="#subcommands">subcommands</a>, the various <a
href="#options">options</a>, and more.</p>
<h2 id="configure">Configure</h2>
<p>First, you'll need to configure rclone. As the object storage systems
have quite complicated authentication these are kept in a config file.
(See the <a href="#config-string"><code>--config</code></a> entry for
how to find the config file and choose its location.)</p>
<p>The easiest way to make the config is to run rclone with the config
option:</p>
<pre class="console"><code>rclone config</code></pre>
<p>See the following for detailed instructions for</p>
<ul>
<li><a href="https://rclone.org/fichier/">1Fichier</a></li>
<li><a href="https://rclone.org/netstorage/">Akamai Netstorage</a></li>
<li><a href="https://rclone.org/alias/">Alias</a></li>
<li><a href="https://rclone.org/archive/">Archive</a></li>
<li><a href="https://rclone.org/s3/">Amazon S3</a></li>
<li><a href="https://rclone.org/b2/">Backblaze B2</a></li>
<li><a href="https://rclone.org/box/">Box</a></li>
<li><a href="https://rclone.org/chunker/">Chunker</a> - transparently
splits large files for other remotes</li>
<li><a href="https://rclone.org/sharefile/">Citrix ShareFile</a></li>
<li><a href="https://rclone.org/compress/">Compress</a></li>
<li><a href="https://rclone.org/cloudinary/">Cloudinary</a></li>
<li><a href="https://rclone.org/combine/">Combine</a></li>
<li><a href="https://rclone.org/crypt/">Crypt</a> - to encrypt other
remotes</li>
<li><a href="https://rclone.org/s3/#digitalocean-spaces">DigitalOcean
Spaces</a></li>
<li><a href="https://rclone.org/koofr/#digi-storage">Digi
Storage</a></li>
<li><a href="https://rclone.org/dosya/">dosya.dev</a></li>
<li><a href="https://rclone.org/drime/">Drime</a></li>
<li><a href="https://rclone.org/dropbox/">Dropbox</a></li>
<li><a href="https://rclone.org/filefabric/">Enterprise File
Fabric</a></li>
<li><a href="https://rclone.org/filelu/">FileLu Cloud Storage</a></li>
<li><a href="https://rclone.org/filen/">Filen</a></li>
<li><a href="https://rclone.org/filescom/">Files.com</a></li>
<li><a href="https://rclone.org/ftp/">FTP</a></li>
<li><a href="https://rclone.org/gofile/">Gofile</a></li>
<li><a href="https://rclone.org/googlecloudstorage/">Google Cloud
Storage</a></li>
<li><a href="https://rclone.org/drive/">Google Drive</a></li>
<li><a href="https://rclone.org/googlephotos/">Google Photos</a></li>
<li><a href="https://rclone.org/hasher/">Hasher</a> - to handle
checksums for other remotes</li>
<li><a href="https://rclone.org/hdfs/">HDFS</a></li>
<li><a href="https://rclone.org/sftp/#hetzner-storage-box">Hetzner
Storage Box</a></li>
<li><a href="https://rclone.org/hidrive/">HiDrive</a></li>
<li><a href="https://rclone.org/http/">HTTP</a></li>
<li><a href="https://rclone.org/huaweidrive/">Huawei Drive</a></li>
<li><a href="https://rclone.org/iclouddrive/">iCloud Drive</a></li>
<li><a href="https://rclone.org/internetarchive/">Internet
Archive</a></li>
<li><a href="https://rclone.org/internxt/">Internxt</a></li>
<li><a href="https://rclone.org/jottacloud/">Jottacloud</a></li>
<li><a href="https://rclone.org/kdrive/">kDrive</a></li>
<li><a href="https://rclone.org/koofr/">Koofr</a></li>
<li><a href="https://rclone.org/linkbox/">Linkbox</a></li>
<li><a href="https://rclone.org/mailru/">Mail.ru Cloud</a></li>
<li><a href="https://rclone.org/mega/">Mega</a></li>
<li><a href="https://rclone.org/memory/">Memory</a></li>
<li><a href="https://rclone.org/azureblob/">Microsoft Azure Blob
Storage</a></li>
<li><a href="https://rclone.org/azurefiles/">Microsoft Azure Files
Storage</a></li>
<li><a href="https://rclone.org/onedrive/">Microsoft OneDrive</a></li>
<li><a href="https://rclone.org/swift/">OpenStack Swift / Rackspace
Cloudfiles / Blomp Cloud Storage / Memset Memstore</a></li>
<li><a href="https://rclone.org/opendrive/">OpenDrive</a></li>
<li><a href="https://rclone.org/oracleobjectstorage/">Oracle Object
Storage</a></li>
<li><a href="https://rclone.org/pcloud/">Pcloud</a></li>
<li><a href="https://rclone.org/pikpak/">PikPak</a></li>
<li><a href="https://rclone.org/pixeldrain/">Pixeldrain</a></li>
<li><a href="https://rclone.org/premiumizeme/">premiumize.me</a></li>
<li><a href="https://rclone.org/putio/">put.io</a></li>
<li><a href="https://rclone.org/protondrive/">Proton Drive</a></li>
<li><a href="https://rclone.org/qingstor/">QingStor</a></li>
<li><a href="https://rclone.org/quatrix/">Quatrix by Maytech</a></li>
<li><a href="https://rclone.org/sftp/#rsync-net">rsync.net</a></li>
<li><a href="https://rclone.org/seafile/">Seafile</a></li>
<li><a href="https://rclone.org/sftp/">SFTP</a></li>
<li><a href="https://rclone.org/shade/">Shade</a></li>
<li><a href="https://rclone.org/sia/">Sia</a></li>
<li><a href="https://rclone.org/smb/">SMB</a></li>
<li><a href="https://rclone.org/storj/">Storj</a></li>
<li><a href="https://rclone.org/sugarsync/">SugarSync</a></li>
<li><a href="https://rclone.org/union/">Union</a></li>
<li><a href="https://rclone.org/ulozto/">Uloz.to</a></li>
<li><a href="https://rclone.org/webdav/">WebDAV</a></li>
<li><a href="https://rclone.org/yandex/">Yandex Disk</a></li>
<li><a href="https://rclone.org/zoho/">Zoho WorkDrive</a></li>
<li><a href="https://rclone.org/local/">The local filesystem</a></li>
</ul>
<h2 id="basic-syntax">Basic syntax</h2>
<p>Rclone syncs a directory tree from one storage system to another.</p>
<p>Its syntax is like this</p>
<pre class="console"><code>rclone subcommand [options] &lt;parameters&gt; &lt;parameters...&gt;</code></pre>
<p>A <code>subcommand</code> is an rclone operation required (e.g.
<code>sync</code>, <code>copy</code>, <code>ls</code>).</p>
<p>An <code>option</code> is a single letter flag (e.g. <code>-v</code>)
or a group of single letter flags (e.g. <code>-Pv</code>) or a long flag
(e.g. <code>--progress</code>). No options are required. Options can
come after the <code>subcommand</code> or in between parameters too or
on the end, but only global options can be used before the
<code>subcommand</code>. Anything after a <code>--</code> option will
not be interpreted as an option so if you need to add a parameter which
starts with a <code>-</code> then put a <code>--</code> on its own
first, eg</p>
<pre class="console"><code>rclone lsf -- -directory-starting-with-dash</code></pre>
<p>A <code>parameter</code> is usually a file path or <a
href="#syntax-of-remote-paths">rclone remote</a>, eg
<code>/path/to/file</code> or <code>remote:path/to/file</code> but it
can be other things - the <code>subcommand</code> help will tell you
what.</p>
<p>Source and destination paths are specified by the name you gave the
storage system in the config file then the sub path, e.g.
"drive:myfolder" to look at "myfolder" in Google drive.</p>
<p>You can define as many storage paths as you like in the config
file.</p>
<p>Please use the <a
href="#interactive"><code>--interactive</code>/<code>-i</code></a> flag
while learning rclone to avoid accidental data loss.</p>
<h2 id="subcommands">Subcommands</h2>
<p>rclone uses a system of subcommands. For example</p>
<pre class="console"><code>rclone ls remote:path # lists a remote
rclone copy /local/path remote:path # copies /local/path to the remote
rclone sync --interactive /local/path remote:path # syncs /local/path to the remote</code></pre>
<h1 id="rclone-config">rclone config</h1>
<p>Enter an interactive configuration session.</p>
<h2 id="synopsis-1">Synopsis</h2>
<p>Enter an interactive configuration session where you can setup new
remotes and manage existing ones. You may also set or remove a password
to protect your configuration.</p>
<pre><code>rclone config [flags]</code></pre>
<h2 id="options">Options</h2>
<pre><code>  -h, --help   help for config</code></pre>
<p>See the <a href="https://rclone.org/flags/">global flags page</a> for
global options not listed here.</p>
<h2 id="see-also">See Also</h2>
<!-- markdownlint-capture -->
<!-- markdownlint-disable ul-style line-length -->
<ul>
<li><a href="https://rclone.org/commands/rclone/">rclone</a> - Show help
for rclone commands, flags and backends.</li>
<li><a href="https://rclone.org/commands/rclone_config_create/">rclone
config create</a> - Create a new remote with name, type and
options.</li>
<li><a href="https://rclone.org/commands/rclone_config_delete/">rclone
config delete</a> - Delete an existing remote.</li>
<li><a
href="https://rclone.org/commands/rclone_config_disconnect/">rclone
config disconnect</a> - Disconnects user from remote</li>
<li><a href="https://rclone.org/commands/rclone_config_dump/">rclone
config dump</a> - Dump the config file as JSON.</li>
<li><a href="https://rclone.org/commands/rclone_config_edit/">rclone
config edit</a> - Enter an interactive configuration session.</li>
<li><a
href="https://rclone.org/commands/rclone_config_encryption/">rclone
config encryption</a> - set, remove and check the encryption for the
config file</li>
<li><a href="https://rclone.org/commands/rclone_config_file/">rclone
config file</a> - Show path of configuration file in use.</li>
<li><a href="https://rclone.org/commands/rclone_config_password/">rclone
config password</a> - Update password in an existing remote.</li>
<li><a href="https://rclone.org/commands/rclone_config_paths/">rclone
config paths</a> - Show paths used for configuration, cache, temp
etc.</li>
<li><a
href="https://rclone.org/commands/rclone_config_providers/">rclone
config providers</a> - List in JSON format all the providers and
options.</li>
<li><a
href="https://rclone.org/commands/rclone_config_reconnect/">rclone
config reconnect</a> - Re-authenticates user with remote.</li>
<li><a href="https://rclone.org/commands/rclone_config_redacted/">rclone
config redacted</a> - Print redacted (decrypted) config file, or the
redacted config for a single remote.</li>
<li><a href="https://rclone.org/commands/rclone_config_show/">rclone
config show</a> - Print (decrypted) config file, or the config for a
single remote.</li>
<li><a href="https://rclone.org/commands/rclone_config_string/">rclone
config string</a> - Print connection string for a single remote.</li>
<li><a href="https://rclone.org/commands/rclone_config_touch/">rclone
config touch</a> - Ensure configuration file exists.</li>
<li><a href="https://rclone.org/commands/rclone_config_unset/">rclone
config unset</a> - Unset options in an existing remote.</li>
<li><a href="https://rclone.org/commands/rclone_config_update/">rclone
config update</a> - Update options in an existing remote.</li>
<li><a href="https://rclone.org/commands/rclone_config_userinfo/">rclone
config userinfo</a> - Prints info about logged in user of remote.</li>
</ul>
<!-- markdownlint-restore -->
<h1 id="rclone-copy">rclone copy</h1>
<p>Copy files from source to dest, skipping identical files.</p>
<h2 id="synopsis-2">Synopsis</h2>
<p>Copy the source to the destination. Does not transfer files that are
identical on source and destination, testing by size and modification
time or MD5SUM. Doesn't delete files from the destination. If you want
to also delete files from destination, to make it match source, use the
<a href="https://rclone.org/commands/rclone_sync/">sync</a> command
instead.</p>
<p>Note that it is always the contents of the directory that is synced,
not the directory itself. So when source:path is a directory, it's the
contents of source:path that are copied, not the directory name and
contents.</p>
<p>To copy single files, use the <a
href="https://rclone.org/commands/rclone_copyto/">copyto</a> command
instead.</p>
<p>If dest:path doesn't exist, it is created and the source:path
contents go there.</p>
<p>For example</p>
<div class="sourceCode" id="cb43"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb43-1"><a href="#cb43-1" aria-hidden="true" tabindex="-1"></a><span class="ex">rclone</span> copy source:sourcepath dest:destpath</span></code></pre></div>
<p>Let's say there are two files in sourcepath</p>
<pre class="text"><code>sourcepath/one.txt
sourcepath/two.txt</code></pre>
<p>This copies them to</p>
<pre class="text"><code>destpath/one.txt
destpath/two.txt</code></pre>
<p>Not to</p>
<pre class="text"><code>destpath/sourcepath/one.txt
destpath/sourcepath/two.txt</code></pre>
<p>If you are familiar with <code>rsync</code>, rclone always works as
if you had written a trailing <code>/</code> - meaning "copy the
contents of this directory". This applies to all commands and whether
you are talking about the source or destination.</p>
<p>See the <a
href="https://rclone.org/docs/#no-traverse">--no-traverse</a> option for
controlling whether rclone lists the destination directory or not.
Supplying this option when copying a small number of files into a large
destination can speed transfers up greatly.</p>
<p>For example, if you have many files in /path/to/src but only a few of
them change every day, you can copy all the files which have changed
recently very efficiently like this:</p>
<div class="sourceCode" id="cb47"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb47-1"><a href="#cb47-1" aria-hidden="true" tabindex="-1"></a><span class="ex">rclone</span> copy <span class="at">--max-age</span> 24h <span class="at">--no-traverse</span> /path/to/src remote:</span></code></pre></div>
<p>Rclone will sync the modification times of files and directories if
the backend supports it. If metadata syncing is required then use the
<code>--metadata</code> flag.</p>
<p>Note that the modification time and metadata for the root directory
will <strong>not</strong> be synced. See <a
href="https://github.com/rclone/rclone/issues/7652">issue #7652</a> for
more info.</p>
<p><strong>Note</strong>: Use the
<code>-P</code>/<code>--progress</code> flag to view real-time transfer
statistics.</p>
<p><strong>Note</strong>: Use the <code>--dry-run</code> or the
<code>--interactive</code>/<code>-i</code> flag to test without copying
anything.</p>
<h2 id="logger-flags">Logger Flags</h2>
<p>The <code>--differ</code>, <code>--missing-on-dst</code>,
<code>--missing-on-src</code>, <code>--match</code> and
<code>--error</code> flags write paths, one per line, to the file name
(or stdout if it is <code>-</code>) supplied. What they write is
described in the help below. For example <code>--differ</code> will
write all paths which are present on both the source and destination but
different.</p>
<p>The <code>--combined</code> flag will write a file (or stdout) which
contains all file paths with a symbol and then a space and then the path
to tell you what happened to it. These are reminiscent of diff
files.</p>
<ul>
<li><code>= path</code> means path was found in source and destination
and was identical</li>
<li><code>- path</code> means path was missing on the source, so only in
the destination</li>
<li><code>+ path</code> means path was missing on the destination, so
only in the source</li>
<li><code>* path</code> means path was present in source and destination
but different.</li>
<li><code>! path</code> means there was an error reading or hashing the
source or dest.</li>
</ul>
<p>The <code>--dest-after</code> flag writes a list file using the same
format flags as <a
href="https://rclone.org/commands/rclone_lsf/#synopsis"><code>lsf</code></a>
(including <a
href="https://rclone.org/commands/rclone_lsf/#synopsis">customizable
options for hash, modtime, etc.</a>) Conceptually it is similar to
rsync's <code>--itemize-changes</code>, but not identical -- it should
output an accurate list of what will be on the destination after the
command is finished.</p>
<p>When the <code>--no-traverse</code> flag is set, all logs involving
files that exist only on the destination will be incomplete or
completely missing.</p>
<p>Note that these logger flags have a few limitations, and certain
scenarios are not currently supported:</p>
<ul>
<li><code>--max-duration</code> / <code>CutoffModeHard</code></li>
<li><code>--compare-dest</code> / <code>--copy-dest</code></li>
<li>server-side moves of an entire dir at once</li>
<li>High-level retries, because there would be duplicates (use
<code>--retries 1</code> to disable)</li>
<li>Possibly some unusual error scenarios</li>
</ul>
<p>Note also that each file is logged during execution, as opposed to
after, so it is most useful as a predictor of what SHOULD happen to each
file (which may or may not match what actually DID).</p>
<pre><code>rclone copy source:path dest:path [flags]</code></pre>
<h2 id="options-1">Options</h2>
<pre><code>      --absolute                Put a leading / in front of path names
      --combined string         Make a combined report of changes to this file
      --create-empty-src-dirs   Create empty source dirs on destination after copy
      --csv                     Output in CSV format
      --dest-after string       Report all files that exist on the dest post-sync
      --differ string           Report all non-matching files to this file
  -d, --dir-slash               Append a slash to directory names (default true)
      --dirs-only               Only list directories
      --error string            Report all files with errors (hashing or reading) to this file
      --files-only              Only list files (default true)
  -F, --format string           Output format - see lsf help for details (default &quot;p&quot;)
      --hash h                  Use this hash when h is used in the format MD5|SHA-1|DropboxHash (default &quot;md5&quot;)
  -h, --help                    help for copy
      --match string            Report all matching files to this file
      --missing-on-dst string   Report all files missing from the destination to this file
      --missing-on-src string   Report all files missing from the source to this file
  -s, --separator string        Separator for the items in the format (default &quot;;&quot;)
  -t, --timeformat string       Specify a custom time format - see docs for details (default: 2006-01-02 15:04:05)</code></pre>
<p>Options shared with other commands are described next. See the <a
href="https://rclone.org/flags/">global flags page</a> for global
options not listed here.</p>
<h3 id="copy-options">Copy Options</h3>
<p>Flags for anything which can copy a file</p>
<pre class="text"><code>      --check-first                                 Do all the checks before starting transfers
  -c, --checksum                                    Check for changes with size &amp; checksum (if available, or fallback to size only)
      --compare-dest stringArray                    Include additional server-side paths during comparison
      --copy-dest stringArray                       Implies --compare-dest but also copies files from paths into destination
      --cutoff-mode HARD|SOFT|CAUTIOUS              Mode to stop transfers when reaching the max transfer limit HARD|SOFT|CAUTIOUS (default HARD)
      --ignore-case-sync                            Ignore case when synchronizing
      --ignore-checksum                             Skip post copy check of checksums
      --ignore-existing                             Skip all files that exist on destination
      --ignore-size                                 Ignore size when skipping use modtime or checksum
  -I, --ignore-times                                Don&#39;t skip items that match size and time - transfer all unconditionally
      --immutable                                   Do not modify files, fail if existing files have been modified
      --inplace                                     Download directly to destination file instead of atomic download to temp/rename
  -l, --links                                       Translate symlinks to/from regular files with a &#39;.rclonelink&#39; extension
      --max-backlog int                             Maximum number of objects in sync or check backlog (default 10000)
      --max-duration Duration                       Maximum duration rclone will transfer data for (default 0s)
      --max-transfer SizeSuffix                     Maximum size of data to transfer (default off)
  -M, --metadata                                    If set, preserve metadata when copying objects
      --modify-window Duration                      Max time diff to be considered the same (default 1ns)
      --multi-thread-chunk-size SizeSuffix          Chunk size for multi-thread downloads / uploads, if not set by filesystem (default 64Mi)
      --multi-thread-cutoff SizeSuffix              Use multi-thread downloads for files above this size (default 256Mi)
      --multi-thread-streams int                    Number of streams to use for multi-thread downloads (default 4)
      --multi-thread-write-buffer-size SizeSuffix   In memory buffer size for writing when in multi-thread mode (default 128Ki)
      --name-transform stringArray                  Transform paths during the copy process
      --no-check-dest                               Don&#39;t check the destination, copy regardless
      --no-traverse                                 Don&#39;t traverse destination file system on copy
      --no-update-dir-modtime                       Don&#39;t update directory modification times
      --no-update-modtime                           Don&#39;t update destination modtime if files identical
      --order-by string                             Instructions on how to order the transfers, e.g. &#39;size,descending&#39;
      --partial-suffix string                       Add partial-suffix to temporary file name when --inplace is not used (default &quot;.partial&quot;)
      --refresh-times                               Refresh the modtime of remote files
      --server-side-across-configs                  Allow server-side operations (e.g. copy) to work across different configs
      --size-only                                   Skip based on size only, not modtime or checksum
      --streaming-upload-cutoff SizeSuffix          Cutoff for switching to chunked upload if file size is unknown, upload starts after reaching cutoff or when file ends (default 100Ki)
  -u, --update                                      Skip files that are newer on the destination</code></pre>
<h3 id="important-options">Important Options</h3>
<p>Important flags useful for most commands</p>
<pre class="text"><code>  -n, --dry-run         Do a trial run with no permanent changes
  -i, --interactive     Enable interactive mode
  -v, --verbose count   Print lots more stuff (repeat for more)</code></pre>
<h3 id="filter-options">Filter Options</h3>
<p>Flags for filtering directory listings</p>
<pre class="text"><code>      --delete-excluded                     Delete files on dest excluded from sync
      --exclude stringArray                 Exclude files matching pattern
      --exclude-from stringArray            Read file exclude patterns from file (use - to read from stdin)
      --exclude-if-present stringArray      Exclude directories if filename is present
      --files-from stringArray              Read list of source-file names from file (use - to read from stdin)
      --files-from-raw stringArray          Read list of source-file names from file without any processing of lines (use - to read from stdin)
      --files-from0 stringArray             Read list of source-file names from file using NUL as separator (use - to read from stdin)
  -f, --filter stringArray                  Add a file filtering rule
      --filter-from stringArray             Read file filtering patterns from a file (use - to read from stdin)
      --hash-filter string                  Partition filenames by hash k/n or randomly @/n
      --ignore-case                         Ignore case in filters (case insensitive)
      --include stringArray                 Include files matching pattern
      --include-from stringArray            Read file include patterns from file (use - to read from stdin)
      --max-age Duration                    Only transfer files younger than this in s or suffix ms|s|m|h|d|w|M|y (default off)
      --max-depth int                       If set limits the recursion depth to this (default -1)
      --max-size SizeSuffix                 Only transfer files smaller than this in KiB or suffix B|K|M|G|T|P (default off)
      --metadata-exclude stringArray        Exclude metadatas matching pattern
      --metadata-exclude-from stringArray   Read metadata exclude patterns from file (use - to read from stdin)
      --metadata-filter stringArray         Add a metadata filtering rule
      --metadata-filter-from stringArray    Read metadata filtering patterns from a file (use - to read from stdin)
      --metadata-include stringArray        Include metadatas matching pattern
      --metadata-include-from stringArray   Read metadata include patterns from file (use - to read from stdin)
      --min-age Duration                    Only transfer files older than this in s or suffix ms|s|m|h|d|w|M|y (default off)
      --min-size SizeSuffix                 Only transfer files bigger than this in KiB or suffix B|K|M|G|T|P (default off)</code></pre>
<h3 id="listing-options">Listing Options</h3>
<p>Flags for listing directories</p>
<pre class="text"><code>      --default-time Time   Time to show if modtime is unknown for files and directories (default 2000-01-01T00:00:00Z)
      --fast-list           Use recursive list if available; uses more memory but fewer transactions</code></pre>
<h2 id="see-also-1">See Also</h2>
<!-- markdownlint-capture -->
<!-- markdownlint-disable ul-style line-length -->
<ul>
<li><a href="https://rclone.org/commands/rclone/">rclone</a> - Show help
for rclone commands, flags and backends.</li>
</ul>
<!-- markdownlint-restore -->
<h1 id="rclone-sync">rclone sync</h1>
<p>Make source and dest identical, modifying destination only.</p>
<h2 id="synopsis-3">Synopsis</h2>
<p>Sync the source to the destination, changing the destination only.
Doesn't transfer files that are identical on source and destination,
testing by size and modification time or MD5SUM. Destination is updated
to match source, including deleting files if necessary (except duplicate
objects, see below). If you don't want to delete files from destination,
use the <a href="https://rclone.org/commands/rclone_copy/">copy</a>
command instead.</p>
<p><strong>Important</strong>: Since this can cause data loss, test
first with the <code>--dry-run</code> or the
<code>--interactive</code>/<code>i</code> flag.</p>
<div class="sourceCode" id="cb54"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb54-1"><a href="#cb54-1" aria-hidden="true" tabindex="-1"></a><span class="ex">rclone</span> sync <span class="at">--interactive</span> SOURCE remote:DESTINATION</span></code></pre></div>
<p>Files in the destination won't be deleted if there were any errors at
any point. Duplicate objects (files with the same name, on those
providers that support it) are not yet handled. Files that are excluded
won't be deleted unless <code>--delete-excluded</code> is used. Symlinks
won't be transferred or deleted from local file systems unless
<code>--links</code> is used.</p>
<p>It is always the contents of the directory that is synced, not the
directory itself. So when source:path is a directory, it's the contents
of source:path that are copied, not the directory name and contents. See
extended explanation in the <a
href="https://rclone.org/commands/rclone_copy/">copy</a> command if
unsure.</p>
<p>If dest:path doesn't exist, it is created and the source:path
contents go there.</p>
<p>It is not possible to sync overlapping remotes. However, you may
exclude the destination from the sync with a filter rule or by putting
an exclude-if-present file inside the destination directory and sync to
a destination that is inside the source directory.</p>
<p>Rclone will sync the modification times of files and directories if
the backend supports it. If metadata syncing is required then use the
<code>--metadata</code> flag.</p>
<p>Note that the modification time and metadata for the root directory
will <strong>not</strong> be synced. See <a
href="https://github.com/rclone/rclone/issues/7652"
class="uri">https://github.com/rclone/rclone/issues/7652</a> for more
info.</p>
<p><strong>Note</strong>: Use the
<code>-P</code>/<code>--progress</code> flag to view real-time transfer
statistics</p>
<p><strong>Note</strong>: Use the <code>rclone dedupe</code> command to
deal with "Duplicate object/directory found in source/destination -
ignoring" errors. See <a
href="https://forum.rclone.org/t/sync-not-clearing-duplicates/14372">this
forum post</a> for more info.</p>
<h2 id="logger-flags-1">Logger Flags</h2>
<p>The <code>--differ</code>, <code>--missing-on-dst</code>,
<code>--missing-on-src</code>, <code>--match</code> and
<code>--error</code> flags write paths, one per line, to the file name
(or stdout if it is <code>-</code>) supplied. What they write is
described in the help below. For example <code>--differ</code> will
write all paths which are present on both the source and destination but
different.</p>
<p>The <code>--combined</code> flag will write a file (or stdout) which
contains all file paths with a symbol and then a space and then the path
to tell you what happened to it. These are reminiscent of diff
files.</p>
<ul>
<li><code>= path</code> means path was found in source and destination
and was identical</li>
<li><code>- path</code> means path was missing on the source, so only in
the destination</li>
<li><code>+ path</code> means path was missing on the destination, so
only in the source</li>
<li><code>* path</code> means path was present in source and destination
but different.</li>
<li><code>! path</code> means there was an error reading or hashing the
source or dest.</li>
</ul>
<p>The <code>--dest-after</code> flag writes a list file using the same
format flags as <a
href="https://rclone.org/commands/rclone_lsf/#synopsis"><code>lsf</code></a>
(including <a
href="https://rclone.org/commands/rclone_lsf/#synopsis">customizable
options for hash, modtime, etc.</a>) Conceptually it is similar to
rsync's <code>--itemize-changes</code>, but not identical -- it should
output an accurate list of what will be on the destination after the
command is finished.</p>
<p>When the <code>--no-traverse</code> flag is set, all logs involving
files that exist only on the destination will be incomplete or
completely missing.</p>
<p>Note that these logger flags have a few limitations, and certain
scenarios are not currently supported:</p>
<ul>
<li><code>--max-duration</code> / <code>CutoffModeHard</code></li>
<li><code>--compare-dest</code> / <code>--copy-dest</code></li>
<li>server-side moves of an entire dir at once</li>
<li>High-level retries, because there would be duplicates (use
<code>--retries 1</code> to disable)</li>
<li>Possibly some unusual error scenarios</li>
</ul>
<p>Note also that each file is logged during execution, as opposed to
after, so it is most useful as a predictor of what SHOULD happen to each
file (which may or may not match what actually DID).</p>
<pre><code>rclone sync source:path dest:path [flags]</code></pre>
<h2 id="options-2">Options</h2>
<pre><code>      --absolute                Put a leading / in front of path names
      --combined string         Make a combined report of changes to this file
      --create-empty-src-dirs   Create empty source dirs on destination after sync
      --csv                     Output in CSV format
      --dest-after string       Report all files that exist on the dest post-sync
      --differ string           Report all non-matching files to this file
  -d, --dir-slash               Append a slash to directory names (default true)
      --dirs-only               Only list directories
      --error string            Report all files with errors (hashing or reading) to this file
      --files-only              Only list files (default true)
  -F, --format string           Output format - see lsf help for details (default &quot;p&quot;)
      --hash h                  Use this hash when h is used in the format MD5|SHA-1|DropboxHash (default &quot;md5&quot;)
  -h, --help                    help for sync
      --match string            Report all matching files to this file
      --missing-on-dst string   Report all files missing from the destination to this file
      --missing-on-src string   Report all files missing from the source to this file
  -s, --separator string        Separator for the items in the format (default &quot;;&quot;)
  -t, --timeformat string       Specify a custom time format - see docs for details (default: 2006-01-02 15:04:05)</code></pre>
<p>Options shared with other commands are described next. See the <a
href="https://rclone.org/flags/">global flags page</a> for global
options not listed here.</p>
<h3 id="copy-options-1">Copy Options</h3>
<p>Flags for anything which can copy a file</p>
<pre class="text"><code>      --check-first                                 Do all the checks before starting transfers
  -c, --checksum                                    Check for changes with size &amp; checksum (if available, or fallback to size only)
      --compare-dest stringArray                    Include additional server-side paths during comparison
      --copy-dest stringArray                       Implies --compare-dest but also copies files from paths into destination
      --cutoff-mode HARD|SOFT|CAUTIOUS              Mode to stop transfers when reaching the max transfer limit HARD|SOFT|CAUTIOUS (default HARD)
      --ignore-case-sync                            Ignore case when synchronizing
      --ignore-checksum                             Skip post copy check of checksums
      --ignore-existing                             Skip all files that exist on destination
      --ignore-size                                 Ignore size when skipping use modtime or checksum
  -I, --ignore-times                                Don&#39;t skip items that match size and time - transfer all unconditionally
      --immutable                                   Do not modify files, fail if existing files have been modified
      --inplace                                     Download directly to destination file instead of atomic download to temp/rename
  -l, --links                                       Translate symlinks to/from regular files with a &#39;.rclonelink&#39; extension
      --max-backlog int                             Maximum number of objects in sync or check backlog (default 10000)
      --max-duration Duration                       Maximum duration rclone will transfer data for (default 0s)
      --max-transfer SizeSuffix                     Maximum size of data to transfer (default off)
  -M, --metadata                                    If set, preserve metadata when copying objects
      --modify-window Duration                      Max time diff to be considered the same (default 1ns)
      --multi-thread-chunk-size SizeSuffix          Chunk size for multi-thread downloads / uploads, if not set by filesystem (default 64Mi)
      --multi-thread-cutoff SizeSuffix              Use multi-thread downloads for files above this size (default 256Mi)
      --multi-thread-streams int                    Number of streams to use for multi-thread downloads (default 4)
      --multi-thread-write-buffer-size SizeSuffix   In memory buffer size for writing when in multi-thread mode (default 128Ki)
      --name-transform stringArray                  Transform paths during the copy process
      --no-check-dest                               Don&#39;t check the destination, copy regardless
      --no-traverse                                 Don&#39;t traverse destination file system on copy
      --no-update-dir-modtime                       Don&#39;t update directory modification times
      --no-update-modtime                           Don&#39;t update destination modtime if files identical
      --order-by string                             Instructions on how to order the transfers, e.g. &#39;size,descending&#39;
      --partial-suffix string                       Add partial-suffix to temporary file name when --inplace is not used (default &quot;.partial&quot;)
      --refresh-times                               Refresh the modtime of remote files
      --server-side-across-configs                  Allow server-side operations (e.g. copy) to work across different configs
      --size-only                                   Skip based on size only, not modtime or checksum
      --streaming-upload-cutoff SizeSuffix          Cutoff for switching to chunked upload if file size is unknown, upload starts after reaching cutoff or when file ends (default 100Ki)
  -u, --update                                      Skip files that are newer on the destination</code></pre>
<h3 id="sync-options">Sync Options</h3>
<p>Flags used for sync commands</p>
<pre class="text"><code>      --backup-dir string               Make backups into hierarchy based in DIR
      --delete-after                    When synchronizing, delete files on destination after transferring (default)
      --delete-before                   When synchronizing, delete files on destination before transferring
      --delete-during                   When synchronizing, delete files during transfer
      --fix-case                        Force rename of case insensitive dest to match source
      --ignore-errors                   Delete even if there are I/O errors
      --list-cutoff int                 To save memory, sort directory listings on disk above this threshold (default 1000000)
      --max-delete int                  When synchronizing, limit the number of deletes (default -1)
      --max-delete-size SizeSuffix      When synchronizing, limit the total size of deletes (default off)
      --suffix string                   Suffix to add to changed files
      --suffix-keep-extension           Preserve the extension when using --suffix
      --track-renames                   When synchronizing, track file renames and do a server-side move if possible
      --track-renames-strategy string   Strategies to use when synchronizing using track-renames hash|modtime|leaf (default &quot;hash&quot;)</code></pre>
<h3 id="important-options-1">Important Options</h3>
<p>Important flags useful for most commands</p>
<pre class="text"><code>  -n, --dry-run         Do a trial run with no permanent changes
  -i, --interactive     Enable interactive mode
  -v, --verbose count   Print lots more stuff (repeat for more)</code></pre>
<h3 id="filter-options-1">Filter Options</h3>
<p>Flags for filtering directory listings</p>
<pre class="text"><code>      --delete-excluded                     Delete files on dest excluded from sync
      --exclude stringArray                 Exclude files matching pattern
      --exclude-from stringArray            Read file exclude patterns from file (use - to read from stdin)
      --exclude-if-present stringArray      Exclude directories if filename is present
      --files-from stringArray              Read list of source-file names from file (use - to read from stdin)
      --files-from-raw stringArray          Read list of source-file names from file without any processing of lines (use - to read from stdin)
      --files-from0 stringArray             Read list of source-file names from file using NUL as separator (use - to read from stdin)
  -f, --filter stringArray                  Add a file filtering rule
      --filter-from stringArray             Read file filtering patterns from a file (use - to read from stdin)
      --hash-filter string                  Partition filenames by hash k/n or randomly @/n
      --ignore-case                         Ignore case in filters (case insensitive)
      --include stringArray                 Include files matching pattern
      --include-from stringArray            Read file include patterns from file (use - to read from stdin)
      --max-age Duration                    Only transfer files younger than this in s or suffix ms|s|m|h|d|w|M|y (default off)
      --max-depth int                       If set limits the recursion depth to this (default -1)
      --max-size SizeSuffix                 Only transfer files smaller than this in KiB or suffix B|K|M|G|T|P (default off)
      --metadata-exclude stringArray        Exclude metadatas matching pattern
      --metadata-exclude-from stringArray   Read metadata exclude patterns from file (use - to read from stdin)
      --metadata-filter stringArray         Add a metadata filtering rule
      --metadata-filter-from stringArray    Read metadata filtering patterns from a file (use - to read from stdin)
      --metadata-include stringArray        Include metadatas matching pattern
      --metadata-include-from stringArray   Read metadata include patterns from file (use - to read from stdin)
      --min-age Duration                    Only transfer files older than this in s or suffix ms|s|m|h|d|w|M|y (default off)
      --min-size SizeSuffix                 Only transfer files bigger than this in KiB or suffix B|K|M|G|T|P (default off)</code></pre>
<h3 id="listing-options-1">Listing Options</h3>
<p>Flags for listing directories</p>
<pre class="text"><code>      --default-time Time   Time to show if modtime is unknown for files and directories (default 2000-01-01T00:00:00Z)
      --fast-list           Use recursive list if available; uses more memory but fewer transactions</code></pre>
<h2 id="see-also-2">See Also</h2>
<!-- markdownlint-capture -->
<!-- markdownlint-disable ul-style line-length -->
<ul>
<li><a href="https://rclone.org/commands/rclone/">rclone</a> - Show help
for rclone commands, flags and backends.</li>
</ul>
<!-- markdownlint-restore -->
<h1 id="rclone-move">rclone move</h1>
<p>Move files from source to dest.</p>
<h2 id="synopsis-4">Synopsis</h2>
<p>Moves the contents of the source directory to the destination
directory. Rclone will error if the source and destination overlap and
the remote does not support a server-side directory move operation.</p>
<p>To move single files, use the <a
href="https://rclone.org/commands/rclone_moveto/">moveto</a> command
instead.</p>
<p>If no filters are in use and if possible this will server-side move
<code>source:path</code> into <code>dest:path</code>. After this
<code>source:path</code> will no longer exist.</p>
<p>Otherwise for each file in <code>source:path</code> selected by the
filters (if any) this will move it into <code>dest:path</code>. If
possible a server-side move will be used, otherwise it will copy it
(server-side if possible) into <code>dest:path</code> then delete the
original (if no errors on copy) in <code>source:path</code>.</p>
<p>If you want to delete empty source directories after move, use the
<code>--delete-empty-src-dirs</code> flag.</p>
<p>See the <a
href="https://rclone.org/docs/#no-traverse">--no-traverse</a> option for
controlling whether rclone lists the destination directory or not.
Supplying this option when moving a small number of files into a large
destination can speed transfers up greatly.</p>
<p>Rclone will sync the modification times of files and directories if
the backend supports it. If metadata syncing is required then use the
<code>--metadata</code> flag.</p>
<p>Note that the modification time and metadata for the root directory
will <strong>not</strong> be synced. See <a
href="https://github.com/rclone/rclone/issues/7652"
class="uri">https://github.com/rclone/rclone/issues/7652</a> for more
info.</p>
<p><strong>Important</strong>: Since this can cause data loss, test
first with the <code>--dry-run</code> or the
<code>--interactive</code>/<code>-i</code> flag.</p>
<p><strong>Note</strong>: Use the
<code>-P</code>/<code>--progress</code> flag to view real-time transfer
statistics.</p>
<h2 id="logger-flags-2">Logger Flags</h2>
<p>The <code>--differ</code>, <code>--missing-on-dst</code>,
<code>--missing-on-src</code>, <code>--match</code> and
<code>--error</code> flags write paths, one per line, to the file name
(or stdout if it is <code>-</code>) supplied. What they write is
described in the help below. For example <code>--differ</code> will
write all paths which are present on both the source and destination but
different.</p>
<p>The <code>--combined</code> flag will write a file (or stdout) which
contains all file paths with a symbol and then a space and then the path
to tell you what happened to it. These are reminiscent of diff
files.</p>
<ul>
<li><code>= path</code> means path was found in source and destination
and was identical</li>
<li><code>- path</code> means path was missing on the source, so only in
the destination</li>
<li><code>+ path</code> means path was missing on the destination, so
only in the source</li>
<li><code>* path</code> means path was present in source and destination
but different.</li>
<li><code>! path</code> means there was an error reading or hashing the
source or dest.</li>
</ul>
<p>The <code>--dest-after</code> flag writes a list file using the same
format flags as <a
href="https://rclone.org/commands/rclone_lsf/#synopsis"><code>lsf</code></a>
(including <a
href="https://rclone.org/commands/rclone_lsf/#synopsis">customizable
options for hash, modtime, etc.</a>) Conceptually it is similar to
rsync's <code>--itemize-changes</code>, but not identical -- it should
output an accurate list of what will be on the destination after the
command is finished.</p>
<p>When the <code>--no-traverse</code> flag is set, all logs involving
files that exist only on the destination will be incomplete or
completely missing.</p>
<p>Note that these logger flags have a few limitations, and certain
scenarios are not currently supported:</p>
<ul>
<li><code>--max-duration</code> / <code>CutoffModeHard</code></li>
<li><code>--compare-dest</code> / <code>--copy-dest</code></li>
<li>server-side moves of an entire dir at once</li>
<li>High-level retries, because there would be duplicates (use
<code>--retries 1</code> to disable)</li>
<li>Possibly some unusual error scenarios</li>
</ul>
<p>Note also that each file is logged during execution, as opposed to
after, so it is most useful as a predictor of what SHOULD happen to each
file (which may or may not match what actually DID).</p>
<pre><code>rclone move source:path dest:path [flags]</code></pre>
<h2 id="options-3">Options</h2>
<pre><code>      --absolute                Put a leading / in front of path names
      --combined string         Make a combined report of changes to this file
      --create-empty-src-dirs   Create empty source dirs on destination after move
      --csv                     Output in CSV format
      --delete-empty-src-dirs   Delete empty source dirs after move
      --dest-after string       Report all files that exist on the dest post-sync
      --differ string           Report all non-matching files to this file
  -d, --dir-slash               Append a slash to directory names (default true)
      --dirs-only               Only list directories
      --error string            Report all files with errors (hashing or reading) to this file
      --files-only              Only list files (default true)
  -F, --format string           Output format - see lsf help for details (default &quot;p&quot;)
      --hash h                  Use this hash when h is used in the format MD5|SHA-1|DropboxHash (default &quot;md5&quot;)
  -h, --help                    help for move
      --match string            Report all matching files to this file
      --missing-on-dst string   Report all files missing from the destination to this file
      --missing-on-src string   Report all files missing from the source to this file
  -s, --separator string        Separator for the items in the format (default &quot;;&quot;)
  -t, --timeformat string       Specify a custom time format - see docs for details (default: 2006-01-02 15:04:05)</code></pre>
<p>Options shared with other commands are described next. See the <a
href="https://rclone.org/flags/">global flags page</a> for global
options not listed here.</p>
<h3 id="copy-options-2">Copy Options</h3>
<p>Flags for anything which can copy a file</p>
<pre class="text"><code>      --check-first                                 Do all the checks before starting transfers
  -c, --checksum                                    Check for changes with size &amp; checksum (if available, or fallback to size only)
      --compare-dest stringArray                    Include additional server-side paths during comparison
      --copy-dest stringArray                       Implies --compare-dest but also copies files from paths into destination
      --cutoff-mode HARD|SOFT|CAUTIOUS              Mode to stop transfers when reaching the max transfer limit HARD|SOFT|CAUTIOUS (default HARD)
      --ignore-case-sync                            Ignore case when synchronizing
      --ignore-checksum                             Skip post copy check of checksums
      --ignore-existing                             Skip all files that exist on destination
      --ignore-size                                 Ignore size when skipping use modtime or checksum
  -I, --ignore-times                                Don&#39;t skip items that match size and time - transfer all unconditionally
      --immutable                                   Do not modify files, fail if existing files have been modified
      --inplace                                     Download directly to destination file instead of atomic download to temp/rename
  -l, --links                                       Translate symlinks to/from regular files with a &#39;.rclonelink&#39; extension
      --max-backlog int                             Maximum number of objects in sync or check backlog (default 10000)
      --max-duration Duration                       Maximum duration rclone will transfer data for (default 0s)
      --max-transfer SizeSuffix                     Maximum size of data to transfer (default off)
  -M, --metadata                                    If set, preserve metadata when copying objects
      --modify-window Duration                      Max time diff to be considered the same (default 1ns)
      --multi-thread-chunk-size SizeSuffix          Chunk size for multi-thread downloads / uploads, if not set by filesystem (default 64Mi)
      --multi-thread-cutoff SizeSuffix              Use multi-thread downloads for files above this size (default 256Mi)
      --multi-thread-streams int                    Number of streams to use for multi-thread downloads (default 4)
      --multi-thread-write-buffer-size SizeSuffix   In memory buffer size for writing when in multi-thread mode (default 128Ki)
      --name-transform stringArray                  Transform paths during the copy process
      --no-check-dest                               Don&#39;t check the destination, copy regardless
      --no-traverse                                 Don&#39;t traverse destination file system on copy
      --no-update-dir-modtime                       Don&#39;t update directory modification times
      --no-update-modtime                           Don&#39;t update destination modtime if files identical
      --order-by string                             Instructions on how to order the transfers, e.g. &#39;size,descending&#39;
      --partial-suffix string                       Add partial-suffix to temporary file name when --inplace is not used (default &quot;.partial&quot;)
      --refresh-times                               Refresh the modtime of remote files
      --server-side-across-configs                  Allow server-side operations (e.g. copy) to work across different configs
      --size-only                                   Skip based on size only, not modtime or checksum
      --streaming-upload-cutoff SizeSuffix          Cutoff for switching to chunked upload if file size is unknown, upload starts after reaching cutoff or when file ends (default 100Ki)
  -u, --update                                      Skip files that are newer on the destination</code></pre>
<h3 id="important-options-2">Important Options</h3>
<p>Important flags useful for most commands</p>
<pre class="text"><code>  -n, --dry-run         Do a trial run with no permanent changes
  -i, --interactive     Enable interactive mode
  -v, --verbose count   Print lots more stuff (repeat for more)</code></pre>
<h3 id="filter-options-2">Filter Options</h3>
<p>Flags for filtering directory listings</p>
<pre class="text"><code>      --delete-excluded                     Delete files on dest excluded from sync
      --exclude stringArray                 Exclude files matching pattern
      --exclude-from stringArray            Read file exclude patterns from file (use - to read from stdin)
      --exclude-if-present stringArray      Exclude directories if filename is present
      --files-from stringArray              Read list of source-file names from file (use - to read from stdin)
      --files-from-raw stringArray          Read list of source-file names from file without any processing of lines (use - to read from stdin)
      --files-from0 stringArray             Read list of source-file names from file using NUL as separator (use - to read from stdin)
  -f, --filter stringArray                  Add a file filtering rule
      --filter-from stringArray             Read file filtering patterns from a file (use - to read from stdin)
      --hash-filter string                  Partition filenames by hash k/n or randomly @/n
      --ignore-case                         Ignore case in filters (case insensitive)
      --include stringArray                 Include files matching pattern
      --include-from stringArray            Read file include patterns from file (use - to read from stdin)
      --max-age Duration                    Only transfer files younger than this in s or suffix ms|s|m|h|d|w|M|y (default off)
      --max-depth int                       If set limits the recursion depth to this (default -1)
      --max-size SizeSuffix                 Only transfer files smaller than this in KiB or suffix B|K|M|G|T|P (default off)
      --metadata-exclude stringArray        Exclude metadatas matching pattern
      --metadata-exclude-from stringArray   Read metadata exclude patterns from file (use - to read from stdin)
      --metadata-filter stringArray         Add a metadata filtering rule
      --metadata-filter-from stringArray    Read metadata filtering patterns from a file (use - to read from stdin)
      --metadata-include stringArray        Include metadatas matching pattern
      --metadata-include-from stringArray   Read metadata include patterns from file (use - to read from stdin)
      --min-age Duration                    Only transfer files older than this in s or suffix ms|s|m|h|d|w|M|y (default off)
      --min-size SizeSuffix                 Only transfer files bigger than this in KiB or suffix B|K|M|G|T|P (default off)</code></pre>
<h3 id="listing-options-2">Listing Options</h3>
<p>Flags for listing directories</p>
<pre class="text"><code>      --default-time Time   Time to show if modtime is unknown for files and directories (default 2000-01-01T00:00:00Z)
      --fast-list           Use recursive list if available; uses more memory but fewer transactions</code></pre>
<h2 id="see-also-3">See Also</h2>
<!-- markdownlint-capture -->
<!-- markdownlint-disable ul-style line-length -->
<ul>
<li><a href="https://rclone.org/commands/rclone/">rclone</a> - Show help
for rclone commands, flags and backends.</li>
</ul>
<!-- markdownlint-restore -->
<h1 id="rclone-delete">rclone delete</h1>
<p>Remove the files in path.</p>
<h2 id="synopsis-5">Synopsis</h2>
<p>Remove the files in path. Unlike <a
href="https://rclone.org/commands/rclone_purge/">purge</a> it obeys
include/exclude filters so can be used to selectively delete files.</p>
<p><code>rclone delete</code> only deletes files but leaves the
directory structure alone. If you want to delete a directory and all of
its contents use the <a
href="https://rclone.org/commands/rclone_purge/">purge</a> command.</p>
<p>If you supply the <code>--rmdirs</code> flag, it will remove all
empty directories along with it. You can also use the separate command
<a href="https://rclone.org/commands/rclone_rmdir/">rmdir</a> or <a
href="https://rclone.org/commands/rclone_rmdirs/">rmdirs</a> to delete
empty directories only.</p>
<p>For example, to delete all files bigger than 100 MiB, you may first
want to check what would be deleted (use either):</p>
<div class="sourceCode" id="cb68"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb68-1"><a href="#cb68-1" aria-hidden="true" tabindex="-1"></a><span class="ex">rclone</span> <span class="at">--min-size</span> 100M lsl remote:path</span>
<span id="cb68-2"><a href="#cb68-2" aria-hidden="true" tabindex="-1"></a><span class="ex">rclone</span> <span class="at">--dry-run</span> <span class="at">--min-size</span> 100M delete remote:path</span></code></pre></div>
<p>Then proceed with the actual delete:</p>
<div class="sourceCode" id="cb69"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb69-1"><a href="#cb69-1" aria-hidden="true" tabindex="-1"></a><span class="ex">rclone</span> <span class="at">--min-size</span> 100M delete remote:path</span></code></pre></div>
<p>That reads "delete everything with a minimum size of 100 MiB", hence
delete all files bigger than 100 MiB.</p>
<p><strong>Important</strong>: Since this can cause data loss, test
first with the <code>--dry-run</code> or the
<code>--interactive</code>/<code>-i</code> flag.</p>
<pre><code>rclone delete remote:path [flags]</code></pre>
<h2 id="options-4">Options</h2>
<pre><code>  -h, --help     help for delete
      --rmdirs   rmdirs removes empty directories but leaves root intact</code></pre>
<p>Options shared with other commands are described next. See the <a
href="https://rclone.org/flags/">global flags page</a> for global
options not listed here.</p>
<h3 id="important-options-3">Important Options</h3>
<p>Important flags useful for most commands</p>
<pre class="text"><code>  -n, --dry-run         Do a trial run with no permanent changes
  -i, --interactive     Enable interactive mode
  -v, --verbose count   Print lots more stuff (repeat for more)</code></pre>
<h3 id="filter-options-3">Filter Options</h3>
<p>Flags for filtering directory listings</p>
<pre class="text"><code>      --delete-excluded                     Delete files on dest excluded from sync
      --exclude stringArray                 Exclude files matching pattern
      --exclude-from stringArray            Read file exclude patterns from file (use - to read from stdin)
      --exclude-if-present stringArray      Exclude directories if filename is present
      --files-from stringArray              Read list of source-file names from file (use - to read from stdin)
      --files-from-raw stringArray          Read list of source-file names from file without any processing of lines (use - to read from stdin)
      --files-from0 stringArray             Read list of source-file names from file using NUL as separator (use - to read from stdin)
  -f, --filter stringArray                  Add a file filtering rule
      --filter-from stringArray             Read file filtering patterns from a file (use - to read from stdin)
      --hash-filter string                  Partition filenames by hash k/n or randomly @/n
      --ignore-case                         Ignore case in filters (case insensitive)
      --include stringArray                 Include files matching pattern
      --include-from stringArray            Read file include patterns from file (use - to read from stdin)
      --max-age Duration                    Only transfer files younger than this in s or suffix ms|s|m|h|d|w|M|y (default off)
      --max-depth int                       If set limits the recursion depth to this (default -1)
      --max-size SizeSuffix                 Only transfer files smaller than this in KiB or suffix B|K|M|G|T|P (default off)
      --metadata-exclude stringArray        Exclude metadatas matching pattern
      --metadata-exclude-from stringArray   Read metadata exclude patterns from file (use - to read from stdin)
      --metadata-filter stringArray         Add a metadata filtering rule
      --metadata-filter-from stringArray    Read metadata filtering patterns from a file (use - to read from stdin)
      --metadata-include stringArray        Include metadatas matching pattern
      --metadata-include-from stringArray   Read metadata include patterns from file (use - to read from stdin)
      --min-age Duration                    Only transfer files older than this in s or suffix ms|s|m|h|d|w|M|y (default off)
      --min-size SizeSuffix                 Only transfer files bigger than this in KiB or suffix B|K|M|G|T|P (default off)</code></pre>
<h3 id="listing-options-3">Listing Options</h3>
<p>Flags for listing directories</p>
<pre class="text"><code>      --default-time Time   Time to show if modtime is unknown for files and directories (default 2000-01-01T00:00:00Z)
      --fast-list           Use recursive list if available; uses more memory but fewer transactions</code></pre>
<h2 id="see-also-4">See Also</h2>
<!-- markdownlint-capture -->
<!-- markdownlint-disable ul-style line-length -->
<ul>
<li><a href="https://rclone.org/commands/rclone/">rclone</a> - Show help
for rclone commands, flags and backends.</li>
</ul>
<!-- markdownlint-restore -->
<h1 id="rclone-purge">rclone purge</h1>
<p>Remove the path and all of its contents.</p>
<h2 id="synopsis-6">Synopsis</h2>
<p>Remove the path and all of its contents. Note that this does not obey
include/exclude filters - everything will be removed. Use the <a
href="https://rclone.org/commands/rclone_delete/">delete</a> command if
you want to selectively delete files. To delete empty directories only,
use command <a
href="https://rclone.org/commands/rclone_rmdir/">rmdir</a> or <a
href="https://rclone.org/commands/rclone_rmdirs/">rmdirs</a>.</p>
<p>The concurrency of this operation is controlled by the
<code>--checkers</code> global flag. However, some backends will
implement this command directly, in which case <code>--checkers</code>
will be ignored.</p>
<p><strong>Important</strong>: Since this can cause data loss, test
first with the <code>--dry-run</code> or the
<code>--interactive</code>/<code>-i</code> flag.</p>
<pre><code>rclone purge remote:path [flags]</code></pre>
<h2 id="options-5">Options</h2>
<pre><code>  -h, --help   help for purge</code></pre>
<p>Options shared with other commands are described next. See the <a
href="https://rclone.org/flags/">global flags page</a> for global
options not listed here.</p>
<h3 id="important-options-4">Important Options</h3>
<p>Important flags useful for most commands</p>
<pre class="text"><code>  -n, --dry-run         Do a trial run with no permanent changes
  -i, --interactive     Enable interactive mode
  -v, --verbose count   Print lots more stuff (repeat for more)</code></pre>
<h2 id="see-also-5">See Also</h2>
<!-- markdownlint-capture -->
<!-- markdownlint-disable ul-style line-length -->
<ul>
<li><a href="https://rclone.org/commands/rclone/">rclone</a> - Show help
for rclone commands, flags and backends.</li>
</ul>
<!-- markdownlint-restore -->
<h1 id="rclone-mkdir">rclone mkdir</h1>
<p>Make the path if it doesn't already exist.</p>
<pre><code>rclone mkdir remote:path [flags]</code></pre>
<h2 id="options-6">Options</h2>
<pre><code>  -h, --help   help for mkdir</code></pre>
<p>Options shared with other commands are described next. See the <a
href="https://rclone.org/flags/">global flags page</a> for global
options not listed here.</p>
<h3 id="important-options-5">Important Options</h3>
<p>Important flags useful for most commands</p>
<pre class="text"><code>  -n, --dry-run         Do a trial run with no permanent changes
  -i, --interactive     Enable interactive mode
  -v, --verbose count   Print lots more stuff (repeat for more)</code></pre>
<h2 id="see-also-6">See Also</h2>
<!-- markdownlint-capture -->
<!-- markdownlint-disable ul-style line-length -->
<ul>
<li><a href="https://rclone.org/commands/rclone/">rclone</a> - Show help
for rclone commands, flags and backends.</li>
</ul>
<!-- markdownlint-restore -->
<h1 id="rclone-rmdir">rclone rmdir</h1>
<p>Remove the empty directory at path.</p>
<h2 id="synopsis-7">Synopsis</h2>
<p>This removes empty directory given by path. Will not remove the path
if it has any objects in it, not even empty subdirectories. Use command
<a href="https://rclone.org/commands/rclone_rmdirs/">rmdirs</a> (or <a
href="https://rclone.org/commands/rclone_delete/">delete</a> with option
<code>--rmdirs</code>) to do that.</p>
<p>To delete a path and any objects in it, use <a
href="https://rclone.org/commands/rclone_purge/">purge</a> command.</p>
<pre><code>rclone rmdir remote:path [flags]</code></pre>
<h2 id="options-7">Options</h2>
<pre><code>  -h, --help   help for rmdir</code></pre>
<p>Options shared with other commands are described next. See the <a
href="https://rclone.org/flags/">global flags page</a> for global
options not listed here.</p>
<h3 id="important-options-6">Important Options</h3>
<p>Important flags useful for most commands</p>
<pre class="text"><code>  -n, --dry-run         Do a trial run with no permanent changes
  -i, --interactive     Enable interactive mode
  -v, --verbose count   Print lots more stuff (repeat for more)</code></pre>
<h2 id="see-also-7">See Also</h2>
<!-- markdownlint-capture -->
<!-- markdownlint-disable ul-style line-length -->
<ul>
<li><a href="https://rclone.org/commands/rclone/">rclone</a> - Show help
for rclone commands, flags and backends.</li>
</ul>
<!-- markdownlint-restore -->
<h1 id="rclone-check">rclone check</h1>
<p>Checks the files in the source and destination match.</p>
<h2 id="synopsis-8">Synopsis</h2>
<p>Checks the files in the source and destination match. It compares
sizes and hashes (MD5 or SHA1) and logs a report of files that don't
match. It doesn't alter the source or destination.</p>
<p>For the <a href="https://rclone.org/crypt/">crypt</a> remote there is
a dedicated command, <a
href="https://rclone.org/commands/rclone_cryptcheck/">cryptcheck</a>,
that are able to check the checksums of the encrypted files.</p>
<p>If you supply the <code>--size-only</code> flag, it will only compare
the sizes not the hashes as well. Use this for a quick check.</p>
<p>If you supply the <code>--download</code> flag, it will download the
data from both remotes and check them against each other on the fly.
This can be useful for remotes that don't support hashes or if you
really want to check all the data.</p>
<p>If you supply the <code>--checkfile HASH</code> flag with a valid
hash name, the <code>source:path</code> must point to a text file in the
SUM format.</p>
<p>If you supply the <code>--one-way</code> flag, it will only check
that files in the source match the files in the destination, not the
other way around. This means that extra files in the destination that
are not in the source will not be detected.</p>
<p>The <code>--differ</code>, <code>--missing-on-dst</code>,
<code>--missing-on-src</code>, <code>--match</code> and
<code>--error</code> flags write paths, one per line, to the file name
(or stdout if it is <code>-</code>) supplied. What they write is
described in the help below. For example <code>--differ</code> will
write all paths which are present on both the source and destination but
different.</p>
<p>The <code>--combined</code> flag will write a file (or stdout) which
contains all file paths with a symbol and then a space and then the path
to tell you what happened to it. These are reminiscent of diff
files.</p>
<ul>
<li><code>= path</code> means path was found in source and destination
and was identical</li>
<li><code>- path</code> means path was missing on the source, so only in
the destination</li>
<li><code>+ path</code> means path was missing on the destination, so
only in the source</li>
<li><code>* path</code> means path was present in source and destination
but different.</li>
<li><code>! path</code> means there was an error reading or hashing the
source or dest.</li>
</ul>
<p>The default number of parallel checks is 8. See the <a
href="https://rclone.org/docs/#checkers-int">--checkers</a> option for
more information.</p>
<pre><code>rclone check source:path dest:path [flags]</code></pre>
<h2 id="options-8">Options</h2>
<pre><code>  -C, --checkfile string        Treat source:path as a SUM file with hashes of given type
      --combined string         Make a combined report of changes to this file
      --differ string           Report all non-matching files to this file
      --download                Check by downloading rather than with hash
      --error string            Report all files with errors (hashing or reading) to this file
  -h, --help                    help for check
      --match string            Report all matching files to this file
      --missing-on-dst string   Report all files missing from the destination to this file
      --missing-on-src string   Report all files missing from the source to this file
      --one-way                 Check one way only, source files must exist on remote</code></pre>
<p>Options shared with other commands are described next. See the <a
href="https://rclone.org/flags/">global flags page</a> for global
options not listed here.</p>
<h3 id="check-options">Check Options</h3>
<p>Flags used for check commands</p>
<pre class="text"><code>      --max-backlog int   Maximum number of objects in sync or check backlog (default 10000)</code></pre>
<h3 id="filter-options-4">Filter Options</h3>
<p>Flags for filtering directory listings</p>
<pre class="text"><code>      --delete-excluded                     Delete files on dest excluded from sync
      --exclude stringArray                 Exclude files matching pattern
      --exclude-from stringArray            Read file exclude patterns from file (use - to read from stdin)
      --exclude-if-present stringArray      Exclude directories if filename is present
      --files-from stringArray              Read list of source-file names from file (use - to read from stdin)
      --files-from-raw stringArray          Read list of source-file names from file without any processing of lines (use - to read from stdin)
      --files-from0 stringArray             Read list of source-file names from file using NUL as separator (use - to read from stdin)
  -f, --filter stringArray                  Add a file filtering rule
      --filter-from stringArray             Read file filtering patterns from a file (use - to read from stdin)
      --hash-filter string                  Partition filenames by hash k/n or randomly @/n
      --ignore-case                         Ignore case in filters (case insensitive)
      --include stringArray                 Include files matching pattern
      --include-from stringArray            Read file include patterns from file (use - to read from stdin)
      --max-age Duration                    Only transfer files younger than this in s or suffix ms|s|m|h|d|w|M|y (default off)
      --max-depth int                       If set limits the recursion depth to this (default -1)
      --max-size SizeSuffix                 Only transfer files smaller than this in KiB or suffix B|K|M|G|T|P (default off)
      --metadata-exclude stringArray        Exclude metadatas matching pattern
      --metadata-exclude-from stringArray   Read metadata exclude patterns from file (use - to read from stdin)
      --metadata-filter stringArray         Add a metadata filtering rule
      --metadata-filter-from stringArray    Read metadata filtering patterns from a file (use - to read from stdin)
      --metadata-include stringArray        Include metadatas matching pattern
      --metadata-include-from stringArray   Read metadata include patterns from file (use - to read from stdin)
      --min-age Duration                    Only transfer files older than this in s or suffix ms|s|m|h|d|w|M|y (default off)
      --min-size SizeSuffix                 Only transfer files bigger than this in KiB or suffix B|K|M|G|T|P (default off)</code></pre>
<h3 id="listing-options-4">Listing Options</h3>
<p>Flags for listing directories</p>
<pre class="text"><code>      --default-time Time   Time to show if modtime is unknown for files and directories (default 2000-01-01T00:00:00Z)
      --fast-list           Use recursive list if available; uses more memory but fewer transactions</code></pre>
<h2 id="see-also-8">See Also</h2>
<!-- markdownlint-capture -->
<!-- markdownlint-disable ul-style line-length -->
<ul>
<li><a href="https://rclone.org/commands/rclone/">rclone</a> - Show help
for rclone commands, flags and backends.</li>
</ul>
<!-- markdownlint-restore -->
<h1 id="rclone-ls">rclone ls</h1>
<p>List the objects in the path with size and path.</p>
<h2 id="synopsis-9">Synopsis</h2>
<p>Lists the objects in the source path to standard output in a human
readable format with size and path. Recurses by default.</p>
<p>E.g.</p>
<pre class="console"><code>$ rclone ls swift:bucket
    60295 bevajer5jef
    90613 canole
    94467 diwogej7
    37600 fubuwic</code></pre>
<p>Any of the filtering options can be applied to this command.</p>
<p>There are several related list commands</p>
<ul>
<li><code>ls</code> to list size and path of objects only</li>
<li><code>lsl</code> to list modification time, size and path of objects
only</li>
<li><code>lsd</code> to list directories only</li>
<li><code>lsf</code> to list objects and directories in easy to parse
format</li>
<li><code>lsjson</code> to list objects and directories in JSON
format</li>
</ul>
<p><code>ls</code>,<code>lsl</code>,<code>lsd</code> are designed to be
human-readable. <code>lsf</code> is designed to be human and
machine-readable. <code>lsjson</code> is designed to be
machine-readable.</p>
<p>Note that <code>ls</code> and <code>lsl</code> recurse by default -
use <code>--max-depth 1</code> to stop the recursion.</p>
<p>The other list commands
<code>lsd</code>,<code>lsf</code>,<code>lsjson</code> do not recurse by
default - use <code>-R</code> to make them recurse.</p>
<p>On the bucket-based remotes (e.g. s3, gcs, b2) a directory is a key
prefix rather than an object, so a listing without <code>-R</code> shows
each prefix as one directory entry and not the objects stored under
it.</p>
<p>List commands prefer a recursive method that uses more memory but
fewer transactions by default. Use <code>--disable ListR</code> to
suppress the behavior. See <a
href="https://rclone.org/docs/#fast-list"><code>--fast-list</code></a>
for more details.</p>
<p>Listing a nonexistent directory will produce an error except for
remotes which can't have empty directories (e.g. s3, swift, or gcs - the
bucket-based remotes).</p>
<pre><code>rclone ls remote:path [flags]</code></pre>
<h2 id="options-9">Options</h2>
<pre><code>  -h, --help   help for ls</code></pre>
<p>Options shared with other commands are described next. See the <a
href="https://rclone.org/flags/">global flags page</a> for global
options not listed here.</p>
<h3 id="filter-options-5">Filter Options</h3>
<p>Flags for filtering directory listings</p>
<pre class="text"><code>      --delete-excluded                     Delete files on dest excluded from sync
      --exclude stringArray                 Exclude files matching pattern
      --exclude-from stringArray            Read file exclude patterns from file (use - to read from stdin)
      --exclude-if-present stringArray      Exclude directories if filename is present
      --files-from stringArray              Read list of source-file names from file (use - to read from stdin)
      --files-from-raw stringArray          Read list of source-file names from file without any processing of lines (use - to read from stdin)
      --files-from0 stringArray             Read list of source-file names from file using NUL as separator (use - to read from stdin)
  -f, --filter stringArray                  Add a file filtering rule
      --filter-from stringArray             Read file filtering patterns from a file (use - to read from stdin)
      --hash-filter string                  Partition filenames by hash k/n or randomly @/n
      --ignore-case                         Ignore case in filters (case insensitive)
      --include stringArray                 Include files matching pattern
      --include-from stringArray            Read file include patterns from file (use - to read from stdin)
      --max-age Duration                    Only transfer files younger than this in s or suffix ms|s|m|h|d|w|M|y (default off)
      --max-depth int                       If set limits the recursion depth to this (default -1)
      --max-size SizeSuffix                 Only transfer files smaller than this in KiB or suffix B|K|M|G|T|P (default off)
      --metadata-exclude stringArray        Exclude metadatas matching pattern
      --metadata-exclude-from stringArray   Read metadata exclude patterns from file (use - to read from stdin)
      --metadata-filter stringArray         Add a metadata filtering rule
      --metadata-filter-from stringArray    Read metadata filtering patterns from a file (use - to read from stdin)
      --metadata-include stringArray        Include metadatas matching pattern
      --metadata-include-from stringArray   Read metadata include patterns from file (use - to read from stdin)
      --min-age Duration                    Only transfer files older than this in s or suffix ms|s|m|h|d|w|M|y (default off)
      --min-size SizeSuffix                 Only transfer files bigger than this in KiB or suffix B|K|M|G|T|P (default off)</code></pre>
<h3 id="listing-options-5">Listing Options</h3>
<p>Flags for listing directories</p>
<pre class="text"><code>      --default-time Time   Time to show if modtime is unknown for files and directories (default 2000-01-01T00:00:00Z)
      --fast-list           Use recursive list if available; uses more memory but fewer transactions</code></pre>
<h2 id="see-also-9">See Also</h2>
<!-- markdownlint-capture -->
<!-- markdownlint-disable ul-style line-length -->
<ul>
<li><a href="https://rclone.org/commands/rclone/">rclone</a> - Show help
for rclone commands, flags and backends.</li>
</ul>
<!-- markdownlint-restore -->
<h1 id="rclone-lsd">rclone lsd</h1>
<p>List all directories/containers/buckets in the path.</p>
<h2 id="synopsis-10">Synopsis</h2>
<p>Lists the directories in the source path to standard output. Does not
recurse by default. Use the <code>-R</code> flag to recurse.</p>
<p>This command lists the total size of the directory (if known, -1 if
not), the modification time (if known, the <code>--default-time</code>
if not), the number of objects in the directory (if known, -1 if not)
and the name of the directory, E.g.</p>
<pre class="console"><code>$ rclone lsd swift:
      494000 2018-04-26 08:43:20     10000 10000files
          65 2018-04-26 08:43:20         1 1File</code></pre>
<p>Or</p>
<pre class="console"><code>$ rclone lsd drive:test
          -1 2016-10-17 17:41:53        -1 1000files
          -1 2017-01-03 14:40:54        -1 2500files
          -1 2017-07-08 14:39:28        -1 4000files</code></pre>
<p>If you just want the directory names use
<code>rclone lsf --dirs-only</code>.</p>
<p>Any of the filtering options can be applied to this command.</p>
<p>There are several related list commands</p>
<ul>
<li><code>ls</code> to list size and path of objects only</li>
<li><code>lsl</code> to list modification time, size and path of objects
only</li>
<li><code>lsd</code> to list directories only</li>
<li><code>lsf</code> to list objects and directories in easy to parse
format</li>
<li><code>lsjson</code> to list objects and directories in JSON
format</li>
</ul>
<p><code>ls</code>,<code>lsl</code>,<code>lsd</code> are designed to be
human-readable. <code>lsf</code> is designed to be human and
machine-readable. <code>lsjson</code> is designed to be
machine-readable.</p>
<p>Note that <code>ls</code> and <code>lsl</code> recurse by default -
use <code>--max-depth 1</code> to stop the recursion.</p>
<p>The other list commands
<code>lsd</code>,<code>lsf</code>,<code>lsjson</code> do not recurse by
default - use <code>-R</code> to make them recurse.</p>
<p>On the bucket-based remotes (e.g. s3, gcs, b2) a directory is a key
prefix rather than an object, so a listing without <code>-R</code> shows
each prefix as one directory entry and not the objects stored under
it.</p>
<p>List commands prefer a recursive method that uses more memory but
fewer transactions by default. Use <code>--disable ListR</code> to
suppress the behavior. See <a
href="https://rclone.org/docs/#fast-list"><code>--fast-list</code></a>
for more details.</p>
<p>Listing a nonexistent directory will produce an error except for
remotes which can't have empty directories (e.g. s3, swift, or gcs - the
bucket-based remotes).</p>
<pre><code>rclone lsd remote:path [flags]</code></pre>
<h2 id="options-10">Options</h2>
<pre><code>  -h, --help        help for lsd
  -R, --recursive   Recurse into the listing</code></pre>
<p>Options shared with other commands are described next. See the <a
href="https://rclone.org/flags/">global flags page</a> for global
options not listed here.</p>
<h3 id="filter-options-6">Filter Options</h3>
<p>Flags for filtering directory listings</p>
<pre class="text"><code>      --delete-excluded                     Delete files on dest excluded from sync
      --exclude stringArray                 Exclude files matching pattern
      --exclude-from stringArray            Read file exclude patterns from file (use - to read from stdin)
      --exclude-if-present stringArray      Exclude directories if filename is present
      --files-from stringArray              Read list of source-file names from file (use - to read from stdin)
      --files-from-raw stringArray          Read list of source-file names from file without any processing of lines (use - to read from stdin)
      --files-from0 stringArray             Read list of source-file names from file using NUL as separator (use - to read from stdin)
  -f, --filter stringArray                  Add a file filtering rule
      --filter-from stringArray             Read file filtering patterns from a file (use - to read from stdin)
      --hash-filter string                  Partition filenames by hash k/n or randomly @/n
      --ignore-case                         Ignore case in filters (case insensitive)
      --include stringArray                 Include files matching pattern
      --include-from stringArray            Read file include patterns from file (use - to read from stdin)
      --max-age Duration                    Only transfer files younger than this in s or suffix ms|s|m|h|d|w|M|y (default off)
      --max-depth int                       If set limits the recursion depth to this (default -1)
      --max-size SizeSuffix                 Only transfer files smaller than this in KiB or suffix B|K|M|G|T|P (default off)
      --metadata-exclude stringArray        Exclude metadatas matching pattern
      --metadata-exclude-from stringArray   Read metadata exclude patterns from file (use - to read from stdin)
      --metadata-filter stringArray         Add a metadata filtering rule
      --metadata-filter-from stringArray    Read metadata filtering patterns from a file (use - to read from stdin)
      --metadata-include stringArray        Include metadatas matching pattern
      --metadata-include-from stringArray   Read metadata include patterns from file (use - to read from stdin)
      --min-age Duration                    Only transfer files older than this in s or suffix ms|s|m|h|d|w|M|y (default off)
      --min-size SizeSuffix                 Only transfer files bigger than this in KiB or suffix B|K|M|G|T|P (default off)</code></pre>
<h3 id="listing-options-6">Listing Options</h3>
<p>Flags for listing directories</p>
<pre class="text"><code>      --default-time Time   Time to show if modtime is unknown for files and directories (default 2000-01-01T00:00:00Z)
      --fast-list           Use recursive list if available; uses more memory but fewer transactions</code></pre>
<h2 id="see-also-10">See Also</h2>
<!-- markdownlint-capture -->
<!-- markdownlint-disable ul-style line-length -->
<ul>
<li><a href="https://rclone.org/commands/rclone/">rclone</a> - Show help
for rclone commands, flags and backends.</li>
</ul>
<!-- markdownlint-restore -->
<h1 id="rclone-lsl">rclone lsl</h1>
<p>List the objects in path with modification time, size and path.</p>
<h2 id="synopsis-11">Synopsis</h2>
<p>Lists the objects in the source path to standard output in a human
readable format with modification time, size and path. Recurses by
default.</p>
<p>E.g.</p>
<pre class="console"><code>$ rclone lsl swift:bucket
    60295 2016-06-25 18:55:41.062626927 bevajer5jef
    90613 2016-06-25 18:55:43.302607074 canole
    94467 2016-06-25 18:55:43.046609333 diwogej7
    37600 2016-06-25 18:55:40.814629136 fubuwic</code></pre>
<p>Any of the filtering options can be applied to this command.</p>
<p>There are several related list commands</p>
<ul>
<li><code>ls</code> to list size and path of objects only</li>
<li><code>lsl</code> to list modification time, size and path of objects
only</li>
<li><code>lsd</code> to list directories only</li>
<li><code>lsf</code> to list objects and directories in easy to parse
format</li>
<li><code>lsjson</code> to list objects and directories in JSON
format</li>
</ul>
<p><code>ls</code>,<code>lsl</code>,<code>lsd</code> are designed to be
human-readable. <code>lsf</code> is designed to be human and
machine-readable. <code>lsjson</code> is designed to be
machine-readable.</p>
<p>Note that <code>ls</code> and <code>lsl</code> recurse by default -
use <code>--max-depth 1</code> to stop the recursion.</p>
<p>The other list commands
<code>lsd</code>,<code>lsf</code>,<code>lsjson</code> do not recurse by
default - use <code>-R</code> to make them recurse.</p>
<p>On the bucket-based remotes (e.g. s3, gcs, b2) a directory is a key
prefix rather than an object, so a listing without <code>-R</code> shows
each prefix as one directory entry and not the objects stored under
it.</p>
<p>List commands prefer a recursive method that uses more memory but
fewer transactions by default. Use <code>--disable ListR</code> to
suppress the behavior. See <a
href="https://rclone.org/docs/#fast-list"><code>--fast-list</code></a>
for more details.</p>
<p>Listing a nonexistent directory will produce an error except for
remotes which can't have empty directories (e.g. s3, swift, or gcs - the
bucket-based remotes).</p>
<pre><code>rclone lsl remote:path [flags]</code></pre>
<h2 id="options-11">Options</h2>
<pre><code>  -h, --help   help for lsl</code></pre>
<p>Options shared with other commands are described next. See the <a
href="https://rclone.org/flags/">global flags page</a> for global
options not listed here.</p>
<h3 id="filter-options-7">Filter Options</h3>
<p>Flags for filtering directory listings</p>
<pre class="text"><code>      --delete-excluded                     Delete files on dest excluded from sync
      --exclude stringArray                 Exclude files matching pattern
      --exclude-from stringArray            Read file exclude patterns from file (use - to read from stdin)
      --exclude-if-present stringArray      Exclude directories if filename is present
      --files-from stringArray              Read list of source-file names from file (use - to read from stdin)
      --files-from-raw stringArray          Read list of source-file names from file without any processing of lines (use - to read from stdin)
      --files-from0 stringArray             Read list of source-file names from file using NUL as separator (use - to read from stdin)
  -f, --filter stringArray                  Add a file filtering rule
      --filter-from stringArray             Read file filtering patterns from a file (use - to read from stdin)
      --hash-filter string                  Partition filenames by hash k/n or randomly @/n
      --ignore-case                         Ignore case in filters (case insensitive)
      --include stringArray                 Include files matching pattern
      --include-from stringArray            Read file include patterns from file (use - to read from stdin)
      --max-age Duration                    Only transfer files younger than this in s or suffix ms|s|m|h|d|w|M|y (default off)
      --max-depth int                       If set limits the recursion depth to this (default -1)
      --max-size SizeSuffix                 Only transfer files smaller than this in KiB or suffix B|K|M|G|T|P (default off)
      --metadata-exclude stringArray        Exclude metadatas matching pattern
      --metadata-exclude-from stringArray   Read metadata exclude patterns from file (use - to read from stdin)
      --metadata-filter stringArray         Add a metadata filtering rule
      --metadata-filter-from stringArray    Read metadata filtering patterns from a file (use - to read from stdin)
      --metadata-include stringArray        Include metadatas matching pattern
      --metadata-include-from stringArray   Read metadata include patterns from file (use - to read from stdin)
      --min-age Duration                    Only transfer files older than this in s or suffix ms|s|m|h|d|w|M|y (default off)
      --min-size SizeSuffix                 Only transfer files bigger than this in KiB or suffix B|K|M|G|T|P (default off)</code></pre>
<h3 id="listing-options-7">Listing Options</h3>
<p>Flags for listing directories</p>
<pre class="text"><code>      --default-time Time   Time to show if modtime is unknown for files and directories (default 2000-01-01T00:00:00Z)
      --fast-list           Use recursive list if available; uses more memory but fewer transactions</code></pre>
<h2 id="see-also-11">See Also</h2>
<!-- markdownlint-capture -->
<!-- markdownlint-disable ul-style line-length -->
<ul>
<li><a href="https://rclone.org/commands/rclone/">rclone</a> - Show help
for rclone commands, flags and backends.</li>
</ul>
<!-- markdownlint-restore -->
<h1 id="rclone-md5sum">rclone md5sum</h1>
<p>Produces an md5sum file for all the objects in the path.</p>
<h2 id="synopsis-12">Synopsis</h2>
<p>Produces an md5sum file for all the objects in the path. This is in
the same format as the standard md5sum tool produces.</p>
<p>By default, the hash is requested from the remote. If MD5 is not
supported by the remote, no hash will be returned. With the download
flag, the file will be downloaded from the remote and hashed locally
enabling MD5 for any remote.</p>
<p>For other algorithms, see the <a
href="https://rclone.org/commands/rclone_hashsum/">hashsum</a> command.
Running <code>rclone md5sum remote:path</code> is equivalent to running
<code>rclone hashsum MD5 remote:path</code>.</p>
<p>This command can also hash data received on standard input (stdin),
by not passing a remote:path, or by passing a hyphen as remote:path when
there is data to read (if not, the hyphen will be treated literally, as
a relative path).</p>
<pre><code>rclone md5sum remote:path [flags]</code></pre>
<h2 id="options-12">Options</h2>
<pre><code>      --base64               Output base64 encoded hashsum
  -C, --checkfile string     Validate hashes against a given SUM file instead of printing them
      --download             Download the file and hash it locally; if this flag is not specified, the hash is requested from the remote
  -h, --help                 help for md5sum
      --output-file string   Output hashsums to a file rather than the terminal</code></pre>
<p>Options shared with other commands are described next. See the <a
href="https://rclone.org/flags/">global flags page</a> for global
options not listed here.</p>
<h3 id="filter-options-8">Filter Options</h3>
<p>Flags for filtering directory listings</p>
<pre class="text"><code>      --delete-excluded                     Delete files on dest excluded from sync
      --exclude stringArray                 Exclude files matching pattern
      --exclude-from stringArray            Read file exclude patterns from file (use - to read from stdin)
      --exclude-if-present stringArray      Exclude directories if filename is present
      --files-from stringArray              Read list of source-file names from file (use - to read from stdin)
      --files-from-raw stringArray          Read list of source-file names from file without any processing of lines (use - to read from stdin)
      --files-from0 stringArray             Read list of source-file names from file using NUL as separator (use - to read from stdin)
  -f, --filter stringArray                  Add a file filtering rule
      --filter-from stringArray             Read file filtering patterns from a file (use - to read from stdin)
      --hash-filter string                  Partition filenames by hash k/n or randomly @/n
      --ignore-case                         Ignore case in filters (case insensitive)
      --include stringArray                 Include files matching pattern
      --include-from stringArray            Read file include patterns from file (use - to read from stdin)
      --max-age Duration                    Only transfer files younger than this in s or suffix ms|s|m|h|d|w|M|y (default off)
      --max-depth int                       If set limits the recursion depth to this (default -1)
      --max-size SizeSuffix                 Only transfer files smaller than this in KiB or suffix B|K|M|G|T|P (default off)
      --metadata-exclude stringArray        Exclude metadatas matching pattern
      --metadata-exclude-from stringArray   Read metadata exclude patterns from file (use - to read from stdin)
      --metadata-filter stringArray         Add a metadata filtering rule
      --metadata-filter-from stringArray    Read metadata filtering patterns from a file (use - to read from stdin)
      --metadata-include stringArray        Include metadatas matching pattern
      --metadata-include-from stringArray   Read metadata include patterns from file (use - to read from stdin)
      --min-age Duration                    Only transfer files older than this in s or suffix ms|s|m|h|d|w|M|y (default off)
      --min-size SizeSuffix                 Only transfer files bigger than this in KiB or suffix B|K|M|G|T|P (default off)</code></pre>
<h3 id="listing-options-8">Listing Options</h3>
<p>Flags for listing directories</p>
<pre class="text"><code>      --default-time Time   Time to show if modtime is unknown for files and directories (default 2000-01-01T00:00:00Z)
      --fast-list           Use recursive list if available; uses more memory but fewer transactions</code></pre>
<h2 id="see-also-12">See Also</h2>
<!-- markdownlint-capture -->
<!-- markdownlint-disable ul-style line-length -->
<ul>
<li><a href="https://rclone.org/commands/rclone/">rclone</a> - Show help
for rclone commands, flags and backends.</li>
</ul>
<!-- markdownlint-restore -->
<h1 id="rclone-sha1sum">rclone sha1sum</h1>
<p>Produces an sha1sum file for all the objects in the path.</p>
<h2 id="synopsis-13">Synopsis</h2>
<p>Produces an sha1sum file for all the objects in the path. This is in
the same format as the standard sha1sum tool produces.</p>
<p>By default, the hash is requested from the remote. If SHA-1 is not
supported by the remote, no hash will be returned. With the download
flag, the file will be downloaded from the remote and hashed locally
enabling SHA-1 for any remote.</p>
<p>For other algorithms, see the <a
href="https://rclone.org/commands/rclone_hashsum/">hashsum</a> command.
Running <code>rclone sha1sum remote:path</code> is equivalent to running
<code>rclone hashsum SHA1 remote:path</code>.</p>
<p>This command can also hash data received on standard input (stdin),
by not passing a remote:path, or by passing a hyphen as remote:path when
there is data to read (if not, the hyphen will be treated literally, as
a relative path).</p>
<p>This command can also hash data received on STDIN, if not passing a
remote:path.</p>
<pre><code>rclone sha1sum remote:path [flags]</code></pre>
<h2 id="options-13">Options</h2>
<pre><code>      --base64               Output base64 encoded hashsum
  -C, --checkfile string     Validate hashes against a given SUM file instead of printing them
      --download             Download the file and hash it locally; if this flag is not specified, the hash is requested from the remote
  -h, --help                 help for sha1sum
      --output-file string   Output hashsums to a file rather than the terminal</code></pre>
<p>Options shared with other commands are described next. See the <a
href="https://rclone.org/flags/">global flags page</a> for global
options not listed here.</p>
<h3 id="filter-options-9">Filter Options</h3>
<p>Flags for filtering directory listings</p>
<pre class="text"><code>      --delete-excluded                     Delete files on dest excluded from sync
      --exclude stringArray                 Exclude files matching pattern
      --exclude-from stringArray            Read file exclude patterns from file (use - to read from stdin)
      --exclude-if-present stringArray      Exclude directories if filename is present
      --files-from stringArray              Read list of source-file names from file (use - to read from stdin)
      --files-from-raw stringArray          Read list of source-file names from file without any processing of lines (use - to read from stdin)
      --files-from0 stringArray             Read list of source-file names from file using NUL as separator (use - to read from stdin)
  -f, --filter stringArray                  Add a file filtering rule
      --filter-from stringArray             Read file filtering patterns from a file (use - to read from stdin)
      --hash-filter string                  Partition filenames by hash k/n or randomly @/n
      --ignore-case                         Ignore case in filters (case insensitive)
      --include stringArray                 Include files matching pattern
      --include-from stringArray            Read file include patterns from file (use - to read from stdin)
      --max-age Duration                    Only transfer files younger than this in s or suffix ms|s|m|h|d|w|M|y (default off)
      --max-depth int                       If set limits the recursion depth to this (default -1)
      --max-size SizeSuffix                 Only transfer files smaller than this in KiB or suffix B|K|M|G|T|P (default off)
      --metadata-exclude stringArray        Exclude metadatas matching pattern
      --metadata-exclude-from stringArray   Read metadata exclude patterns from file (use - to read from stdin)
      --metadata-filter stringArray         Add a metadata filtering rule
      --metadata-filter-from stringArray    Read metadata filtering patterns from a file (use - to read from stdin)
      --metadata-include stringArray        Include metadatas matching pattern
      --metadata-include-from stringArray   Read metadata include patterns from file (use - to read from stdin)
      --min-age Duration                    Only transfer files older than this in s or suffix ms|s|m|h|d|w|M|y (default off)
      --min-size SizeSuffix                 Only transfer files bigger than this in KiB or suffix B|K|M|G|T|P (default off)</code></pre>
<h3 id="listing-options-9">Listing Options</h3>
<p>Flags for listing directories</p>
<pre class="text"><code>      --default-time Time   Time to show if modtime is unknown for files and directories (default 2000-01-01T00:00:00Z)
      --fast-list           Use recursive list if available; uses more memory but fewer transactions</code></pre>
<h2 id="see-also-13">See Also</h2>
<!-- markdownlint-capture -->
<!-- markdownlint-disable ul-style line-length -->
<ul>
<li><a href="https://rclone.org/commands/rclone/">rclone</a> - Show help
for rclone commands, flags and backends.</li>
</ul>
<!-- markdownlint-restore -->
<h1 id="rclone-size">rclone size</h1>
<p>Prints the total size and number of objects in remote:path.</p>
<h2 id="synopsis-14">Synopsis</h2>
<p>Counts objects in the path and calculates the total size. Prints the
result to standard output.</p>
<p>By default the output is in human-readable format, but shows values
in both human-readable format as well as the raw numbers (global option
<code>--human-readable</code> is not considered). Use option
<code>--json</code> to format output as JSON instead.</p>
<p>Recurses by default, use <code>--max-depth 1</code> to stop the
recursion.</p>
<p>Some backends do not always provide file sizes, see for example <a
href="https://rclone.org/googlephotos/#size">Google Photos</a> and <a
href="https://rclone.org/drive/#limitations-of-google-docs">Google
Docs</a>. Rclone will then show a notice in the log indicating how many
such files were encountered, and count them in as empty files in the
output of the size command.</p>
<pre><code>rclone size remote:path [flags]</code></pre>
<h2 id="options-14">Options</h2>
<pre><code>  -h, --help   help for size
      --json   Format output as JSON</code></pre>
<p>Options shared with other commands are described next. See the <a
href="https://rclone.org/flags/">global flags page</a> for global
options not listed here.</p>
<h3 id="filter-options-10">Filter Options</h3>
<p>Flags for filtering directory listings</p>
<pre class="text"><code>      --delete-excluded                     Delete files on dest excluded from sync
      --exclude stringArray                 Exclude files matching pattern
      --exclude-from stringArray            Read file exclude patterns from file (use - to read from stdin)
      --exclude-if-present stringArray      Exclude directories if filename is present
      --files-from stringArray              Read list of source-file names from file (use - to read from stdin)
      --files-from-raw stringArray          Read list of source-file names from file without any processing of lines (use - to read from stdin)
      --files-from0 stringArray             Read list of source-file names from file using NUL as separator (use - to read from stdin)
  -f, --filter stringArray                  Add a file filtering rule
      --filter-from stringArray             Read file filtering patterns from a file (use - to read from stdin)
      --hash-filter string                  Partition filenames by hash k/n or randomly @/n
      --ignore-case                         Ignore case in filters (case insensitive)
      --include stringArray                 Include files matching pattern
      --include-from stringArray            Read file include patterns from file (use - to read from stdin)
      --max-age Duration                    Only transfer files younger than this in s or suffix ms|s|m|h|d|w|M|y (default off)
      --max-depth int                       If set limits the recursion depth to this (default -1)
      --max-size SizeSuffix                 Only transfer files smaller than this in KiB or suffix B|K|M|G|T|P (default off)
      --metadata-exclude stringArray        Exclude metadatas matching pattern
      --metadata-exclude-from stringArray   Read metadata exclude patterns from file (use - to read from stdin)
      --metadata-filter stringArray         Add a metadata filtering rule
      --metadata-filter-from stringArray    Read metadata filtering patterns from a file (use - to read from stdin)
      --metadata-include stringArray        Include metadatas matching pattern
      --metadata-include-from stringArray   Read metadata include patterns from file (use - to read from stdin)
      --min-age Duration                    Only transfer files older than this in s or suffix ms|s|m|h|d|w|M|y (default off)
      --min-size SizeSuffix                 Only transfer files bigger than this in KiB or suffix B|K|M|G|T|P (default off)</code></pre>
<h3 id="listing-options-10">Listing Options</h3>
<p>Flags for listing directories</p>
<pre class="text"><code>      --default-time Time   Time to show if modtime is unknown for files and directories (default 2000-01-01T00:00:00Z)
      --fast-list           Use recursive list if available; uses more memory but fewer transactions</code></pre>
<h2 id="see-also-14">See Also</h2>
<!-- markdownlint-capture -->
<!-- markdownlint-disable ul-style line-length -->
<ul>
<li><a href="https://rclone.org/commands/rclone/">rclone</a> - Show help
for rclone commands, flags and backends.</li>
</ul>
<!-- markdownlint-restore -->
<h1 id="rclone-version">rclone version</h1>
<p>Show the version number.</p>
<h2 id="synopsis-15">Synopsis</h2>
<p>Show the rclone version number, the go version, the build target OS
and architecture, the runtime OS and kernel version and bitness, build
tags and the type of executable (static or dynamic).</p>
<p>For example:</p>
<pre class="console"><code>$ rclone version
rclone v1.55.0
- os/version: ubuntu 18.04 (64 bit)
- os/kernel: 4.15.0-136-generic (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.16
- go/linking: static
- go/tags: none</code></pre>
<p>Note: before rclone version 1.55 the os/type and os/arch lines were
merged, and the "go/version" line was tagged as "go version".</p>
<p>If you supply the --check flag, then it will do an online check to
compare your version with the latest release and the latest beta.</p>
<pre class="console"><code>$ rclone version --check
yours:  1.42.0.6
latest: 1.42          (released 2018-06-16)
beta:   1.42.0.5      (released 2018-06-17)</code></pre>
<p>Or</p>
<pre class="console"><code>$ rclone version --check
yours:  1.41
latest: 1.42          (released 2018-06-16)
  upgrade: https://downloads.rclone.org/v1.42
beta:   1.42.0.5      (released 2018-06-17)
  upgrade: https://beta.rclone.org/v1.42-005-g56e1e820</code></pre>
<p>If you supply the --deps flag then rclone will print a list of all
the packages it depends on and their versions along with some other
information about the build.</p>
<pre><code>rclone version [flags]</code></pre>
<h2 id="options-15">Options</h2>
<pre><code>      --check   Check for new version
      --deps    Show the Go dependencies
  -h, --help    help for version</code></pre>
<p>See the <a href="https://rclone.org/flags/">global flags page</a> for
global options not listed here.</p>
<h2 id="see-also-15">See Also</h2>
<!-- markdownlint-capture -->
<!-- markdownlint-disable ul-style line-length -->
<ul>
<li><a href="https://rclone.org/commands/rclone/">rclone</a> - Show help
for rclone commands, flags and backends.</li>
</ul>
<!-- markdownlint-restore -->
<h1 id="rclone-cleanup">rclone cleanup</h1>
<p>Clean up the remote if possible.</p>
<h2 id="synopsis-16">Synopsis</h2>
<p>Clean up the remote if possible. Empty the trash or delete old file
versions. Not supported by all remotes.</p>
<pre><code>rclone cleanup remote:path [flags]</code></pre>
<h2 id="options-16">Options</h2>
<pre><code>  -h, --help   help for cleanup</code></pre>
<p>Options shared with other commands are described next. See the <a
href="https://rclone.org/flags/">global flags page</a> for global
options not listed here.</p>
<h3 id="important-options-7">Important Options</h3>
<p>Important flags useful for most commands</p>
<pre class="text"><code>  -n, --dry-run         Do a trial run with no permanent changes
  -i, --interactive     Enable interactive mode
  -v, --verbose count   Print lots more stuff (repeat for more)</code></pre>
<h2 id="see-also-16">See Also</h2>
<!-- markdownlint-capture -->
<!-- markdownlint-disable ul-style line-length -->
<ul>
<li><a href="https://rclone.org/commands/rclone/">rclone</a> - Show help
for rclone commands, flags and backends.</li>
</ul>
<!-- markdownlint-restore -->
<h1 id="rclone-dedupe">rclone dedupe</h1>
<p>Interactively find duplicate filenames and delete/rename them.</p>
<h2 id="synopsis-17">Synopsis</h2>
<p>By default <code>dedupe</code> interactively finds files with
duplicate names and offers to delete all but one or rename them to be
different. This is known as deduping by name.</p>
<p>Deduping by name is only useful with a small group of backends (e.g.
Google Drive, Opendrive) that can have duplicate file names. It can be
run on wrapping backends (e.g. crypt) if they wrap a backend which
supports duplicate file names.</p>
<p>However if <code>--by-hash</code> is passed in then dedupe will find
files with duplicate hashes instead which will work on any backend which
supports at least one hash. This can be used to find files with
duplicate content. This is known as deduping by hash.</p>
<p>If deduping by name, first rclone will merge directories with the
same name. It will do this iteratively until all the identically named
directories have been merged.</p>
<p>Next, if deduping by name, for every group of duplicate file names /
hashes, it will delete all but one identical file it finds without
confirmation. This means that for most duplicated files the
<code>dedupe</code> command will not be interactive.</p>
<p><code>dedupe</code> considers files to be identical if they have the
same file path and the same hash. If the backend does not support hashes
(e.g. crypt wrapping Google Drive) then they will never be found to be
identical. If you use the <code>--size-only</code> flag then files will
be considered identical if they have the same size (any hash will be
ignored). This can be useful on crypt backends which do not support
hashes.</p>
<p>Next rclone will resolve the remaining duplicates. Exactly which
action is taken depends on the dedupe mode. By default, rclone will
interactively query the user for each one.</p>
<p><strong>Important</strong>: Since this can cause data loss, test
first with the <code>--dry-run</code> or the
<code>--interactive</code>/<code>-i</code> flag.</p>
<p>Here is an example run.</p>
<p>Before - with duplicates</p>
<pre class="console"><code>$ rclone lsl drive:dupes
  6048320 2016-03-05 16:23:16.798000000 one.txt
  6048320 2016-03-05 16:23:11.775000000 one.txt
   564374 2016-03-05 16:23:06.731000000 one.txt
  6048320 2016-03-05 16:18:26.092000000 one.txt
  6048320 2016-03-05 16:22:46.185000000 two.txt
  1744073 2016-03-05 16:22:38.104000000 two.txt
   564374 2016-03-05 16:22:52.118000000 two.txt</code></pre>
<p>Now the <code>dedupe</code> session</p>
<pre class="console"><code>$ rclone dedupe drive:dupes
2016/03/05 16:24:37 Google drive root &#39;dupes&#39;: Looking for duplicates using interactive mode.
one.txt: Found 4 files with duplicate names
one.txt: Deleting 2/3 identical duplicates (MD5 &quot;1eedaa9fe86fd4b8632e2ac549403b36&quot;)
one.txt: 2 duplicates remain
  1:      6048320 bytes, 2016-03-05 16:23:16.798000000, MD5 1eedaa9fe86fd4b8632e2ac549403b36
  2:       564374 bytes, 2016-03-05 16:23:06.731000000, MD5 7594e7dc9fc28f727c42ee3e0749de81
s) Skip and do nothing
k) Keep just one (choose which in next step)
r) Rename all to be different (by changing file.jpg to file-1.jpg)
s/k/r&gt; k
Enter the number of the file to keep&gt; 1
one.txt: Deleted 1 extra copies
two.txt: Found 3 files with duplicate names
two.txt: 3 duplicates remain
  1:       564374 bytes, 2016-03-05 16:22:52.118000000, MD5 7594e7dc9fc28f727c42ee3e0749de81
  2:      6048320 bytes, 2016-03-05 16:22:46.185000000, MD5 1eedaa9fe86fd4b8632e2ac549403b36
  3:      1744073 bytes, 2016-03-05 16:22:38.104000000, MD5 851957f7fb6f0bc4ce76be966d336802
s) Skip and do nothing
k) Keep just one (choose which in next step)
r) Rename all to be different (by changing file.jpg to file-1.jpg)
s/k/r&gt; r
two-1.txt: renamed from: two.txt
two-2.txt: renamed from: two.txt
two-3.txt: renamed from: two.txt</code></pre>
<p>The result being</p>
<pre class="console"><code>$ rclone lsl drive:dupes
  6048320 2016-03-05 16:23:16.798000000 one.txt
   564374 2016-03-05 16:22:52.118000000 two-1.txt
  6048320 2016-03-05 16:22:46.185000000 two-2.txt
  1744073 2016-03-05 16:22:38.104000000 two-3.txt</code></pre>
<p>Dedupe can be run non interactively using the
<code>--dedupe-mode</code> flag or by using an extra parameter with the
same value</p>
<ul>
<li><code>--dedupe-mode interactive</code> - interactive as above.</li>
<li><code>--dedupe-mode skip</code> - removes identical files then skips
anything left.</li>
<li><code>--dedupe-mode first</code> - removes identical files then
keeps the first one.</li>
<li><code>--dedupe-mode newest</code> - removes identical files then
keeps the newest one.</li>
<li><code>--dedupe-mode oldest</code> - removes identical files then
keeps the oldest one.</li>
<li><code>--dedupe-mode largest</code> - removes identical files then
keeps the largest one.</li>
<li><code>--dedupe-mode smallest</code> - removes identical files then
keeps the smallest one.</li>
<li><code>--dedupe-mode rename</code> - removes identical files then
renames the rest to be different.</li>
<li><code>--dedupe-mode list</code> - lists duplicate dirs and files
only and changes nothing.</li>
</ul>
<p>For example, to rename all the identically named photos in your
Google Photos directory, do</p>
<pre class="console"><code>rclone dedupe --dedupe-mode rename &quot;drive:Google Photos&quot;</code></pre>
<p>Or</p>
<pre class="console"><code>rclone dedupe rename &quot;drive:Google Photos&quot;</code></pre>
<pre><code>rclone dedupe [mode] remote:path [flags]</code></pre>
<h2 id="options-17">Options</h2>
<pre><code>      --by-hash              Find identical hashes rather than names
      --dedupe-mode string   Dedupe mode interactive|skip|first|newest|oldest|largest|smallest|rename (default &quot;interactive&quot;)
  -h, --help                 help for dedupe</code></pre>
<p>Options shared with other commands are described next. See the <a
href="https://rclone.org/flags/">global flags page</a> for global
options not listed here.</p>
<h3 id="important-options-8">Important Options</h3>
<p>Important flags useful for most commands</p>
<pre class="text"><code>  -n, --dry-run         Do a trial run with no permanent changes
  -i, --interactive     Enable interactive mode
  -v, --verbose count   Print lots more stuff (repeat for more)</code></pre>
<h2 id="see-also-17">See Also</h2>
<!-- markdownlint-capture -->
<!-- markdownlint-disable ul-style line-length -->
<ul>
<li><a href="https://rclone.org/commands/rclone/">rclone</a> - Show help
for rclone commands, flags and backends.</li>
</ul>
<!-- markdownlint-restore -->
<h1 id="rclone-about">rclone about</h1>
<p>Get quota information from the remote.</p>
<h2 id="synopsis-18">Synopsis</h2>
<p>Prints quota information about a remote to standard output. The
output is typically used, free, quota and trash contents.</p>
<p>E.g. Typical output from <code>rclone about remote:</code> is:</p>
<pre class="text"><code>Total:   17 GiB
Used:    7.444 GiB
Free:    1.315 GiB
Trashed: 100.000 MiB
Other:   8.241 GiB</code></pre>
<p>Where the fields are:</p>
<ul>
<li>Total: Total size available.</li>
<li>Used: Total size used.</li>
<li>Free: Total space available to this user.</li>
<li>Trashed: Total space used by trash.</li>
<li>Other: Total amount in other storage (e.g. Gmail, Google
Photos).</li>
<li>Objects: Total number of objects in the storage.</li>
</ul>
<p>All sizes are in number of bytes.</p>
<p>Applying a <code>--full</code> flag to the command prints the bytes
in full, e.g.</p>
<pre class="text"><code>Total:   18253611008
Used:    7993453766
Free:    1411001220
Trashed: 104857602
Other:   8849156022</code></pre>
<p>A <code>--json</code> flag generates conveniently machine-readable
output, e.g.</p>
<div class="sourceCode" id="cb135"><pre
class="sourceCode json"><code class="sourceCode json"><span id="cb135-1"><a href="#cb135-1" aria-hidden="true" tabindex="-1"></a><span class="fu">{</span></span>
<span id="cb135-2"><a href="#cb135-2" aria-hidden="true" tabindex="-1"></a>  <span class="dt">&quot;total&quot;</span><span class="fu">:</span> <span class="dv">18253611008</span><span class="fu">,</span></span>
<span id="cb135-3"><a href="#cb135-3" aria-hidden="true" tabindex="-1"></a>  <span class="dt">&quot;used&quot;</span><span class="fu">:</span> <span class="dv">7993453766</span><span class="fu">,</span></span>
<span id="cb135-4"><a href="#cb135-4" aria-hidden="true" tabindex="-1"></a>  <span class="dt">&quot;trashed&quot;</span><span class="fu">:</span> <span class="dv">104857602</span><span class="fu">,</span></span>
<span id="cb135-5"><a href="#cb135-5" aria-hidden="true" tabindex="-1"></a>  <span class="dt">&quot;other&quot;</span><span class="fu">:</span> <span class="dv">8849156022</span><span class="fu">,</span></span>
<span id="cb135-6"><a href="#cb135-6" aria-hidden="true" tabindex="-1"></a>  <span class="dt">&quot;free&quot;</span><span class="fu">:</span> <span class="dv">1411001220</span></span>
<span id="cb135-7"><a href="#cb135-7" aria-hidden="true" tabindex="-1"></a><span class="fu">}</span></span></code></pre></div>
<p>Not all backends print all fields. Information is not included if it
is not provided by a backend. Where the value is unlimited it is
omitted.</p>
<p>Some backends does not support the <code>rclone about</code> command
at all, see complete list in <a
href="https://rclone.org/overview/#optional-features">documentation</a>.</p>
<pre><code>rclone about remote: [flags]</code></pre>
<h2 id="options-18">Options</h2>
<pre><code>      --full   Full numbers instead of human-readable
  -h, --help   help for about
      --json   Format output as JSON</code></pre>
<p>See the <a href="https://rclone.org/flags/">global flags page</a> for
global options not listed here.</p>
<h2 id="see-also-18">See Also</h2>
<!-- markdownlint-capture -->
<!-- markdownlint-disable ul-style line-length -->
<ul>
<li><a href="https://rclone.org/commands/rclone/">rclone</a> - Show help
for rclone commands, flags and backends.</li>
</ul>
<!-- markdownlint-restore -->
<h1 id="rclone-archive">rclone archive</h1>
<p>Perform an action on an archive.</p>
<h2 id="synopsis-19">Synopsis</h2>
<p>Perform an action on an archive. Requires the use of a subcommand to
specify the protocol, e.g.</p>
<pre><code>rclone archive list remote:file.zip</code></pre>
<p>Each subcommand has its own options which you can see in their
help.</p>
<p>See <a
href="https://rclone.org/commands/rclone_archive_create/">rclone archive
create</a> for the archive formats supported.</p>
<pre><code>rclone archive &lt;action&gt; [opts] &lt;source&gt; [&lt;destination&gt;] [flags]</code></pre>
<h2 id="options-19">Options</h2>
<pre><code>  -h, --help   help for archive</code></pre>
<p>See the <a href="https://rclone.org/flags/">global flags page</a> for
global options not listed here.</p>
<h2 id="see-also-19">See Also</h2>
<!-- markdownlint-capture -->
<!-- markdownlint-disable ul-style line-length -->
<ul>
<li><a href="https://rclone.org/commands/rclone/">rclone</a> - Show help
for rclone commands, flags and backends.</li>
<li><a href="https://rclone.org/commands/rclone_archive_create/">rclone
archive create</a> - Archive source file(s) to destination.</li>
<li><a href="https://rclone.org/commands/rclone_archive_extract/">rclone
archive extract</a> - Extract archives from source to destination.</li>
<li><a href="https://rclone.org/commands/rclone_archive_list/">rclone
archive list</a> - List archive contents from source.</li>
</ul>
<!-- markdownlint-restore -->
<h1 id="rclone-archive-create">rclone archive create</h1>
<p>Archive source file(s) to destination.</p>
<h2 id="synopsis-20">Synopsis</h2>
<p>Creates an archive from the files in source:path and saves the
archive to dest:path. If dest:path is missing, it will write to the
console.</p>
<p>The valid formats for the <code>--format</code> flag are listed
below. If <code>--format</code> is not set rclone will guess it from the
extension of dest:path.</p>
<table>
<thead>
<tr class="header">
<th style="text-align: left;">Format</th>
<th style="text-align: left;">Extensions</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;">zip</td>
<td style="text-align: left;">.zip</td>
</tr>
<tr class="even">
<td style="text-align: left;">tar</td>
<td style="text-align: left;">.tar</td>
</tr>
<tr class="odd">
<td style="text-align: left;">tar.gz</td>
<td style="text-align: left;">.tar.gz, .tgz, .taz</td>
</tr>
<tr class="even">
<td style="text-align: left;">tar.bz2</td>
<td style="text-align: left;">.tar.bz2, .tb2, .tbz, .tbz2, .tz2</td>
</tr>
<tr class="odd">
<td style="text-align: left;">tar.lz</td>
<td style="text-align: left;">.tar.lz</td>
</tr>
<tr class="even">
<td style="text-align: left;">tar.lz4</td>
<td style="text-align: left;">.tar.lz4</td>
</tr>
<tr class="odd">
<td style="text-align: left;">tar.xz</td>
<td style="text-align: left;">.tar.xz, .txz</td>
</tr>
<tr class="even">
<td style="text-align: left;">tar.zst</td>
<td style="text-align: left;">.tar.zst, .tzst</td>
</tr>
<tr class="odd">
<td style="text-align: left;">tar.br</td>
<td style="text-align: left;">.tar.br</td>
</tr>
<tr class="even">
<td style="text-align: left;">tar.sz</td>
<td style="text-align: left;">.tar.sz</td>
</tr>
<tr class="odd">
<td style="text-align: left;">tar.mz</td>
<td style="text-align: left;">.tar.mz</td>
</tr>
</tbody>
</table>
<p>The <code>--prefix</code> and <code>--full-path</code> flags control
the prefix for the files in the archive.</p>
<p>If the flag <code>--full-path</code> is set then the files will have
the full source path as the prefix.</p>
<p>If the flag <code>--prefix=&lt;value&gt;</code> is set then the files
will have <code>&lt;value&gt;</code> as prefix. It's possible to create
invalid file names with <code>--prefix=&lt;value&gt;</code> so use with
caution. Flag <code>--prefix</code> has priority over
<code>--full-path</code>.</p>
<p>Given a directory <code>/sourcedir</code> with the following:</p>
<pre><code>file1.txt
dir1/file2.txt</code></pre>
<p>Running the command
<code>rclone archive create /sourcedir /dest.tar.gz</code> will make an
archive with the contents:</p>
<pre><code>file1.txt
dir1/
dir1/file2.txt</code></pre>
<p>Running the command
<code>rclone archive create --full-path /sourcedir /dest.tar.gz</code>
will make an archive with the contents:</p>
<pre><code>sourcedir/file1.txt
sourcedir/dir1/
sourcedir/dir1/file2.txt</code></pre>
<p>Running the command
<code>rclone archive create --prefix=my_new_path /sourcedir /dest.tar.gz</code>
will make an archive with the contents:</p>
<pre><code>my_new_path/file1.txt
my_new_path/dir1/
my_new_path/dir1/file2.txt</code></pre>
<pre><code>rclone archive create [flags] &lt;source&gt; [&lt;destination&gt;]</code></pre>
<h2 id="options-20">Options</h2>
<pre><code>      --format string   Create the archive with format or guess from extension.
      --full-path       Set prefix for files in archive to source path
  -h, --help            help for create
      --prefix string   Set prefix for files in archive to entered value or source path</code></pre>
<p>See the <a href="https://rclone.org/flags/">global flags page</a> for
global options not listed here.</p>
<h2 id="see-also-20">See Also</h2>
<!-- markdownlint-capture -->
<!-- markdownlint-disable ul-style line-length -->
<ul>
<li><a href="https://rclone.org/commands/rclone_archive/">rclone
archive</a> - Perform an action on an archive.</li>
</ul>
<!-- markdownlint-restore -->
<h1 id="rclone-archive-extract">rclone archive extract</h1>
<p>Extract archives from source to destination.</p>
<h2 id="synopsis-21">Synopsis</h2>
<p>Extract the archive contents to a destination directory auto
detecting the format. See <a
href="https://rclone.org/commands/rclone_archive_create/">rclone archive
create</a> for the archive formats supported.</p>
<p>For example on this archive:</p>
<pre><code>$ rclone archive list --long remote:archive.zip
        6 2025-10-30 09:46:23.000000000 file.txt
        0 2025-10-30 09:46:57.000000000 dir/
        4 2025-10-30 09:46:57.000000000 dir/bye.txt</code></pre>
<p>You can run extract like this</p>
<pre><code>$ rclone archive extract remote:archive.zip remote:extracted</code></pre>
<p>Which gives this result</p>
<pre><code>$ rclone tree remote:extracted
/
├── dir
│   └── bye.txt
└── file.txt</code></pre>
<p>The source or destination or both can be local or remote.</p>
<p>Filters can be used to only extract certain files:</p>
<pre><code>$ rclone archive extract archive.zip partial --include &quot;bye.*&quot;
$ rclone tree partial
/
└── dir
    └── bye.txt</code></pre>
<p>The <a href="https://rclone.org/archive/">archive backend</a> can
also be used to extract files. It can be used to read only mount
archives also but it supports a different set of archive formats to the
archive commands.</p>
<pre><code>rclone archive extract [flags] &lt;source&gt; &lt;destination&gt;</code></pre>
<h2 id="options-21">Options</h2>
<pre><code>  -h, --help   help for extract</code></pre>
<p>See the <a href="https://rclone.org/flags/">global flags page</a> for
global options not listed here.</p>
<h2 id="see-also-21">See Also</h2>
<!-- markdownlint-capture -->
<!-- markdownlint-disable ul-style line-length -->
<ul>
<li><a href="https://rclone.org/commands/rclone_archive/">rclone
archive</a> - Perform an action on an archive.</li>
</ul>
<!-- markdownlint-restore -->
<h1 id="rclone-archive-list">rclone archive list</h1>
<p>List archive contents from source.</p>
<h2 id="synopsis-22">Synopsis</h2>
<p>List the contents of an archive to the console, auto detecting the
format. See <a
href="https://rclone.org/commands/rclone_archive_create/">rclone archive
create</a> for the archive formats supported.</p>
<p>For example:</p>
<pre><code>$ rclone archive list remote:archive.zip
        6 file.txt
        0 dir/
        4 dir/bye.txt</code></pre>
<p>Or with <code>--long</code> flag for more info:</p>
<pre><code>$ rclone archive list --long remote:archive.zip
        6 2025-10-30 09:46:23.000000000 file.txt
        0 2025-10-30 09:46:57.000000000 dir/
        4 2025-10-30 09:46:57.000000000 dir/bye.txt</code></pre>
<p>Or with <code>--plain</code> flag which is useful for scripting:</p>
<pre><code>$ rclone archive list --plain /path/to/archive.zip
file.txt
dir/
dir/bye.txt</code></pre>
<p>Or with <code>--dirs-only</code>:</p>
<pre><code>$ rclone archive list --plain --dirs-only /path/to/archive.zip
dir/</code></pre>
<p>Or with <code>--files-only</code>:</p>
<pre><code>$ rclone archive list --plain --files-only /path/to/archive.zip
file.txt
dir/bye.txt</code></pre>
<p>Filters may also be used:</p>
<pre><code>$ rclone archive list --long archive.zip --include &quot;bye.*&quot;
        4 2025-10-30 09:46:57.000000000 dir/bye.txt</code></pre>
<p>The <a href="https://rclone.org/archive/">archive backend</a> can
also be used to list files. It can be used to read only mount archives
also but it supports a different set of archive formats to the archive
commands.</p>
<pre><code>rclone archive list [flags] &lt;source&gt;</code></pre>
<h2 id="options-22">Options</h2>
<pre><code>      --dirs-only    Only list directories
      --files-only   Only list files
  -h, --help         help for list
      --long         List extra attributtes
      --plain        Only list file names</code></pre>
<p>See the <a href="https://rclone.org/flags/">global flags page</a> for
global options not listed here.</p>
<h2 id="see-also-22">See Also</h2>
<!-- markdownlint-capture -->
<!-- markdownlint-disable ul-style line-length -->
<ul>
<li><a href="https://rclone.org/commands/rclone_archive/">rclone
archive</a> - Perform an action on an archive.</li>
</ul>
<!-- markdownlint-restore -->
<h1 id="rclone-authorize">rclone authorize</h1>
<p>Remote authorization.</p>
<h2 id="synopsis-23">Synopsis</h2>
<p>Remote authorization. Used to authorize a remote or headless rclone
from a machine with a browser. Use as instructed by rclone config. See
also the <a href="/remote_setup">remote setup documentation</a>.</p>
<p>The command requires 1-3 arguments:</p>
<ul>
<li>Name of a backend (e.g. "drive", "s3")</li>
<li>Either a base64 encoded JSON blob obtained from a previous rclone
config session</li>
<li>Or a client_id and client_secret pair obtained from the remote
service</li>
</ul>
<p>Use --auth-no-open-browser to prevent rclone to open auth link in
default browser automatically.</p>
<p>Use --template to generate HTML output via a custom Go template. If a
blank string is provided as an argument to this flag, the default
template is used.</p>
<pre><code>rclone authorize &lt;backendname&gt; [base64_json_blob | client_id client_secret] [flags]</code></pre>
<h2 id="options-23">Options</h2>
<pre><code>      --auth-no-open-browser   Do not automatically open auth link in default browser
  -h, --help                   help for authorize
      --template string        The path to a custom Go template for generating HTML responses</code></pre>
<p>See the <a href="https://rclone.org/flags/">global flags page</a> for
global options not listed here.</p>
<h2 id="see-also-23">See Also</h2>
<!-- markdownlint-capture -->
<!-- markdownlint-disable ul-style line-length -->
<ul>
<li><a href="https://rclone.org/commands/rclone/">rclone</a> - Show help
for rclone commands, flags and backends.</li>
</ul>
<!-- markdownlint-restore -->
<h1 id="rclone-backend">rclone backend</h1>
<p>Run a backend-specific command.</p>
<h2 id="synopsis-24">Synopsis</h2>
<p>This runs a backend-specific command. The commands themselves (except
for "help" and "features") are defined by the backends and you should
see the backend docs for definitions.</p>
<p>You can discover what commands a backend implements by using</p>
<pre class="console"><code>rclone backend help remote:
rclone backend help &lt;backendname&gt;</code></pre>
<p>You can also discover information about the backend using (see <a
href="https://rclone.org/rc/#operations-fsinfo">operations/fsinfo</a> in
the remote control docs for more info).</p>
<pre class="console"><code>rclone backend features remote:</code></pre>
<p>Pass options to the backend command with -o. This should be key=value
or key, e.g.:</p>
<pre class="console"><code>rclone backend stats remote:path stats -o format=json -o long</code></pre>
<p>Pass arguments to the backend by placing them on the end of the
line</p>
<pre class="console"><code>rclone backend cleanup remote:path file1 file2 file3</code></pre>
<p>Note to run these commands on a running backend then see <a
href="https://rclone.org/rc/#backend-command">backend/command</a> in the
rc docs.</p>
<pre><code>rclone backend &lt;command&gt; remote:path [opts] &lt;args&gt; [flags]</code></pre>
<h2 id="options-24">Options</h2>
<pre><code>  -h, --help                 help for backend
      --json                 Always output in JSON format
  -o, --option stringArray   Option in the form name=value or name</code></pre>
<p>Options shared with other commands are described next. See the <a
href="https://rclone.org/flags/">global flags page</a> for global
options not listed here.</p>
<h3 id="important-options-9">Important Options</h3>
<p>Important flags useful for most commands</p>
<pre class="text"><code>  -n, --dry-run         Do a trial run with no permanent changes
  -i, --interactive     Enable interactive mode
  -v, --verbose count   Print lots more stuff (repeat for more)</code></pre>
<h2 id="see-also-24">See Also</h2>
<!-- markdownlint-capture -->
<!-- markdownlint-disable ul-style line-length -->
<ul>
<li><a href="https://rclone.org/commands/rclone/">rclone</a> - Show help
for rclone commands, flags and backends.</li>
</ul>
<!-- markdownlint-restore -->
<h1 id="rclone-bisync">rclone bisync</h1>
<p>Perform bidirectional synchronization between two paths.</p>
<h2 id="synopsis-25">Synopsis</h2>
<p>Perform bidirectional synchronization between two paths.</p>
<p><a href="https://rclone.org/bisync/">Bisync</a> provides a
bidirectional cloud sync solution in rclone. It retains the Path1 and
Path2 filesystem listings from the prior run. On each successive run it
will:</p>
<ul>
<li>list files on Path1 and Path2, and check for changes on each side.
Changes include <code>New</code>, <code>Newer</code>,
<code>Older</code>, and <code>Deleted</code> files.</li>
<li>Propagate changes on Path1 to Path2, and vice-versa.</li>
</ul>
<p>Bisync is considered an <strong>advanced command</strong>, so use
with care. Make sure you have read and understood the entire <a
href="https://rclone.org/bisync">manual</a> (especially the <a
href="https://rclone.org/bisync/#limitations">Limitations</a> section)
before using, or data loss can result. Questions can be asked in the <a
href="https://forum.rclone.org/">Rclone Forum</a>.</p>
<p>See <a href="https://rclone.org/bisync/">full bisync description</a>
for details.</p>
<pre><code>rclone bisync remote1:path1 remote2:path2 [flags]</code></pre>
<h2 id="options-25">Options</h2>
<pre><code>      --backup-dir1 string                   --backup-dir for Path1. Must be a non-overlapping path on the same remote.
      --backup-dir2 string                   --backup-dir for Path2. Must be a non-overlapping path on the same remote.
      --check-access                         Ensure expected RCLONE_TEST files are found on both Path1 and Path2 filesystems, else abort.
      --check-filename string                Filename for --check-access (default: RCLONE_TEST)
      --check-sync string                    Controls comparison of final listings: true|false|only (default: true) (default &quot;true&quot;)
      --compare string                       Comma-separated list of bisync-specific compare options ex. &#39;size,modtime,checksum&#39; (default: &#39;size,modtime&#39;)
      --conflict-loser ConflictLoserAction   Action to take on the loser of a sync conflict (when there is a winner) or on both files (when there is no winner): , num, pathname, delete (default: num)
      --conflict-resolve string              Automatically resolve conflicts by preferring the version that is: none, path1, path2, newer, older, larger, smaller (default: none) (default &quot;none&quot;)
      --conflict-suffix string               Suffix to use when renaming a --conflict-loser. Can be either one string or two comma-separated strings to assign different suffixes to Path1/Path2. (default: &#39;conflict&#39;)
      --create-empty-src-dirs                Sync creation and deletion of empty directories. (Not compatible with --remove-empty-dirs)
      --download-hash                        Compute hash by downloading when otherwise unavailable. (warning: may be slow and use lots of data!)
      --filters-file string                  Read filtering patterns from a file
      --force                                Bypass --max-delete safety check and run the sync. Consider using with --verbose
  -h, --help                                 help for bisync
      --ignore-listing-checksum              Do not use checksums for listings (add --ignore-checksum to additionally skip post-copy checksum checks)
      --max-delete-renames-aware             Exclude tracked renames from the --max-delete safety check (requires --track-renames)
      --max-lock Duration                    Consider lock files older than this to be expired (default: 0 (never expire)) (minimum: 2m) (default 0s)
      --no-cleanup                           Retain working files (useful for troubleshooting and testing).
      --no-slow-hash                         Ignore listing checksums only on backends where they are slow
      --recover                              Automatically recover from interruptions without requiring --resync.
      --remove-empty-dirs                    Remove ALL empty directories at the final cleanup step.
      --resilient                            Allow future runs to retry after certain less-serious errors, instead of requiring --resync.
  -1, --resync                               Performs the resync run. Equivalent to --resync-mode path1. Consider using --verbose or --dry-run first.
      --resync-mode string                   During resync, prefer the version that is: path1, path2, newer, older, larger, smaller (default: path1 if --resync, otherwise none for no resync.) (default &quot;none&quot;)
      --slow-hash-sync-only                  Ignore slow checksums for listings and deltas, but still consider them during sync calls.
      --workdir string                       Use custom working dir - useful for testing. (default: $HOME/.cache/rclone/bisync)</code></pre>
<p>Options shared with other commands are described next. See the <a
href="https://rclone.org/flags/">global flags page</a> for global
options not listed here.</p>
<h3 id="copy-options-3">Copy Options</h3>
<p>Flags for anything which can copy a file</p>
<pre class="text"><code>      --check-first                                 Do all the checks before starting transfers
  -c, --checksum                                    Check for changes with size &amp; checksum (if available, or fallback to size only)
      --compare-dest stringArray                    Include additional server-side paths during comparison
      --copy-dest stringArray                       Implies --compare-dest but also copies files from paths into destination
      --cutoff-mode HARD|SOFT|CAUTIOUS              Mode to stop transfers when reaching the max transfer limit HARD|SOFT|CAUTIOUS (default HARD)
      --ignore-case-sync                            Ignore case when synchronizing
      --ignore-checksum                             Skip post copy check of checksums
      --ignore-existing                             Skip all files that exist on destination
      --ignore-size                                 Ignore size when skipping use modtime or checksum
  -I, --ignore-times                                Don&#39;t skip items that match size and time - transfer all unconditionally
      --immutable                                   Do not modify files, fail if existing files have been modified
      --inplace                                     Download directly to destination file instead of atomic download to temp/rename
  -l, --links                                       Translate symlinks to/from regular files with a &#39;.rclonelink&#39; extension
      --max-backlog int                             Maximum number of objects in sync or check backlog (default 10000)
      --max-duration Duration                       Maximum duration rclone will transfer data for (default 0s)
      --max-transfer SizeSuffix                     Maximum size of data to transfer (default off)
  -M, --metadata                                    If set, preserve metadata when copying objects
      --modify-window Duration                      Max time diff to be considered the same (default 1ns)
      --multi-thread-chunk-size SizeSuffix          Chunk size for multi-thread downloads / uploads, if not set by filesystem (default 64Mi)
      --multi-thread-cutoff SizeSuffix              Use multi-thread downloads for files above this size (default 256Mi)
      --multi-thread-streams int                    Number of streams to use for multi-thread downloads (default 4)
      --multi-thread-write-buffer-size SizeSuffix   In memory buffer size for writing when in multi-thread mode (default 128Ki)
      --name-transform stringArray                  Transform paths during the copy process
      --no-check-dest                               Don&#39;t check the destination, copy regardless
      --no-traverse                                 Don&#39;t traverse destination file system on copy
      --no-update-dir-modtime                       Don&#39;t update directory modification times
      --no-update-modtime                           Don&#39;t update destination modtime if files identical
      --order-by string                             Instructions on how to order the transfers, e.g. &#39;size,descending&#39;
      --partial-suffix string                       Add partial-suffix to temporary file name when --inplace is not used (default &quot;.partial&quot;)
      --refresh-times                               Refresh the modtime of remote files
      --server-side-across-configs                  Allow server-side operations (e.g. copy) to work across different configs
      --size-only                                   Skip based on size only, not modtime or checksum
      --streaming-upload-cutoff SizeSuffix          Cutoff for switching to chunked upload if file size is unknown, upload starts after reaching cutoff or when file ends (default 100Ki)
  -u, --update                                      Skip files that are newer on the destination</code></pre>
<h3 id="sync-options-1">Sync Options</h3>
<p>Flags used for sync commands</p>
<pre class="text"><code>      --backup-dir string               Make backups into hierarchy based in DIR
      --delete-after                    When synchronizing, delete files on destination after transferring (default)
      --delete-before                   When synchronizing, delete files on destination before transferring
      --delete-during                   When synchronizing, delete files during transfer
      --fix-case                        Force rename of case insensitive dest to match source
      --ignore-errors                   Delete even if there are I/O errors
      --list-cutoff int                 To save memory, sort directory listings on disk above this threshold (default 1000000)
      --max-delete int                  When synchronizing, limit the number of deletes (default -1)
      --max-delete-size SizeSuffix      When synchronizing, limit the total size of deletes (default off)
      --suffix string                   Suffix to add to changed files
      --suffix-keep-extension           Preserve the extension when using --suffix
      --track-renames                   When synchronizing, track file renames and do a server-side move if possible
      --track-renames-strategy string   Strategies to use when synchronizing using track-renames hash|modtime|leaf (default &quot;hash&quot;)</code></pre>
<h3 id="important-options-10">Important Options</h3>
<p>Important flags useful for most commands</p>
<pre class="text"><code>  -n, --dry-run         Do a trial run with no permanent changes
  -i, --interactive     Enable interactive mode
  -v, --verbose count   Print lots more stuff (repeat for more)</code></pre>
<h3 id="filter-options-11">Filter Options</h3>
<p>Flags for filtering directory listings</p>
<pre class="text"><code>      --delete-excluded                     Delete files on dest excluded from sync
      --exclude stringArray                 Exclude files matching pattern
      --exclude-from stringArray            Read file exclude patterns from file (use - to read from stdin)
      --exclude-if-present stringArray      Exclude directories if filename is present
      --files-from stringArray              Read list of source-file names from file (use - to read from stdin)
      --files-from-raw stringArray          Read list of source-file names from file without any processing of lines (use - to read from stdin)
      --files-from0 stringArray             Read list of source-file names from file using NUL as separator (use - to read from stdin)
  -f, --filter stringArray                  Add a file filtering rule
      --filter-from stringArray             Read file filtering patterns from a file (use - to read from stdin)
      --hash-filter string                  Partition filenames by hash k/n or randomly @/n
      --ignore-case                         Ignore case in filters (case insensitive)
      --include stringArray                 Include files matching pattern
      --include-from stringArray            Read file include patterns from file (use - to read from stdin)
      --max-age Duration                    Only transfer files younger than this in s or suffix ms|s|m|h|d|w|M|y (default off)
      --max-depth int                       If set limits the recursion depth to this (default -1)
      --max-size SizeSuffix                 Only transfer files smaller than this in KiB or suffix B|K|M|G|T|P (default off)
      --metadata-exclude stringArray        Exclude metadatas matching pattern
      --metadata-exclude-from stringArray   Read metadata exclude patterns from file (use - to read from stdin)
      --metadata-filter stringArray         Add a metadata filtering rule
      --metadata-filter-from stringArray    Read metadata filtering patterns from a file (use - to read from stdin)
      --metadata-include stringArray        Include metadatas matching pattern
      --metadata-include-from stringArray   Read metadata include patterns from file (use - to read from stdin)
      --min-age Duration                    Only transfer files older than this in s or suffix ms|s|m|h|d|w|M|y (default off)
      --min-size SizeSuffix                 Only transfer files bigger than this in KiB or suffix B|K|M|G|T|P (default off)</code></pre>
<h2 id="see-also-25">See Also</h2>
<!-- markdownlint-capture -->
<!-- markdownlint-disable ul-style line-length -->
<ul>
<li><a href="https://rclone.org/commands/rclone/">rclone</a> - Show help
for rclone commands, flags and backends.</li>
</ul>
<!-- markdownlint-restore -->
<h1 id="rclone-cat">rclone cat</h1>
<p>Concatenates any files and sends them to stdout.</p>
<h2 id="synopsis-26">Synopsis</h2>
<p>Sends any files to standard output.</p>
<p>You can use it like this to output a single file</p>
<div class="sourceCode" id="cb176"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb176-1"><a href="#cb176-1" aria-hidden="true" tabindex="-1"></a><span class="ex">rclone</span> cat remote:path/to/file</span></code></pre></div>
<p>Or like this to output any file in dir or its subdirectories.</p>
<div class="sourceCode" id="cb177"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb177-1"><a href="#cb177-1" aria-hidden="true" tabindex="-1"></a><span class="ex">rclone</span> cat remote:path/to/dir</span></code></pre></div>
<p>Or like this to output any .txt files in dir or its
subdirectories.</p>
<div class="sourceCode" id="cb178"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb178-1"><a href="#cb178-1" aria-hidden="true" tabindex="-1"></a><span class="ex">rclone</span> <span class="at">--include</span> <span class="st">&quot;*.txt&quot;</span> cat remote:path/to/dir</span></code></pre></div>
<p>Use the <code>--head</code> flag to print characters only at the
start, <code>--tail</code> for the end and <code>--offset</code> and
<code>--count</code> to print a section in the middle. Note that if
offset is negative it will count from the end, so
<code>--offset -1 --count 1</code> is equivalent to
<code>--tail 1</code>.</p>
<p>Use the <code>--separator</code> flag to print a separator value
between files. Be sure to shell-escape special characters. For example,
to print a newline between files, use:</p>
<ul>
<li><p>bash:</p>
<div class="sourceCode" id="cb179"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb179-1"><a href="#cb179-1" aria-hidden="true" tabindex="-1"></a><span class="ex">rclone</span> <span class="at">--include</span> <span class="st">&quot;*.txt&quot;</span> <span class="at">--separator</span> <span class="st">$&#39;</span><span class="dt">\n</span><span class="st">&#39;</span> cat remote:path/to/dir</span></code></pre></div></li>
<li><p>powershell:</p>
<div class="sourceCode" id="cb180"><pre
class="sourceCode powershell"><code class="sourceCode powershell"><span id="cb180-1"><a href="#cb180-1" aria-hidden="true" tabindex="-1"></a>rclone <span class="op">--</span>include <span class="st">&quot;*.txt&quot;</span> <span class="op">--</span>separator <span class="st">&quot;</span><span class="ch">`n</span><span class="st">&quot;</span> <span class="fu">cat</span> remote<span class="op">:</span>path<span class="op">/</span>to<span class="op">/</span><span class="fu">dir</span></span></code></pre></div></li>
</ul>
<pre><code>rclone cat remote:path [flags]</code></pre>
<h2 id="options-26">Options</h2>
<pre><code>      --count int          Only print N characters (default -1)
      --discard            Discard the output instead of printing
      --head int           Only print the first N characters
  -h, --help               help for cat
      --offset int         Start printing at offset N (or from end if -ve)
      --separator string   Separator to use between objects when printing multiple files
      --tail int           Only print the last N characters</code></pre>
<p>Options shared with other commands are described next. See the <a
href="https://rclone.org/flags/">global flags page</a> for global
options not listed here.</p>
<h3 id="filter-options-12">Filter Options</h3>
<p>Flags for filtering directory listings</p>
<pre class="text"><code>      --delete-excluded                     Delete files on dest excluded from sync
      --exclude stringArray                 Exclude files matching pattern
      --exclude-from stringArray            Read file exclude patterns from file (use - to read from stdin)
      --exclude-if-present stringArray      Exclude directories if filename is present
      --files-from stringArray              Read list of source-file names from file (use - to read from stdin)
      --files-from-raw stringArray          Read list of source-file names from file without any processing of lines (use - to read from stdin)
      --files-from0 stringArray             Read list of source-file names from file using NUL as separator (use - to read from stdin)
  -f, --filter stringArray                  Add a file filtering rule
      --filter-from stringArray             Read file filtering patterns from a file (use - to read from stdin)
      --hash-filter string                  Partition filenames by hash k/n or randomly @/n
      --ignore-case                         Ignore case in filters (case insensitive)
      --include stringArray                 Include files matching pattern
      --include-from stringArray            Read file include patterns from file (use - to read from stdin)
      --max-age Duration                    Only transfer files younger than this in s or suffix ms|s|m|h|d|w|M|y (default off)
      --max-depth int                       If set limits the recursion depth to this (default -1)
      --max-size SizeSuffix                 Only transfer files smaller than this in KiB or suffix B|K|M|G|T|P (default off)
      --metadata-exclude stringArray        Exclude metadatas matching pattern
      --metadata-exclude-from stringArray   Read metadata exclude patterns from file (use - to read from stdin)
      --metadata-filter stringArray         Add a metadata filtering rule
      --metadata-filter-from stringArray    Read metadata filtering patterns from a file (use - to read from stdin)
      --metadata-include stringArray        Include metadatas matching pattern
      --metadata-include-from stringArray   Read metadata include patterns from file (use - to read from stdin)
      --min-age Duration                    Only transfer files older than this in s or suffix ms|s|m|h|d|w|M|y (default off)
      --min-size SizeSuffix                 Only transfer files bigger than this in KiB or suffix B|K|M|G|T|P (default off)</code></pre>
<h3 id="listing-options-11">Listing Options</h3>
<p>Flags for listing directories</p>
<pre class="text"><code>      --default-time Time   Time to show if modtime is unknown for files and directories (default 2000-01-01T00:00:00Z)
      --fast-list           Use recursive list if available; uses more memory but fewer transactions</code></pre>
<h2 id="see-also-26">See Also</h2>
<!-- markdownlint-capture -->
<!-- markdownlint-disable ul-style line-length -->
<ul>
<li><a href="https://rclone.org/commands/rclone/">rclone</a> - Show help
for rclone commands, flags and backends.</li>
</ul>
<!-- markdownlint-restore -->
<h1 id="rclone-checksum">rclone checksum</h1>
<p>Checks the files in the destination against a SUM file.</p>
<h2 id="synopsis-27">Synopsis</h2>
<p>Checks that hashsums of destination files match the SUM file. It
compares hashes (MD5, SHA1, etc) and logs a report of files which don't
match. It doesn't alter the file system.</p>
<p>The sumfile is treated as the source and the dst:path is treated as
the destination for the purposes of the output.</p>
<p>If you supply the <code>--download</code> flag, it will download the
data from the remote and calculate the content hash on the fly. This can
be useful for remotes that don't support hashes or if you really want to
check all the data.</p>
<p>Note that hash values in the SUM file are treated as case
insensitive.</p>
<p>If you supply the <code>--one-way</code> flag, it will only check
that files in the source match the files in the destination, not the
other way around. This means that extra files in the destination that
are not in the source will not be detected.</p>
<p>The <code>--differ</code>, <code>--missing-on-dst</code>,
<code>--missing-on-src</code>, <code>--match</code> and
<code>--error</code> flags write paths, one per line, to the file name
(or stdout if it is <code>-</code>) supplied. What they write is
described in the help below. For example <code>--differ</code> will
write all paths which are present on both the source and destination but
different.</p>
<p>The <code>--combined</code> flag will write a file (or stdout) which
contains all file paths with a symbol and then a space and then the path
to tell you what happened to it. These are reminiscent of diff
files.</p>
<ul>
<li><code>= path</code> means path was found in source and destination
and was identical</li>
<li><code>- path</code> means path was missing on the source, so only in
the destination</li>
<li><code>+ path</code> means path was missing on the destination, so
only in the source</li>
<li><code>* path</code> means path was present in source and destination
but different.</li>
<li><code>! path</code> means there was an error reading or hashing the
source or dest.</li>
</ul>
<p>The default number of parallel checks is 8. See the <a
href="https://rclone.org/docs/#checkers-int">--checkers</a> option for
more information.</p>
<pre><code>rclone checksum &lt;hash&gt; sumfile dst:path [flags]</code></pre>
<h2 id="options-27">Options</h2>
<pre><code>      --combined string         Make a combined report of changes to this file
      --differ string           Report all non-matching files to this file
      --download                Check by hashing the contents
      --error string            Report all files with errors (hashing or reading) to this file
  -h, --help                    help for checksum
      --match string            Report all matching files to this file
      --missing-on-dst string   Report all files missing from the destination to this file
      --missing-on-src string   Report all files missing from the source to this file
      --one-way                 Check one way only, source files must exist on remote</code></pre>
<p>Options shared with other commands are described next. See the <a
href="https://rclone.org/flags/">global flags page</a> for global
options not listed here.</p>
<h3 id="filter-options-13">Filter Options</h3>
<p>Flags for filtering directory listings</p>
<pre class="text"><code>      --delete-excluded                     Delete files on dest excluded from sync
      --exclude stringArray                 Exclude files matching pattern
      --exclude-from stringArray            Read file exclude patterns from file (use - to read from stdin)
      --exclude-if-present stringArray      Exclude directories if filename is present
      --files-from stringArray              Read list of source-file names from file (use - to read from stdin)
      --files-from-raw stringArray          Read list of source-file names from file without any processing of lines (use - to read from stdin)
      --files-from0 stringArray             Read list of source-file names from file using NUL as separator (use - to read from stdin)
  -f, --filter stringArray                  Add a file filtering rule
      --filter-from stringArray             Read file filtering patterns from a file (use - to read from stdin)
      --hash-filter string                  Partition filenames by hash k/n or randomly @/n
      --ignore-case                         Ignore case in filters (case insensitive)
      --include stringArray                 Include files matching pattern
      --include-from stringArray            Read file include patterns from file (use - to read from stdin)
      --max-age Duration                    Only transfer files younger than this in s or suffix ms|s|m|h|d|w|M|y (default off)
      --max-depth int                       If set limits the recursion depth to this (default -1)
      --max-size SizeSuffix                 Only transfer files smaller than this in KiB or suffix B|K|M|G|T|P (default off)
      --metadata-exclude stringArray        Exclude metadatas matching pattern
      --metadata-exclude-from stringArray   Read metadata exclude patterns from file (use - to read from stdin)
      --metadata-filter stringArray         Add a metadata filtering rule
      --metadata-filter-from stringArray    Read metadata filtering patterns from a file (use - to read from stdin)
      --metadata-include stringArray        Include metadatas matching pattern
      --metadata-include-from stringArray   Read metadata include patterns from file (use - to read from stdin)
      --min-age Duration                    Only transfer files older than this in s or suffix ms|s|m|h|d|w|M|y (default off)
      --min-size SizeSuffix                 Only transfer files bigger than this in KiB or suffix B|K|M|G|T|P (default off)</code></pre>
<h3 id="listing-options-12">Listing Options</h3>
<p>Flags for listing directories</p>
<pre class="text"><code>      --default-time Time   Time to show if modtime is unknown for files and directories (default 2000-01-01T00:00:00Z)
      --fast-list           Use recursive list if available; uses more memory but fewer transactions</code></pre>
<h2 id="see-also-27">See Also</h2>
<!-- markdownlint-capture -->
<!-- markdownlint-disable ul-style line-length -->
<ul>
<li><a href="https://rclone.org/commands/rclone/">rclone</a> - Show help
for rclone commands, flags and backends.</li>
</ul>
<!-- markdownlint-restore -->
<h1 id="rclone-completion">rclone completion</h1>
<p>Output completion script for a given shell.</p>
<h2 id="synopsis-28">Synopsis</h2>
<p>Generates a shell completion script for rclone. Run with
<code>--help</code> to list the supported shells. Enum-valued flags such
as <code>--log-level</code> and <code>--vfs-cache-mode</code> also
complete their supported values.</p>
<h2 id="options-28">Options</h2>
<pre><code>  -h, --help   help for completion</code></pre>
<p>See the <a href="https://rclone.org/flags/">global flags page</a> for
global options not listed here.</p>
<h2 id="see-also-28">See Also</h2>
<!-- markdownlint-capture -->
<!-- markdownlint-disable ul-style line-length -->
<ul>
<li><a href="https://rclone.org/commands/rclone/">rclone</a> - Show help
for rclone commands, flags and backends.</li>
<li><a href="https://rclone.org/commands/rclone_completion_bash/">rclone
completion bash</a> - Output bash completion script for rclone.</li>
<li><a href="https://rclone.org/commands/rclone_completion_fish/">rclone
completion fish</a> - Output fish completion script for rclone.</li>
<li><a
href="https://rclone.org/commands/rclone_completion_powershell/">rclone
completion powershell</a> - Output powershell completion script for
rclone.</li>
<li><a href="https://rclone.org/commands/rclone_completion_zsh/">rclone
completion zsh</a> - Output zsh completion script for rclone.</li>
</ul>
<!-- markdownlint-restore -->
<h1 id="rclone-completion-bash">rclone completion bash</h1>
<p>Output bash completion script for rclone.</p>
<h2 id="synopsis-29">Synopsis</h2>
<p>Generates a bash shell autocompletion script for rclone.</p>
<p>By default, when run without any arguments,</p>
<pre class="console"><code>rclone completion bash</code></pre>
<p>the generated script will be written to</p>
<pre class="console"><code>/etc/bash_completion.d/rclone</code></pre>
<p>and so rclone will probably need to be run as root, or with sudo.</p>
<p>If you supply a path to a file as the command line argument, then the
generated script will be written to that file, in which case you should
not need root privileges.</p>
<p>If output_file is "-", then the output will be written to stdout.</p>
<p>If you have installed the script into the default location, you can
logout and login again to use the autocompletion script.</p>
<p>Alternatively, you can source the script directly</p>
<pre class="console"><code>. /path/to/my_bash_completion_scripts/rclone</code></pre>
<p>and the autocompletion functionality will be added to your current
shell.</p>
<pre><code>rclone completion bash [output_file] [flags]</code></pre>
<h2 id="options-29">Options</h2>
<pre><code>  -h, --help   help for bash</code></pre>
<p>See the <a href="https://rclone.org/flags/">global flags page</a> for
global options not listed here.</p>
<h2 id="see-also-29">See Also</h2>
<!-- markdownlint-capture -->
<!-- markdownlint-disable ul-style line-length -->
<ul>
<li><a href="https://rclone.org/commands/rclone_completion/">rclone
completion</a> - Output completion script for a given shell.</li>
</ul>
<!-- markdownlint-restore -->
<h1 id="rclone-completion-fish">rclone completion fish</h1>
<p>Output fish completion script for rclone.</p>
<h2 id="synopsis-30">Synopsis</h2>
<p>Generates a fish autocompletion script for rclone.</p>
<p>This writes to /etc/fish/completions/rclone.fish by default so will
probably need to be run with sudo or as root, e.g.</p>
<pre class="console"><code>sudo rclone completion fish</code></pre>
<p>Logout and login again to use the autocompletion scripts, or source
them directly</p>
<pre class="console"><code>. /etc/fish/completions/rclone.fish</code></pre>
<p>If you supply a command line argument the script will be written
there.</p>
<p>If output_file is "-", then the output will be written to stdout.</p>
<pre><code>rclone completion fish [output_file] [flags]</code></pre>
<h2 id="options-30">Options</h2>
<pre><code>  -h, --help   help for fish</code></pre>
<p>See the <a href="https://rclone.org/flags/">global flags page</a> for
global options not listed here.</p>
<h2 id="see-also-30">See Also</h2>
<!-- markdownlint-capture -->
<!-- markdownlint-disable ul-style line-length -->
<ul>
<li><a href="https://rclone.org/commands/rclone_completion/">rclone
completion</a> - Output completion script for a given shell.</li>
</ul>
<!-- markdownlint-restore -->
<h1 id="rclone-completion-powershell">rclone completion powershell</h1>
<p>Output powershell completion script for rclone.</p>
<h2 id="synopsis-31">Synopsis</h2>
<p>Generate the autocompletion script for powershell.</p>
<p>To load completions in your current shell session:</p>
<pre class="console"><code>rclone completion powershell | Out-String | Invoke-Expression</code></pre>
<p>To load completions for every new session, add the output of the
above command to your powershell profile.</p>
<p>If output_file is "-" or missing, then the output will be written to
stdout.</p>
<pre><code>rclone completion powershell [output_file] [flags]</code></pre>
<h2 id="options-31">Options</h2>
<pre><code>  -h, --help   help for powershell</code></pre>
<p>See the <a href="https://rclone.org/flags/">global flags page</a> for
global options not listed here.</p>
<h2 id="see-also-31">See Also</h2>
<!-- markdownlint-capture -->
<!-- markdownlint-disable ul-style line-length -->
<ul>
<li><a href="https://rclone.org/commands/rclone_completion/">rclone
completion</a> - Output completion script for a given shell.</li>
</ul>
<!-- markdownlint-restore -->
<h1 id="rclone-completion-zsh">rclone completion zsh</h1>
<p>Output zsh completion script for rclone.</p>
<h2 id="synopsis-32">Synopsis</h2>
<p>Generates a zsh autocompletion script for rclone.</p>
<p>This writes to /usr/share/zsh/vendor-completions/_rclone by default
so will probably need to be run with sudo or as root, e.g.</p>
<pre class="console"><code>sudo rclone completion zsh</code></pre>
<p>Logout and login again to use the autocompletion scripts, or source
them directly</p>
<pre class="console"><code>autoload -U compinit &amp;&amp; compinit</code></pre>
<p>If you supply a command line argument the script will be written
there.</p>
<p>If output_file is "-", then the output will be written to stdout.</p>
<pre><code>rclone completion zsh [output_file] [flags]</code></pre>
<h2 id="options-32">Options</h2>
<pre><code>  -h, --help   help for zsh</code></pre>
<p>See the <a href="https://rclone.org/flags/">global flags page</a> for
global options not listed here.</p>
<h2 id="see-also-32">See Also</h2>
<!-- markdownlint-capture -->
<!-- markdownlint-disable ul-style line-length -->
<ul>
<li><a href="https://rclone.org/commands/rclone_completion/">rclone
completion</a> - Output completion script for a given shell.</li>
</ul>
<!-- markdownlint-restore -->
<h1 id="rclone-config-create">rclone config create</h1>
<p>Create a new remote with name, type and options.</p>
<h2 id="synopsis-33">Synopsis</h2>
<p>Create a new remote of <code>name</code> with <code>type</code> and
options. The options should be passed in pairs of <code>key</code>
<code>value</code> or as <code>key=value</code>.</p>
<p>For example, to make a swift remote of name myremote using auto
config you would do:</p>
<div class="sourceCode" id="cb206"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb206-1"><a href="#cb206-1" aria-hidden="true" tabindex="-1"></a><span class="ex">rclone</span> config create myremote swift env_auth true</span>
<span id="cb206-2"><a href="#cb206-2" aria-hidden="true" tabindex="-1"></a><span class="ex">rclone</span> config create myremote swift env_auth=true</span></code></pre></div>
<p>So for example if you wanted to configure a Google Drive remote but
using remote authorization you would do this:</p>
<div class="sourceCode" id="cb207"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb207-1"><a href="#cb207-1" aria-hidden="true" tabindex="-1"></a><span class="ex">rclone</span> config create mydrive drive config_is_local=false</span></code></pre></div>
<p>Note that if the config process would normally ask a question the
default is taken (unless <code>--non-interactive</code> is used). Each
time that happens rclone will print or DEBUG a message saying how to
affect the value taken.</p>
<p>If any of the parameters passed is a password field, then rclone will
automatically obscure them if they aren't already obscured before
putting them in the config file.</p>
<p><strong>NB</strong> If the password parameter is 22 characters or
longer and consists only of base64 characters then rclone can get
confused about whether the password is already obscured or not and put
unobscured passwords into the config file. If you want to be 100%
certain that the passwords get obscured then use the
<code>--obscure</code> flag, or if you are 100% certain you are already
passing obscured passwords then use <code>--no-obscure</code>. You can
also set obscured passwords using the
<code>rclone config password</code> command.</p>
<p>The flag <code>--non-interactive</code> is for use by applications
that wish to configure rclone themselves, rather than using rclone's
text based configuration questions. If this flag is set, and rclone
needs to ask the user a question, a JSON blob will be returned with the
question in it.</p>
<p>This will look something like (some irrelevant detail removed):</p>
<div class="sourceCode" id="cb208"><pre
class="sourceCode json"><code class="sourceCode json"><span id="cb208-1"><a href="#cb208-1" aria-hidden="true" tabindex="-1"></a><span class="fu">{</span></span>
<span id="cb208-2"><a href="#cb208-2" aria-hidden="true" tabindex="-1"></a>  <span class="dt">&quot;State&quot;</span><span class="fu">:</span> <span class="st">&quot;*oauth-islocal,teamdrive,,&quot;</span><span class="fu">,</span></span>
<span id="cb208-3"><a href="#cb208-3" aria-hidden="true" tabindex="-1"></a>  <span class="dt">&quot;Option&quot;</span><span class="fu">:</span> <span class="fu">{</span></span>
<span id="cb208-4"><a href="#cb208-4" aria-hidden="true" tabindex="-1"></a>    <span class="dt">&quot;Name&quot;</span><span class="fu">:</span> <span class="st">&quot;config_is_local&quot;</span><span class="fu">,</span></span>
<span id="cb208-5"><a href="#cb208-5" aria-hidden="true" tabindex="-1"></a>    <span class="dt">&quot;Help&quot;</span><span class="fu">:</span> <span class="st">&quot;Use web browser to automatically authenticate rclone with remote?</span><span class="ch">\n</span><span class="st"> * Say Y if the machine running rclone has a web browser you can use</span><span class="ch">\n</span><span class="st"> * Say N if running rclone on a (remote) machine without web browser access</span><span class="ch">\n</span><span class="st">If not sure try Y. If Y failed, try N.</span><span class="ch">\n</span><span class="st">&quot;</span><span class="fu">,</span></span>
<span id="cb208-6"><a href="#cb208-6" aria-hidden="true" tabindex="-1"></a>    <span class="dt">&quot;Default&quot;</span><span class="fu">:</span> <span class="kw">true</span><span class="fu">,</span></span>
<span id="cb208-7"><a href="#cb208-7" aria-hidden="true" tabindex="-1"></a>    <span class="dt">&quot;Examples&quot;</span><span class="fu">:</span> <span class="ot">[</span></span>
<span id="cb208-8"><a href="#cb208-8" aria-hidden="true" tabindex="-1"></a>      <span class="fu">{</span></span>
<span id="cb208-9"><a href="#cb208-9" aria-hidden="true" tabindex="-1"></a>        <span class="dt">&quot;Value&quot;</span><span class="fu">:</span> <span class="st">&quot;true&quot;</span><span class="fu">,</span></span>
<span id="cb208-10"><a href="#cb208-10" aria-hidden="true" tabindex="-1"></a>        <span class="dt">&quot;Help&quot;</span><span class="fu">:</span> <span class="st">&quot;Yes&quot;</span></span>
<span id="cb208-11"><a href="#cb208-11" aria-hidden="true" tabindex="-1"></a>      <span class="fu">}</span><span class="ot">,</span></span>
<span id="cb208-12"><a href="#cb208-12" aria-hidden="true" tabindex="-1"></a>      <span class="fu">{</span></span>
<span id="cb208-13"><a href="#cb208-13" aria-hidden="true" tabindex="-1"></a>        <span class="dt">&quot;Value&quot;</span><span class="fu">:</span> <span class="st">&quot;false&quot;</span><span class="fu">,</span></span>
<span id="cb208-14"><a href="#cb208-14" aria-hidden="true" tabindex="-1"></a>        <span class="dt">&quot;Help&quot;</span><span class="fu">:</span> <span class="st">&quot;No&quot;</span></span>
<span id="cb208-15"><a href="#cb208-15" aria-hidden="true" tabindex="-1"></a>      <span class="fu">}</span></span>
<span id="cb208-16"><a href="#cb208-16" aria-hidden="true" tabindex="-1"></a>    <span class="ot">]</span><span class="fu">,</span></span>
<span id="cb208-17"><a href="#cb208-17" aria-hidden="true" tabindex="-1"></a>    <span class="dt">&quot;Required&quot;</span><span class="fu">:</span> <span class="kw">false</span><span class="fu">,</span></span>
<span id="cb208-18"><a href="#cb208-18" aria-hidden="true" tabindex="-1"></a>    <span class="dt">&quot;IsPassword&quot;</span><span class="fu">:</span> <span class="kw">false</span><span class="fu">,</span></span>
<span id="cb208-19"><a href="#cb208-19" aria-hidden="true" tabindex="-1"></a>    <span class="dt">&quot;Type&quot;</span><span class="fu">:</span> <span class="st">&quot;bool&quot;</span><span class="fu">,</span></span>
<span id="cb208-20"><a href="#cb208-20" aria-hidden="true" tabindex="-1"></a>    <span class="dt">&quot;Exclusive&quot;</span><span class="fu">:</span> <span class="kw">true</span><span class="fu">,</span></span>
<span id="cb208-21"><a href="#cb208-21" aria-hidden="true" tabindex="-1"></a>  <span class="fu">},</span></span>
<span id="cb208-22"><a href="#cb208-22" aria-hidden="true" tabindex="-1"></a>  <span class="dt">&quot;Error&quot;</span><span class="fu">:</span> <span class="st">&quot;&quot;</span><span class="fu">,</span></span>
<span id="cb208-23"><a href="#cb208-23" aria-hidden="true" tabindex="-1"></a><span class="fu">}</span></span></code></pre></div>
<p>The format of <code>Option</code> is the same as returned by
<code>rclone config providers</code>. The question should be asked to
the user and returned to rclone as the <code>--result</code> option
along with the <code>--state</code> parameter.</p>
<p>The keys of <code>Option</code> are used as follows:</p>
<ul>
<li><code>Name</code> - name of variable - show to user</li>
<li><code>Help</code> - help text. Hard wrapped at 80 chars. Any URLs
should be clicky.</li>
<li><code>Default</code> - default value - return this if the user just
wants the default.</li>
<li><code>Examples</code> - the user should be able to choose one of
these</li>
<li><code>Required</code> - the value should be non-empty</li>
<li><code>IsPassword</code> - the value is a password and should be
edited as such</li>
<li><code>Type</code> - type of value, eg <code>bool</code>,
<code>string</code>, <code>int</code> and others</li>
<li><code>Exclusive</code> - if set no free-form entry allowed only the
<code>Examples</code></li>
<li>Irrelevant keys <code>Provider</code>, <code>ShortOpt</code>,
<code>Hide</code>, <code>NoPrefix</code>, <code>Advanced</code></li>
</ul>
<p>If <code>Error</code> is set then it should be shown to the user at
the same time as the question.</p>
<div class="sourceCode" id="cb209"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb209-1"><a href="#cb209-1" aria-hidden="true" tabindex="-1"></a><span class="ex">rclone</span> config update name <span class="at">--continue</span> <span class="at">--state</span> <span class="st">&quot;*oauth-islocal,teamdrive,,&quot;</span> <span class="at">--result</span> <span class="st">&quot;true&quot;</span></span></code></pre></div>
<p>Note that when using <code>--continue</code> all passwords should be
passed in the clear (not obscured). Any default config values should be
passed in with each invocation of <code>--continue</code>.</p>
<p>At the end of the non interactive process, rclone will return a
result with <code>State</code> as empty string.</p>
<p>If <code>--all</code> is passed then rclone will ask all the config
questions, not just the post config questions. Any parameters are used
as defaults for questions as usual.</p>
<p>Note that <code>bin/config.py</code> in the rclone source implements
this protocol as a readable demonstration.</p>
<pre><code>rclone config create name type [key value]* [flags]</code></pre>
<h2 id="options-33">Options</h2>
<pre><code>      --all               Ask the full set of config questions
      --continue          Continue the configuration process with an answer
  -h, --help              help for create
      --no-obscure        Force any passwords not to be obscured
      --no-output         Don&#39;t provide any output
      --non-interactive   Don&#39;t interact with user and return questions
      --obscure           Force any passwords to be obscured
      --result string     Result - use with --continue
      --state string      State - use with --continue</code></pre>
<p>See the <a href="https://rclone.org/flags/">global flags page</a> for
global options not listed here.</p>
<h2 id="see-also-33">See Also</h2>
<!-- markdownlint-capture -->
<!-- markdownlint-disable ul-style line-length -->
<ul>
<li><a href="https://rclone.org/commands/rclone_config/">rclone
config</a> - Enter an interactive configuration session.</li>
</ul>
<!-- markdownlint-restore -->
<h1 id="rclone-config-delete">rclone config delete</h1>
<p>Delete an existing remote.</p>
<pre><code>rclone config delete name [flags]</code></pre>
<h2 id="options-34">Options</h2>
<pre><code>  -h, --help   help for delete</code></pre>
<p>See the <a href="https://rclone.org/flags/">global flags page</a> for
global options not listed here.</p>
<h2 id="see-also-34">See Also</h2>
<!-- markdownlint-capture -->
<!-- markdownlint-disable ul-style line-length -->
<ul>
<li><a href="https://rclone.org/commands/rclone_config/">rclone
config</a> - Enter an interactive configuration session.</li>
</ul>
<!-- markdownlint-restore -->
<h1 id="rclone-config-disconnect">rclone config disconnect</h1>
<p>Disconnects user from remote</p>
<h2 id="synopsis-34">Synopsis</h2>
<p>This disconnects the remote: passed in to the cloud storage
system.</p>
<p>This normally means revoking the oauth token.</p>
<p>To reconnect use "rclone config reconnect".</p>
<pre><code>rclone config disconnect remote: [flags]</code></pre>
<h2 id="options-35">Options</h2>
<pre><code>  -h, --help   help for disconnect</code></pre>
<p>See the <a href="https://rclone.org/flags/">global flags page</a> for
global options not listed here.</p>
<h2 id="see-also-35">See Also</h2>
<!-- markdownlint-capture -->
<!-- markdownlint-disable ul-style line-length -->
<ul>
<li><a href="https://rclone.org/commands/rclone_config/">rclone
config</a> - Enter an interactive configuration session.</li>
</ul>
<!-- markdownlint-restore -->
<h1 id="rclone-config-dump">rclone config dump</h1>
<p>Dump the config file as JSON.</p>
<pre><code>rclone config dump [flags]</code></pre>
<h2 id="options-36">Options</h2>
<pre><code>  -h, --help   help for dump</code></pre>
<p>See the <a href="https://rclone.org/flags/">global flags page</a> for
global options not listed here.</p>
<h2 id="see-also-36">See Also</h2>
<!-- markdownlint-capture -->
<!-- markdownlint-disable ul-style line-length -->
<ul>
<li><a href="https://rclone.org/commands/rclone_config/">rclone
config</a> - Enter an interactive configuration session.</li>
</ul>
<!-- markdownlint-restore -->
<h1 id="rclone-config-edit">rclone config edit</h1>
<p>Enter an interactive configuration session.</p>
<h2 id="synopsis-35">Synopsis</h2>
<p>Enter an interactive configuration session where you can setup new
remotes and manage existing ones. You may also set or remove a password
to protect your configuration.</p>
<pre><code>rclone config edit [flags]</code></pre>
<h2 id="options-37">Options</h2>
<pre><code>  -h, --help   help for edit</code></pre>
<p>See the <a href="https://rclone.org/flags/">global flags page</a> for
global options not listed here.</p>
<h2 id="see-also-37">See Also</h2>
<!-- markdownlint-capture -->
<!-- markdownlint-disable ul-style line-length -->
<ul>
<li><a href="https://rclone.org/commands/rclone_config/">rclone
config</a> - Enter an interactive configuration session.</li>
</ul>
<!-- markdownlint-restore -->
<h1 id="rclone-config-encryption">rclone config encryption</h1>
<p>set, remove and check the encryption for the config file</p>
<h2 id="synopsis-36">Synopsis</h2>
<p>This command sets, clears and checks the encryption for the config
file using the subcommands below.</p>
<h2 id="options-38">Options</h2>
<pre><code>  -h, --help   help for encryption</code></pre>
<p>See the <a href="https://rclone.org/flags/">global flags page</a> for
global options not listed here.</p>
<h2 id="see-also-38">See Also</h2>
<!-- markdownlint-capture -->
<!-- markdownlint-disable ul-style line-length -->
<ul>
<li><a href="https://rclone.org/commands/rclone_config/">rclone
config</a> - Enter an interactive configuration session.</li>
<li><a
href="https://rclone.org/commands/rclone_config_encryption_check/">rclone
config encryption check</a> - Check that the config file is
encrypted</li>
<li><a
href="https://rclone.org/commands/rclone_config_encryption_remove/">rclone
config encryption remove</a> - Remove the config file encryption
password</li>
<li><a
href="https://rclone.org/commands/rclone_config_encryption_set/">rclone
config encryption set</a> - Set or change the config file encryption
password</li>
</ul>
<!-- markdownlint-restore -->
<h1 id="rclone-config-encryption-check">rclone config encryption
check</h1>
<p>Check that the config file is encrypted</p>
<h2 id="synopsis-37">Synopsis</h2>
<p>This checks the config file is encrypted and that you can decrypt
it.</p>
<p>It will attempt to decrypt the config using the password you
supply.</p>
<p>If decryption fails it will return a non-zero exit code if using
<code>--password-command</code>, otherwise it will prompt again for the
password.</p>
<p>If the config file is not encrypted it will return a non zero exit
code.</p>
<pre><code>rclone config encryption check [flags]</code></pre>
<h2 id="options-39">Options</h2>
<pre><code>  -h, --help   help for check</code></pre>
<p>See the <a href="https://rclone.org/flags/">global flags page</a> for
global options not listed here.</p>
<h2 id="see-also-39">See Also</h2>
<!-- markdownlint-capture -->
<!-- markdownlint-disable ul-style line-length -->
<ul>
<li><a
href="https://rclone.org/commands/rclone_config_encryption/">rclone
config encryption</a> - set, remove and check the encryption for the
config file</li>
</ul>
<!-- markdownlint-restore -->
<h1 id="rclone-config-encryption-remove">rclone config encryption
remove</h1>
<p>Remove the config file encryption password</p>
<h2 id="synopsis-38">Synopsis</h2>
<p>Remove the config file encryption password</p>
<p>This removes the config file encryption, returning it to
un-encrypted.</p>
<p>If <code>--password-command</code> is in use, this will be called to
supply the old config password.</p>
<p>If the config was not encrypted then no error will be returned and
this command will do nothing.</p>
<pre><code>rclone config encryption remove [flags]</code></pre>
<h2 id="options-40">Options</h2>
<pre><code>  -h, --help   help for remove</code></pre>
<p>See the <a href="https://rclone.org/flags/">global flags page</a> for
global options not listed here.</p>
<h2 id="see-also-40">See Also</h2>
<!-- markdownlint-capture -->
<!-- markdownlint-disable ul-style line-length -->
<ul>
<li><a
href="https://rclone.org/commands/rclone_config_encryption/">rclone
config encryption</a> - set, remove and check the encryption for the
config file</li>
</ul>
<!-- markdownlint-restore -->
<h1 id="rclone-config-encryption-set">rclone config encryption set</h1>
<p>Set or change the config file encryption password</p>
<h2 id="synopsis-39">Synopsis</h2>
<p>This command sets or changes the config file encryption password.</p>
<p>If there was no config password set then it sets a new one, otherwise
it changes the existing config password.</p>
<p>Note that if you are changing an encryption password using
<code>--password-command</code> then this will be called once to decrypt
the config using the old password and then again to read the new
password to re-encrypt the config.</p>
<p>When <code>--password-command</code> is called to change the password
then the environment variable <code>RCLONE_PASSWORD_CHANGE=1</code> will
be set. So if changing passwords programmatically you can use the
environment variable to distinguish which password you must supply.</p>
<p>Alternatively you can remove the password first (with
<code>rclone config encryption remove</code>), then set it again with
this command which may be easier if you don't mind the unencrypted
config file being on the disk briefly.</p>
<pre><code>rclone config encryption set [flags]</code></pre>
<h2 id="options-41">Options</h2>
<pre><code>  -h, --help   help for set</code></pre>
<p>See the <a href="https://rclone.org/flags/">global flags page</a> for
global options not listed here.</p>
<h2 id="see-also-41">See Also</h2>
<!-- markdownlint-capture -->
<!-- markdownlint-disable ul-style line-length -->
<ul>
<li><a
href="https://rclone.org/commands/rclone_config_encryption/">rclone
config encryption</a> - set, remove and check the encryption for the
config file</li>
</ul>
<!-- markdownlint-restore -->
<h1 id="rclone-config-file">rclone config file</h1>
<p>Show path of configuration file in use.</p>
<pre><code>rclone config file [flags]</code></pre>
<h2 id="options-42">Options</h2>
<pre><code>  -h, --help   help for file</code></pre>
<p>See the <a href="https://rclone.org/flags/">global flags page</a> for
global options not listed here.</p>
<h2 id="see-also-42">See Also</h2>
<!-- markdownlint-capture -->
<!-- markdownlint-disable ul-style line-length -->
<ul>
<li><a href="https://rclone.org/commands/rclone_config/">rclone
config</a> - Enter an interactive configuration session.</li>
</ul>
<!-- markdownlint-restore -->
<h1 id="rclone-config-password">rclone config password</h1>
<p>Update password in an existing remote.</p>
<h2 id="synopsis-40">Synopsis</h2>
<p>Update an existing remote's password. The password should be passed
in pairs of <code>key</code> <code>password</code> or as
<code>key=password</code>. The <code>password</code> should be passed in
in clear (unobscured).</p>
<p>For example, to set password of a remote of name myremote you would
do:</p>
<div class="sourceCode" id="cb229"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb229-1"><a href="#cb229-1" aria-hidden="true" tabindex="-1"></a><span class="ex">rclone</span> config password myremote fieldname mypassword</span>
<span id="cb229-2"><a href="#cb229-2" aria-hidden="true" tabindex="-1"></a><span class="ex">rclone</span> config password myremote fieldname=mypassword</span></code></pre></div>
<p>This command is obsolete now that "config update" and "config create"
both support obscuring passwords directly.</p>
<pre><code>rclone config password name [key value]+ [flags]</code></pre>
<h2 id="options-43">Options</h2>
<pre><code>  -h, --help   help for password</code></pre>
<p>See the <a href="https://rclone.org/flags/">global flags page</a> for
global options not listed here.</p>
<h2 id="see-also-43">See Also</h2>
<!-- markdownlint-capture -->
<!-- markdownlint-disable ul-style line-length -->
<ul>
<li><a href="https://rclone.org/commands/rclone_config/">rclone
config</a> - Enter an interactive configuration session.</li>
</ul>
<!-- markdownlint-restore -->
<h1 id="rclone-config-paths">rclone config paths</h1>
<p>Show paths used for configuration, cache, temp etc.</p>
<pre><code>rclone config paths [flags]</code></pre>
<h2 id="options-44">Options</h2>
<pre><code>  -h, --help   help for paths</code></pre>
<p>See the <a href="https://rclone.org/flags/">global flags page</a> for
global options not listed here.</p>
<h2 id="see-also-44">See Also</h2>
<!-- markdownlint-capture -->
<!-- markdownlint-disable ul-style line-length -->
<ul>
<li><a href="https://rclone.org/commands/rclone_config/">rclone
config</a> - Enter an interactive configuration session.</li>
</ul>
<!-- markdownlint-restore -->
<h1 id="rclone-config-providers">rclone config providers</h1>
<p>List in JSON format all the providers and options.</p>
<pre><code>rclone config providers [flags]</code></pre>
<h2 id="options-45">Options</h2>
<pre><code>  -h, --help   help for providers</code></pre>
<p>See the <a href="https://rclone.org/flags/">global flags page</a> for
global options not listed here.</p>
<h2 id="see-also-45">See Also</h2>
<!-- markdownlint-capture -->
<!-- markdownlint-disable ul-style line-length -->
<ul>
<li><a href="https://rclone.org/commands/rclone_config/">rclone
config</a> - Enter an interactive configuration session.</li>
</ul>
<!-- markdownlint-restore -->
<h1 id="rclone-config-reconnect">rclone config reconnect</h1>
<p>Re-authenticates user with remote.</p>
<h2 id="synopsis-41">Synopsis</h2>
<p>This reconnects remote: passed in to the cloud storage system.</p>
<p>To disconnect the remote use "rclone config disconnect".</p>
<p>This normally means going through the interactive oauth flow
again.</p>
<pre><code>rclone config reconnect remote: [flags]</code></pre>
<h2 id="options-46">Options</h2>
<pre><code>  -h, --help   help for reconnect</code></pre>
<p>See the <a href="https://rclone.org/flags/">global flags page</a> for
global options not listed here.</p>
<h2 id="see-also-46">See Also</h2>
<!-- markdownlint-capture -->
<!-- markdownlint-disable ul-style line-length -->
<ul>
<li><a href="https://rclone.org/commands/rclone_config/">rclone
config</a> - Enter an interactive configuration session.</li>
</ul>
<!-- markdownlint-restore -->
<h1 id="rclone-config-redacted">rclone config redacted</h1>
<p>Print redacted (decrypted) config file, or the redacted config for a
single remote.</p>
<h2 id="synopsis-42">Synopsis</h2>
<p>This prints a redacted copy of the config file, either the whole
config file or for a given remote.</p>
<p>The config file will be redacted by replacing all passwords and other
sensitive info with XXX.</p>
<p>This makes the config file suitable for posting online for
support.</p>
<p>It should be double checked before posting as the redaction may not
be perfect.</p>
<pre><code>rclone config redacted [&lt;remote&gt;] [flags]</code></pre>
<h2 id="options-47">Options</h2>
<pre><code>  -h, --help   help for redacted</code></pre>
<p>See the <a href="https://rclone.org/flags/">global flags page</a> for
global options not listed here.</p>
<h2 id="see-also-47">See Also</h2>
<!-- markdownlint-capture -->
<!-- markdownlint-disable ul-style line-length -->
<ul>
<li><a href="https://rclone.org/commands/rclone_config/">rclone
config</a> - Enter an interactive configuration session.</li>
</ul>
<!-- markdownlint-restore -->
<h1 id="rclone-config-show">rclone config show</h1>
<p>Print (decrypted) config file, or the config for a single remote.</p>
<pre><code>rclone config show [&lt;remote&gt;] [flags]</code></pre>
<h2 id="options-48">Options</h2>
<pre><code>  -h, --help   help for show</code></pre>
<p>See the <a href="https://rclone.org/flags/">global flags page</a> for
global options not listed here.</p>
<h2 id="see-also-48">See Also</h2>
<!-- markdownlint-capture -->
<!-- markdownlint-disable ul-style line-length -->
<ul>
<li><a href="https://rclone.org/commands/rclone_config/">rclone
config</a> - Enter an interactive configuration session.</li>
</ul>
<!-- markdownlint-restore -->
<h1 id="rclone-config-string">rclone config string</h1>
<p>Print connection string for a single remote.</p>
<h2 id="synopsis-43">Synopsis</h2>
<p>Print a connection string for a single remote.</p>
<p>The <a href="https://rclone.org/docs/#connection-strings">connection
strings</a> can be used wherever a remote is needed and can be more
convenient than using the config file, especially if using the RC
API.</p>
<p>Backend parameters may be provided to the command also.</p>
<p>Example:</p>
<div class="sourceCode" id="cb242"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb242-1"><a href="#cb242-1" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> rclone config string s3:rclone <span class="at">--s3-no-check-bucket</span></span>
<span id="cb242-2"><a href="#cb242-2" aria-hidden="true" tabindex="-1"></a><span class="ex">:s3,access_key_id=XXX,no_check_bucket,provider=AWS,region=eu-west-2,secret_access_key=YYY:rclone</span></span></code></pre></div>
<p><strong>NB</strong> the strings are not quoted for use in shells (eg
bash, powershell, windows cmd). Most will work if enclosed in "double
quotes", however connection strings that contain double quotes will
require further quoting which is very shell dependent.</p>
<pre><code>rclone config string &lt;remote&gt; [flags]</code></pre>
<h2 id="options-49">Options</h2>
<pre><code>  -h, --help   help for string</code></pre>
<p>See the <a href="https://rclone.org/flags/">global flags page</a> for
global options not listed here.</p>
<h2 id="see-also-49">See Also</h2>
<!-- markdownlint-capture -->
<!-- markdownlint-disable ul-style line-length -->
<ul>
<li><a href="https://rclone.org/commands/rclone_config/">rclone
config</a> - Enter an interactive configuration session.</li>
</ul>
<!-- markdownlint-restore -->
<h1 id="rclone-config-touch">rclone config touch</h1>
<p>Ensure configuration file exists.</p>
<pre><code>rclone config touch [flags]</code></pre>
<h2 id="options-50">Options</h2>
<pre><code>  -h, --help   help for touch</code></pre>
<p>See the <a href="https://rclone.org/flags/">global flags page</a> for
global options not listed here.</p>
<h2 id="see-also-50">See Also</h2>
<!-- markdownlint-capture -->
<!-- markdownlint-disable ul-style line-length -->
<ul>
<li><a href="https://rclone.org/commands/rclone_config/">rclone
config</a> - Enter an interactive configuration session.</li>
</ul>
<!-- markdownlint-restore -->
<h1 id="rclone-config-unset">rclone config unset</h1>
<p>Unset options in an existing remote.</p>
<h2 id="synopsis-44">Synopsis</h2>
<p>Remove one or more options from an existing remote. The options to
remove should be passed in as a list of key names.</p>
<p>For example, to remove the <code>client_id</code> and
<code>client_secret</code> options from a remote of name myremote you
would do:</p>
<div class="sourceCode" id="cb247"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb247-1"><a href="#cb247-1" aria-hidden="true" tabindex="-1"></a><span class="ex">rclone</span> config unset myremote client_id client_secret</span></code></pre></div>
<p>This removes the keys from the config file entirely, which is
different from setting them to an empty string with
<code>config update</code>. Removing a key restores rclone's default
behaviour for that option, whereas setting it to an empty string
overrides the default with an empty value.</p>
<p>You can't unset the <code>type</code> of a remote - use
<code>config delete</code> to remove the whole remote instead.</p>
<pre><code>rclone config unset name [key]+ [flags]</code></pre>
<h2 id="options-51">Options</h2>
<pre><code>  -h, --help   help for unset</code></pre>
<p>See the <a href="https://rclone.org/flags/">global flags page</a> for
global options not listed here.</p>
<h2 id="see-also-51">See Also</h2>
<!-- markdownlint-capture -->
<!-- markdownlint-disable ul-style line-length -->
<ul>
<li><a href="https://rclone.org/commands/rclone_config/">rclone
config</a> - Enter an interactive configuration session.</li>
</ul>
<!-- markdownlint-restore -->
<h1 id="rclone-config-update">rclone config update</h1>
<p>Update options in an existing remote.</p>
<h2 id="synopsis-45">Synopsis</h2>
<p>Update an existing remote's options. The options should be passed in
pairs of <code>key</code> <code>value</code> or as
<code>key=value</code>.</p>
<p>For example, to update the env_auth field of a remote of name
myremote you would do:</p>
<div class="sourceCode" id="cb250"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb250-1"><a href="#cb250-1" aria-hidden="true" tabindex="-1"></a><span class="ex">rclone</span> config update myremote env_auth true</span>
<span id="cb250-2"><a href="#cb250-2" aria-hidden="true" tabindex="-1"></a><span class="ex">rclone</span> config update myremote env_auth=true</span></code></pre></div>
<p>If the remote uses OAuth the token will be updated, if you don't
require this add an extra parameter thus:</p>
<div class="sourceCode" id="cb251"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb251-1"><a href="#cb251-1" aria-hidden="true" tabindex="-1"></a><span class="ex">rclone</span> config update myremote env_auth=true config_refresh_token=false</span></code></pre></div>
<p>Note that if the config process would normally ask a question the
default is taken (unless <code>--non-interactive</code> is used). Each
time that happens rclone will print or DEBUG a message saying how to
affect the value taken.</p>
<p>If any of the parameters passed is a password field, then rclone will
automatically obscure them if they aren't already obscured before
putting them in the config file.</p>
<p><strong>NB</strong> If the password parameter is 22 characters or
longer and consists only of base64 characters then rclone can get
confused about whether the password is already obscured or not and put
unobscured passwords into the config file. If you want to be 100%
certain that the passwords get obscured then use the
<code>--obscure</code> flag, or if you are 100% certain you are already
passing obscured passwords then use <code>--no-obscure</code>. You can
also set obscured passwords using the
<code>rclone config password</code> command.</p>
<p>The flag <code>--non-interactive</code> is for use by applications
that wish to configure rclone themselves, rather than using rclone's
text based configuration questions. If this flag is set, and rclone
needs to ask the user a question, a JSON blob will be returned with the
question in it.</p>
<p>This will look something like (some irrelevant detail removed):</p>
<div class="sourceCode" id="cb252"><pre
class="sourceCode json"><code class="sourceCode json"><span id="cb252-1"><a href="#cb252-1" aria-hidden="true" tabindex="-1"></a><span class="fu">{</span></span>
<span id="cb252-2"><a href="#cb252-2" aria-hidden="true" tabindex="-1"></a>  <span class="dt">&quot;State&quot;</span><span class="fu">:</span> <span class="st">&quot;*oauth-islocal,teamdrive,,&quot;</span><span class="fu">,</span></span>
<span id="cb252-3"><a href="#cb252-3" aria-hidden="true" tabindex="-1"></a>  <span class="dt">&quot;Option&quot;</span><span class="fu">:</span> <span class="fu">{</span></span>
<span id="cb252-4"><a href="#cb252-4" aria-hidden="true" tabindex="-1"></a>    <span class="dt">&quot;Name&quot;</span><span class="fu">:</span> <span class="st">&quot;config_is_local&quot;</span><span class="fu">,</span></span>
<span id="cb252-5"><a href="#cb252-5" aria-hidden="true" tabindex="-1"></a>    <span class="dt">&quot;Help&quot;</span><span class="fu">:</span> <span class="st">&quot;Use web browser to automatically authenticate rclone with remote?</span><span class="ch">\n</span><span class="st"> * Say Y if the machine running rclone has a web browser you can use</span><span class="ch">\n</span><span class="st"> * Say N if running rclone on a (remote) machine without web browser access</span><span class="ch">\n</span><span class="st">If not sure try Y. If Y failed, try N.</span><span class="ch">\n</span><span class="st">&quot;</span><span class="fu">,</span></span>
<span id="cb252-6"><a href="#cb252-6" aria-hidden="true" tabindex="-1"></a>    <span class="dt">&quot;Default&quot;</span><span class="fu">:</span> <span class="kw">true</span><span class="fu">,</span></span>
<span id="cb252-7"><a href="#cb252-7" aria-hidden="true" tabindex="-1"></a>    <span class="dt">&quot;Examples&quot;</span><span class="fu">:</span> <span class="ot">[</span></span>
<span id="cb252-8"><a href="#cb252-8" aria-hidden="true" tabindex="-1"></a>      <span class="fu">{</span></span>
<span id="cb252-9"><a href="#cb252-9" aria-hidden="true" tabindex="-1"></a>        <span class="dt">&quot;Value&quot;</span><span class="fu">:</span> <span class="st">&quot;true&quot;</span><span class="fu">,</span></span>
<span id="cb252-10"><a href="#cb252-10" aria-hidden="true" tabindex="-1"></a>        <span class="dt">&quot;Help&quot;</span><span class="fu">:</span> <span class="st">&quot;Yes&quot;</span></span>
<span id="cb252-11"><a href="#cb252-11" aria-hidden="true" tabindex="-1"></a>      <span class="fu">}</span><span class="ot">,</span></span>
<span id="cb252-12"><a href="#cb252-12" aria-hidden="true" tabindex="-1"></a>      <span class="fu">{</span></span>
<span id="cb252-13"><a href="#cb252-13" aria-hidden="true" tabindex="-1"></a>        <span class="dt">&quot;Value&quot;</span><span class="fu">:</span> <span class="st">&quot;false&quot;</span><span class="fu">,</span></span>
<span id="cb252-14"><a href="#cb252-14" aria-hidden="true" tabindex="-1"></a>        <span class="dt">&quot;Help&quot;</span><span class="fu">:</span> <span class="st">&quot;No&quot;</span></span>
<span id="cb252-15"><a href="#cb252-15" aria-hidden="true" tabindex="-1"></a>      <span class="fu">}</span></span>
<span id="cb252-16"><a href="#cb252-16" aria-hidden="true" tabindex="-1"></a>    <span class="ot">]</span><span class="fu">,</span></span>
<span id="cb252-17"><a href="#cb252-17" aria-hidden="true" tabindex="-1"></a>    <span class="dt">&quot;Required&quot;</span><span class="fu">:</span> <span class="kw">false</span><span class="fu">,</span></span>
<span id="cb252-18"><a href="#cb252-18" aria-hidden="true" tabindex="-1"></a>    <span class="dt">&quot;IsPassword&quot;</span><span class="fu">:</span> <span class="kw">false</span><span class="fu">,</span></span>
<span id="cb252-19"><a href="#cb252-19" aria-hidden="true" tabindex="-1"></a>    <span class="dt">&quot;Type&quot;</span><span class="fu">:</span> <span class="st">&quot;bool&quot;</span><span class="fu">,</span></span>
<span id="cb252-20"><a href="#cb252-20" aria-hidden="true" tabindex="-1"></a>    <span class="dt">&quot;Exclusive&quot;</span><span class="fu">:</span> <span class="kw">true</span><span class="fu">,</span></span>
<span id="cb252-21"><a href="#cb252-21" aria-hidden="true" tabindex="-1"></a>  <span class="fu">},</span></span>
<span id="cb252-22"><a href="#cb252-22" aria-hidden="true" tabindex="-1"></a>  <span class="dt">&quot;Error&quot;</span><span class="fu">:</span> <span class="st">&quot;&quot;</span><span class="fu">,</span></span>
<span id="cb252-23"><a href="#cb252-23" aria-hidden="true" tabindex="-1"></a><span class="fu">}</span></span></code></pre></div>
<p>The format of <code>Option</code> is the same as returned by
<code>rclone config providers</code>. The question should be asked to
the user and returned to rclone as the <code>--result</code> option
along with the <code>--state</code> parameter.</p>
<p>The keys of <code>Option</code> are used as follows:</p>
<ul>
<li><code>Name</code> - name of variable - show to user</li>
<li><code>Help</code> - help text. Hard wrapped at 80 chars. Any URLs
should be clicky.</li>
<li><code>Default</code> - default value - return this if the user just
wants the default.</li>
<li><code>Examples</code> - the user should be able to choose one of
these</li>
<li><code>Required</code> - the value should be non-empty</li>
<li><code>IsPassword</code> - the value is a password and should be
edited as such</li>
<li><code>Type</code> - type of value, eg <code>bool</code>,
<code>string</code>, <code>int</code> and others</li>
<li><code>Exclusive</code> - if set no free-form entry allowed only the
<code>Examples</code></li>
<li>Irrelevant keys <code>Provider</code>, <code>ShortOpt</code>,
<code>Hide</code>, <code>NoPrefix</code>, <code>Advanced</code></li>
</ul>
<p>If <code>Error</code> is set then it should be shown to the user at
the same time as the question.</p>
<div class="sourceCode" id="cb253"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb253-1"><a href="#cb253-1" aria-hidden="true" tabindex="-1"></a><span class="ex">rclone</span> config update name <span class="at">--continue</span> <span class="at">--state</span> <span class="st">&quot;*oauth-islocal,teamdrive,,&quot;</span> <span class="at">--result</span> <span class="st">&quot;true&quot;</span></span></code></pre></div>
<p>Note that when using <code>--continue</code> all passwords should be
passed in the clear (not obscured). Any default config values should be
passed in with each invocation of <code>--continue</code>.</p>
<p>At the end of the non interactive process, rclone will return a
result with <code>State</code> as empty string.</p>
<p>If <code>--all</code> is passed then rclone will ask all the config
questions, not just the post config questions. Any parameters are used
as defaults for questions as usual.</p>
<p>Note that <code>bin/config.py</code> in the rclone source implements
this protocol as a readable demonstration.</p>
<pre><code>rclone config update name [key value]+ [flags]</code></pre>
<h2 id="options-52">Options</h2>
<pre><code>      --all               Ask the full set of config questions
      --continue          Continue the configuration process with an answer
  -h, --help              help for update
      --no-obscure        Force any passwords not to be obscured
      --no-output         Don&#39;t provide any output
      --non-interactive   Don&#39;t interact with user and return questions
      --obscure           Force any passwords to be obscured
      --result string     Result - use with --continue
      --state string      State - use with --continue</code></pre>
<p>See the <a href="https://rclone.org/flags/">global flags page</a> for
global options not listed here.</p>
<h2 id="see-also-52">See Also</h2>
<!-- markdownlint-capture -->
<!-- markdownlint-disable ul-style line-length -->
<ul>
<li><a href="https://rclone.org/commands/rclone_config/">rclone
config</a> - Enter an interactive configuration session.</li>
</ul>
<!-- markdownlint-restore -->
<h1 id="rclone-config-userinfo">rclone config userinfo</h1>
<p>Prints info about logged in user of remote.</p>
<h2 id="synopsis-46">Synopsis</h2>
<p>This prints the details of the person logged in to the cloud storage
system.</p>
<pre><code>rclone config userinfo remote: [flags]</code></pre>
<h2 id="options-53">Options</h2>
<pre><code>  -h, --help   help for userinfo
      --json   Format output as JSON</code></pre>
<p>See the <a href="https://rclone.org/flags/">global flags page</a> for
global options not listed here.</p>
<h2 id="see-also-53">See Also</h2>
<!-- markdownlint-capture -->
<!-- markdownlint-disable ul-style line-length -->
<ul>
<li><a href="https://rclone.org/commands/rclone_config/">rclone
config</a> - Enter an interactive configuration session.</li>
</ul>
<!-- markdownlint-restore -->
<h1 id="rclone-convmv">rclone convmv</h1>
<p>Convert file and directory names in place.</p>
<h2 id="synopsis-47">Synopsis</h2>
<p>convmv supports advanced path name transformations for converting and
renaming files and directories by applying prefixes, suffixes, and other
alterations.</p>
<table>
<colgroup>
<col style="width: 50%" />
<col style="width: 50%" />
</colgroup>
<thead>
<tr class="header">
<th>Command</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td><code>--name-transform prefix=XXXX</code></td>
<td>Prepends XXXX to the file name.</td>
</tr>
<tr class="even">
<td><code>--name-transform suffix=XXXX</code></td>
<td>Appends XXXX to the file name after the extension.</td>
</tr>
<tr class="odd">
<td><code>--name-transform suffix_keep_extension=XXXX</code></td>
<td>Appends XXXX to the file name while preserving the original file
extension.</td>
</tr>
<tr class="even">
<td><code>--name-transform trimprefix=XXXX</code></td>
<td>Removes XXXX if it appears at the start of the file name.</td>
</tr>
<tr class="odd">
<td><code>--name-transform trimsuffix=XXXX</code></td>
<td>Removes XXXX if it appears at the end of the file name.</td>
</tr>
<tr class="even">
<td><code>--name-transform regex=pattern/replacement</code></td>
<td>Applies a regex-based transformation.</td>
</tr>
<tr class="odd">
<td><code>--name-transform replace=old:new</code></td>
<td>Replaces occurrences of old with new in the file name.</td>
</tr>
<tr class="even">
<td><code>--name-transform date={YYYYMMDD}</code></td>
<td>Appends or prefixes the specified date format.</td>
</tr>
<tr class="odd">
<td><code>--name-transform truncate=N</code></td>
<td>Truncates the file name to a maximum of N characters.</td>
</tr>
<tr class="even">
<td><code>--name-transform truncate_keep_extension=N</code></td>
<td>Truncates the file name to a maximum of N characters while
preserving the original file extension.</td>
</tr>
<tr class="odd">
<td><code>--name-transform truncate_bytes=N</code></td>
<td>Truncates the file name to a maximum of N bytes (not
characters).</td>
</tr>
<tr class="even">
<td><code>--name-transform truncate_bytes_keep_extension=N</code></td>
<td>Truncates the file name to a maximum of N bytes (not characters)
while preserving the original file extension.</td>
</tr>
<tr class="odd">
<td><code>--name-transform base64encode</code></td>
<td>Encodes the file name in Base64.</td>
</tr>
<tr class="even">
<td><code>--name-transform base64decode</code></td>
<td>Decodes a Base64-encoded file name.</td>
</tr>
<tr class="odd">
<td><code>--name-transform encoder=ENCODING</code></td>
<td>Converts the file name to the specified encoding (e.g., ISO-8859-1,
Windows-1252, Macintosh).</td>
</tr>
<tr class="even">
<td><code>--name-transform decoder=ENCODING</code></td>
<td>Decodes the file name from the specified encoding.</td>
</tr>
<tr class="odd">
<td><code>--name-transform charmap=MAP</code></td>
<td>Applies a character mapping transformation.</td>
</tr>
<tr class="even">
<td><code>--name-transform lowercase</code></td>
<td>Converts the file name to lowercase.</td>
</tr>
<tr class="odd">
<td><code>--name-transform uppercase</code></td>
<td>Converts the file name to UPPERCASE.</td>
</tr>
<tr class="even">
<td><code>--name-transform titlecase</code></td>
<td>Converts the file name to Title Case.</td>
</tr>
<tr class="odd">
<td><code>--name-transform ascii</code></td>
<td>Strips non-ASCII characters.</td>
</tr>
<tr class="even">
<td><code>--name-transform url</code></td>
<td>URL-encodes the file name.</td>
</tr>
<tr class="odd">
<td><code>--name-transform nfc</code></td>
<td>Converts the file name to NFC Unicode normalization form.</td>
</tr>
<tr class="even">
<td><code>--name-transform nfd</code></td>
<td>Converts the file name to NFD Unicode normalization form.</td>
</tr>
<tr class="odd">
<td><code>--name-transform nfkc</code></td>
<td>Converts the file name to NFKC Unicode normalization form.</td>
</tr>
<tr class="even">
<td><code>--name-transform nfkd</code></td>
<td>Converts the file name to NFKD Unicode normalization form.</td>
</tr>
<tr class="odd">
<td><code>--name-transform command=/path/to/my/programfile names.</code></td>
<td>Executes an external program to transform.</td>
</tr>
</tbody>
</table>
<p>Conversion modes:</p>
<pre class="text"><code>none
nfc
nfd
nfkc
nfkd
replace
prefix
suffix
suffix_keep_extension
trimprefix
trimsuffix
index
date
truncate
truncate_keep_extension
truncate_bytes
truncate_bytes_keep_extension
base64encode
base64decode
encoder
decoder
ISO-8859-1
Windows-1252
Macintosh
charmap
lowercase
uppercase
titlecase
ascii
url
regex
command</code></pre>
<p>Char maps:</p>
<pre class="text"><code>IBM-Code-Page-037
IBM-Code-Page-437
IBM-Code-Page-850
IBM-Code-Page-852
IBM-Code-Page-855
Windows-Code-Page-858
IBM-Code-Page-860
IBM-Code-Page-862
IBM-Code-Page-863
IBM-Code-Page-865
IBM-Code-Page-866
IBM-Code-Page-1047
IBM-Code-Page-1140
ISO-8859-1
ISO-8859-2
ISO-8859-3
ISO-8859-4
ISO-8859-5
ISO-8859-6
ISO-8859-7
ISO-8859-8
ISO-8859-9
ISO-8859-10
ISO-8859-13
ISO-8859-14
ISO-8859-15
ISO-8859-16
KOI8-R
KOI8-U
Macintosh
Macintosh-Cyrillic
Windows-874
Windows-1250
Windows-1251
Windows-1252
Windows-1253
Windows-1254
Windows-1255
Windows-1256
Windows-1257
Windows-1258
X-User-Defined</code></pre>
<p>Encoding masks:</p>
<pre class="text"><code>Asterisk
BackQuote
BackSlash
Colon
CrLf
Ctl
Del
Dollar
Dot
DoubleQuote
Exclamation
Hash
InvalidUtf8
LeftCrLfHtVt
LeftPeriod
LeftSpace
LeftTilde
LtGt
None
Percent
Pipe
Question
Raw
RightCrLfHtVt
RightPeriod
RightSpace
Semicolon
SingleQuote
Slash
SquareBracket</code></pre>
<p>Examples:</p>
<pre class="console"><code>rclone convmv &quot;stories/The Quick Brown Fox!.txt&quot; --name-transform &quot;all,uppercase&quot;
// Output: STORIES/THE QUICK BROWN FOX!.TXT</code></pre>
<pre class="console"><code>rclone convmv &quot;stories/The Quick Brown Fox!.txt&quot; --name-transform &quot;all,replace=Fox:Turtle&quot; --name-transform &quot;all,replace=Quick:Slow&quot;
// Output: stories/The Slow Brown Turtle!.txt</code></pre>
<pre class="console"><code>rclone convmv &quot;stories/The Quick Brown Fox!.txt&quot; --name-transform &quot;all,base64encode&quot;
// Output: c3Rvcmllcw==/VGhlIFF1aWNrIEJyb3duIEZveCEudHh0</code></pre>
<pre class="console"><code>rclone convmv &quot;c3Rvcmllcw==/VGhlIFF1aWNrIEJyb3duIEZveCEudHh0&quot; --name-transform &quot;all,base64decode&quot;
// Output: stories/The Quick Brown Fox!.txt</code></pre>
<pre class="console"><code>rclone convmv &quot;stories/The Quick Brown 🦊 Fox Went to the Café!.txt&quot; --name-transform &quot;all,nfc&quot;
// Output: stories/The Quick Brown 🦊 Fox Went to the Café!.txt</code></pre>
<pre class="console"><code>rclone convmv &quot;stories/The Quick Brown 🦊 Fox Went to the Café!.txt&quot; --name-transform &quot;all,nfd&quot;
// Output: stories/The Quick Brown 🦊 Fox Went to the Café!.txt</code></pre>
<pre class="console"><code>rclone convmv &quot;stories/The Quick Brown 🦊 Fox!.txt&quot; --name-transform &quot;all,ascii&quot;
// Output: stories/The Quick Brown  Fox!.txt</code></pre>
<pre class="console"><code>rclone convmv &quot;stories/The Quick Brown Fox!.txt&quot; --name-transform &quot;all,trimsuffix=.txt&quot;
// Output: stories/The Quick Brown Fox!</code></pre>
<pre class="console"><code>rclone convmv &quot;stories/The Quick Brown Fox!.txt&quot; --name-transform &quot;all,prefix=OLD_&quot;
// Output: OLD_stories/OLD_The Quick Brown Fox!.txt</code></pre>
<pre class="console"><code>rclone convmv &quot;stories/The Quick Brown 🦊 Fox Went to the Café!.txt&quot; --name-transform &quot;all,charmap=ISO-8859-7&quot;
// Output: stories/The Quick Brown _ Fox Went to the Caf_!.txt</code></pre>
<pre class="console"><code>rclone convmv &quot;stories/The Quick Brown Fox: A Memoir [draft].txt&quot; --name-transform &quot;all,encoder=Colon,SquareBracket&quot;
// Output: stories/The Quick Brown Fox: A Memoir [draft].txt</code></pre>
<pre class="console"><code>rclone convmv &quot;stories/The Quick Brown 🦊 Fox Went to the Café!.txt&quot; --name-transform &quot;all,truncate=21&quot;
// Output: stories/The Quick Brown 🦊 Fox</code></pre>
<pre class="console"><code>rclone convmv &quot;stories/The Quick Brown Fox!.txt&quot; --name-transform &quot;all,command=echo&quot;
// Output: stories/The Quick Brown Fox!.txt</code></pre>
<pre class="console"><code>rclone convmv &quot;stories/The Quick Brown Fox!&quot; --name-transform &quot;date=-{YYYYMMDD}&quot;
// Output: stories/The Quick Brown Fox!-20261106</code></pre>
<pre class="console"><code>rclone convmv &quot;stories/The Quick Brown Fox!&quot; --name-transform &quot;date=-{macfriendlytime}&quot;
// Output: stories/The Quick Brown Fox!-2026-11-06 0220PM</code></pre>
<pre class="console"><code>rclone convmv &quot;stories/The Quick Brown Fox!.txt&quot; --name-transform &quot;all,regex=[\\.\\w]/ab&quot;
// Output: ababababababab/ababab ababababab ababababab ababab!abababab</code></pre>
<p>The regex command generally accepts Perl-style regular expressions,
the exact syntax is defined in the <a
href="https://golang.org/pkg/regexp/syntax/">Go regular expression
reference</a>. The replacement string may contain capturing group
variables, referencing capturing groups using the syntax
<code>$name</code> or <code>${name}</code>, where the name can refer to
a named capturing group or it can simply be the index as a number. To
insert a literal $, use $$.</p>
<p>Multiple transformations can be used in sequence, applied in the
order they are specified on the command line.</p>
<p>The <code>--name-transform</code> flag is also available in
<code>sync</code>, <code>copy</code>, and <code>move</code>.</p>
<h2 id="files-vs-directories">Files vs Directories</h2>
<p>By default <code>--name-transform</code> will only apply to file
names. The means only the leaf file name will be transformed. However
some of the transforms would be better applied to the whole path or just
directories. To choose which which part of the file path is affected
some tags can be added to the <code>--name-transform</code>.</p>
<table>
<colgroup>
<col style="width: 50%" />
<col style="width: 50%" />
</colgroup>
<thead>
<tr class="header">
<th>Tag</th>
<th>Effect</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td><code>file</code></td>
<td>Only transform the leaf name of files (DEFAULT)</td>
</tr>
<tr class="even">
<td><code>dir</code></td>
<td>Only transform name of directories - these may appear anywhere in
the path</td>
</tr>
<tr class="odd">
<td><code>all</code></td>
<td>Transform the entire path for files and directories</td>
</tr>
</tbody>
</table>
<p>This is used by adding the tag into the transform name like this:
<code>--name-transform file,prefix=ABC</code> or
<code>--name-transform dir,prefix=DEF</code>.</p>
<p>For some conversions using all is more likely to be useful, for
example <code>--name-transform all,nfc</code>.</p>
<p>Note that <code>--name-transform</code> may not add path separators
<code>/</code> to the name. This will cause an error.</p>
<h2 id="ordering-and-conflicts">Ordering and Conflicts</h2>
<ul>
<li>Transformations will be applied in the order specified by the user.
<ul>
<li>If the <code>file</code> tag is in use (the default) then only the
leaf name of files will be transformed.</li>
<li>If the <code>dir</code> tag is in use then directories anywhere in
the path will be transformed</li>
<li>If the <code>all</code> tag is in use then directories and files
anywhere in the path will be transformed</li>
<li>Each transformation will be run one path segment at a time.</li>
<li>If a transformation adds a <code>/</code> or ends up with an empty
path segment then that will be an error.</li>
</ul></li>
<li>It is up to the user to put the transformations in a sensible order.
<ul>
<li>Conflicting transformations, such as <code>prefix</code> followed by
<code>trimprefix</code> or <code>nfc</code> followed by
<code>nfd</code>, are possible.</li>
<li>Instead of enforcing mutual exclusivity, transformations are applied
in sequence as specified by the user, allowing for intentional use cases
(e.g., trimming one prefix before adding another).</li>
<li>Users should be aware that certain combinations may lead to
unexpected results and should verify transformations using
<code>--dry-run</code> before execution.</li>
</ul></li>
</ul>
<h2 id="race-conditions-and-non-deterministic-behavior">Race Conditions
and Non-Deterministic Behavior</h2>
<p>Some transformations, such as <code>replace=old:new</code>, may
introduce conflicts where multiple source files map to the same
destination name. This can lead to race conditions when performing
concurrent transfers. It is up to the user to anticipate these.</p>
<ul>
<li>If two files from the source are transformed into the same name at
the destination, the final state may be non-deterministic.</li>
<li>Running rclone check after a sync using such transformations may
erroneously report missing or differing files due to overwritten
results.</li>
</ul>
<p>To minimize risks, users should:</p>
<ul>
<li>Carefully review transformations that may introduce conflicts.</li>
<li>Use <code>--dry-run</code> to inspect changes before executing a
sync (but keep in mind that it won't show the effect of
non-deterministic transformations).</li>
<li>Avoid transformations that cause multiple distinct source files to
map to the same destination name.</li>
<li>Consider disabling concurrency with <code>--transfers=1</code> if
necessary.</li>
<li>Certain transformations (e.g. <code>prefix</code>) will have a
multiplying effect every time they are used. Avoid these when using
<code>bisync</code>.</li>
</ul>
<pre><code>rclone convmv dest:path --name-transform XXX [flags]</code></pre>
<h2 id="options-54">Options</h2>
<pre><code>      --create-empty-src-dirs   Create empty source dirs on destination after move
      --delete-empty-src-dirs   Delete empty source dirs after move
  -h, --help                    help for convmv</code></pre>
<p>Options shared with other commands are described next. See the <a
href="https://rclone.org/flags/">global flags page</a> for global
options not listed here.</p>
<h3 id="copy-options-4">Copy Options</h3>
<p>Flags for anything which can copy a file</p>
<pre class="text"><code>      --check-first                                 Do all the checks before starting transfers
  -c, --checksum                                    Check for changes with size &amp; checksum (if available, or fallback to size only)
      --compare-dest stringArray                    Include additional server-side paths during comparison
      --copy-dest stringArray                       Implies --compare-dest but also copies files from paths into destination
      --cutoff-mode HARD|SOFT|CAUTIOUS              Mode to stop transfers when reaching the max transfer limit HARD|SOFT|CAUTIOUS (default HARD)
      --ignore-case-sync                            Ignore case when synchronizing
      --ignore-checksum                             Skip post copy check of checksums
      --ignore-existing                             Skip all files that exist on destination
      --ignore-size                                 Ignore size when skipping use modtime or checksum
  -I, --ignore-times                                Don&#39;t skip items that match size and time - transfer all unconditionally
      --immutable                                   Do not modify files, fail if existing files have been modified
      --inplace                                     Download directly to destination file instead of atomic download to temp/rename
  -l, --links                                       Translate symlinks to/from regular files with a &#39;.rclonelink&#39; extension
      --max-backlog int                             Maximum number of objects in sync or check backlog (default 10000)
      --max-duration Duration                       Maximum duration rclone will transfer data for (default 0s)
      --max-transfer SizeSuffix                     Maximum size of data to transfer (default off)
  -M, --metadata                                    If set, preserve metadata when copying objects
      --modify-window Duration                      Max time diff to be considered the same (default 1ns)
      --multi-thread-chunk-size SizeSuffix          Chunk size for multi-thread downloads / uploads, if not set by filesystem (default 64Mi)
      --multi-thread-cutoff SizeSuffix              Use multi-thread downloads for files above this size (default 256Mi)
      --multi-thread-streams int                    Number of streams to use for multi-thread downloads (default 4)
      --multi-thread-write-buffer-size SizeSuffix   In memory buffer size for writing when in multi-thread mode (default 128Ki)
      --name-transform stringArray                  Transform paths during the copy process
      --no-check-dest                               Don&#39;t check the destination, copy regardless
      --no-traverse                                 Don&#39;t traverse destination file system on copy
      --no-update-dir-modtime                       Don&#39;t update directory modification times
      --no-update-modtime                           Don&#39;t update destination modtime if files identical
      --order-by string                             Instructions on how to order the transfers, e.g. &#39;size,descending&#39;
      --partial-suffix string                       Add partial-suffix to temporary file name when --inplace is not used (default &quot;.partial&quot;)
      --refresh-times                               Refresh the modtime of remote files
      --server-side-across-configs                  Allow server-side operations (e.g. copy) to work across different configs
      --size-only                                   Skip based on size only, not modtime or checksum
      --streaming-upload-cutoff SizeSuffix          Cutoff for switching to chunked upload if file size is unknown, upload starts after reaching cutoff or when file ends (default 100Ki)
  -u, --update                                      Skip files that are newer on the destination</code></pre>
<h3 id="important-options-11">Important Options</h3>
<p>Important flags useful for most commands</p>
<pre class="text"><code>  -n, --dry-run         Do a trial run with no permanent changes
  -i, --interactive     Enable interactive mode
  -v, --verbose count   Print lots more stuff (repeat for more)</code></pre>
<h3 id="filter-options-14">Filter Options</h3>
<p>Flags for filtering directory listings</p>
<pre class="text"><code>      --delete-excluded                     Delete files on dest excluded from sync
      --exclude stringArray                 Exclude files matching pattern
      --exclude-from stringArray            Read file exclude patterns from file (use - to read from stdin)
      --exclude-if-present stringArray      Exclude directories if filename is present
      --files-from stringArray              Read list of source-file names from file (use - to read from stdin)
      --files-from-raw stringArray          Read list of source-file names from file without any processing of lines (use - to read from stdin)
      --files-from0 stringArray             Read list of source-file names from file using NUL as separator (use - to read from stdin)
  -f, --filter stringArray                  Add a file filtering rule
      --filter-from stringArray             Read file filtering patterns from a file (use - to read from stdin)
      --hash-filter string                  Partition filenames by hash k/n or randomly @/n
      --ignore-case                         Ignore case in filters (case insensitive)
      --include stringArray                 Include files matching pattern
      --include-from stringArray            Read file include patterns from file (use - to read from stdin)
      --max-age Duration                    Only transfer files younger than this in s or suffix ms|s|m|h|d|w|M|y (default off)
      --max-depth int                       If set limits the recursion depth to this (default -1)
      --max-size SizeSuffix                 Only transfer files smaller than this in KiB or suffix B|K|M|G|T|P (default off)
      --metadata-exclude stringArray        Exclude metadatas matching pattern
      --metadata-exclude-from stringArray   Read metadata exclude patterns from file (use - to read from stdin)
      --metadata-filter stringArray         Add a metadata filtering rule
      --metadata-filter-from stringArray    Read metadata filtering patterns from a file (use - to read from stdin)
      --metadata-include stringArray        Include metadatas matching pattern
      --metadata-include-from stringArray   Read metadata include patterns from file (use - to read from stdin)
      --min-age Duration                    Only transfer files older than this in s or suffix ms|s|m|h|d|w|M|y (default off)
      --min-size SizeSuffix                 Only transfer files bigger than this in KiB or suffix B|K|M|G|T|P (default off)</code></pre>
<h3 id="listing-options-13">Listing Options</h3>
<p>Flags for listing directories</p>
<pre class="text"><code>      --default-time Time   Time to show if modtime is unknown for files and directories (default 2000-01-01T00:00:00Z)
      --fast-list           Use recursive list if available; uses more memory but fewer transactions</code></pre>
<h2 id="see-also-54">See Also</h2>
<!-- markdownlint-capture -->
<!-- markdownlint-disable ul-style line-length -->
<ul>
<li><a href="https://rclone.org/commands/rclone/">rclone</a> - Show help
for rclone commands, flags and backends.</li>
</ul>
<!-- markdownlint-restore -->
<h1 id="rclone-copyto">rclone copyto</h1>
<p>Copy files from source to dest, skipping identical files.</p>
<h2 id="synopsis-48">Synopsis</h2>
<p>If source:path is a file or directory then it copies it to a file or
directory named dest:path.</p>
<p>This can be used to copy a single file to a destination with a name
different from its source - for example, uploading and renaming in one
step. If the source is a directory then it acts exactly like the <a
href="https://rclone.org/commands/rclone_copy/">copy</a> command.</p>
<p>So</p>
<pre class="console"><code>rclone copyto src dst</code></pre>
<p>where src and dst are rclone paths, either <code>remote:path</code>
or <code>/path/to/local</code> or
<code>C:\windows\path\if\on\windows</code>.</p>
<p>This will:</p>
<pre class="text"><code>if src is file
    copy it to dst, overwriting an existing file if it exists
if src is directory
    copy it to dst, overwriting existing files if they exist
    see copy command for full details</code></pre>
<p>This doesn't transfer files that are identical on src and dst,
testing by size and modification time or MD5SUM. It doesn't delete files
from the destination.</p>
<p><em>If you are looking to copy just a byte range of a file, please
see <code>rclone cat --offset X --count Y</code>.</em></p>
<p><strong>Note</strong>: Use the
<code>-P</code>/<code>--progress</code> flag to view real-time transfer
statistics.</p>
<h2 id="logger-flags-3">Logger Flags</h2>
<p>The <code>--differ</code>, <code>--missing-on-dst</code>,
<code>--missing-on-src</code>, <code>--match</code> and
<code>--error</code> flags write paths, one per line, to the file name
(or stdout if it is <code>-</code>) supplied. What they write is
described in the help below. For example <code>--differ</code> will
write all paths which are present on both the source and destination but
different.</p>
<p>The <code>--combined</code> flag will write a file (or stdout) which
contains all file paths with a symbol and then a space and then the path
to tell you what happened to it. These are reminiscent of diff
files.</p>
<ul>
<li><code>= path</code> means path was found in source and destination
and was identical</li>
<li><code>- path</code> means path was missing on the source, so only in
the destination</li>
<li><code>+ path</code> means path was missing on the destination, so
only in the source</li>
<li><code>* path</code> means path was present in source and destination
but different.</li>
<li><code>! path</code> means there was an error reading or hashing the
source or dest.</li>
</ul>
<p>The <code>--dest-after</code> flag writes a list file using the same
format flags as <a
href="https://rclone.org/commands/rclone_lsf/#synopsis"><code>lsf</code></a>
(including <a
href="https://rclone.org/commands/rclone_lsf/#synopsis">customizable
options for hash, modtime, etc.</a>) Conceptually it is similar to
rsync's <code>--itemize-changes</code>, but not identical -- it should
output an accurate list of what will be on the destination after the
command is finished.</p>
<p>When the <code>--no-traverse</code> flag is set, all logs involving
files that exist only on the destination will be incomplete or
completely missing.</p>
<p>Note that these logger flags have a few limitations, and certain
scenarios are not currently supported:</p>
<ul>
<li><code>--max-duration</code> / <code>CutoffModeHard</code></li>
<li><code>--compare-dest</code> / <code>--copy-dest</code></li>
<li>server-side moves of an entire dir at once</li>
<li>High-level retries, because there would be duplicates (use
<code>--retries 1</code> to disable)</li>
<li>Possibly some unusual error scenarios</li>
</ul>
<p>Note also that each file is logged during execution, as opposed to
after, so it is most useful as a predictor of what SHOULD happen to each
file (which may or may not match what actually DID).</p>
<pre><code>rclone copyto source:path dest:path [flags]</code></pre>
<h2 id="options-55">Options</h2>
<pre><code>      --absolute                Put a leading / in front of path names
      --combined string         Make a combined report of changes to this file
      --csv                     Output in CSV format
      --dest-after string       Report all files that exist on the dest post-sync
      --differ string           Report all non-matching files to this file
  -d, --dir-slash               Append a slash to directory names (default true)
      --dirs-only               Only list directories
      --error string            Report all files with errors (hashing or reading) to this file
      --files-only              Only list files (default true)
  -F, --format string           Output format - see lsf help for details (default &quot;p&quot;)
      --hash h                  Use this hash when h is used in the format MD5|SHA-1|DropboxHash (default &quot;md5&quot;)
  -h, --help                    help for copyto
      --match string            Report all matching files to this file
      --missing-on-dst string   Report all files missing from the destination to this file
      --missing-on-src string   Report all files missing from the source to this file
  -s, --separator string        Separator for the items in the format (default &quot;;&quot;)
  -t, --timeformat string       Specify a custom time format - see docs for details (default: 2006-01-02 15:04:05)</code></pre>
<p>Options shared with other commands are described next. See the <a
href="https://rclone.org/flags/">global flags page</a> for global
options not listed here.</p>
<h3 id="copy-options-5">Copy Options</h3>
<p>Flags for anything which can copy a file</p>
<pre class="text"><code>      --check-first                                 Do all the checks before starting transfers
  -c, --checksum                                    Check for changes with size &amp; checksum (if available, or fallback to size only)
      --compare-dest stringArray                    Include additional server-side paths during comparison
      --copy-dest stringArray                       Implies --compare-dest but also copies files from paths into destination
      --cutoff-mode HARD|SOFT|CAUTIOUS              Mode to stop transfers when reaching the max transfer limit HARD|SOFT|CAUTIOUS (default HARD)
      --ignore-case-sync                            Ignore case when synchronizing
      --ignore-checksum                             Skip post copy check of checksums
      --ignore-existing                             Skip all files that exist on destination
      --ignore-size                                 Ignore size when skipping use modtime or checksum
  -I, --ignore-times                                Don&#39;t skip items that match size and time - transfer all unconditionally
      --immutable                                   Do not modify files, fail if existing files have been modified
      --inplace                                     Download directly to destination file instead of atomic download to temp/rename
  -l, --links                                       Translate symlinks to/from regular files with a &#39;.rclonelink&#39; extension
      --max-backlog int                             Maximum number of objects in sync or check backlog (default 10000)
      --max-duration Duration                       Maximum duration rclone will transfer data for (default 0s)
      --max-transfer SizeSuffix                     Maximum size of data to transfer (default off)
  -M, --metadata                                    If set, preserve metadata when copying objects
      --modify-window Duration                      Max time diff to be considered the same (default 1ns)
      --multi-thread-chunk-size SizeSuffix          Chunk size for multi-thread downloads / uploads, if not set by filesystem (default 64Mi)
      --multi-thread-cutoff SizeSuffix              Use multi-thread downloads for files above this size (default 256Mi)
      --multi-thread-streams int                    Number of streams to use for multi-thread downloads (default 4)
      --multi-thread-write-buffer-size SizeSuffix   In memory buffer size for writing when in multi-thread mode (default 128Ki)
      --name-transform stringArray                  Transform paths during the copy process
      --no-check-dest                               Don&#39;t check the destination, copy regardless
      --no-traverse                                 Don&#39;t traverse destination file system on copy
      --no-update-dir-modtime                       Don&#39;t update directory modification times
      --no-update-modtime                           Don&#39;t update destination modtime if files identical
      --order-by string                             Instructions on how to order the transfers, e.g. &#39;size,descending&#39;
      --partial-suffix string                       Add partial-suffix to temporary file name when --inplace is not used (default &quot;.partial&quot;)
      --refresh-times                               Refresh the modtime of remote files
      --server-side-across-configs                  Allow server-side operations (e.g. copy) to work across different configs
      --size-only                                   Skip based on size only, not modtime or checksum
      --streaming-upload-cutoff SizeSuffix          Cutoff for switching to chunked upload if file size is unknown, upload starts after reaching cutoff or when file ends (default 100Ki)
  -u, --update                                      Skip files that are newer on the destination</code></pre>
<h3 id="important-options-12">Important Options</h3>
<p>Important flags useful for most commands</p>
<pre class="text"><code>  -n, --dry-run         Do a trial run with no permanent changes
  -i, --interactive     Enable interactive mode
  -v, --verbose count   Print lots more stuff (repeat for more)</code></pre>
<h3 id="filter-options-15">Filter Options</h3>
<p>Flags for filtering directory listings</p>
<pre class="text"><code>      --delete-excluded                     Delete files on dest excluded from sync
      --exclude stringArray                 Exclude files matching pattern
      --exclude-from stringArray            Read file exclude patterns from file (use - to read from stdin)
      --exclude-if-present stringArray      Exclude directories if filename is present
      --files-from stringArray              Read list of source-file names from file (use - to read from stdin)
      --files-from-raw stringArray          Read list of source-file names from file without any processing of lines (use - to read from stdin)
      --files-from0 stringArray             Read list of source-file names from file using NUL as separator (use - to read from stdin)
  -f, --filter stringArray                  Add a file filtering rule
      --filter-from stringArray             Read file filtering patterns from a file (use - to read from stdin)
      --hash-filter string                  Partition filenames by hash k/n or randomly @/n
      --ignore-case                         Ignore case in filters (case insensitive)
      --include stringArray                 Include files matching pattern
      --include-from stringArray            Read file include patterns from file (use - to read from stdin)
      --max-age Duration                    Only transfer files younger than this in s or suffix ms|s|m|h|d|w|M|y (default off)
      --max-depth int                       If set limits the recursion depth to this (default -1)
      --max-size SizeSuffix                 Only transfer files smaller than this in KiB or suffix B|K|M|G|T|P (default off)
      --metadata-exclude stringArray        Exclude metadatas matching pattern
      --metadata-exclude-from stringArray   Read metadata exclude patterns from file (use - to read from stdin)
      --metadata-filter stringArray         Add a metadata filtering rule
      --metadata-filter-from stringArray    Read metadata filtering patterns from a file (use - to read from stdin)
      --metadata-include stringArray        Include metadatas matching pattern
      --metadata-include-from stringArray   Read metadata include patterns from file (use - to read from stdin)
      --min-age Duration                    Only transfer files older than this in s or suffix ms|s|m|h|d|w|M|y (default off)
      --min-size SizeSuffix                 Only transfer files bigger than this in KiB or suffix B|K|M|G|T|P (default off)</code></pre>
<h3 id="listing-options-14">Listing Options</h3>
<p>Flags for listing directories</p>
<pre class="text"><code>      --default-time Time   Time to show if modtime is unknown for files and directories (default 2000-01-01T00:00:00Z)
      --fast-list           Use recursive list if available; uses more memory but fewer transactions</code></pre>
<h2 id="see-also-55">See Also</h2>
<!-- markdownlint-capture -->
<!-- markdownlint-disable ul-style line-length -->
<ul>
<li><a href="https://rclone.org/commands/rclone/">rclone</a> - Show help
for rclone commands, flags and backends.</li>
</ul>
<!-- markdownlint-restore -->
<h1 id="rclone-copyurl">rclone copyurl</h1>
<p>Copy the contents of the URL supplied content to dest:path.</p>
<h2 id="synopsis-49">Synopsis</h2>
<p>Download a URL's content and copy it to the destination without
saving it in temporary storage.</p>
<p>Setting <code>--auto-filename</code> will attempt to automatically
determine the filename from the URL (after any redirections) and used in
the destination path.</p>
<p>With <code>--header-filename</code> in addition, if a specific
filename is set in HTTP headers, it will be used instead of the name
from the URL. With <code>--print-filename</code> in addition, the
resulting file name will be printed.</p>
<p>Setting <code>--no-clobber</code> will prevent overwriting file on
the destination if there is one with the same name.</p>
<p>Setting <code>--stdout</code> or making the output file name
<code>-</code> will cause the output to be written to standard
output.</p>
<p>Setting <code>--urls</code> allows you to input a CSV file of URLs in
format: URL, FILENAME. If <code>--urls</code> is in use then replace the
URL in the arguments with the file containing the URLs, e.g.:</p>
<div class="sourceCode" id="cb291"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb291-1"><a href="#cb291-1" aria-hidden="true" tabindex="-1"></a><span class="ex">rclone</span> copyurl <span class="at">--urls</span> myurls.csv remote:dir</span></code></pre></div>
<p>Missing filenames will be autogenerated equivalent to using
<code>--auto-filename</code>. Note that <code>--stdout</code> and
<code>--print-filename</code> are incompatible with <code>--urls</code>.
This will do <code>--transfers</code> copies in parallel. Note that if
<code>--auto-filename</code> is desired for all URLs then a file with
only URLs and no filename can be used.</p>
<p>Each FILENAME in the CSV file can start with a relative path which
will be appended to the destination path provided at the command line.
For example, running the command shown above with the following CSV file
will write two files to the destination:
<code>remote:dir/local/path/bar.json</code> and
<code>remote:dir/another/local/directory/qux.json</code></p>
<pre class="csv"><code>https://example.org/foo/bar.json,local/path/bar.json
https://example.org/qux/baz.json,another/local/directory/qux.json</code></pre>
<h2 id="troubleshooting">Troubleshooting</h2>
<p>If you can't get <code>rclone copyurl</code> to work then here are
some things you can try:</p>
<ul>
<li><code>--disable-http2</code> rclone will use HTTP2 if available -
try disabling it</li>
<li><code>--bind 0.0.0.0</code> rclone will use IPv6 if available - try
disabling it</li>
<li><code>--bind ::0</code> to disable IPv4</li>
<li><code>--user agent curl</code> - some sites have whitelists for
curl's user-agent - try that</li>
<li>Make sure the site works with <code>curl</code> directly</li>
</ul>
<pre><code>rclone copyurl https://example.com dest:path [flags]</code></pre>
<h2 id="options-56">Options</h2>
<pre><code>  -a, --auto-filename     Get the file name from the URL and use it for destination file path
      --header-filename   Get the file name from the Content-Disposition header
  -h, --help              help for copyurl
      --no-clobber        Prevent overwriting file with same name
  -p, --print-filename    Print the resulting name from --auto-filename
      --stdout            Write the output to stdout rather than a file
      --urls              Use a CSV file of links to process multiple URLs</code></pre>
<p>Options shared with other commands are described next. See the <a
href="https://rclone.org/flags/">global flags page</a> for global
options not listed here.</p>
<h3 id="important-options-13">Important Options</h3>
<p>Important flags useful for most commands</p>
<pre class="text"><code>  -n, --dry-run         Do a trial run with no permanent changes
  -i, --interactive     Enable interactive mode
  -v, --verbose count   Print lots more stuff (repeat for more)</code></pre>
<h2 id="see-also-56">See Also</h2>
<!-- markdownlint-capture -->
<!-- markdownlint-disable ul-style line-length -->
<ul>
<li><a href="https://rclone.org/commands/rclone/">rclone</a> - Show help
for rclone commands, flags and backends.</li>
</ul>
<!-- markdownlint-restore -->
<h1 id="rclone-cryptcheck">rclone cryptcheck</h1>
<p>Cryptcheck checks the integrity of an encrypted remote.</p>
<h2 id="synopsis-50">Synopsis</h2>
<p>Checks a remote against an <a
href="https://rclone.org/crypt/">encrypted</a> remote. This is the
equivalent of running rclone <a
href="https://rclone.org/commands/rclone_check/">check</a>, but able to
check the checksums of the encrypted remote.</p>
<p>For it to work the underlying remote of the cryptedremote must
support some kind of checksum.</p>
<p>It works by reading the nonce from each file on the cryptedremote:
and using that to encrypt each file on the remote:. It then checks the
checksum of the underlying file on the cryptedremote: against the
checksum of the file it has just encrypted.</p>
<p>Use it like this</p>
<pre class="console"><code>rclone cryptcheck /path/to/files encryptedremote:path</code></pre>
<p>You can use it like this also, but that will involve downloading all
the files in <code>remote:path</code>.</p>
<pre class="console"><code>rclone cryptcheck remote:path encryptedremote:path</code></pre>
<p>After it has run it will log the status of the
<code>encryptedremote:</code>.</p>
<p>If you supply the <code>--one-way</code> flag, it will only check
that files in the source match the files in the destination, not the
other way around. This means that extra files in the destination that
are not in the source will not be detected.</p>
<p>The <code>--differ</code>, <code>--missing-on-dst</code>,
<code>--missing-on-src</code>, <code>--match</code> and
<code>--error</code> flags write paths, one per line, to the file name
(or stdout if it is <code>-</code>) supplied. What they write is
described in the help below. For example <code>--differ</code> will
write all paths which are present on both the source and destination but
different.</p>
<p>The <code>--combined</code> flag will write a file (or stdout) which
contains all file paths with a symbol and then a space and then the path
to tell you what happened to it. These are reminiscent of diff
files.</p>
<ul>
<li><code>= path</code> means path was found in source and destination
and was identical</li>
<li><code>- path</code> means path was missing on the source, so only in
the destination</li>
<li><code>+ path</code> means path was missing on the destination, so
only in the source</li>
<li><code>* path</code> means path was present in source and destination
but different.</li>
<li><code>! path</code> means there was an error reading or hashing the
source or dest.</li>
</ul>
<p>The default number of parallel checks is 8. See the <a
href="https://rclone.org/docs/#checkers-int">--checkers</a> option for
more information.</p>
<pre><code>rclone cryptcheck remote:path cryptedremote:path [flags]</code></pre>
<h2 id="options-57">Options</h2>
<pre><code>      --combined string         Make a combined report of changes to this file
      --differ string           Report all non-matching files to this file
      --error string            Report all files with errors (hashing or reading) to this file
  -h, --help                    help for cryptcheck
      --match string            Report all matching files to this file
      --missing-on-dst string   Report all files missing from the destination to this file
      --missing-on-src string   Report all files missing from the source to this file
      --one-way                 Check one way only, source files must exist on remote</code></pre>
<p>Options shared with other commands are described next. See the <a
href="https://rclone.org/flags/">global flags page</a> for global
options not listed here.</p>
<h3 id="check-options-1">Check Options</h3>
<p>Flags used for check commands</p>
<pre class="text"><code>      --max-backlog int   Maximum number of objects in sync or check backlog (default 10000)</code></pre>
<h3 id="filter-options-16">Filter Options</h3>
<p>Flags for filtering directory listings</p>
<pre class="text"><code>      --delete-excluded                     Delete files on dest excluded from sync
      --exclude stringArray                 Exclude files matching pattern
      --exclude-from stringArray            Read file exclude patterns from file (use - to read from stdin)
      --exclude-if-present stringArray      Exclude directories if filename is present
      --files-from stringArray              Read list of source-file names from file (use - to read from stdin)
      --files-from-raw stringArray          Read list of source-file names from file without any processing of lines (use - to read from stdin)
      --files-from0 stringArray             Read list of source-file names from file using NUL as separator (use - to read from stdin)
  -f, --filter stringArray                  Add a file filtering rule
      --filter-from stringArray             Read file filtering patterns from a file (use - to read from stdin)
      --hash-filter string                  Partition filenames by hash k/n or randomly @/n
      --ignore-case                         Ignore case in filters (case insensitive)
      --include stringArray                 Include files matching pattern
      --include-from stringArray            Read file include patterns from file (use - to read from stdin)
      --max-age Duration                    Only transfer files younger than this in s or suffix ms|s|m|h|d|w|M|y (default off)
      --max-depth int                       If set limits the recursion depth to this (default -1)
      --max-size SizeSuffix                 Only transfer files smaller than this in KiB or suffix B|K|M|G|T|P (default off)
      --metadata-exclude stringArray        Exclude metadatas matching pattern
      --metadata-exclude-from stringArray   Read metadata exclude patterns from file (use - to read from stdin)
      --metadata-filter stringArray         Add a metadata filtering rule
      --metadata-filter-from stringArray    Read metadata filtering patterns from a file (use - to read from stdin)
      --metadata-include stringArray        Include metadatas matching pattern
      --metadata-include-from stringArray   Read metadata include patterns from file (use - to read from stdin)
      --min-age Duration                    Only transfer files older than this in s or suffix ms|s|m|h|d|w|M|y (default off)
      --min-size SizeSuffix                 Only transfer files bigger than this in KiB or suffix B|K|M|G|T|P (default off)</code></pre>
<h3 id="listing-options-15">Listing Options</h3>
<p>Flags for listing directories</p>
<pre class="text"><code>      --default-time Time   Time to show if modtime is unknown for files and directories (default 2000-01-01T00:00:00Z)
      --fast-list           Use recursive list if available; uses more memory but fewer transactions</code></pre>
<h2 id="see-also-57">See Also</h2>
<!-- markdownlint-capture -->
<!-- markdownlint-disable ul-style line-length -->
<ul>
<li><a href="https://rclone.org/commands/rclone/">rclone</a> - Show help
for rclone commands, flags and backends.</li>
</ul>
<!-- markdownlint-restore -->
<h1 id="rclone-cryptdecode">rclone cryptdecode</h1>
<p>Cryptdecode returns unencrypted file names.</p>
<h2 id="synopsis-51">Synopsis</h2>
<p>Returns unencrypted file names when provided with a list of encrypted
file names. List limit is 10 items.</p>
<p>If you supply the <code>--reverse</code> flag, it will return
encrypted file names.</p>
<p>use it like this</p>
<pre class="console"><code>rclone cryptdecode encryptedremote: encryptedfilename1 encryptedfilename2
rclone cryptdecode --reverse encryptedremote: filename1 filename2</code></pre>
<p>Another way to accomplish this is by using the
<code>rclone backend encode</code> (or <code>decode</code>) command. See
the documentation on the <a href="https://rclone.org/crypt/">crypt</a>
overlay for more info.</p>
<pre><code>rclone cryptdecode encryptedremote: encryptedfilename [flags]</code></pre>
<h2 id="options-58">Options</h2>
<pre><code>  -h, --help      help for cryptdecode
      --reverse   Reverse cryptdecode, encrypts filenames</code></pre>
<p>See the <a href="https://rclone.org/flags/">global flags page</a> for
global options not listed here.</p>
<h2 id="see-also-58">See Also</h2>
<!-- markdownlint-capture -->
<!-- markdownlint-disable ul-style line-length -->
<ul>
<li><a href="https://rclone.org/commands/rclone/">rclone</a> - Show help
for rclone commands, flags and backends.</li>
</ul>
<!-- markdownlint-restore -->
<h1 id="rclone-deletefile">rclone deletefile</h1>
<p>Remove a single file from remote.</p>
<h2 id="synopsis-52">Synopsis</h2>
<p>Remove a single file from remote. Unlike <code>delete</code> it
cannot be used to remove a directory and it doesn't obey include/exclude
filters - if the specified file exists, it will always be removed from
its original location.</p>
<p>The <code>--backup-dir</code> and <code>--suffix</code> flags are
honored when set.</p>
<pre><code>rclone deletefile remote:path [flags]</code></pre>
<h2 id="options-59">Options</h2>
<pre><code>  -h, --help   help for deletefile</code></pre>
<p>Options shared with other commands are described next. See the <a
href="https://rclone.org/flags/">global flags page</a> for global
options not listed here.</p>
<h3 id="sync-options-2">Sync Options</h3>
<p>Flags used for sync commands</p>
<pre class="text"><code>      --backup-dir string               Make backups into hierarchy based in DIR
      --delete-after                    When synchronizing, delete files on destination after transferring (default)
      --delete-before                   When synchronizing, delete files on destination before transferring
      --delete-during                   When synchronizing, delete files during transfer
      --fix-case                        Force rename of case insensitive dest to match source
      --ignore-errors                   Delete even if there are I/O errors
      --list-cutoff int                 To save memory, sort directory listings on disk above this threshold (default 1000000)
      --max-delete int                  When synchronizing, limit the number of deletes (default -1)
      --max-delete-size SizeSuffix      When synchronizing, limit the total size of deletes (default off)
      --suffix string                   Suffix to add to changed files
      --suffix-keep-extension           Preserve the extension when using --suffix
      --track-renames                   When synchronizing, track file renames and do a server-side move if possible
      --track-renames-strategy string   Strategies to use when synchronizing using track-renames hash|modtime|leaf (default &quot;hash&quot;)</code></pre>
<h3 id="important-options-14">Important Options</h3>
<p>Important flags useful for most commands</p>
<pre class="text"><code>  -n, --dry-run         Do a trial run with no permanent changes
  -i, --interactive     Enable interactive mode
  -v, --verbose count   Print lots more stuff (repeat for more)</code></pre>
<h2 id="see-also-59">See Also</h2>
<!-- markdownlint-capture -->
<!-- markdownlint-disable ul-style line-length -->
<ul>
<li><a href="https://rclone.org/commands/rclone/">rclone</a> - Show help
for rclone commands, flags and backends.</li>
</ul>
<!-- markdownlint-restore -->
<h1 id="rclone-gendocs">rclone gendocs</h1>
<p>Output markdown docs for rclone to the directory supplied.</p>
<h2 id="synopsis-53">Synopsis</h2>
<p>This produces markdown docs for the rclone commands to the directory
supplied. These are in a format suitable for hugo to render into the
rclone.org website.</p>
<pre><code>rclone gendocs output_directory [flags]</code></pre>
<h2 id="options-60">Options</h2>
<pre><code>  -h, --help   help for gendocs</code></pre>
<p>See the <a href="https://rclone.org/flags/">global flags page</a> for
global options not listed here.</p>
<h2 id="see-also-60">See Also</h2>
<!-- markdownlint-capture -->
<!-- markdownlint-disable ul-style line-length -->
<ul>
<li><a href="https://rclone.org/commands/rclone/">rclone</a> - Show help
for rclone commands, flags and backends.</li>
</ul>
<!-- markdownlint-restore -->
<h1 id="rclone-gitannex">rclone gitannex</h1>
<p>Speaks with git-annex over stdin/stdout.</p>
<h2 id="synopsis-54">Synopsis</h2>
<p>Rclone's <code>gitannex</code> subcommand enables <a
href="https://git-annex.branchable.com/">git-annex</a> to store and
retrieve content from an rclone remote. It is meant to be run by
git-annex, not directly by users.</p>
<h2 id="installation-on-linux">Installation on Linux</h2>
<ol type="1">
<li><p>Skip this step if your version of git-annex is <a
href="https://git-annex.branchable.com/news/version_10.20240430/">10.20240430</a>
or newer. Otherwise, you must create a symlink somewhere on your PATH
with a particular name. This symlink helps git-annex tell rclone it
wants to run the "gitannex" subcommand.</p>
<p>Create the helper symlink in "$HOME/bin":</p>
<pre class="console"><code>ln -s &quot;$(realpath rclone)&quot; &quot;$HOME/bin/git-annex-remote-rclone-builtin&quot;

Verify the new symlink is on your PATH:

```console
which git-annex-remote-rclone-builtin</code></pre></li>
<li><p>Add a new remote to your git-annex repo. This new remote will
connect git-annex with the <code>rclone gitannex</code> subcommand.</p>
<p>Start by asking git-annex to describe the remote's available
configuration parameters.</p>
<p>If you skipped step 1:</p>
<pre class="console"><code>git annex initremote MyRemote type=rclone --whatelse</code></pre>
<p>If you created a symlink in step 1:</p>
<pre class="console"><code>git annex initremote MyRemote type=external externaltype=rclone-builtin --whatelse</code></pre>
<blockquote>
<p><strong>NOTE</strong>: If you're porting an existing <a
href="https://github.com/git-annex-remote-rclone/git-annex-remote-rclone">git-annex-remote-rclone</a>
remote to use <code>rclone gitannex</code>, you can probably reuse the
configuration parameters verbatim without renaming them. Check parameter
synonyms with <code>--whatelse</code> as shown above.</p>
</blockquote>
<p>The following example creates a new git-annex remote named "MyRemote"
that will use the rclone remote named "SomeRcloneRemote". That rclone
remote must be one configured in your rclone.conf file, which can be
located with <code>rclone config file</code>.</p>
<pre class="console"><code>git annex initremote MyRemote         \
    type=external                     \
    externaltype=rclone-builtin       \
    encryption=none                   \
    rcloneremotename=SomeRcloneRemote \
    rcloneprefix=git-annex-content    \
    rclonelayout=nodir</code></pre></li>
<li><p>Before you trust this command with your precious data, be sure to
<strong>test the remote</strong>. This command is very new and has not
been tested on many rclone backends. Caveat emptor!</p>
<pre class="console"><code>git annex testremote MyRemote</code></pre></li>
</ol>
<p>Happy annexing!</p>
<pre><code>rclone gitannex [flags]</code></pre>
<h2 id="options-61">Options</h2>
<pre><code>  -h, --help   help for gitannex</code></pre>
<p>See the <a href="https://rclone.org/flags/">global flags page</a> for
global options not listed here.</p>
<h2 id="see-also-61">See Also</h2>
<!-- markdownlint-capture -->
<!-- markdownlint-disable ul-style line-length -->
<ul>
<li><a href="https://rclone.org/commands/rclone/">rclone</a> - Show help
for rclone commands, flags and backends.</li>
</ul>
<!-- markdownlint-restore -->
<h1 id="rclone-gui">rclone gui</h1>
<p>Open the web based GUI.</p>
<h2 id="synopsis-55">Synopsis</h2>
<p>This command starts an embedded web GUI for rclone and opens it in
your default browser.</p>
<p>This starts an RC API server and a GUI server on separate localhost
ports, generates login credentials automatically unless --no-auth is
specified, and opens the browser already authenticated.</p>
<pre><code>rclone gui</code></pre>
<p>By default rclone gui serves the web GUI that was embedded into the
rclone binary at build time from https://github.com/rclone/rclone-web/
You can override this by passing a path to either an unpacked GUI
directory or a dist.zip archive (e.g. one downloaded from the rclone-web
releases page):</p>
<pre><code>rclone gui ./my-dist/
rclone gui ./dist.zip</code></pre>
<p>This is useful for iterating on the GUI locally without rebuilding
rclone, or for serving a different GUI release than the one
embedded.</p>
<p>Use --no-open-browser to skip opening the browser automatically:</p>
<pre><code>rclone gui --no-open-browser</code></pre>
<p>Use --addr to bind the GUI to a specific address:</p>
<pre><code>rclone gui --addr localhost:5580</code></pre>
<p>Use --user and --pass to set specific credentials:</p>
<pre><code>rclone gui --user admin --pass secret</code></pre>
<p>Use --no-auth to disable authentication entirely:</p>
<pre><code>rclone gui --no-auth</code></pre>
<p>For more help see <a href="https://rclone.org/gui/">the GUI
docs</a>.</p>
<pre><code>rclone gui [path] [flags]</code></pre>
<h2 id="options-62">Options</h2>
<pre><code>      --addr stringArray       IPaddress:Port for the GUI server (default auto-chosen localhost port)
      --api-addr stringArray   IPaddress:Port for the RC API server (default auto-chosen localhost port)
      --enable-metrics         Enable OpenMetrics/Prometheus compatible endpoint at /metrics
  -h, --help                   help for gui
      --no-auth                Don&#39;t require auth for the RC API
      --no-open-browser        Skip opening the browser automatically
      --pass string            Password for RC authentication
      --user string            User name for RC authentication</code></pre>
<p>Options shared with other commands are described next. See the <a
href="https://rclone.org/flags/">global flags page</a> for global
options not listed here.</p>
<h3 id="rc-options">RC Options</h3>
<p>Flags to control the Remote Control API</p>
<pre class="text"><code>      --rc                                 Enable the remote control server
      --rc-addr stringArray                IPaddress:Port or :Port to bind server to (default localhost:5572)
      --rc-allow-origin string             Origin which cross-domain request (CORS) can be executed from
      --rc-baseurl string                  Prefix for URLs - leave blank for root
      --rc-cert string                     TLS PEM key (concatenation of certificate and CA certificate)
      --rc-client-ca string                Client certificate authority to verify clients with
      --rc-enable-metrics                  Enable the Prometheus metrics path at the remote control server
      --rc-files string                    Path to local files to serve on the HTTP server
      --rc-htpasswd string                 A htpasswd file - if not provided no authentication is done
      --rc-job-expire-duration Duration    Expire finished async jobs older than this value (default 1m0s)
      --rc-job-expire-interval Duration    Interval to check for expired async jobs (default 10s)
      --rc-key string                      TLS PEM Private key
      --rc-max-header-bytes int            Maximum size of request header (default 4096)
      --rc-min-tls-version string          Minimum TLS version that is acceptable (default &quot;tls1.0&quot;)
      --rc-no-auth                         Don&#39;t require auth for certain methods
      --rc-pass string                     Password for authentication
      --rc-realm string                    Realm for authentication
      --rc-response-header stringArray     Set HTTP header for all responses, overriding existing values
      --rc-salt string                     Password hashing salt (default &quot;dlPL2MqE&quot;)
      --rc-serve                           Enable the serving of remote objects
      --rc-serve-no-modtime                Don&#39;t read the modification time (can speed things up)
      --rc-server-read-timeout Duration    Timeout for server reading data (default 1h0m0s)
      --rc-server-write-timeout Duration   Timeout for server writing data (default 1h0m0s)
      --rc-template string                 User-specified template
      --rc-user string                     User name for authentication
      --rc-user-from-header string         User name from a defined HTTP header</code></pre>
<h2 id="see-also-62">See Also</h2>
<!-- markdownlint-capture -->
<!-- markdownlint-disable ul-style line-length -->
<ul>
<li><a href="https://rclone.org/commands/rclone/">rclone</a> - Show help
for rclone commands, flags and backends.</li>
</ul>
<!-- markdownlint-restore -->
<h1 id="rclone-hashsum">rclone hashsum</h1>
<p>Produces a hashsum file for all the objects in the path.</p>
<h2 id="synopsis-56">Synopsis</h2>
<p>Produces a hash file for all the objects in the path using the hash
named. The output is in the same format as the standard md5sum/sha1sum
tool.</p>
<p>By default, the hash is requested from the remote. If the hash is not
supported by the remote, no hash will be returned. With the download
flag, the file will be downloaded from the remote and hashed locally
enabling any hash for any remote.</p>
<p>For the MD5 and SHA1 algorithms there are also dedicated commands, <a
href="https://rclone.org/commands/rclone_md5sum/">md5sum</a> and <a
href="https://rclone.org/commands/rclone_sha1sum/">sha1sum</a>.</p>
<p>This command can also hash data received on standard input (stdin),
by not passing a remote:path, or by passing a hyphen as remote:path when
there is data to read (if not, the hyphen will be treated literally, as
a relative path).</p>
<p>Run without a hash to see the list of all supported hashes, e.g.</p>
<pre class="console"><code>$ rclone hashsum
Supported hashes are:
- md5
- sha1
- whirlpool
- crc32
- sha256
- sha512
- blake3
- xxh3
- xxh128
- crc32c</code></pre>
<p>Then</p>
<pre class="console"><code>rclone hashsum MD5 remote:path</code></pre>
<p>Note that hash names are case insensitive and values are output in
lower case.</p>
<pre><code>rclone hashsum [&lt;hash&gt; remote:path] [flags]</code></pre>
<h2 id="options-63">Options</h2>
<pre><code>      --base64               Output base64 encoded hashsum
  -C, --checkfile string     Validate hashes against a given SUM file instead of printing them
      --download             Download the file and hash it locally; if this flag is not specified, the hash is requested from the remote
  -h, --help                 help for hashsum
      --output-file string   Output hashsums to a file rather than the terminal</code></pre>
<p>Options shared with other commands are described next. See the <a
href="https://rclone.org/flags/">global flags page</a> for global
options not listed here.</p>
<h3 id="filter-options-17">Filter Options</h3>
<p>Flags for filtering directory listings</p>
<pre class="text"><code>      --delete-excluded                     Delete files on dest excluded from sync
      --exclude stringArray                 Exclude files matching pattern
      --exclude-from stringArray            Read file exclude patterns from file (use - to read from stdin)
      --exclude-if-present stringArray      Exclude directories if filename is present
      --files-from stringArray              Read list of source-file names from file (use - to read from stdin)
      --files-from-raw stringArray          Read list of source-file names from file without any processing of lines (use - to read from stdin)
      --files-from0 stringArray             Read list of source-file names from file using NUL as separator (use - to read from stdin)
  -f, --filter stringArray                  Add a file filtering rule
      --filter-from stringArray             Read file filtering patterns from a file (use - to read from stdin)
      --hash-filter string                  Partition filenames by hash k/n or randomly @/n
      --ignore-case                         Ignore case in filters (case insensitive)
      --include stringArray                 Include files matching pattern
      --include-from stringArray            Read file include patterns from file (use - to read from stdin)
      --max-age Duration                    Only transfer files younger than this in s or suffix ms|s|m|h|d|w|M|y (default off)
      --max-depth int                       If set limits the recursion depth to this (default -1)
      --max-size SizeSuffix                 Only transfer files smaller than this in KiB or suffix B|K|M|G|T|P (default off)
      --metadata-exclude stringArray        Exclude metadatas matching pattern
      --metadata-exclude-from stringArray   Read metadata exclude patterns from file (use - to read from stdin)
      --metadata-filter stringArray         Add a metadata filtering rule
      --metadata-filter-from stringArray    Read metadata filtering patterns from a file (use - to read from stdin)
      --metadata-include stringArray        Include metadatas matching pattern
      --metadata-include-from stringArray   Read metadata include patterns from file (use - to read from stdin)
      --min-age Duration                    Only transfer files older than this in s or suffix ms|s|m|h|d|w|M|y (default off)
      --min-size SizeSuffix                 Only transfer files bigger than this in KiB or suffix B|K|M|G|T|P (default off)</code></pre>
<h3 id="listing-options-16">Listing Options</h3>
<p>Flags for listing directories</p>
<pre class="text"><code>      --default-time Time   Time to show if modtime is unknown for files and directories (default 2000-01-01T00:00:00Z)
      --fast-list           Use recursive list if available; uses more memory but fewer transactions</code></pre>
<h2 id="see-also-63">See Also</h2>
<!-- markdownlint-capture -->
<!-- markdownlint-disable ul-style line-length -->
<ul>
<li><a href="https://rclone.org/commands/rclone/">rclone</a> - Show help
for rclone commands, flags and backends.</li>
</ul>
<!-- markdownlint-restore -->
<h1 id="rclone-index">rclone index</h1>
<p>Write static directory listings into a remote.</p>
<h2 id="synopsis-57">Synopsis</h2>
<p>Write a directory listing, <code>index.html</code> by default, into
every directory of <code>remote:path</code> so that it can be browsed
when it is served as a static website, for example from an S3 website
endpoint, a bucket behind a CDN, or a plain web server.</p>
<p>This works like <code>rclone sync</code>: each run makes the minimum
changes needed to bring the listings into line with the files. Listings
which haven't changed aren't rewritten, so a run with no changes makes
no uploads. The listings never show the listing files themselves.</p>
<p><strong>Note</strong> that <code>rclone index</code> treats every
file with an output name (<code>index.html</code> by default) in the
directories it indexes as its own, and will overwrite it or delete it
without checking where it came from. To protect a hand-written index,
exclude its directory with <code>--index-exclude</code>.</p>
<h2 id="outputs">Outputs</h2>
<p><code>--output NAME=FORMAT</code> says what to write in each
directory and can be repeated. NAME is the file name, and FORMAT is one
of the built-in formats below or the path of a Go template file.</p>
<table>
<colgroup>
<col style="width: 27%" />
<col style="width: 37%" />
<col style="width: 34%" />
</colgroup>
<thead>
<tr class="header">
<th style="text-align: left;">Format</th>
<th style="text-align: left;">MIME type</th>
<th style="text-align: left;">Contents</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;"><code>html</code></td>
<td style="text-align: left;"><code>text/html; charset=utf-8</code></td>
<td style="text-align: left;">The HTML listing from the
<code>rclone serve http</code> template</td>
</tr>
<tr class="even">
<td style="text-align: left;"><code>json</code></td>
<td style="text-align: left;"><code>application/json</code></td>
<td style="text-align: left;">JSON in the format of
<code>rclone lsjson</code> for the directory</td>
</tr>
<tr class="odd">
<td style="text-align: left;"><code>caddy</code></td>
<td style="text-align: left;"><code>application/json</code></td>
<td style="text-align: left;">JSON in the format of Caddy's
<code>file_server browse</code></td>
</tr>
</tbody>
</table>
<p>The default is <code>--output index.html=html</code>. The built-in
formats are templates, so they can be printed with
<code>--print-template FORMAT</code>, copied and changed. Outputs whose
name ends in <code>.html</code> or <code>.htm</code> are rendered with
Go's <code>html/template</code> and everything else with
<code>text/template</code>, which has a <code>json</code> function for
safe encoding. The template data is that of
<code>rclone serve http</code> with <code>.Static</code> set (see <a
href="https://rclone.org/commands/rclone_serve_http/#template">rclone
serve http</a>). Outputs are uploaded with the MIME type of the built-in
format, or that of the output name's extension for template outputs,
since static hosts serve the stored type.</p>
<h2 id="filters">Filters</h2>
<p>The normal filters (<code>--include</code>, <code>--exclude</code>,
<code>--filter-from</code>, <code>--max-age</code>, ...) control what
appears in the listings. An excluded file isn't listed, and an excluded
directory isn't listed or indexed.</p>
<p>The <code>--index-include</code>, <code>--index-exclude</code>,
<code>--index-filter</code> flags and their <code>-from</code> variants
control which directories get listings. They take the same patterns as
the normal filters, applied to directory paths, and
<code>--index-include</code> implies excluding all other directories. A
directory excluded here still appears in its parent's listing, but
nothing is written or deleted inside it, so it can have its own
hand-made index. <code>--index-max-depth</code> limits how deep listings
are written.</p>
<h2 id="modification-times">Modification times</h2>
<p>Listings show the modification time of each file. When using the s3,
oracleobjectstorage and swift backends rclone stores the modification
time as metadata which isn't returned by the bucket listing, so
<strong>every object needs a HEAD request</strong>, which can mean
thousands of transactions per run. Avoid this with one of:</p>
<ul>
<li><code>--use-server-modtime</code> uses the time the object was
uploaded instead, which is what the web server sends as
<code>Last-Modified</code>. Recommended for s3 unless the original
modification times matter.</li>
<li><code>--no-modtime</code> shows no times at all, which is the
cheapest option.</li>
</ul>
<p><code>--dir-time</code> sets the time shown for directories:</p>
<ul>
<li><code>newest</code> (default): the newest modification time of
anything below the directory. Note that this means one new file changes
the listing of every directory above it.</li>
<li><code>dir</code>: the directory's own modification time. On most
file systems writing a listing into a directory changes its time, so
this can take more than one run to settle.</li>
<li><code>none</code>: no time.</li>
</ul>
<p>The listing files are given the newest modification time below their
directory, so the <code>Last-Modified</code> header of a listing is
meaningful.</p>
<h2 id="links-1">Links</h2>
<p>Directory links are <code>dir/</code> by default, which works on
hosts that serve index documents: S3 website endpoints, GCS and Azure
static websites, nginx and Apache, and R2 custom domains with a URL
rewrite rule. For hosts that don't (plain S3 REST URLs, B2 friendly
URLs) use <code>--link-index</code> to make directory links
<code>dir/index.html</code> instead.</p>
<h2 id="partial-runs">Partial runs</h2>
<p>After a sync which changed a known set of files there is no need to
walk the whole remote. Tell <code>rclone index</code> what changed and
it re-indexes only the directories that could be affected:</p>
<pre><code>rclone index r2:bucket --changed v1.76.0/ --changed version.txt
rclone index r2:bucket --changed-from changes.txt
rclone sync ./public r2:bucket --exclude index.html --combined - | rclone index r2:bucket --changed-combined -</code></pre>
<ul>
<li><code>--changed PATH</code> names a changed file or directory
relative to <code>remote:path</code> and can be repeated. A directory,
given with a trailing slash or found to be one, is re-indexed
completely.</li>
<li><code>--changed-from FILE</code> reads one path per line exactly as
written.</li>
<li><code>--changed-combined FILE</code> reads the
<code>--combined</code> report of <code>rclone sync</code>: lines
starting with <code>+</code>, <code>-</code>, <code>*</code> and
<code>!</code> are changes and <code>=</code> lines are ignored.</li>
<li>Both files accept <code>-</code> for standard input and all three
flags can be combined.</li>
</ul>
<p>A changed file re-indexes its directory and every directory above it,
since their times and their listings can change too, and on bucket based
storage a directory can cease to exist. Each of those is one directory
listing. With <code>--dir-time newest</code> the directories above also
need the times of their unchanged subdirectories, which are read from
the modification times of those subdirectories' listings at the cost of
one small request each. With <code>--use-server-modtime</code> that is
the time the listing was written rather than the time of the newest
file, so partial runs can drift by the indexing delay until the next
full run. <code>--dir-time dir</code> and <code>none</code> need no such
lookups.</p>
<p>Directories which are neither named nor above a named path are left
alone, as are directories deeper than <code>--max-depth</code>. An empty
change list does nothing, and naming the root does a full run. There is
no automatic cutover to a full run since that depends on the size of the
whole remote: a partial run costs one listing per affected directory, a
full run one request per thousand objects on S3-like storage or one per
directory elsewhere. The number of directories a partial run will list
is logged with <code>-v</code>, and <code>--changed-max-dirs</code>
makes it fall back to a full run above that number. A good pattern is a
partial run after each upload and a scheduled full run to catch anything
missed.</p>
<h2 id="site-icon">Site icon</h2>
<p>The listings carry no icon or branding of their own. To give a site
an icon, upload a <code>favicon.ico</code> to the root of the remote,
which browsers fetch from there for every page. Exclude it from the
listings with <code>--exclude /favicon.ico</code> so it stays on the
site but isn't shown.</p>
<h2 id="deleting-listings">Deleting listings</h2>
<p>On backends which can't have empty directories (S3, B2 and other
bucket-based storage) a directory only exists while it has files in it.
Once the last file in a directory has been removed its listing is
deleted, since the directory only existed because of it. Backends which
can have empty directories keep a listing for each empty directory.</p>
<h2 id="using-with-sync">Using with sync</h2>
<p>A sync from a local build deletes files on the destination which
aren't in the source, which includes the listings. Either index the
local build before syncing:</p>
<pre><code>rclone index ./public
rclone sync ./public r2:bucket</code></pre>
<p>or exclude the listings from the sync so it neither uploads nor
deletes them, then index the remote:</p>
<pre><code>rclone sync ./public r2:bucket --exclude index.html
rclone index r2:bucket</code></pre>
<h2 id="examples">Examples</h2>
<p>An S3 website bucket, using the upload times so no object needs a
HEAD request:</p>
<pre><code>rclone index s3:my-site --use-server-modtime</code></pre>
<p>HTML and rclone JSON listings, setting <code>Cache-Control</code> on
them:</p>
<pre><code>rclone index s3:bucket --output index.html=html --output index.json=json --header-upload &quot;Cache-Control: max-age=300&quot;</code></pre>
<p>Only list release files, and don't write listings under
<code>/private</code>:</p>
<pre><code>rclone index r2:bucket --include &quot;*.{zip,deb,rpm}&quot; --index-exclude &quot;/private/**&quot;</code></pre>
<p>A B2 bucket served from its friendly URLs:</p>
<pre><code>rclone index b2:bucket --link-index</code></pre>
<p>See what would change:</p>
<pre><code>rclone index r2:bucket --dry-run -v</code></pre>
<p>Listings which haven't changed aren't normally rewritten, so changing
the headers or metadata set on them needs <code>--index-rewrite</code>,
which writes every listing a run would render whether it changed or
not:</p>
<pre><code>rclone index r2:bucket --index-rewrite --header-upload &quot;Cache-Control: max-age=3600&quot;</code></pre>
<pre><code>rclone index remote:path [flags]</code></pre>
<h2 id="options-64">Options</h2>
<pre><code>      --changed stringArray              Only re-index directories affected by this changed path (directories end in /)
      --changed-combined stringArray     Read changed paths from a sync --combined report (use - to read from stdin)
      --changed-from stringArray         Read changed paths from file, one per line (use - to read from stdin)
      --changed-max-dirs int             Do a full index if a partial one would list more than this many directories (0 for no limit)
      --dir-time newest|dir|none         How to work out the time shown for a directory (default newest)
  -h, --help                             help for index
      --index-exclude stringArray        Don&#39;t write listings in directories matching pattern
      --index-exclude-from stringArray   Read directory exclude patterns from file (use - to read from stdin)
      --index-filter stringArray         Add a rule for which directories get listings
      --index-filter-from stringArray    Read directory rules from a file (use - to read from stdin)
      --index-include stringArray        Only write listings in directories matching pattern
      --index-include-from stringArray   Read directory include patterns from file (use - to read from stdin)
      --index-max-depth int              Only write listings this many directories deep (-1 for no limit) (default -1)
      --index-rewrite                    Write every listing even if it is unchanged
      --link-index                       Link to dir/NAME rather than dir/ for hosts without index documents
      --no-modtime                       Don&#39;t show modification times in listings
      --output stringArray               Listing to write in each directory as NAME=FORMAT (default [index.html=html])
      --print-template string            Print the built-in template for FORMAT and exit</code></pre>
<p>Options shared with other commands are described next. See the <a
href="https://rclone.org/flags/">global flags page</a> for global
options not listed here.</p>
<h3 id="copy-options-6">Copy Options</h3>
<p>Flags for anything which can copy a file</p>
<pre class="text"><code>      --check-first                                 Do all the checks before starting transfers
  -c, --checksum                                    Check for changes with size &amp; checksum (if available, or fallback to size only)
      --compare-dest stringArray                    Include additional server-side paths during comparison
      --copy-dest stringArray                       Implies --compare-dest but also copies files from paths into destination
      --cutoff-mode HARD|SOFT|CAUTIOUS              Mode to stop transfers when reaching the max transfer limit HARD|SOFT|CAUTIOUS (default HARD)
      --ignore-case-sync                            Ignore case when synchronizing
      --ignore-checksum                             Skip post copy check of checksums
      --ignore-existing                             Skip all files that exist on destination
      --ignore-size                                 Ignore size when skipping use modtime or checksum
  -I, --ignore-times                                Don&#39;t skip items that match size and time - transfer all unconditionally
      --immutable                                   Do not modify files, fail if existing files have been modified
      --inplace                                     Download directly to destination file instead of atomic download to temp/rename
  -l, --links                                       Translate symlinks to/from regular files with a &#39;.rclonelink&#39; extension
      --max-backlog int                             Maximum number of objects in sync or check backlog (default 10000)
      --max-duration Duration                       Maximum duration rclone will transfer data for (default 0s)
      --max-transfer SizeSuffix                     Maximum size of data to transfer (default off)
  -M, --metadata                                    If set, preserve metadata when copying objects
      --modify-window Duration                      Max time diff to be considered the same (default 1ns)
      --multi-thread-chunk-size SizeSuffix          Chunk size for multi-thread downloads / uploads, if not set by filesystem (default 64Mi)
      --multi-thread-cutoff SizeSuffix              Use multi-thread downloads for files above this size (default 256Mi)
      --multi-thread-streams int                    Number of streams to use for multi-thread downloads (default 4)
      --multi-thread-write-buffer-size SizeSuffix   In memory buffer size for writing when in multi-thread mode (default 128Ki)
      --name-transform stringArray                  Transform paths during the copy process
      --no-check-dest                               Don&#39;t check the destination, copy regardless
      --no-traverse                                 Don&#39;t traverse destination file system on copy
      --no-update-dir-modtime                       Don&#39;t update directory modification times
      --no-update-modtime                           Don&#39;t update destination modtime if files identical
      --order-by string                             Instructions on how to order the transfers, e.g. &#39;size,descending&#39;
      --partial-suffix string                       Add partial-suffix to temporary file name when --inplace is not used (default &quot;.partial&quot;)
      --refresh-times                               Refresh the modtime of remote files
      --server-side-across-configs                  Allow server-side operations (e.g. copy) to work across different configs
      --size-only                                   Skip based on size only, not modtime or checksum
      --streaming-upload-cutoff SizeSuffix          Cutoff for switching to chunked upload if file size is unknown, upload starts after reaching cutoff or when file ends (default 100Ki)
  -u, --update                                      Skip files that are newer on the destination</code></pre>
<h3 id="important-options-15">Important Options</h3>
<p>Important flags useful for most commands</p>
<pre class="text"><code>  -n, --dry-run         Do a trial run with no permanent changes
  -i, --interactive     Enable interactive mode
  -v, --verbose count   Print lots more stuff (repeat for more)</code></pre>
<h3 id="filter-options-18">Filter Options</h3>
<p>Flags for filtering directory listings</p>
<pre class="text"><code>      --delete-excluded                     Delete files on dest excluded from sync
      --exclude stringArray                 Exclude files matching pattern
      --exclude-from stringArray            Read file exclude patterns from file (use - to read from stdin)
      --exclude-if-present stringArray      Exclude directories if filename is present
      --files-from stringArray              Read list of source-file names from file (use - to read from stdin)
      --files-from-raw stringArray          Read list of source-file names from file without any processing of lines (use - to read from stdin)
      --files-from0 stringArray             Read list of source-file names from file using NUL as separator (use - to read from stdin)
  -f, --filter stringArray                  Add a file filtering rule
      --filter-from stringArray             Read file filtering patterns from a file (use - to read from stdin)
      --hash-filter string                  Partition filenames by hash k/n or randomly @/n
      --ignore-case                         Ignore case in filters (case insensitive)
      --include stringArray                 Include files matching pattern
      --include-from stringArray            Read file include patterns from file (use - to read from stdin)
      --max-age Duration                    Only transfer files younger than this in s or suffix ms|s|m|h|d|w|M|y (default off)
      --max-depth int                       If set limits the recursion depth to this (default -1)
      --max-size SizeSuffix                 Only transfer files smaller than this in KiB or suffix B|K|M|G|T|P (default off)
      --metadata-exclude stringArray        Exclude metadatas matching pattern
      --metadata-exclude-from stringArray   Read metadata exclude patterns from file (use - to read from stdin)
      --metadata-filter stringArray         Add a metadata filtering rule
      --metadata-filter-from stringArray    Read metadata filtering patterns from a file (use - to read from stdin)
      --metadata-include stringArray        Include metadatas matching pattern
      --metadata-include-from stringArray   Read metadata include patterns from file (use - to read from stdin)
      --min-age Duration                    Only transfer files older than this in s or suffix ms|s|m|h|d|w|M|y (default off)
      --min-size SizeSuffix                 Only transfer files bigger than this in KiB or suffix B|K|M|G|T|P (default off)</code></pre>
<h3 id="listing-options-17">Listing Options</h3>
<p>Flags for listing directories</p>
<pre class="text"><code>      --default-time Time   Time to show if modtime is unknown for files and directories (default 2000-01-01T00:00:00Z)
      --fast-list           Use recursive list if available; uses more memory but fewer transactions</code></pre>
<h2 id="see-also-64">See Also</h2>
<!-- markdownlint-capture -->
<!-- markdownlint-disable ul-style line-length -->
<ul>
<li><a href="https://rclone.org/commands/rclone/">rclone</a> - Show help
for rclone commands, flags and backends.</li>
</ul>
<!-- markdownlint-restore -->
<h1 id="rclone-link">rclone link</h1>
<p>Generate public link to file/folder.</p>
<h2 id="synopsis-58">Synopsis</h2>
<p>Create, retrieve or remove a public link to the given file or
folder.</p>
<pre class="console"><code>rclone link remote:path/to/file
rclone link remote:path/to/folder/
rclone link --unlink remote:path/to/folder/
rclone link --expire 1d remote:path/to/file</code></pre>
<p>If you supply the --expire flag, it will set the expiration time
otherwise it will use the default (100 years). <strong>Note</strong> not
all backends support the --expire flag - if the backend doesn't support
it then the link returned won't expire.</p>
<p>Use the --unlink flag to remove existing public links to the file or
folder. <strong>Note</strong> not all backends support "--unlink" flag -
those that don't will just ignore it.</p>
<p>If successful, the last line of the output will contain the link.
Exact capabilities depend on the remote, but the link will always by
default be created with the least constraints - e.g. no expiry, no
password protection, accessible without account.</p>
<pre><code>rclone link remote:path [flags]</code></pre>
<h2 id="options-65">Options</h2>
<pre><code>      --expire Duration   The amount of time that the link will be valid (default off)
  -h, --help              help for link
      --unlink            Remove existing public link to file/folder</code></pre>
<p>See the <a href="https://rclone.org/flags/">global flags page</a> for
global options not listed here.</p>
<h2 id="see-also-65">See Also</h2>
<!-- markdownlint-capture -->
<!-- markdownlint-disable ul-style line-length -->
<ul>
<li><a href="https://rclone.org/commands/rclone/">rclone</a> - Show help
for rclone commands, flags and backends.</li>
</ul>
<!-- markdownlint-restore -->
<h1 id="rclone-listremotes">rclone listremotes</h1>
<p>List all the remotes in the config file and defined in environment
variables.</p>
<h2 id="synopsis-59">Synopsis</h2>
<p>Lists all the available remotes from the config file, or the remotes
matching an optional filter.</p>
<p>Prints the result in human-readable format by default, and as a
simple list of remote names, or if used with flag <code>--long</code> a
tabular format including the remote names, types and descriptions. Using
flag <code>--json</code> produces machine-readable output instead, which
always includes all attributes - including the source (file or
environment).</p>
<p>Result can be filtered by a filter argument which applies to all
attributes, and/or filter flags specific for each attribute. The values
must be specified according to regular rclone filtering pattern
syntax.</p>
<p>By default filtering uses non-anchored matching, so
<code>--type box</code> also matches <code>dropbox</code>. Use
<code>--exact</code> to match complete values only.</p>
<pre><code>rclone listremotes [&lt;filter&gt;] [flags]</code></pre>
<h2 id="options-66">Options</h2>
<pre><code>      --description string   Filter remotes by description
      --exact                Match filter strings exactly instead of using non-anchored glob matching
  -h, --help                 help for listremotes
      --json                 Format output as JSON
      --long                 Show type and description in addition to name
      --name string          Filter remotes by name
      --order-by string      Instructions on how to order the result, e.g. &#39;type,name=descending&#39;
      --source string        Filter remotes by source, e.g. &#39;file&#39; or &#39;environment&#39;
      --type string          Filter remotes by type</code></pre>
<p>See the <a href="https://rclone.org/flags/">global flags page</a> for
global options not listed here.</p>
<h2 id="see-also-66">See Also</h2>
<!-- markdownlint-capture -->
<!-- markdownlint-disable ul-style line-length -->
<ul>
<li><a href="https://rclone.org/commands/rclone/">rclone</a> - Show help
for rclone commands, flags and backends.</li>
</ul>
<!-- markdownlint-restore -->
<h1 id="rclone-lsf">rclone lsf</h1>
<p>List directories and objects in remote:path formatted for
parsing.</p>
<h2 id="synopsis-60">Synopsis</h2>
<p>List the contents of the source path (directories and objects) to
standard output in a form which is easy to parse by scripts. By default
this will just be the names of the objects and directories, one per
line. The directories will have a / suffix.</p>
<p>E.g.</p>
<pre class="console"><code>$ rclone lsf swift:bucket
bevajer5jef
canole
diwogej7
ferejej3gux/
fubuwic</code></pre>
<p>Use the <code>--format</code> option to control what gets listed. By
default this is just the path, but you can use these parameters to
control the output:</p>
<pre class="text"><code>p - path
s - size
t - modification time
h - hash
i - ID of object
o - Original ID of underlying object
m - MimeType of object if known
e - encrypted name
T - tier of storage if known, e.g. &quot;Hot&quot; or &quot;Cool&quot;
M - Metadata of object in JSON blob format, eg {&quot;key&quot;:&quot;value&quot;}</code></pre>
<p>Some backends use composite IDs. In particular, Google Drive
shortcuts are normally dereferenced, and their "i" field contains the
target object's ID followed by the shortcut's ID, separated by a tab.
This tab is part of the ID field and is not changed by
<code>--separator</code>. Use <code>--drive-skip-shortcuts</code> to
omit shortcut entries.</p>
<p>So if you wanted the path, size and modification time, you would use
<code>--format "pst"</code>, or maybe <code>--format "tsp"</code> to put
the path last.</p>
<p>E.g.</p>
<pre class="console"><code>$ rclone lsf  --format &quot;tsp&quot; swift:bucket
2016-06-25 18:55:41;60295;bevajer5jef
2016-06-25 18:55:43;90613;canole
2016-06-25 18:55:43;94467;diwogej7
2018-04-26 08:50:45;0;ferejej3gux/
2016-06-25 18:55:40;37600;fubuwic</code></pre>
<p>If you specify "h" in the format you will get the MD5 hash by
default, use the <code>--hash</code> flag to change which hash you want.
Note that this can be returned as an empty string if it isn't available
on the object (and for directories), "ERROR" if there was an error
reading it from the object and "UNSUPPORTED" if that object does not
support that hash type.</p>
<p>For example, to emulate the md5sum command you can use</p>
<pre class="console"><code>rclone lsf -R --hash MD5 --format hp --separator &quot;  &quot; --files-only .</code></pre>
<p>E.g.</p>
<pre class="console"><code>$ rclone lsf -R --hash MD5 --format hp --separator &quot;  &quot; --files-only swift:bucket
7908e352297f0f530b84a756f188baa3  bevajer5jef
cd65ac234e6fea5925974a51cdd865cc  canole
03b5341b4f234b9d984d03ad076bae91  diwogej7
8fd37c3810dd660778137ac3a66cc06d  fubuwic
99713e14a4c4ff553acaf1930fad985b  gixacuh7ku</code></pre>
<p>(Though "rclone md5sum ." is an easier way of typing this.)</p>
<p>By default the separator is ";" this can be changed with the
<code>--separator</code> flag. Note that separators aren't escaped in
the path so putting it last is a good strategy.</p>
<p>E.g.</p>
<pre class="console"><code>$ rclone lsf  --separator &quot;,&quot; --format &quot;tshp&quot; swift:bucket
2016-06-25 18:55:41,60295,7908e352297f0f530b84a756f188baa3,bevajer5jef
2016-06-25 18:55:43,90613,cd65ac234e6fea5925974a51cdd865cc,canole
2016-06-25 18:55:43,94467,03b5341b4f234b9d984d03ad076bae91,diwogej7
2018-04-26 08:52:53,0,,ferejej3gux/
2016-06-25 18:55:40,37600,8fd37c3810dd660778137ac3a66cc06d,fubuwic</code></pre>
<p>You can output in CSV standard format. This will escape things in "
if they contain,</p>
<p>E.g.</p>
<pre class="console"><code>$ rclone lsf --csv --files-only --format ps remote:path
test.log,22355
test.sh,449
&quot;this file contains a comma, in the file name.txt&quot;,6</code></pre>
<p>Note that the <code>--absolute</code> parameter is useful for making
lists of files to pass to an rclone copy with the
<code>--files-from-raw</code> flag.</p>
<p>For example, to find all the files modified within one day and copy
those only (without traversing the whole directory structure):</p>
<pre class="console"><code>rclone lsf --absolute --files-only --max-age 1d /path/to/local &gt; new_files
rclone copy --files-from-raw new_files /path/to/local remote:path</code></pre>
<p>The default time format is <code>'2006-01-02 15:04:05'</code>. <a
href="https://pkg.go.dev/time#pkg-constants">Other formats</a> can be
specified with the <code>--time-format</code> flag. Examples:</p>
<pre class="console"><code>rclone lsf remote:path --format pt --time-format &#39;Jan 2, 2006 at 3:04pm (MST)&#39;
rclone lsf remote:path --format pt --time-format &#39;2006-01-02 15:04:05.000000000&#39;
rclone lsf remote:path --format pt --time-format &#39;2006-01-02T15:04:05.999999999Z07:00&#39;
rclone lsf remote:path --format pt --time-format RFC3339
rclone lsf remote:path --format pt --time-format DateOnly
rclone lsf remote:path --format pt --time-format max
rclone lsf remote:path --format pt --time-format unix
rclone lsf remote:path --format pt --time-format unixnano</code></pre>
<p><code>--time-format max</code> will automatically truncate
<code>2006-01-02 15:04:05.000000000</code> to the maximum precision
supported by the remote.</p>
<p>Any of the filtering options can be applied to this command.</p>
<p>There are several related list commands</p>
<ul>
<li><code>ls</code> to list size and path of objects only</li>
<li><code>lsl</code> to list modification time, size and path of objects
only</li>
<li><code>lsd</code> to list directories only</li>
<li><code>lsf</code> to list objects and directories in easy to parse
format</li>
<li><code>lsjson</code> to list objects and directories in JSON
format</li>
</ul>
<p><code>ls</code>,<code>lsl</code>,<code>lsd</code> are designed to be
human-readable. <code>lsf</code> is designed to be human and
machine-readable. <code>lsjson</code> is designed to be
machine-readable.</p>
<p>Note that <code>ls</code> and <code>lsl</code> recurse by default -
use <code>--max-depth 1</code> to stop the recursion.</p>
<p>The other list commands
<code>lsd</code>,<code>lsf</code>,<code>lsjson</code> do not recurse by
default - use <code>-R</code> to make them recurse.</p>
<p>On the bucket-based remotes (e.g. s3, gcs, b2) a directory is a key
prefix rather than an object, so a listing without <code>-R</code> shows
each prefix as one directory entry and not the objects stored under
it.</p>
<p>List commands prefer a recursive method that uses more memory but
fewer transactions by default. Use <code>--disable ListR</code> to
suppress the behavior. See <a
href="https://rclone.org/docs/#fast-list"><code>--fast-list</code></a>
for more details.</p>
<p>Listing a nonexistent directory will produce an error except for
remotes which can't have empty directories (e.g. s3, swift, or gcs - the
bucket-based remotes).</p>
<pre><code>rclone lsf remote:path [flags]</code></pre>
<h2 id="options-67">Options</h2>
<pre><code>      --absolute             Put a leading / in front of path names
      --csv                  Output in CSV format
  -d, --dir-slash            Append a slash to directory names (default true)
      --dirs-only            Only list directories
      --files-only           Only list files
  -F, --format string        Output format - see  help for details (default &quot;p&quot;)
      --hash h               Use this hash when h is used in the format MD5|SHA-1|DropboxHash (default &quot;md5&quot;)
  -h, --help                 help for lsf
  -R, --recursive            Recurse into the listing
  -s, --separator string     Separator for the items in the format (default &quot;;&quot;)
  -t, --time-format string   Specify a custom time format - see docs for details (default: 2006-01-02 15:04:05)</code></pre>
<p>Options shared with other commands are described next. See the <a
href="https://rclone.org/flags/">global flags page</a> for global
options not listed here.</p>
<h3 id="filter-options-19">Filter Options</h3>
<p>Flags for filtering directory listings</p>
<pre class="text"><code>      --delete-excluded                     Delete files on dest excluded from sync
      --exclude stringArray                 Exclude files matching pattern
      --exclude-from stringArray            Read file exclude patterns from file (use - to read from stdin)
      --exclude-if-present stringArray      Exclude directories if filename is present
      --files-from stringArray              Read list of source-file names from file (use - to read from stdin)
      --files-from-raw stringArray          Read list of source-file names from file without any processing of lines (use - to read from stdin)
      --files-from0 stringArray             Read list of source-file names from file using NUL as separator (use - to read from stdin)
  -f, --filter stringArray                  Add a file filtering rule
      --filter-from stringArray             Read file filtering patterns from a file (use - to read from stdin)
      --hash-filter string                  Partition filenames by hash k/n or randomly @/n
      --ignore-case                         Ignore case in filters (case insensitive)
      --include stringArray                 Include files matching pattern
      --include-from stringArray            Read file include patterns from file (use - to read from stdin)
      --max-age Duration                    Only transfer files younger than this in s or suffix ms|s|m|h|d|w|M|y (default off)
      --max-depth int                       If set limits the recursion depth to this (default -1)
      --max-size SizeSuffix                 Only transfer files smaller than this in KiB or suffix B|K|M|G|T|P (default off)
      --metadata-exclude stringArray        Exclude metadatas matching pattern
      --metadata-exclude-from stringArray   Read metadata exclude patterns from file (use - to read from stdin)
      --metadata-filter stringArray         Add a metadata filtering rule
      --metadata-filter-from stringArray    Read metadata filtering patterns from a file (use - to read from stdin)
      --metadata-include stringArray        Include metadatas matching pattern
      --metadata-include-from stringArray   Read metadata include patterns from file (use - to read from stdin)
      --min-age Duration                    Only transfer files older than this in s or suffix ms|s|m|h|d|w|M|y (default off)
      --min-size SizeSuffix                 Only transfer files bigger than this in KiB or suffix B|K|M|G|T|P (default off)</code></pre>
<h3 id="listing-options-18">Listing Options</h3>
<p>Flags for listing directories</p>
<pre class="text"><code>      --default-time Time   Time to show if modtime is unknown for files and directories (default 2000-01-01T00:00:00Z)
      --fast-list           Use recursive list if available; uses more memory but fewer transactions</code></pre>
<h2 id="see-also-67">See Also</h2>
<!-- markdownlint-capture -->
<!-- markdownlint-disable ul-style line-length -->
<ul>
<li><a href="https://rclone.org/commands/rclone/">rclone</a> - Show help
for rclone commands, flags and backends.</li>
</ul>
<!-- markdownlint-restore -->
<h1 id="rclone-lsjson">rclone lsjson</h1>
<p>List directories and objects in the path in JSON format.</p>
<h2 id="synopsis-61">Synopsis</h2>
<p>List directories and objects in the path in JSON format.</p>
<p>The output is an array of Items, where each Item looks like this:</p>
<div class="sourceCode" id="cb367"><pre
class="sourceCode json"><code class="sourceCode json"><span id="cb367-1"><a href="#cb367-1" aria-hidden="true" tabindex="-1"></a><span class="fu">{</span></span>
<span id="cb367-2"><a href="#cb367-2" aria-hidden="true" tabindex="-1"></a>  <span class="dt">&quot;Hashes&quot;</span> <span class="fu">:</span> <span class="fu">{</span></span>
<span id="cb367-3"><a href="#cb367-3" aria-hidden="true" tabindex="-1"></a>    <span class="dt">&quot;SHA-1&quot;</span> <span class="fu">:</span> <span class="st">&quot;f572d396fae9206628714fb2ce00f72e94f2258f&quot;</span><span class="fu">,</span></span>
<span id="cb367-4"><a href="#cb367-4" aria-hidden="true" tabindex="-1"></a>    <span class="dt">&quot;MD5&quot;</span> <span class="fu">:</span> <span class="st">&quot;b1946ac92492d2347c6235b4d2611184&quot;</span><span class="fu">,</span></span>
<span id="cb367-5"><a href="#cb367-5" aria-hidden="true" tabindex="-1"></a>    <span class="dt">&quot;DropboxHash&quot;</span> <span class="fu">:</span> <span class="st">&quot;ecb65bb98f9d905b70458986c39fcbad7715e5f2fcc3b1f07767d7c83e2438cc&quot;</span></span>
<span id="cb367-6"><a href="#cb367-6" aria-hidden="true" tabindex="-1"></a>  <span class="fu">},</span></span>
<span id="cb367-7"><a href="#cb367-7" aria-hidden="true" tabindex="-1"></a>  <span class="dt">&quot;ID&quot;</span><span class="fu">:</span> <span class="st">&quot;y2djkhiujf83u33&quot;</span><span class="fu">,</span></span>
<span id="cb367-8"><a href="#cb367-8" aria-hidden="true" tabindex="-1"></a>  <span class="dt">&quot;OrigID&quot;</span><span class="fu">:</span> <span class="st">&quot;UYOJVTUW00Q1RzTDA&quot;</span><span class="fu">,</span></span>
<span id="cb367-9"><a href="#cb367-9" aria-hidden="true" tabindex="-1"></a>  <span class="dt">&quot;IsBucket&quot;</span> <span class="fu">:</span> <span class="kw">false</span><span class="fu">,</span></span>
<span id="cb367-10"><a href="#cb367-10" aria-hidden="true" tabindex="-1"></a>  <span class="dt">&quot;IsDir&quot;</span> <span class="fu">:</span> <span class="kw">false</span><span class="fu">,</span></span>
<span id="cb367-11"><a href="#cb367-11" aria-hidden="true" tabindex="-1"></a>  <span class="dt">&quot;MimeType&quot;</span> <span class="fu">:</span> <span class="st">&quot;application/octet-stream&quot;</span><span class="fu">,</span></span>
<span id="cb367-12"><a href="#cb367-12" aria-hidden="true" tabindex="-1"></a>  <span class="dt">&quot;ModTime&quot;</span> <span class="fu">:</span> <span class="st">&quot;2017-05-31T16:15:57.034468261+01:00&quot;</span><span class="fu">,</span></span>
<span id="cb367-13"><a href="#cb367-13" aria-hidden="true" tabindex="-1"></a>  <span class="dt">&quot;Name&quot;</span> <span class="fu">:</span> <span class="st">&quot;file.txt&quot;</span><span class="fu">,</span></span>
<span id="cb367-14"><a href="#cb367-14" aria-hidden="true" tabindex="-1"></a>  <span class="dt">&quot;Encrypted&quot;</span> <span class="fu">:</span> <span class="st">&quot;v0qpsdq8anpci8n929v3uu9338&quot;</span><span class="fu">,</span></span>
<span id="cb367-15"><a href="#cb367-15" aria-hidden="true" tabindex="-1"></a>  <span class="dt">&quot;EncryptedPath&quot;</span> <span class="fu">:</span> <span class="st">&quot;kja9098349023498/v0qpsdq8anpci8n929v3uu9338&quot;</span><span class="fu">,</span></span>
<span id="cb367-16"><a href="#cb367-16" aria-hidden="true" tabindex="-1"></a>  <span class="dt">&quot;Path&quot;</span> <span class="fu">:</span> <span class="st">&quot;full/path/goes/here/file.txt&quot;</span><span class="fu">,</span></span>
<span id="cb367-17"><a href="#cb367-17" aria-hidden="true" tabindex="-1"></a>  <span class="dt">&quot;Size&quot;</span> <span class="fu">:</span> <span class="dv">6</span><span class="fu">,</span></span>
<span id="cb367-18"><a href="#cb367-18" aria-hidden="true" tabindex="-1"></a>  <span class="dt">&quot;Tier&quot;</span> <span class="fu">:</span> <span class="st">&quot;hot&quot;</span><span class="fu">,</span></span>
<span id="cb367-19"><a href="#cb367-19" aria-hidden="true" tabindex="-1"></a><span class="fu">}</span></span></code></pre></div>
<p>The exact set of properties included depends on the backend:</p>
<ul>
<li>The property IsBucket will only be included for bucket-based
remotes, and only for directories that are buckets. It will always be
omitted when value is not true.</li>
<li>Properties Encrypted and EncryptedPath will only be included for
encrypted remotes, and (as mentioned below) only if the
<code>--encrypted</code> option is set.</li>
</ul>
<p>Different options may also affect which properties are included:</p>
<ul>
<li>If <code>--hash</code> is not specified, the Hashes property will be
omitted. The types of hash can be specified with the
<code>--hash-type</code> parameter (which may be repeated). If
<code>--hash-type</code> is set then it implies
<code>--hash</code>.</li>
<li>If <code>--no-modtime</code> is specified then ModTime will be
blank. This can speed things up on remotes where reading the ModTime
takes an extra request (e.g. s3, swift).</li>
<li>If <code>--no-mimetype</code> is specified then MimeType will be
blank. This can speed things up on remotes where reading the MimeType
takes an extra request (e.g. s3, swift).</li>
<li>If <code>--encrypted</code> is not specified the Encrypted and
EncryptedPath properties will be omitted - even for encrypted
remotes.</li>
<li>If <code>--metadata</code> is set then an additional Metadata
property will be returned. This will have <a
href="https://rclone.org/docs/#metadata">metadata</a> in rclone standard
format as a JSON object.</li>
</ul>
<p>The default is to list directories and files/objects, but this can be
changed with the following options:</p>
<ul>
<li>If <code>--dirs-only</code> is specified then directories will be
returned only, no files/objects.</li>
<li>If <code>--files-only</code> is specified then files will be
returned only, no directories.</li>
</ul>
<p>If <code>--stat</code> is set then the output is not an array of
items, but instead a single JSON blob will be returned about the item
pointed to. This will return an error if the item isn't found, however
on bucket based backends (like s3, gcs, b2, azureblob etc) if the item
isn't found it will return an empty directory, as it isn't possible to
tell empty directories from missing directories there.</p>
<p>The Path field will only show folders below the remote path being
listed. If "remote:path" contains the file "subfolder/file.txt", the
Path for "file.txt" will be "subfolder/file.txt", not
"remote:path/subfolder/file.txt". When used without
<code>--recursive</code> the Path will always be the same as Name.</p>
<p>The time is in RFC3339 format with up to nanosecond precision. The
number of decimal digits in the seconds will depend on the precision
that the remote can hold the times, so if times are accurate to the
nearest millisecond (e.g. Google Drive) then 3 digits will always be
shown ("2017-05-31T16:15:57.034+01:00") whereas if the times are
accurate to the nearest second (Dropbox, Box, WebDav, etc.) no digits
will be shown ("2017-05-31T16:15:57+01:00").</p>
<p>The whole output can be processed as a JSON blob, or alternatively it
can be processed line by line as each item is written on individual
lines (except with <code>--stat</code>).</p>
<p>Any of the filtering options can be applied to this command.</p>
<p>There are several related list commands</p>
<ul>
<li><code>ls</code> to list size and path of objects only</li>
<li><code>lsl</code> to list modification time, size and path of objects
only</li>
<li><code>lsd</code> to list directories only</li>
<li><code>lsf</code> to list objects and directories in easy to parse
format</li>
<li><code>lsjson</code> to list objects and directories in JSON
format</li>
</ul>
<p><code>ls</code>,<code>lsl</code>,<code>lsd</code> are designed to be
human-readable. <code>lsf</code> is designed to be human and
machine-readable. <code>lsjson</code> is designed to be
machine-readable.</p>
<p>Note that <code>ls</code> and <code>lsl</code> recurse by default -
use <code>--max-depth 1</code> to stop the recursion.</p>
<p>The other list commands
<code>lsd</code>,<code>lsf</code>,<code>lsjson</code> do not recurse by
default - use <code>-R</code> to make them recurse.</p>
<p>On the bucket-based remotes (e.g. s3, gcs, b2) a directory is a key
prefix rather than an object, so a listing without <code>-R</code> shows
each prefix as one directory entry and not the objects stored under
it.</p>
<p>List commands prefer a recursive method that uses more memory but
fewer transactions by default. Use <code>--disable ListR</code> to
suppress the behavior. See <a
href="https://rclone.org/docs/#fast-list"><code>--fast-list</code></a>
for more details.</p>
<p>Listing a nonexistent directory will produce an error except for
remotes which can't have empty directories (e.g. s3, swift, or gcs - the
bucket-based remotes).</p>
<pre><code>rclone lsjson remote:path [flags]</code></pre>
<h2 id="options-68">Options</h2>
<pre><code>      --dirs-only               Show only directories in the listing
      --encrypted               Show the encrypted names
      --files-only              Show only files in the listing
      --hash                    Include hashes in the output (may take longer)
      --hash-type stringArray   Show only this hash type (may be repeated)
  -h, --help                    help for lsjson
  -M, --metadata                Add metadata to the listing
      --no-mimetype             Don&#39;t read the mime type (can speed things up)
      --no-modtime              Don&#39;t read the modification time (can speed things up)
      --original                Show the ID of the underlying Object
  -R, --recursive               Recurse into the listing
      --stat                    Just return the info for the pointed to file</code></pre>
<p>Options shared with other commands are described next. See the <a
href="https://rclone.org/flags/">global flags page</a> for global
options not listed here.</p>
<h3 id="filter-options-20">Filter Options</h3>
<p>Flags for filtering directory listings</p>
<pre class="text"><code>      --delete-excluded                     Delete files on dest excluded from sync
      --exclude stringArray                 Exclude files matching pattern
      --exclude-from stringArray            Read file exclude patterns from file (use - to read from stdin)
      --exclude-if-present stringArray      Exclude directories if filename is present
      --files-from stringArray              Read list of source-file names from file (use - to read from stdin)
      --files-from-raw stringArray          Read list of source-file names from file without any processing of lines (use - to read from stdin)
      --files-from0 stringArray             Read list of source-file names from file using NUL as separator (use - to read from stdin)
  -f, --filter stringArray                  Add a file filtering rule
      --filter-from stringArray             Read file filtering patterns from a file (use - to read from stdin)
      --hash-filter string                  Partition filenames by hash k/n or randomly @/n
      --ignore-case                         Ignore case in filters (case insensitive)
      --include stringArray                 Include files matching pattern
      --include-from stringArray            Read file include patterns from file (use - to read from stdin)
      --max-age Duration                    Only transfer files younger than this in s or suffix ms|s|m|h|d|w|M|y (default off)
      --max-depth int                       If set limits the recursion depth to this (default -1)
      --max-size SizeSuffix                 Only transfer files smaller than this in KiB or suffix B|K|M|G|T|P (default off)
      --metadata-exclude stringArray        Exclude metadatas matching pattern
      --metadata-exclude-from stringArray   Read metadata exclude patterns from file (use - to read from stdin)
      --metadata-filter stringArray         Add a metadata filtering rule
      --metadata-filter-from stringArray    Read metadata filtering patterns from a file (use - to read from stdin)
      --metadata-include stringArray        Include metadatas matching pattern
      --metadata-include-from stringArray   Read metadata include patterns from file (use - to read from stdin)
      --min-age Duration                    Only transfer files older than this in s or suffix ms|s|m|h|d|w|M|y (default off)
      --min-size SizeSuffix                 Only transfer files bigger than this in KiB or suffix B|K|M|G|T|P (default off)</code></pre>
<h3 id="listing-options-19">Listing Options</h3>
<p>Flags for listing directories</p>
<pre class="text"><code>      --default-time Time   Time to show if modtime is unknown for files and directories (default 2000-01-01T00:00:00Z)
      --fast-list           Use recursive list if available; uses more memory but fewer transactions</code></pre>
<h2 id="see-also-68">See Also</h2>
<!-- markdownlint-capture -->
<!-- markdownlint-disable ul-style line-length -->
<ul>
<li><a href="https://rclone.org/commands/rclone/">rclone</a> - Show help
for rclone commands, flags and backends.</li>
</ul>
<!-- markdownlint-restore -->
<h1 id="rclone-mount">rclone mount</h1>
<p>Mount the remote as file system on a mountpoint.</p>
<h2 id="synopsis-62">Synopsis</h2>
<p>Rclone mount allows Linux, FreeBSD, macOS and Windows to mount any of
Rclone's cloud storage systems as a file system with FUSE.</p>
<p>First set up your remote using <code>rclone config</code>. Check it
works with <code>rclone ls</code> etc.</p>
<p>On Linux and macOS, you can run mount in either foreground or
background (aka daemon) mode. Mount runs in foreground mode by default.
Use the <code>--daemon</code> flag to force background mode. On Windows
you can run mount in foreground only, the flag is ignored.</p>
<p>In background mode rclone acts as a generic Unix mount program: the
main program starts, spawns background rclone process to setup and
maintain the mount, waits until success or timeout and exits with
appropriate code (killing the child process if it fails).</p>
<p>On Linux/macOS/FreeBSD start the mount like this, where
<code>/path/to/local/mount</code> is an <strong>empty</strong>
<strong>existing</strong> directory:</p>
<pre class="console"><code>rclone mount remote:path/to/files /path/to/local/mount</code></pre>
<p>On Windows you can start a mount in different ways. See <a
href="#mounting-modes-on-windows">below</a> for details. If foreground
mount is used interactively from a console window, rclone will serve the
mount and occupy the console so another window should be used to work
with the mount until rclone is interrupted e.g. by pressing Ctrl-C.</p>
<p>The following examples will mount to an automatically assigned drive,
to specific drive letter <code>X:</code>, to path
<code>C:\path\parent\mount</code> (where parent directory or drive must
exist, and mount must <strong>not</strong> exist, and is not supported
when <a href="#mounting-modes-on-windows">mounting as a network
drive</a>), and the last example will mount as network share
<code>\\cloud\remote</code> and map it to an automatically assigned
drive:</p>
<pre class="console"><code>rclone mount remote:path/to/files *
rclone mount remote:path/to/files X:
rclone mount remote:path/to/files C:\path\parent\mount
rclone mount remote:path/to/files \\cloud\remote</code></pre>
<p>When the program ends while in foreground mode, either via Ctrl+C or
receiving a SIGINT or SIGTERM signal, the mount should be automatically
stopped.</p>
<p>When running in background mode the user will have to stop the mount
manually:</p>
<pre class="console"><code># Linux
fusermount -u /path/to/local/mount
#... or on some systems
fusermount3 -u /path/to/local/mount
# OS X or Linux when using nfsmount
umount /path/to/local/mount</code></pre>
<p>The umount operation can fail, for example when the mountpoint is
busy. When that happens, it is the user's responsibility to stop the
mount manually.</p>
<p>The size of the mounted file system will be set according to
information retrieved from the remote, the same as returned by the <a
href="https://rclone.org/commands/rclone_about/">rclone about</a>
command. Remotes with unlimited storage may report the used size only,
then an additional 1 PiB of free space is assumed. If the remote does
not <a href="https://rclone.org/overview/#optional-features">support</a>
the about feature at all, then 1 PiB is set as both the total and the
free size.</p>
<h2 id="installing-on-windows">Installing on Windows</h2>
<p>To run <code>rclone mount on Windows</code>, you will need to
download and install <a href="https://winfsp.dev">WinFsp</a>.</p>
<p><a href="https://github.com/winfsp/winfsp">WinFsp</a> is an
open-source Windows File System Proxy which makes it easy to write user
space file systems for Windows. It provides a FUSE emulation layer which
rclone uses combination with <a
href="https://github.com/winfsp/cgofuse">cgofuse</a>. Both of these
packages are by Bill Zissimopoulos who was very helpful during the
implementation of rclone mount for Windows.</p>
<h3 id="mounting-modes-on-windows">Mounting modes on windows</h3>
<p>Unlike other operating systems, Microsoft Windows provides a
different filesystem type for network and fixed drives. It optimises
access on the assumption fixed disk drives are fast and reliable, while
network drives have relatively high latency and less reliability. Some
settings can also be differentiated between the two types, for example
that Windows Explorer should just display icons and not create preview
thumbnails for image and video files on network drives.</p>
<p>In most cases, rclone will mount the remote as a normal, fixed disk
drive by default. However, you can also choose to mount it as a remote
network drive, often described as a network share. If you mount an
rclone remote using the default, fixed drive mode and experience
unexpected program errors, freezes or other issues, consider mounting as
a network drive instead.</p>
<p>When mounting as a fixed disk drive you can either mount to an unused
drive letter, or to a path representing a <strong>nonexistent</strong>
subdirectory of an <strong>existing</strong> parent directory or drive.
Using the special value <code>*</code> will tell rclone to automatically
assign the next available drive letter, starting with Z: and moving
backward. Examples:</p>
<pre class="console"><code>rclone mount remote:path/to/files *
rclone mount remote:path/to/files X:
rclone mount remote:path/to/files C:\path\parent\mount
rclone mount remote:path/to/files X:</code></pre>
<p>Option <code>--volname</code> can be used to set a custom volume name
for the mounted file system. The default is to use the remote name and
path.</p>
<p>To mount as network drive, you can add option
<code>--network-mode</code> to your mount command. Mounting to a
directory path is not supported in this mode, it is a limitation Windows
imposes on junctions, so the remote must always be mounted to a drive
letter.</p>
<pre class="console"><code>rclone mount remote:path/to/files X: --network-mode</code></pre>
<p>A volume name specified with <code>--volname</code> will be used to
create the network share path. A complete UNC path, such as
<code>\\cloud\remote</code>, optionally with path
<code>\\cloud\remote\madeup\path</code>, will be used as is. Any other
string will be used as the share part, after a default prefix
<code>\\server\</code>. If no volume name is specified then
<code>\\server\share</code> will be used. You must make sure the volume
name is unique when you are mounting more than one drive, or else the
mount command will fail. The share name will treated as the volume label
for the mapped drive, shown in Windows Explorer etc, while the complete
<code>\\server\share</code> will be reported as the remote UNC path by
<code>net use</code> etc, just like a normal network drive mapping.</p>
<p>If you specify a full network share UNC path with
<code>--volname</code>, this will implicitly set the
<code>--network-mode</code> option, so the following two examples have
same result:</p>
<pre class="console"><code>rclone mount remote:path/to/files X: --network-mode
rclone mount remote:path/to/files X: --volname \\server\share</code></pre>
<p>You may also specify the network share UNC path as the mountpoint
itself. Then rclone will automatically assign a drive letter, same as
with <code>*</code> and use that as mountpoint, and instead use the UNC
path specified as the volume name, as if it were specified with the
<code>--volname</code> option. This will also implicitly set the
<code>--network-mode</code> option. This means the following two
examples have same result:</p>
<pre class="console"><code>rclone mount remote:path/to/files \\cloud\remote
rclone mount remote:path/to/files * --volname \\cloud\remote</code></pre>
<p>There is yet another way to enable network mode, and to set the share
path, and that is to pass the "native" libfuse/WinFsp option directly:
<code>--fuse-flag --VolumePrefix=\server\share</code>. Note that the
path must be with just a single backslash prefix in this case.</p>
<p><em>Note:</em> In previous versions of rclone this was the only
supported method.</p>
<p><a href="https://en.wikipedia.org/wiki/Drive_mapping">Read more about
drive mapping</a></p>
<p>See also <a href="#limitations">Limitations</a> section below.</p>
<h3 id="windows-filesystem-permissions">Windows filesystem
permissions</h3>
<p>The FUSE emulation layer on Windows must convert between the
POSIX-based permission model used in FUSE, and the permission model used
in Windows, based on access-control lists (ACL).</p>
<p>The mounted filesystem will normally get three entries in its
access-control list (ACL), representing permissions for the POSIX
permission scopes: Owner, group and others. By default, the owner and
group will be taken from the current user, and the built-in group
"Everyone" will be used to represent others. The user/group can be
customized with FUSE options "UserName" and "GroupName", e.g.
<code>-o UserName=user123 -o GroupName="Authenticated Users"</code>. The
permissions on each entry will be set according to <a
href="#options">options</a> <code>--dir-perms</code> and
<code>--file-perms</code>, which takes a value in traditional Unix <a
href="https://en.wikipedia.org/wiki/File-system_permissions#Numeric_notation">numeric
notation</a>.</p>
<p>The default permissions corresponds to
<code>--file-perms 0666 --dir-perms 0777</code>, i.e. read and write
permissions to everyone. This means you will not be able to start any
programs from the mount. To be able to do that you must add execute
permissions, e.g. <code>--file-perms 0777 --dir-perms 0777</code> to add
it to everyone. If the program needs to write files, chances are you
will have to enable <a href="#vfs-file-caching">VFS File Caching</a> as
well (see also <a href="#limitations">limitations</a>). Note that the
default write permission have some restrictions for accounts other than
the owner, specifically it lacks the "write extended attributes", as
explained next.</p>
<p>The mapping of permissions is not always trivial, and the result you
see in Windows Explorer may not be exactly like you expected. For
example, when setting a value that includes write access for the group
or others scope, this will be mapped to individual permissions "write
attributes", "write data" and "append data", but not "write extended
attributes". Windows will then show this as basic permission "Special"
instead of "Write", because "Write" also covers the "write extended
attributes" permission. When setting digit 0 for group or others, to
indicate no permissions, they will still get individual permissions
"read attributes", "read extended attributes" and "read permissions".
This is done for compatibility reasons, e.g. to allow users without
additional permissions to be able to read basic metadata about files
like in Unix.</p>
<p>WinFsp 2021 (version 1.9) introduced a new FUSE option
"FileSecurity", that allows the complete specification of file security
descriptors using <a
href="https://docs.microsoft.com/en-us/windows/win32/secauthz/security-descriptor-string-format">SDDL</a>.
With this you get detailed control of the resulting permissions,
compared to use of the POSIX permissions described above, and no
additional permissions will be added automatically for compatibility
with Unix. Some example use cases will following.</p>
<p>If you set POSIX permissions for only allowing access to the owner,
using <code>--file-perms 0600 --dir-perms 0700</code>, the user group
and the built-in "Everyone" group will still be given some special
permissions, as described above. Some programs may then (incorrectly)
interpret this as the file being accessible by everyone, for example an
SSH client may warn about "unprotected private key file". You can work
around this by specifying
<code>-o FileSecurity="D:P(A;;FA;;;OW)"</code>, which sets file all
access (FA) to the owner (OW), and nothing else.</p>
<p>When setting write permissions then, except for the owner, this does
not include the "write extended attributes" permission, as mentioned
above. This may prevent applications from writing to files, giving
permission denied error instead. To set working write permissions for
the built-in "Everyone" group, similar to what it gets by default but
with the addition of the "write extended attributes", you can specify
<code>-o FileSecurity="D:P(A;;FRFW;;;WD)"</code>, which sets file read
(FR) and file write (FW) to everyone (WD). If file execute (FX) is also
needed, then change to
<code>-o FileSecurity="D:P(A;;FRFWFX;;;WD)"</code>, or set file all
access (FA) to get full access permissions, including delete, with
<code>-o FileSecurity="D:P(A;;FA;;;WD)"</code>.</p>
<h3 id="windows-caveats">Windows caveats</h3>
<p>Drives created as Administrator are not visible to other accounts,
not even an account that was elevated to Administrator with the User
Account Control (UAC) feature. A result of this is that if you mount to
a drive letter from a Command Prompt run as Administrator, and then try
to access the same drive from Windows Explorer (which does not run as
Administrator), you will not be able to see the mounted drive.</p>
<p>If you don't need to access the drive from applications running with
administrative privileges, the easiest way around this is to always
create the mount from a non-elevated command prompt.</p>
<p>To make mapped drives available to the user account that created them
regardless if elevated or not, there is a special Windows setting called
<a
href="https://docs.microsoft.com/en-us/troubleshoot/windows-client/networking/mapped-drives-not-available-from-elevated-command#detail-to-configure-the-enablelinkedconnections-registry-entry">linked
connections</a> that can be enabled.</p>
<p>It is also possible to make a drive mount available to everyone on
the system, by running the process creating it as the built-in SYSTEM
account. There are several ways to do this: One is to use the
command-line utility <a
href="https://docs.microsoft.com/en-us/sysinternals/downloads/psexec">PsExec</a>,
from Microsoft's Sysinternals suite, which has option <code>-s</code> to
start processes as the SYSTEM account. Another alternative is to run the
mount command from a Windows Scheduled Task, or a Windows Service,
configured to run as the SYSTEM account. A third alternative is to use
the <a
href="https://github.com/winfsp/winfsp/wiki/WinFsp-Service-Architecture">WinFsp.Launcher
infrastructure</a>). Read more in the <a
href="https://rclone.org/install/">install documentation</a>. Note that
when running rclone as another user, it will not use the configuration
file from your profile unless you tell it to with the <a
href="https://rclone.org/docs/#config-string"><code>--config</code></a>
option. Note also that it is now the SYSTEM account that will have the
owner permissions, and other accounts will have permissions according to
the group or others scopes. As mentioned above, these will then not get
the "write extended attributes" permission, and this may prevent writing
to files. You can work around this with the FileSecurity option, see
example above.</p>
<p>Note that mapping to a directory path, instead of a drive letter,
does not suffer from the same limitations.</p>
<h2 id="mounting-on-macos">Mounting on macOS</h2>
<p>Mounting on macOS can be done either via <a
href="https://rclone.org/commands/rclone_serve_nfs/">built-in NFS
server</a>, <a href="https://osxfuse.github.io/">macFUSE</a> (also known
as osxfuse) or <a href="https://www.fuse-t.org/">FUSE-T</a>. macFUSE is
a traditional FUSE driver utilizing a macOS kernel extension (kext).
FUSE-T is an alternative FUSE system which "mounts" via an NFSv4 local
server.</p>
<h3 id="unicode-normalization">Unicode Normalization</h3>
<p>It is highly recommended to keep the default of
<code>--no-unicode-normalization=false</code> for all <code>mount</code>
and <code>serve</code> commands on macOS. For details, see <a
href="https://rclone.org/commands/rclone_mount/#vfs-case-sensitivity">vfs-case-sensitivity</a>.</p>
<h3 id="nfs-mount">NFS mount</h3>
<p>For macOS (and other platforms where this path is supported), prefer
the dedicated <a
href="https://rclone.org/commands/rclone_nfsmount/">rclone nfsmount</a>
command. It starts the NFS server and performs the mount for you.
<code>rclone mount</code> itself still uses FUSE (macFUSE/FUSE-T) and
does not switch to NFS via a flag.</p>
<p>This method spins up an NFS server using <a
href="https://rclone.org/commands/rclone_serve_nfs/">serve nfs</a>
command and mounts it to the specified mountpoint. If you run this in
background mode using |--daemon|, you will need to send SIGTERM signal
to the rclone process using |kill| command to stop the mount.</p>
<p>Note that <code>--nfs-cache-handle-limit</code> controls the maximum
number of cached file handles stored by the <code>nfsmount</code>
caching handler. This should not be set too low or you may experience
errors when trying to access files. The default is 1000000, but consider
lowering this limit if the server's system resource usage causes
problems.</p>
<h3 id="macfuse-notes">macFUSE Notes</h3>
<p>If installing macFUSE using <a
href="https://github.com/osxfuse/osxfuse/releases">dmg packages</a> from
the website, rclone will locate the macFUSE libraries without any
further intervention. If however, macFUSE is installed using the <a
href="https://www.macports.org/">macports</a> package manager, the
following addition steps are required.</p>
<pre class="console"><code>sudo mkdir /usr/local/lib
cd /usr/local/lib
sudo ln -s /opt/local/lib/libfuse.2.dylib</code></pre>
<h3 id="fuse-t-limitations-caveats-and-notes">FUSE-T Limitations,
Caveats, and Notes</h3>
<p>There are some limitations, caveats, and notes about how it works.
These are current as of FUSE-T version 1.0.14.</p>
<h4 id="modtime-update-on-read">ModTime update on read</h4>
<p>As per the <a
href="https://github.com/macos-fuse-t/fuse-t/wiki#caveats">FUSE-T
wiki</a>:</p>
<blockquote>
<p>File access and modification times cannot be set separately as it
seems to be an issue with the NFS client which always modifies both. Can
be reproduced with <code>touch -m</code> and <code>touch -a</code>
commands</p>
</blockquote>
<p>This means that viewing files with various tools, notably macOS
Finder, will cause rlcone to update the modification time of the file.
This may make rclone upload a full new copy of the file.</p>
<h4 id="read-only-mounts">Read Only mounts</h4>
<p>When mounting with <code>--read-only</code>, attempts to write to
files will fail <em>silently</em> as opposed to with a clear warning as
in macFUSE.</p>
<h2 id="mounting-on-linux">Mounting on Linux</h2>
<p>On newer versions of Ubuntu, you may encounter the following error
when running <code>rclone mount</code>:</p>
<blockquote>
<p>NOTICE: mount helper error: fusermount3: mount failed: Permission
denied CRITICAL: Fatal error: failed to mount FUSE fs: fusermount: exit
status 1</p>
</blockquote>
<p>This may be due to newer <a
href="https://wiki.ubuntu.com/AppArmor">Apparmor</a> restrictions, which
can be disabled with <code>sudo aa-disable /usr/bin/fusermount3</code>
(you may need to <code>sudo apt install apparmor-utils</code>
beforehand).</p>
<h2 id="mounting-on-openbsd">Mounting on OpenBSD</h2>
<p><code>rclone nfsmount</code> works on OpenBSD by spinning up the <a
href="https://rclone.org/commands/rclone_serve_nfs/">serve nfs</a>
server and mounting it with the system <code>mount_nfs(8)</code>, the
same approach used for the NFS mount method on macOS. There is no
FUSE-based mount option on OpenBSD, so <code>nfsmount</code> is the only
way to mount rclone remotes as a local file system there.</p>
<h3 id="portmap-registration">portmap registration</h3>
<p>OpenBSD's kernel NFS client locates <code>mountd</code> through the
system portmapper rather than connecting to a fixed port, so rclone's
in-process NFS server needs to be registered with portmap before it can
be mounted. Start the <code>serve nfs</code> server on a fixed port,
stop the system NFS services so they don't conflict with it, then
register that port with portmap for both the <code>nfs</code> and
<code>mountd</code> RPC programs (this is the recipe from <a
href="https://github.com/rclone/rclone/issues/8578#issuecomment-2799229652">hjicks
in #8578</a>):</p>
<pre class="console"><code>rclone serve nfs --addr localhost:&lt;PORT&gt; remote:path

doas rcctl stop nfsd portmap
doas pkill -9 mountd   # mountd can&#39;t be stopped via rcctl(8)
doas rcctl -f start portmap
doas rpcinfo -s nfs 3 &lt;PORT&gt;
doas rpcinfo -s mountd 3 &lt;PORT&gt;</code></pre>
<p>Replace <code>&lt;PORT&gt;</code> with the port passed to
<code>--addr</code>. Port 2049 works too, but needs either running
rclone as root or adjusting <code>sysctl(8)</code> at securelevel 0, so
a non-privileged port is simpler for testing.</p>
<h3 id="use-mount_nfs--t-not-mount">Use <code>mount_nfs -T</code>, not
<code>mount</code></h3>
<p>Mount the exported NFS share directly with <code>mount_nfs(8)</code>
using the <code>-T</code> flag to force TCP, rather than the generic
<code>mount(8)</code> wrapper - OpenBSD's <code>mount(8)</code> does not
understand <code>-T</code> and rejects it with
<code>unknown option -- T</code>:</p>
<pre class="console"><code>mount_nfs -T localhost:/ /path/to/local/mount</code></pre>
<p><code>rclone nfsmount</code> does this for you automatically on
OpenBSD (it calls <code>mount_nfs</code> directly with <code>-T</code>
instead of going through <code>mount</code>), so this is only needed if
you are mounting the <code>serve nfs</code> export by hand.</p>
<h3 id="auth_unix-and-existing-limitations">AUTH_UNIX and existing
limitations</h3>
<p>OpenBSD's (and the other BSDs') kernel NFS client requires the server
to offer the <code>AUTH_UNIX</code> authentication flavor during the
MOUNT RPC handshake; a server that only offers <code>AUTH_NULL</code> is
rejected with
<code>mount_nfs: can't access /: Authentication error</code>. rclone's
NFS server advertises <code>AUTH_UNIX</code> for this reason, though it
does not implement any per-user access control on top of it - see <a
href="https://github.com/rclone/rclone/issues/8578">issue #8578</a> for
the background on this and for the current state of OpenBSD support.</p>
<h2 id="limitations">Limitations</h2>
<p>Without the use of <code>--vfs-cache-mode</code> this can only write
files sequentially, it can only seek when reading. This means that many
applications won't work with their files on an rclone mount without
<code>--vfs-cache-mode writes</code> or
<code>--vfs-cache-mode full</code>. See the <a
href="#vfs-file-caching">VFS File Caching</a> section for more info.
When using NFS mount on macOS, if you don't specify |--vfs-cache-mode|
the mount point will be read-only.</p>
<p>Bucket-based remotes - Azure Blob, Swift, S3, Google Cloud Storage
and B2 - can't store empty directories. Of these, only Azure Blob,
Google Cloud Storage and S3 can preserve them when you add
<code>--xxx-directory_markers</code>; otherwise, empty directories will
vanish once they drop out of the directory cache.</p>
<p>When <code>rclone mount</code> is invoked on Unix with
<code>--daemon</code> flag, the main rclone program will wait for the
background mount to become ready or until the timeout specified by the
<code>--daemon-wait</code> flag. On Linux it can check mount status
using ProcFS so the flag in fact sets <strong>maximum</strong> time to
wait, while the real wait can be less. On macOS / BSD the time to wait
is constant and the check is performed only at the end. We advise you to
set wait time on macOS reasonably.</p>
<p>Only supported on Linux, FreeBSD, OS X and Windows at the moment.</p>
<h2 id="rclone-mount-vs-rclone-synccopy">rclone mount vs rclone
sync/copy</h2>
<p>File systems expect things to be 100% reliable, whereas cloud storage
systems are a long way from 100% reliable. The rclone sync/copy commands
cope with this with lots of retries. However rclone mount can't use
retries in the same way without making local copies of the uploads. Look
at the <a href="#vfs-file-caching">VFS File Caching</a> for solutions to
make mount more reliable.</p>
<h2 id="attribute-caching">Attribute caching</h2>
<p>You can use the flag <code>--attr-timeout</code> to set the time the
kernel caches the attributes (size, modification time, etc.) for
directory entries.</p>
<p>The default is <code>1s</code> which caches files just long enough to
avoid too many callbacks to rclone from the kernel.</p>
<p>In theory 0s should be the correct value for filesystems which can
change outside the control of the kernel. However this causes quite a
few problems such as <a
href="https://github.com/rclone/rclone/issues/2157">rclone using too
much memory</a>, <a
href="https://forum.rclone.org/t/rclone-1-39-vs-1-40-mount-issue/5112">rclone
not serving files to samba</a> and <a
href="https://github.com/rclone/rclone/issues/2095#issuecomment-371141147">excessive
time listing directories</a>.</p>
<p>The kernel can cache the info about a file for the time given by
<code>--attr-timeout</code>. You may see corruption if the remote file
changes length during this window. It will show up as either a truncated
file or a file with garbage on the end. With
<code>--attr-timeout 1s</code> this is very unlikely but not impossible.
The higher you set <code>--attr-timeout</code> the more likely it is.
The default setting of "1s" is the lowest setting which mitigates the
problems above.</p>
<p>If you set it higher (<code>10s</code> or <code>1m</code> say) then
the kernel will call back to rclone less often making it more efficient,
however there is more chance of the corruption issue above.</p>
<p>If files don't change on the remote outside of the control of rclone
then there is no chance of corruption.</p>
<p>This is the same as setting the attr_timeout option in
mount.fuse.</p>
<h2 id="filters-1">Filters</h2>
<p>Note that all the rclone filters can be used to select a subset of
the files to be visible in the mount.</p>
<h2 id="systemd">systemd</h2>
<p>When running rclone mount as a systemd service, it is possible to use
Type=notify. In this case the service will enter the started state after
the mountpoint has been successfully set up. Units having the rclone
mount service specified as a requirement will see all files and folders
immediately in this mode.</p>
<p>Note that systemd runs mount units without any environment variables
including <code>PATH</code> or <code>HOME</code>. This means that tilde
(<code>~</code>) expansion will not work and you should provide
<code>--config</code> and <code>--cache-dir</code> explicitly as
absolute paths via rclone arguments. Since mounting requires the
<code>fusermount</code> or <code>fusermount3</code> program, rclone will
use the fallback PATH of <code>/bin:/usr/bin</code> in this scenario.
Please ensure that <code>fusermount</code>/<code>fusermount3</code> is
present on this PATH.</p>
<h2 id="rclone-as-unix-mount-helper">Rclone as Unix mount helper</h2>
<p>The core Unix program <code>/bin/mount</code> normally takes the
<code>-t FSTYPE</code> argument then runs the
<code>/sbin/mount.FSTYPE</code> helper program passing it mount options
as <code>-o key=val,...</code> or <code>--opt=...</code>. Automount
(classic or systemd) behaves in a similar way.</p>
<p>rclone by default expects GNU-style flags <code>--key val</code>. To
run it as a mount helper you should symlink rclone binary to
<code>/sbin/mount.rclone</code> and optionally
<code>/usr/bin/rclonefs</code>, e.g.
<code>ln -s /usr/bin/rclone /sbin/mount.rclone</code>. rclone will
detect it and translate command-line arguments appropriately.</p>
<p>Now you can run classic mounts like this:</p>
<pre class="console"><code>mount sftp1:subdir /mnt/data -t rclone -o vfs_cache_mode=writes,sftp_key_file=/path/to/pem</code></pre>
<p>or create systemd mount units:</p>
<div class="sourceCode" id="cb383"><pre
class="sourceCode ini"><code class="sourceCode ini"><span id="cb383-1"><a href="#cb383-1" aria-hidden="true" tabindex="-1"></a><span class="co"># /etc/systemd/system/mnt-data.mount</span></span>
<span id="cb383-2"><a href="#cb383-2" aria-hidden="true" tabindex="-1"></a><span class="kw">[Unit]</span></span>
<span id="cb383-3"><a href="#cb383-3" aria-hidden="true" tabindex="-1"></a><span class="dt">Description</span><span class="ot">=</span><span class="st">Mount for /mnt/data</span></span>
<span id="cb383-4"><a href="#cb383-4" aria-hidden="true" tabindex="-1"></a><span class="kw">[Mount]</span></span>
<span id="cb383-5"><a href="#cb383-5" aria-hidden="true" tabindex="-1"></a><span class="dt">Type</span><span class="ot">=</span><span class="st">rclone</span></span>
<span id="cb383-6"><a href="#cb383-6" aria-hidden="true" tabindex="-1"></a><span class="dt">What</span><span class="ot">=</span><span class="st">sftp1:subdir</span></span>
<span id="cb383-7"><a href="#cb383-7" aria-hidden="true" tabindex="-1"></a><span class="dt">Where</span><span class="ot">=</span><span class="st">/mnt/data</span></span>
<span id="cb383-8"><a href="#cb383-8" aria-hidden="true" tabindex="-1"></a><span class="dt">Options</span><span class="ot">=</span><span class="st">rw,_netdev,allow_other,args2env,vfs-cache-mode=writes,config=/etc/rclone.conf,cache-dir=/var/rclone</span></span></code></pre></div>
<p>optionally accompanied by systemd automount unit</p>
<div class="sourceCode" id="cb384"><pre
class="sourceCode ini"><code class="sourceCode ini"><span id="cb384-1"><a href="#cb384-1" aria-hidden="true" tabindex="-1"></a><span class="co"># /etc/systemd/system/mnt-data.automount</span></span>
<span id="cb384-2"><a href="#cb384-2" aria-hidden="true" tabindex="-1"></a><span class="kw">[Unit]</span></span>
<span id="cb384-3"><a href="#cb384-3" aria-hidden="true" tabindex="-1"></a><span class="dt">Description</span><span class="ot">=</span><span class="st">AutoMount for /mnt/data</span></span>
<span id="cb384-4"><a href="#cb384-4" aria-hidden="true" tabindex="-1"></a><span class="kw">[Automount]</span></span>
<span id="cb384-5"><a href="#cb384-5" aria-hidden="true" tabindex="-1"></a><span class="dt">Where</span><span class="ot">=</span><span class="st">/mnt/data</span></span>
<span id="cb384-6"><a href="#cb384-6" aria-hidden="true" tabindex="-1"></a><span class="dt">TimeoutIdleSec</span><span class="ot">=</span><span class="dv">600</span></span>
<span id="cb384-7"><a href="#cb384-7" aria-hidden="true" tabindex="-1"></a><span class="kw">[Install]</span></span>
<span id="cb384-8"><a href="#cb384-8" aria-hidden="true" tabindex="-1"></a><span class="dt">WantedBy</span><span class="ot">=</span><span class="st">multi-user.target</span></span></code></pre></div>
<p>or add in <code>/etc/fstab</code> a line like</p>
<pre class="console"><code>sftp1:subdir /mnt/data rclone rw,noauto,nofail,_netdev,x-systemd.automount,args2env,vfs_cache_mode=writes,config=/etc/rclone.conf,cache_dir=/var/cache/rclone 0 0</code></pre>
<p>or use classic Automountd. Remember to provide explicit
<code>config=...,cache-dir=...</code> as a workaround for mount units
being run without <code>HOME</code>.</p>
<p>Rclone in the mount helper mode will split <code>-o</code>
argument(s) by comma, replace <code>_</code> by <code>-</code> and
prepend <code>--</code> to get the command-line flags. Options
containing commas or spaces can be wrapped in single or double quotes.
Any inner quotes inside outer quotes of the same type should be
doubled.</p>
<p>Mount option syntax includes a few extra options treated
specially:</p>
<ul>
<li><code>env.NAME=VALUE</code> will set an environment variable for the
mount process. This helps with Automountd and Systemd.mount which don't
allow setting custom environment for mount helpers. Typically you will
use <code>env.HTTPS_PROXY=proxy.host:3128</code> or
<code>env.HOME=/root</code></li>
<li><code>command=cmount</code> can be used to run <code>cmount</code>
or any other rclone command rather than the default
<code>mount</code>.</li>
<li><code>args2env</code> will pass mount options to the mount helper
running in background via environment variables instead of command line
arguments. This allows to hide secrets from such commands as
<code>ps</code> or <code>pgrep</code>.</li>
<li><code>vv...</code> will be transformed into appropriate
<code>--verbose=N</code></li>
<li>standard mount options like <code>x-systemd.automount</code>,
<code>_netdev</code>, <code>nosuid</code> and alike are intended only
for Automountd and ignored by rclone.</li>
</ul>
<h2 id="vfs---virtual-file-system">VFS - Virtual File System</h2>
<p>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.</p>
<p>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.</p>
<p>The VFS layer also implements a directory cache - this caches info
about files and directories (but not the data) in memory.</p>
<h2 id="vfs-directory-cache">VFS Directory Cache</h2>
<p>Using the <code>--dir-cache-time</code> 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.</p>
<pre class="text"><code>    --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)</code></pre>
<p>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.</p>
<p>You can send a <code>SIGHUP</code> 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:</p>
<pre class="console"><code>kill -SIGHUP $(pidof rclone)</code></pre>
<p>If you configure rclone with a <a href="/rc">remote control</a> then
you can use rclone rc to flush the whole directory cache:</p>
<pre class="console"><code>rclone rc vfs/forget</code></pre>
<p>Or individual files or directories:</p>
<pre class="console"><code>rclone rc vfs/forget file=path/to/file dir=path/to/dir</code></pre>
<h2 id="vfs-file-buffering">VFS File Buffering</h2>
<p>The <code>--buffer-size</code> flag determines the amount of memory,
that will be used to buffer data in advance.</p>
<p>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.</p>
<p>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 yet
read. If the buffer is empty, only a small amount of memory will be
used.</p>
<p>The maximum memory used by rclone for buffering can be up to
<code>--buffer-size * open files</code>.</p>
<h2 id="vfs-file-caching">VFS File Caching</h2>
<p>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 cost of some compatibility.</p>
<p>For example you'll need to enable VFS caching if you want to read and
write simultaneously to a file. See below for more details.</p>
<p>Note that the VFS cache is separate from the cache backend and you
may find that you need one or the other or both.</p>
<pre class="text"><code>    --cache-dir string                     Directory rclone will use for caching.
    --vfs-cache-mode CacheMode             Cache mode off|minimal|writes|full (default off)
    --vfs-cache-max-age duration           Max time since last access of objects in the cache (default 1h0m0s)
    --vfs-cache-max-size SizeSuffix        Max total size of objects in the cache (default off)
    --vfs-cache-min-free-space SizeSuffix  Target minimum free space on the disk containing the cache (default off)
    --vfs-cache-poll-interval duration     Interval to poll the cache for stale objects (default 1m0s)
    --vfs-write-back duration              Time to writeback files after last use when using cache (default 5s)</code></pre>
<p>If run with <code>-vv</code> rclone will print the location of the
file cache. The files are stored in the user cache file area which is OS
dependent but can be controlled with <code>--cache-dir</code> or setting
the appropriate environment variable.</p>
<p>The cache has 4 different modes selected by
<code>--vfs-cache-mode</code>. The higher the cache mode the more
compatible rclone becomes at the cost of using disk space.</p>
<p>Note that files are written back to the remote only when they are
closed and if they haven't been accessed for
<code>--vfs-write-back</code> seconds. If rclone is quit or dies with
files that haven't been uploaded, these will be uploaded next time
rclone is run with the same flags.</p>
<p>If using <code>--vfs-cache-max-size</code> or
<code>--vfs-cache-min-free-space</code> note that the cache may exceed
these quotas for two reasons. Firstly because it is only checked every
<code>--vfs-cache-poll-interval</code>. Secondly because open files
cannot be evicted from the cache. When <code>--vfs-cache-max-size</code>
or <code>--vfs-cache-min-free-space</code> is exceeded, rclone will
attempt to evict the least accessed files from the cache first. rclone
will start with files that haven't been accessed for the longest. This
cache flushing strategy is efficient and more relevant files are likely
to remain cached.</p>
<p>The <code>--vfs-cache-max-age</code> will evict files from the cache
after the set time since last access has passed; it is based on access
time, not on when the file was first added to the cache. The default
value of 1 hour will start evicting files from cache that haven't been
accessed for 1 hour. When a cached file is accessed the 1 hour timer is
reset to 0 and will wait for 1 more hour before evicting. Specify the
time with standard notation, s, m, h, d, w .</p>
<p>You <strong>should not</strong> run two copies of rclone using the
same VFS cache with the same or overlapping remotes if using
<code>--vfs-cache-mode &gt; off</code>. This can potentially cause data
corruption if you do. You can work around this by giving each rclone its
own cache hierarchy with <code>--cache-dir</code>. You don't need to
worry about this if the remotes in use don't overlap.</p>
<h3 id="vfs-cache-mode-off">--vfs-cache-mode off</h3>
<p>In this mode (the default) the cache will read directly from the
remote and write directly to the remote without caching anything on
disk.</p>
<p>This will mean some operations are not possible</p>
<ul>
<li>Files can't be opened for both read AND write</li>
<li>Files opened for write can't be seeked</li>
<li>Existing files opened for write must have O_TRUNC set</li>
<li>Files open for read with O_TRUNC will be opened write only</li>
<li>Files open for write only will behave as if O_TRUNC was
supplied</li>
<li>Open modes O_APPEND, O_TRUNC are ignored</li>
<li>If an upload fails it can't be retried</li>
</ul>
<h3 id="vfs-cache-mode-minimal">--vfs-cache-mode minimal</h3>
<p>This is very similar to "off" except that files opened for read AND
write will be buffered to disk. This means that files opened for write
will be a lot more compatible, but uses the minimal disk space.</p>
<p>These operations are not possible</p>
<ul>
<li>Files opened for write only can't be seeked</li>
<li>Existing files opened for write must have O_TRUNC set</li>
<li>Files opened for write only will ignore O_APPEND, O_TRUNC</li>
<li>If an upload fails it can't be retried</li>
</ul>
<h3 id="vfs-cache-mode-writes">--vfs-cache-mode writes</h3>
<p>In this mode files opened for read only are still read directly from
the remote, write only and read/write files are buffered to disk
first.</p>
<p>This mode should support all normal file system operations.</p>
<p>If an upload fails it will be retried at exponentially increasing
intervals up to 1 minute.</p>
<h3 id="vfs-cache-mode-full">--vfs-cache-mode full</h3>
<p>In this mode all reads and writes are buffered to and from disk. When
data is read from the remote this is buffered to disk as well.</p>
<p>In this mode the files in the cache will be sparse files and rclone
will keep track of which bits of the files it has downloaded.</p>
<p>So if an application only reads the starts of each file, then rclone
will only buffer the start of the file. These files will appear to be
their full size in the cache, but they will be sparse files with only
the data that has been downloaded present in them.</p>
<p>This mode should support all normal file system operations and is
otherwise identical to <code>--vfs-cache-mode</code> writes.</p>
<p>When reading a file rclone will read <code>--buffer-size</code> plus
<code>--vfs-read-ahead</code> bytes ahead. The
<code>--buffer-size</code> is buffered in memory whereas the
<code>--vfs-read-ahead</code> is buffered on disk.</p>
<p>When using this mode it is recommended that
<code>--buffer-size</code> is not set too large and
<code>--vfs-read-ahead</code> is set large if required.</p>
<p><strong>IMPORTANT</strong> not all file systems support sparse files.
In particular FAT/exFAT do not. Rclone will perform very badly if the
cache directory is on a filesystem which doesn't support sparse files
and it will log an ERROR message if one is detected.</p>
<h3 id="fingerprinting">Fingerprinting</h3>
<p>Various parts of the VFS use fingerprinting to see if a local file
copy has changed relative to a remote file. Fingerprints are made
from:</p>
<ul>
<li>size</li>
<li>modification time</li>
<li>hash</li>
</ul>
<p>where available on an object.</p>
<p>On some backends some of these attributes are slow to read (they take
an extra API call per object, or extra work per object).</p>
<p>For example <code>hash</code> is slow with the <code>local</code> and
<code>sftp</code> backends as they have to read the entire file and hash
it, and <code>modtime</code> is slow with the <code>s3</code>,
<code>swift</code>, <code>ftp</code> and <code>qinqstor</code> backends
because they need to do an extra API call to fetch it.</p>
<p>If you use the <code>--vfs-fast-fingerprint</code> flag then rclone
will not include the slow operations in the fingerprint. This makes the
fingerprinting less accurate but much faster and will improve the
opening time of cached files.</p>
<p>If you are running a vfs cache over <code>local</code>,
<code>s3</code> or <code>swift</code> backends then using this flag is
recommended.</p>
<p>Note that if you change the value of this flag, the fingerprints of
the files in the cache may be invalidated and the files will need to be
downloaded again.</p>
<h2 id="vfs-chunked-reading">VFS Chunked Reading</h2>
<p>When rclone reads files from a remote it reads them in chunks. This
means that rather than requesting the whole file rclone reads the chunk
specified. This can reduce the used download quota for some remotes by
requesting only chunks from the remote that are actually read, at the
cost of an increased number of requests.</p>
<p>These flags control the chunking:</p>
<pre class="text"><code>    --vfs-read-chunk-size SizeSuffix        Read the source objects in chunks (default 128M)
    --vfs-read-chunk-size-limit SizeSuffix  Max chunk doubling size (default off)
    --vfs-read-chunk-streams int            The number of parallel streams to read at once</code></pre>
<p>The chunking behaves differently depending on the
<code>--vfs-read-chunk-streams</code> parameter.</p>
<h3 id="vfs-read-chunk-streams-0"><code>--vfs-read-chunk-streams</code>
== 0</h3>
<p>Rclone will start reading a chunk of size
<code>--vfs-read-chunk-size</code>, and then double the size for each
read. When <code>--vfs-read-chunk-size-limit</code> is specified, and
greater than <code>--vfs-read-chunk-size</code>, the chunk size for each
open file will get doubled only until the specified value is reached. If
the value is "off", which is the default, the limit is disabled and the
chunk size will grow indefinitely.</p>
<p>With <code>--vfs-read-chunk-size 100M</code> and
<code>--vfs-read-chunk-size-limit 0</code> the following parts will be
downloaded: 0-100M, 100M-200M, 200M-300M, 300M-400M and so on. When
<code>--vfs-read-chunk-size-limit 500M</code> is specified, the result
would be 0-100M, 100M-300M, 300M-700M, 700M-1200M, 1200M-1700M and so
on.</p>
<p>Setting <code>--vfs-read-chunk-size</code> to <code>0</code> or "off"
disables chunked reading.</p>
<p>The chunks will not be buffered in memory.</p>
<h3
id="vfs-read-chunk-streams-0-1"><code>--vfs-read-chunk-streams</code>
&gt; 0</h3>
<p>Rclone reads <code>--vfs-read-chunk-streams</code> chunks of size
<code>--vfs-read-chunk-size</code> concurrently. The size for each read
will stay constant.</p>
<p>This improves performance massively on high latency links or very
high bandwidth links to high performance object stores.</p>
<p>Some experimentation will be needed to find the optimum values of
<code>--vfs-read-chunk-size</code> and
<code>--vfs-read-chunk-streams</code> as these will depend on the
backend in use and the latency to the backend.</p>
<p>For high performance object stores (eg AWS S3) a reasonable place to
start might be <code>--vfs-read-chunk-streams 16</code> and
<code>--vfs-read-chunk-size 4M</code>. In testing with AWS S3 the
performance scaled roughly as the <code>--vfs-read-chunk-streams</code>
setting.</p>
<p>Similar settings should work for high latency links, but depending on
the latency they may need more <code>--vfs-read-chunk-streams</code> in
order to get the throughput.</p>
<h2 id="vfs-performance">VFS Performance</h2>
<p>These flags may be used to enable/disable features of the VFS for
performance or other reasons. See also the <a
href="#vfs-chunked-reading">chunked reading</a> feature.</p>
<p>In particular S3 and Swift benefit hugely from the
<code>--no-modtime</code> flag (or use <code>--use-server-modtime</code>
for a slightly different effect) as each read of the modification time
takes a transaction.</p>
<pre class="text"><code>    --no-checksum     Don&#39;t compare checksums on up/download.
    --no-modtime      Don&#39;t read/write the modification time (can speed things up).
    --no-seek         Don&#39;t allow seeking in files.
    --read-only       Only allow read-only access.</code></pre>
<p>Sometimes rclone is delivered reads or writes out of order. Rather
than seeking rclone will wait a short time for the in sequence read or
write to come in. These flags only come into effect when not using an on
disk cache file.</p>
<pre class="text"><code>    --vfs-read-wait duration   Time to wait for in-sequence read before seeking (default 20ms)
    --vfs-write-wait duration  Time to wait for in-sequence write before giving error (default 1s)</code></pre>
<p>When using VFS write caching (<code>--vfs-cache-mode</code> with
value writes or full), the global flag <code>--transfers</code> can be
set to adjust the number of parallel uploads of modified files from the
cache (the related global flag <code>--checkers</code> has no effect on
the VFS).</p>
<pre class="text"><code>    --transfers int  Number of file transfers to run in parallel (default 4)</code></pre>
<h2 id="symlinks">Symlinks</h2>
<p>By default the VFS does not support symlinks. However this may be
enabled with either of the following flags:</p>
<pre class="text"><code>    --links      Translate symlinks to/from regular files with a &#39;.rclonelink&#39; extension.
    --vfs-links  Translate symlinks to/from regular files with a &#39;.rclonelink&#39; extension for the VFS</code></pre>
<p>As most cloud storage systems do not support symlinks directly,
rclone stores the symlink as a normal file with a special extension. So
a file which appears as a symlink <code>link-to-file.txt</code> would be
stored on cloud storage as <code>link-to-file.txt.rclonelink</code> and
the contents would be the path to the symlink destination.</p>
<p>Note that <code>--links</code> enables symlink translation globally
in rclone - this includes any backend which supports the concept (for
example the local backend). <code>--vfs-links</code> just enables it for
the VFS layer.</p>
<p>This scheme is compatible with that used by the <a
href="https://rclone.org/local/#symlinks-junction-points">local backend
with the --local-links flag</a>.</p>
<p>The <code>--vfs-links</code> flag has been designed for
<code>rclone mount</code>, <code>rclone nfsmount</code> and
<code>rclone serve nfs</code>.</p>
<p>It hasn't been tested with the other <code>rclone serve</code>
commands yet.</p>
<p>A limitation of the current implementation is that it expects the
caller to resolve sub-symlinks. For example given this directory
tree</p>
<pre class="text"><code>.
├── dir
│   └── file.txt
└── linked-dir -&gt; dir</code></pre>
<p>The VFS will correctly resolve <code>linked-dir</code> but not
<code>linked-dir/file.txt</code>. This is not a problem for the tested
commands but may be for other commands.</p>
<p><strong>Note</strong> that there is an outstanding issue with symlink
support <a href="https://github.com/rclone/rclone/issues/8245">issue
#8245</a> with duplicate files being created when symlinks are moved
into directories where there is a file of the same name (or vice
versa).</p>
<h2 id="vfs-case-sensitivity">VFS Case Sensitivity</h2>
<p>Linux file systems are case-sensitive: two files can differ only by
case, and the exact case must be used when opening a file.</p>
<p>File systems in modern Windows are case-insensitive but
case-preserving: although existing files can be opened using any case,
the exact case used to create the file is preserved and available for
programs to query. It is not allowed for two files in the same directory
to differ only by case.</p>
<p>Usually file systems on macOS are case-insensitive. It is possible to
make macOS file systems case-sensitive but that is not the default.</p>
<p>The <code>--vfs-case-insensitive</code> VFS flag controls how rclone
handles these two cases. If its value is "false", rclone passes file
names to the remote as-is. If the flag is "true" (or appears without a
value on the command line), rclone may perform a "fixup" as explained
below.</p>
<p>The user may specify a file name to open/delete/rename/etc with a
case different than what is stored on the remote. If an argument refers
to an existing file with exactly the same name, then the case of the
existing file on the disk will be used. However, if a file name with
exactly the same name is not found but a name differing only by case
exists, rclone will transparently fixup the name. This fixup happens
only when an existing file is requested. Case sensitivity of file names
created anew by rclone is controlled by the underlying remote.</p>
<p>Note that case sensitivity of the operating system running rclone
(the target) may differ from case sensitivity of a file system presented
by rclone (the source). The flag controls whether "fixup" is performed
to satisfy the target.</p>
<p>If the flag is not provided on the command line, then its default
value depends on the operating system where rclone runs: "true" on
Windows and macOS, "false" otherwise. If the flag is provided without a
value, then it is "true".</p>
<p>The <code>--no-unicode-normalization</code> flag controls whether a
similar "fixup" is performed for filenames that differ but are <a
href="https://en.wikipedia.org/wiki/Unicode_equivalence">canonically
equivalent</a> with respect to unicode. Unicode normalization can be
particularly helpful for users of macOS, which prefers form NFD instead
of the NFC used by most other platforms. It is therefore highly
recommended to keep the default of <code>false</code> on macOS, to avoid
encoding compatibility issues.</p>
<p>In the (probably unlikely) event that a directory has multiple
duplicate filenames after applying case and unicode normalization, the
<code>--vfs-block-norm-dupes</code> flag allows hiding these duplicates.
This comes with a performance tradeoff, as rclone will have to scan the
entire directory for duplicates when listing a directory. For this
reason, it is recommended to leave this disabled if not needed. However,
macOS users may wish to consider using it, as otherwise, if a remote
directory contains both NFC and NFD versions of the same filename, an
odd situation will occur: both versions of the file will be visible in
the mount, and both will appear to be editable, however, editing either
version will actually result in only the NFD version getting edited
under the hood. <code>--vfs-block- norm-dupes</code> prevents this
confusion by detecting this scenario, hiding the duplicates, and logging
an error, similar to how this is handled in
<code>rclone sync</code>.</p>
<h2 id="vfs-disk-options">VFS Disk Options</h2>
<p>This flag allows you to manually set the statistics about the filing
system. It can be useful when those statistics cannot be read correctly
automatically.</p>
<pre class="text"><code>    --vfs-disk-space-total-size    Manually set the total disk space size (example: 256G, default: -1)</code></pre>
<h2 id="alternate-report-of-used-bytes">Alternate report of used
bytes</h2>
<p>Some backends, most notably S3, do not report the amount of bytes
used. If you need this information to be available when running
<code>df</code> on the filesystem, then pass the flag
<code>--vfs-used-is-size</code> to rclone. With this flag set, instead
of relying on the backend to report this information, rclone will scan
the whole remote similar to <code>rclone size</code> and compute the
total used space itself.</p>
<p><strong>WARNING</strong>: Contrary to <code>rclone size</code>, this
flag ignores filters so that the result is accurate. However, this is
very inefficient and may cost lots of API calls resulting in extra
charges. Use it as a last resort and only with caching.</p>
<h2 id="vfs-metadata">VFS Metadata</h2>
<p>If you use the <code>--vfs-metadata-extension</code> flag you can get
the VFS to expose files which contain the <a
href="https://rclone.org/docs/#metadata">metadata</a> as a JSON blob.
These files will not appear in the directory listing, but can be
<code>stat</code>-ed and opened and once they have been they
<strong>will</strong> appear in directory listings until the directory
cache expires.</p>
<p>Note that some backends won't create metadata unless you pass in the
<code>--metadata</code> flag.</p>
<p>For example, using <code>rclone mount</code> with
<code>--metadata --vfs-metadata-extension .metadata</code> we get</p>
<pre class="console"><code>$ ls -l /mnt/
total 1048577
-rw-rw-r-- 1 user user 1073741824 Mar  3 16:03 1G

$ cat /mnt/1G.metadata
{
        &quot;atime&quot;: &quot;2025-03-04T17:34:22.317069787Z&quot;,
        &quot;btime&quot;: &quot;2025-03-03T16:03:37.708253808Z&quot;,
        &quot;gid&quot;: &quot;1000&quot;,
        &quot;mode&quot;: &quot;100664&quot;,
        &quot;mtime&quot;: &quot;2025-03-03T16:03:39.640238323Z&quot;,
        &quot;uid&quot;: &quot;1000&quot;
}

$ ls -l /mnt/
total 1048578
-rw-rw-r-- 1 user user 1073741824 Mar  3 16:03 1G
-rw-rw-r-- 1 user user        185 Mar  3 16:03 1G.metadata</code></pre>
<p>If the file has no metadata it will be returned as <code>{}</code>
and if there is an error reading the metadata the error will be returned
as <code>{"error":"error string"}</code>.</p>
<pre><code>rclone mount remote:path /path/to/mountpoint [flags]</code></pre>
<h2 id="options-69">Options</h2>
<pre><code>      --allow-idmap                            Allow id-mapped mounts (Linux 6.12+, mount2 only)
      --allow-non-empty                        Allow mounting over a non-empty directory (not supported on Windows)
      --allow-other                            Allow access to other users (not supported on Windows)
      --allow-root                             Allow access to root user (not supported on Windows)
      --async-read                             Use asynchronous reads (not supported on Windows) (default true)
      --attr-timeout Duration                  Time for which file/directory attributes are cached (default 1s)
      --daemon                                 Run mount in background and exit parent process (as background output is suppressed, use --log-file with --log-format=pid,... to monitor) (not supported on Windows)
      --daemon-timeout Duration                Time limit for rclone to respond to kernel (not supported on Windows) (default 0s)
      --daemon-wait Duration                   Time to wait for ready mount from daemon (maximum time on Linux, constant sleep time on OSX/BSD) (not supported on Windows) (default 1m0s)
      --debug-fuse                             Debug the FUSE internals - needs -v
      --default-permissions                    Makes kernel enforce access control based on the file mode (not supported on Windows)
      --devname string                         Set the device name - default is remote:path
      --dir-cache-time Duration                Time to cache directory entries for (default 5m0s)
      --dir-perms FileMode                     Directory permissions (default 777)
      --direct-io                              Use Direct IO, disables caching of data
      --file-perms FileMode                    File permissions (default 666)
      --fuse-flag stringArray                  Flags or arguments to be passed direct to libfuse/WinFsp (repeat if required)
      --gid uint32                             Override the gid field set by the filesystem (not supported on Windows) (default 1000)
  -h, --help                                   help for mount
      --link-perms FileMode                    Link permissions (default 666)
      --max-read-ahead SizeSuffix              The number of bytes that can be prefetched for sequential reads (not supported on Windows) (default 128Ki)
      --mount-case-insensitive Tristate        Tell the OS the mount is case insensitive (true) or sensitive (false) regardless of the backend (auto) (default unset)
      --network-mode                           Mount as remote network drive, instead of fixed disk drive (supported on Windows only)
      --no-checksum                            Don&#39;t compare checksums on up/download
      --no-modtime                             Don&#39;t read/write the modification time (can speed things up)
      --no-seek                                Don&#39;t allow seeking in files
      --noappledouble                          Ignore Apple Double (._) and .DS_Store files (supported on OSX only) (default true)
      --noapplexattr                           Ignore all &quot;com.apple.*&quot; extended attributes (supported on OSX only)
  -o, --option stringArray                     Option for libfuse/WinFsp (repeat if required)
      --poll-interval Duration                 Time to wait between polling for changes, must be smaller than dir-cache-time and only on supported remotes (set 0 to disable) (default 1m0s)
      --read-only                              Only allow read-only access
      --uid uint32                             Override the uid field set by the filesystem (not supported on Windows) (default 1000)
      --umask FileMode                         Override the permission bits set by the filesystem (not supported on Windows) (default 002)
      --vfs-block-norm-dupes                   If duplicate filenames exist in the same directory (after normalization), log an error and hide the duplicates (may have a performance cost)
      --vfs-cache-max-age Duration             Max time since last access of objects in the cache (default 1h0m0s)
      --vfs-cache-max-size SizeSuffix          Max total size of objects in the cache (default off)
      --vfs-cache-min-free-space SizeSuffix    Target minimum free space on the disk containing the cache (default off)
      --vfs-cache-mode CacheMode               Cache mode off|minimal|writes|full (default off)
      --vfs-cache-poll-interval Duration       Interval to poll the cache for stale objects (default 1m0s)
      --vfs-case-insensitive                   If a file name not found, find a case insensitive match
      --vfs-disk-space-total-size SizeSuffix   Specify the total space of disk (default off)
      --vfs-fast-fingerprint                   Use fast (less accurate) fingerprints for change detection
      --vfs-handle-caching Duration            Time to keep file handle and downloaders alive after last close (default 5s)
      --vfs-links                              Translate symlinks to/from regular files with a &#39;.rclonelink&#39; extension for the VFS
      --vfs-metadata-extension string          Set the extension to read metadata from
      --vfs-read-ahead SizeSuffix              Extra read ahead over --buffer-size when using cache-mode full
      --vfs-read-chunk-size SizeSuffix         Read the source objects in chunks (default 128Mi)
      --vfs-read-chunk-size-limit SizeSuffix   If greater than --vfs-read-chunk-size, double the chunk size after each chunk read, until the limit is reached (&#39;off&#39; is unlimited) (default off)
      --vfs-read-chunk-streams int             The number of parallel streams to read at once
      --vfs-read-wait Duration                 Time to wait for in-sequence read before seeking (default 20ms)
      --vfs-refresh                            Refreshes the directory cache recursively in the background on start
      --vfs-used-is-size rclone size           Use the rclone size algorithm for Used size
      --vfs-write-back Duration                Time to writeback files after last use when using cache (default 5s)
      --vfs-write-wait Duration                Time to wait for in-sequence write before giving error (default 1s)
      --volname string                         Set the volume name (supported on Windows and OSX only)
      --write-back-cache                       Makes kernel buffer writes before sending them to rclone (without this, writethrough caching is used) (not supported on Windows)</code></pre>
<p>Options shared with other commands are described next. See the <a
href="https://rclone.org/flags/">global flags page</a> for global
options not listed here.</p>
<h3 id="filter-options-21">Filter Options</h3>
<p>Flags for filtering directory listings</p>
<pre class="text"><code>      --delete-excluded                     Delete files on dest excluded from sync
      --exclude stringArray                 Exclude files matching pattern
      --exclude-from stringArray            Read file exclude patterns from file (use - to read from stdin)
      --exclude-if-present stringArray      Exclude directories if filename is present
      --files-from stringArray              Read list of source-file names from file (use - to read from stdin)
      --files-from-raw stringArray          Read list of source-file names from file without any processing of lines (use - to read from stdin)
      --files-from0 stringArray             Read list of source-file names from file using NUL as separator (use - to read from stdin)
  -f, --filter stringArray                  Add a file filtering rule
      --filter-from stringArray             Read file filtering patterns from a file (use - to read from stdin)
      --hash-filter string                  Partition filenames by hash k/n or randomly @/n
      --ignore-case                         Ignore case in filters (case insensitive)
      --include stringArray                 Include files matching pattern
      --include-from stringArray            Read file include patterns from file (use - to read from stdin)
      --max-age Duration                    Only transfer files younger than this in s or suffix ms|s|m|h|d|w|M|y (default off)
      --max-depth int                       If set limits the recursion depth to this (default -1)
      --max-size SizeSuffix                 Only transfer files smaller than this in KiB or suffix B|K|M|G|T|P (default off)
      --metadata-exclude stringArray        Exclude metadatas matching pattern
      --metadata-exclude-from stringArray   Read metadata exclude patterns from file (use - to read from stdin)
      --metadata-filter stringArray         Add a metadata filtering rule
      --metadata-filter-from stringArray    Read metadata filtering patterns from a file (use - to read from stdin)
      --metadata-include stringArray        Include metadatas matching pattern
      --metadata-include-from stringArray   Read metadata include patterns from file (use - to read from stdin)
      --min-age Duration                    Only transfer files older than this in s or suffix ms|s|m|h|d|w|M|y (default off)
      --min-size SizeSuffix                 Only transfer files bigger than this in KiB or suffix B|K|M|G|T|P (default off)</code></pre>
<h2 id="see-also-69">See Also</h2>
<!-- markdownlint-capture -->
<!-- markdownlint-disable ul-style line-length -->
<ul>
<li><a href="https://rclone.org/commands/rclone/">rclone</a> - Show help
for rclone commands, flags and backends.</li>
</ul>
<!-- markdownlint-restore -->
<h1 id="rclone-moveto">rclone moveto</h1>
<p>Move file or directory from source to dest.</p>
<h2 id="synopsis-63">Synopsis</h2>
<p>If source:path is a file or directory then it moves it to a file or
directory named dest:path.</p>
<p>This can be used to rename files or upload single files to other than
their existing name. If the source is a directory then it acts exactly
like the <a href="https://rclone.org/commands/rclone_move/">move</a>
command.</p>
<p>So</p>
<pre class="console"><code>rclone moveto src dst</code></pre>
<p>where src and dst are rclone paths, either remote:path or
/path/to/local or C:.</p>
<p>This will:</p>
<pre class="text"><code>if src is file
    move it to dst, overwriting an existing file if it exists
if src is directory
    move it to dst, overwriting existing files if they exist
    see move command for full details</code></pre>
<p>This doesn't transfer files that are identical on src and dst,
testing by size and modification time or MD5SUM. src will be deleted on
successful transfer.</p>
<p><strong>Important</strong>: Since this can cause data loss, test
first with the <code>--dry-run</code> or the
<code>--interactive</code>/<code>-i</code> flag.</p>
<p><strong>Note</strong>: Use the
<code>-P</code>/<code>--progress</code> flag to view real-time transfer
statistics.</p>
<h2 id="logger-flags-4">Logger Flags</h2>
<p>The <code>--differ</code>, <code>--missing-on-dst</code>,
<code>--missing-on-src</code>, <code>--match</code> and
<code>--error</code> flags write paths, one per line, to the file name
(or stdout if it is <code>-</code>) supplied. What they write is
described in the help below. For example <code>--differ</code> will
write all paths which are present on both the source and destination but
different.</p>
<p>The <code>--combined</code> flag will write a file (or stdout) which
contains all file paths with a symbol and then a space and then the path
to tell you what happened to it. These are reminiscent of diff
files.</p>
<ul>
<li><code>= path</code> means path was found in source and destination
and was identical</li>
<li><code>- path</code> means path was missing on the source, so only in
the destination</li>
<li><code>+ path</code> means path was missing on the destination, so
only in the source</li>
<li><code>* path</code> means path was present in source and destination
but different.</li>
<li><code>! path</code> means there was an error reading or hashing the
source or dest.</li>
</ul>
<p>The <code>--dest-after</code> flag writes a list file using the same
format flags as <a
href="https://rclone.org/commands/rclone_lsf/#synopsis"><code>lsf</code></a>
(including <a
href="https://rclone.org/commands/rclone_lsf/#synopsis">customizable
options for hash, modtime, etc.</a>) Conceptually it is similar to
rsync's <code>--itemize-changes</code>, but not identical -- it should
output an accurate list of what will be on the destination after the
command is finished.</p>
<p>When the <code>--no-traverse</code> flag is set, all logs involving
files that exist only on the destination will be incomplete or
completely missing.</p>
<p>Note that these logger flags have a few limitations, and certain
scenarios are not currently supported:</p>
<ul>
<li><code>--max-duration</code> / <code>CutoffModeHard</code></li>
<li><code>--compare-dest</code> / <code>--copy-dest</code></li>
<li>server-side moves of an entire dir at once</li>
<li>High-level retries, because there would be duplicates (use
<code>--retries 1</code> to disable)</li>
<li>Possibly some unusual error scenarios</li>
</ul>
<p>Note also that each file is logged during execution, as opposed to
after, so it is most useful as a predictor of what SHOULD happen to each
file (which may or may not match what actually DID).</p>
<pre><code>rclone moveto source:path dest:path [flags]</code></pre>
<h2 id="options-70">Options</h2>
<pre><code>      --absolute                Put a leading / in front of path names
      --combined string         Make a combined report of changes to this file
      --csv                     Output in CSV format
      --dest-after string       Report all files that exist on the dest post-sync
      --differ string           Report all non-matching files to this file
  -d, --dir-slash               Append a slash to directory names (default true)
      --dirs-only               Only list directories
      --error string            Report all files with errors (hashing or reading) to this file
      --files-only              Only list files (default true)
  -F, --format string           Output format - see lsf help for details (default &quot;p&quot;)
      --hash h                  Use this hash when h is used in the format MD5|SHA-1|DropboxHash (default &quot;md5&quot;)
  -h, --help                    help for moveto
      --match string            Report all matching files to this file
      --missing-on-dst string   Report all files missing from the destination to this file
      --missing-on-src string   Report all files missing from the source to this file
  -s, --separator string        Separator for the items in the format (default &quot;;&quot;)
  -t, --timeformat string       Specify a custom time format - see docs for details (default: 2006-01-02 15:04:05)</code></pre>
<p>Options shared with other commands are described next. See the <a
href="https://rclone.org/flags/">global flags page</a> for global
options not listed here.</p>
<h3 id="copy-options-7">Copy Options</h3>
<p>Flags for anything which can copy a file</p>
<pre class="text"><code>      --check-first                                 Do all the checks before starting transfers
  -c, --checksum                                    Check for changes with size &amp; checksum (if available, or fallback to size only)
      --compare-dest stringArray                    Include additional server-side paths during comparison
      --copy-dest stringArray                       Implies --compare-dest but also copies files from paths into destination
      --cutoff-mode HARD|SOFT|CAUTIOUS              Mode to stop transfers when reaching the max transfer limit HARD|SOFT|CAUTIOUS (default HARD)
      --ignore-case-sync                            Ignore case when synchronizing
      --ignore-checksum                             Skip post copy check of checksums
      --ignore-existing                             Skip all files that exist on destination
      --ignore-size                                 Ignore size when skipping use modtime or checksum
  -I, --ignore-times                                Don&#39;t skip items that match size and time - transfer all unconditionally
      --immutable                                   Do not modify files, fail if existing files have been modified
      --inplace                                     Download directly to destination file instead of atomic download to temp/rename
  -l, --links                                       Translate symlinks to/from regular files with a &#39;.rclonelink&#39; extension
      --max-backlog int                             Maximum number of objects in sync or check backlog (default 10000)
      --max-duration Duration                       Maximum duration rclone will transfer data for (default 0s)
      --max-transfer SizeSuffix                     Maximum size of data to transfer (default off)
  -M, --metadata                                    If set, preserve metadata when copying objects
      --modify-window Duration                      Max time diff to be considered the same (default 1ns)
      --multi-thread-chunk-size SizeSuffix          Chunk size for multi-thread downloads / uploads, if not set by filesystem (default 64Mi)
      --multi-thread-cutoff SizeSuffix              Use multi-thread downloads for files above this size (default 256Mi)
      --multi-thread-streams int                    Number of streams to use for multi-thread downloads (default 4)
      --multi-thread-write-buffer-size SizeSuffix   In memory buffer size for writing when in multi-thread mode (default 128Ki)
      --name-transform stringArray                  Transform paths during the copy process
      --no-check-dest                               Don&#39;t check the destination, copy regardless
      --no-traverse                                 Don&#39;t traverse destination file system on copy
      --no-update-dir-modtime                       Don&#39;t update directory modification times
      --no-update-modtime                           Don&#39;t update destination modtime if files identical
      --order-by string                             Instructions on how to order the transfers, e.g. &#39;size,descending&#39;
      --partial-suffix string                       Add partial-suffix to temporary file name when --inplace is not used (default &quot;.partial&quot;)
      --refresh-times                               Refresh the modtime of remote files
      --server-side-across-configs                  Allow server-side operations (e.g. copy) to work across different configs
      --size-only                                   Skip based on size only, not modtime or checksum
      --streaming-upload-cutoff SizeSuffix          Cutoff for switching to chunked upload if file size is unknown, upload starts after reaching cutoff or when file ends (default 100Ki)
  -u, --update                                      Skip files that are newer on the destination</code></pre>
<h3 id="important-options-16">Important Options</h3>
<p>Important flags useful for most commands</p>
<pre class="text"><code>  -n, --dry-run         Do a trial run with no permanent changes
  -i, --interactive     Enable interactive mode
  -v, --verbose count   Print lots more stuff (repeat for more)</code></pre>
<h3 id="filter-options-22">Filter Options</h3>
<p>Flags for filtering directory listings</p>
<pre class="text"><code>      --delete-excluded                     Delete files on dest excluded from sync
      --exclude stringArray                 Exclude files matching pattern
      --exclude-from stringArray            Read file exclude patterns from file (use - to read from stdin)
      --exclude-if-present stringArray      Exclude directories if filename is present
      --files-from stringArray              Read list of source-file names from file (use - to read from stdin)
      --files-from-raw stringArray          Read list of source-file names from file without any processing of lines (use - to read from stdin)
      --files-from0 stringArray             Read list of source-file names from file using NUL as separator (use - to read from stdin)
  -f, --filter stringArray                  Add a file filtering rule
      --filter-from stringArray             Read file filtering patterns from a file (use - to read from stdin)
      --hash-filter string                  Partition filenames by hash k/n or randomly @/n
      --ignore-case                         Ignore case in filters (case insensitive)
      --include stringArray                 Include files matching pattern
      --include-from stringArray            Read file include patterns from file (use - to read from stdin)
      --max-age Duration                    Only transfer files younger than this in s or suffix ms|s|m|h|d|w|M|y (default off)
      --max-depth int                       If set limits the recursion depth to this (default -1)
      --max-size SizeSuffix                 Only transfer files smaller than this in KiB or suffix B|K|M|G|T|P (default off)
      --metadata-exclude stringArray        Exclude metadatas matching pattern
      --metadata-exclude-from stringArray   Read metadata exclude patterns from file (use - to read from stdin)
      --metadata-filter stringArray         Add a metadata filtering rule
      --metadata-filter-from stringArray    Read metadata filtering patterns from a file (use - to read from stdin)
      --metadata-include stringArray        Include metadatas matching pattern
      --metadata-include-from stringArray   Read metadata include patterns from file (use - to read from stdin)
      --min-age Duration                    Only transfer files older than this in s or suffix ms|s|m|h|d|w|M|y (default off)
      --min-size SizeSuffix                 Only transfer files bigger than this in KiB or suffix B|K|M|G|T|P (default off)</code></pre>
<h3 id="listing-options-20">Listing Options</h3>
<p>Flags for listing directories</p>
<pre class="text"><code>      --default-time Time   Time to show if modtime is unknown for files and directories (default 2000-01-01T00:00:00Z)
      --fast-list           Use recursive list if available; uses more memory but fewer transactions</code></pre>
<h2 id="see-also-70">See Also</h2>
<!-- markdownlint-capture -->
<!-- markdownlint-disable ul-style line-length -->
<ul>
<li><a href="https://rclone.org/commands/rclone/">rclone</a> - Show help
for rclone commands, flags and backends.</li>
</ul>
<!-- markdownlint-restore -->
<h1 id="rclone-ncdu">rclone ncdu</h1>
<p>Explore a remote with a text based user interface.</p>
<h2 id="synopsis-64">Synopsis</h2>
<p>This displays a text based user interface allowing the navigation of
a remote. It is most useful for answering the question - "What is using
all my disk space?".</p>
<p>To make the user interface it first scans the entire remote given and
builds an in memory representation. rclone ncdu can be used during this
scanning phase and you will see it building up the directory structure
as it goes along.</p>
<p>You can interact with the user interface using key presses, press '?'
to toggle the help on and off. The supported keys are:</p>
<pre class="text"><code> ↑,↓ or k,j to Move
 →,l to enter
 ←,h to return
 g toggle graph
 c toggle counts
 a toggle average size in directory
 m toggle modified time
 u toggle human-readable format
 n,s,C,A,M sort by name,size,count,asize,mtime
 d delete file/directory
 v select file/directory
 V enter visual select mode
 D delete selected files/directories
 y copy current path to clipboard
 Y display current path
 ^L refresh screen (fix screen corruption)
 r recalculate file sizes
 ? to toggle help on and off
 ESC to close the menu box
 q/^c to quit</code></pre>
<p>Listed files/directories may be prefixed by a one-character flag,
some of them combined with a description in brackets at end of line.
These flags have the following meaning:</p>
<pre class="text"><code>e means this is an empty directory, i.e. contains no files (but
  may contain empty subdirectories)
~ means this is a directory where some of the files (possibly in
  subdirectories) have unknown size, and therefore the directory
  size may be underestimated (and average size inaccurate, as it
  is average of the files with known sizes).
. means an error occurred while reading a subdirectory, and
  therefore the directory size may be underestimated (and average
  size inaccurate)
! means an error occurred while reading this directory</code></pre>
<p>This an homage to the <a href="https://dev.yorhel.nl/ncdu">ncdu
tool</a> but for rclone remotes. It is missing lots of features at the
moment but is useful as it stands. Unlike ncdu it does not show excluded
files.</p>
<p>Note that it might take some time to delete big files/directories.
The UI won't respond in the meantime since the deletion is done
synchronously.</p>
<p>For a non-interactive listing of the remote, see the <a
href="https://rclone.org/commands/rclone_tree/">tree</a> command. To
just get the total size of the remote you can also use the <a
href="https://rclone.org/commands/rclone_size/">size</a> command.</p>
<pre><code>rclone ncdu remote:path [flags]</code></pre>
<h2 id="options-71">Options</h2>
<pre><code>  -h, --help   help for ncdu</code></pre>
<p>Options shared with other commands are described next. See the <a
href="https://rclone.org/flags/">global flags page</a> for global
options not listed here.</p>
<h3 id="filter-options-23">Filter Options</h3>
<p>Flags for filtering directory listings</p>
<pre class="text"><code>      --delete-excluded                     Delete files on dest excluded from sync
      --exclude stringArray                 Exclude files matching pattern
      --exclude-from stringArray            Read file exclude patterns from file (use - to read from stdin)
      --exclude-if-present stringArray      Exclude directories if filename is present
      --files-from stringArray              Read list of source-file names from file (use - to read from stdin)
      --files-from-raw stringArray          Read list of source-file names from file without any processing of lines (use - to read from stdin)
      --files-from0 stringArray             Read list of source-file names from file using NUL as separator (use - to read from stdin)
  -f, --filter stringArray                  Add a file filtering rule
      --filter-from stringArray             Read file filtering patterns from a file (use - to read from stdin)
      --hash-filter string                  Partition filenames by hash k/n or randomly @/n
      --ignore-case                         Ignore case in filters (case insensitive)
      --include stringArray                 Include files matching pattern
      --include-from stringArray            Read file include patterns from file (use - to read from stdin)
      --max-age Duration                    Only transfer files younger than this in s or suffix ms|s|m|h|d|w|M|y (default off)
      --max-depth int                       If set limits the recursion depth to this (default -1)
      --max-size SizeSuffix                 Only transfer files smaller than this in KiB or suffix B|K|M|G|T|P (default off)
      --metadata-exclude stringArray        Exclude metadatas matching pattern
      --metadata-exclude-from stringArray   Read metadata exclude patterns from file (use - to read from stdin)
      --metadata-filter stringArray         Add a metadata filtering rule
      --metadata-filter-from stringArray    Read metadata filtering patterns from a file (use - to read from stdin)
      --metadata-include stringArray        Include metadatas matching pattern
      --metadata-include-from stringArray   Read metadata include patterns from file (use - to read from stdin)
      --min-age Duration                    Only transfer files older than this in s or suffix ms|s|m|h|d|w|M|y (default off)
      --min-size SizeSuffix                 Only transfer files bigger than this in KiB or suffix B|K|M|G|T|P (default off)</code></pre>
<h3 id="listing-options-21">Listing Options</h3>
<p>Flags for listing directories</p>
<pre class="text"><code>      --default-time Time   Time to show if modtime is unknown for files and directories (default 2000-01-01T00:00:00Z)
      --fast-list           Use recursive list if available; uses more memory but fewer transactions</code></pre>
<h2 id="see-also-71">See Also</h2>
<!-- markdownlint-capture -->
<!-- markdownlint-disable ul-style line-length -->
<ul>
<li><a href="https://rclone.org/commands/rclone/">rclone</a> - Show help
for rclone commands, flags and backends.</li>
</ul>
<!-- markdownlint-restore -->
<h1 id="rclone-nfsmount">rclone nfsmount</h1>
<p>Mount the remote as file system on a mountpoint.</p>
<h2 id="synopsis-65">Synopsis</h2>
<p>Rclone nfsmount allows Linux, FreeBSD, macOS and Windows to mount any
of Rclone's cloud storage systems as a file system with FUSE.</p>
<p>First set up your remote using <code>rclone config</code>. Check it
works with <code>rclone ls</code> etc.</p>
<p>On Linux and macOS, you can run mount in either foreground or
background (aka daemon) mode. Mount runs in foreground mode by default.
Use the <code>--daemon</code> flag to force background mode. On Windows
you can run mount in foreground only, the flag is ignored.</p>
<p>In background mode rclone acts as a generic Unix mount program: the
main program starts, spawns background rclone process to setup and
maintain the mount, waits until success or timeout and exits with
appropriate code (killing the child process if it fails).</p>
<p>On Linux/macOS/FreeBSD start the mount like this, where
<code>/path/to/local/mount</code> is an <strong>empty</strong>
<strong>existing</strong> directory:</p>
<pre class="console"><code>rclone nfsmount remote:path/to/files /path/to/local/mount</code></pre>
<p>On Windows you can start a mount in different ways. See <a
href="#mounting-modes-on-windows">below</a> for details. If foreground
mount is used interactively from a console window, rclone will serve the
mount and occupy the console so another window should be used to work
with the mount until rclone is interrupted e.g. by pressing Ctrl-C.</p>
<p>The following examples will mount to an automatically assigned drive,
to specific drive letter <code>X:</code>, to path
<code>C:\path\parent\mount</code> (where parent directory or drive must
exist, and mount must <strong>not</strong> exist, and is not supported
when <a href="#mounting-modes-on-windows">mounting as a network
drive</a>), and the last example will mount as network share
<code>\\cloud\remote</code> and map it to an automatically assigned
drive:</p>
<pre class="console"><code>rclone nfsmount remote:path/to/files *
rclone nfsmount remote:path/to/files X:
rclone nfsmount remote:path/to/files C:\path\parent\mount
rclone nfsmount remote:path/to/files \\cloud\remote</code></pre>
<p>When the program ends while in foreground mode, either via Ctrl+C or
receiving a SIGINT or SIGTERM signal, the mount should be automatically
stopped.</p>
<p>When running in background mode the user will have to stop the mount
manually:</p>
<pre class="console"><code># Linux
fusermount -u /path/to/local/mount
#... or on some systems
fusermount3 -u /path/to/local/mount
# OS X or Linux when using nfsmount
umount /path/to/local/mount</code></pre>
<p>The umount operation can fail, for example when the mountpoint is
busy. When that happens, it is the user's responsibility to stop the
mount manually.</p>
<p>The size of the mounted file system will be set according to
information retrieved from the remote, the same as returned by the <a
href="https://rclone.org/commands/rclone_about/">rclone about</a>
command. Remotes with unlimited storage may report the used size only,
then an additional 1 PiB of free space is assumed. If the remote does
not <a href="https://rclone.org/overview/#optional-features">support</a>
the about feature at all, then 1 PiB is set as both the total and the
free size.</p>
<h2 id="installing-on-windows-1">Installing on Windows</h2>
<p>To run <code>rclone nfsmount on Windows</code>, you will need to
download and install <a href="https://winfsp.dev">WinFsp</a>.</p>
<p><a href="https://github.com/winfsp/winfsp">WinFsp</a> is an
open-source Windows File System Proxy which makes it easy to write user
space file systems for Windows. It provides a FUSE emulation layer which
rclone uses combination with <a
href="https://github.com/winfsp/cgofuse">cgofuse</a>. Both of these
packages are by Bill Zissimopoulos who was very helpful during the
implementation of rclone nfsmount for Windows.</p>
<h3 id="mounting-modes-on-windows-1">Mounting modes on windows</h3>
<p>Unlike other operating systems, Microsoft Windows provides a
different filesystem type for network and fixed drives. It optimises
access on the assumption fixed disk drives are fast and reliable, while
network drives have relatively high latency and less reliability. Some
settings can also be differentiated between the two types, for example
that Windows Explorer should just display icons and not create preview
thumbnails for image and video files on network drives.</p>
<p>In most cases, rclone will mount the remote as a normal, fixed disk
drive by default. However, you can also choose to mount it as a remote
network drive, often described as a network share. If you mount an
rclone remote using the default, fixed drive mode and experience
unexpected program errors, freezes or other issues, consider mounting as
a network drive instead.</p>
<p>When mounting as a fixed disk drive you can either mount to an unused
drive letter, or to a path representing a <strong>nonexistent</strong>
subdirectory of an <strong>existing</strong> parent directory or drive.
Using the special value <code>*</code> will tell rclone to automatically
assign the next available drive letter, starting with Z: and moving
backward. Examples:</p>
<pre class="console"><code>rclone nfsmount remote:path/to/files *
rclone nfsmount remote:path/to/files X:
rclone nfsmount remote:path/to/files C:\path\parent\mount
rclone nfsmount remote:path/to/files X:</code></pre>
<p>Option <code>--volname</code> can be used to set a custom volume name
for the mounted file system. The default is to use the remote name and
path.</p>
<p>To mount as network drive, you can add option
<code>--network-mode</code> to your nfsmount command. Mounting to a
directory path is not supported in this mode, it is a limitation Windows
imposes on junctions, so the remote must always be mounted to a drive
letter.</p>
<pre class="console"><code>rclone nfsmount remote:path/to/files X: --network-mode</code></pre>
<p>A volume name specified with <code>--volname</code> will be used to
create the network share path. A complete UNC path, such as
<code>\\cloud\remote</code>, optionally with path
<code>\\cloud\remote\madeup\path</code>, will be used as is. Any other
string will be used as the share part, after a default prefix
<code>\\server\</code>. If no volume name is specified then
<code>\\server\share</code> will be used. You must make sure the volume
name is unique when you are mounting more than one drive, or else the
mount command will fail. The share name will treated as the volume label
for the mapped drive, shown in Windows Explorer etc, while the complete
<code>\\server\share</code> will be reported as the remote UNC path by
<code>net use</code> etc, just like a normal network drive mapping.</p>
<p>If you specify a full network share UNC path with
<code>--volname</code>, this will implicitly set the
<code>--network-mode</code> option, so the following two examples have
same result:</p>
<pre class="console"><code>rclone nfsmount remote:path/to/files X: --network-mode
rclone nfsmount remote:path/to/files X: --volname \\server\share</code></pre>
<p>You may also specify the network share UNC path as the mountpoint
itself. Then rclone will automatically assign a drive letter, same as
with <code>*</code> and use that as mountpoint, and instead use the UNC
path specified as the volume name, as if it were specified with the
<code>--volname</code> option. This will also implicitly set the
<code>--network-mode</code> option. This means the following two
examples have same result:</p>
<pre class="console"><code>rclone nfsmount remote:path/to/files \\cloud\remote
rclone nfsmount remote:path/to/files * --volname \\cloud\remote</code></pre>
<p>There is yet another way to enable network mode, and to set the share
path, and that is to pass the "native" libfuse/WinFsp option directly:
<code>--fuse-flag --VolumePrefix=\server\share</code>. Note that the
path must be with just a single backslash prefix in this case.</p>
<p><em>Note:</em> In previous versions of rclone this was the only
supported method.</p>
<p><a href="https://en.wikipedia.org/wiki/Drive_mapping">Read more about
drive mapping</a></p>
<p>See also <a href="#limitations">Limitations</a> section below.</p>
<h3 id="windows-filesystem-permissions-1">Windows filesystem
permissions</h3>
<p>The FUSE emulation layer on Windows must convert between the
POSIX-based permission model used in FUSE, and the permission model used
in Windows, based on access-control lists (ACL).</p>
<p>The mounted filesystem will normally get three entries in its
access-control list (ACL), representing permissions for the POSIX
permission scopes: Owner, group and others. By default, the owner and
group will be taken from the current user, and the built-in group
"Everyone" will be used to represent others. The user/group can be
customized with FUSE options "UserName" and "GroupName", e.g.
<code>-o UserName=user123 -o GroupName="Authenticated Users"</code>. The
permissions on each entry will be set according to <a
href="#options">options</a> <code>--dir-perms</code> and
<code>--file-perms</code>, which takes a value in traditional Unix <a
href="https://en.wikipedia.org/wiki/File-system_permissions#Numeric_notation">numeric
notation</a>.</p>
<p>The default permissions corresponds to
<code>--file-perms 0666 --dir-perms 0777</code>, i.e. read and write
permissions to everyone. This means you will not be able to start any
programs from the mount. To be able to do that you must add execute
permissions, e.g. <code>--file-perms 0777 --dir-perms 0777</code> to add
it to everyone. If the program needs to write files, chances are you
will have to enable <a href="#vfs-file-caching">VFS File Caching</a> as
well (see also <a href="#limitations">limitations</a>). Note that the
default write permission have some restrictions for accounts other than
the owner, specifically it lacks the "write extended attributes", as
explained next.</p>
<p>The mapping of permissions is not always trivial, and the result you
see in Windows Explorer may not be exactly like you expected. For
example, when setting a value that includes write access for the group
or others scope, this will be mapped to individual permissions "write
attributes", "write data" and "append data", but not "write extended
attributes". Windows will then show this as basic permission "Special"
instead of "Write", because "Write" also covers the "write extended
attributes" permission. When setting digit 0 for group or others, to
indicate no permissions, they will still get individual permissions
"read attributes", "read extended attributes" and "read permissions".
This is done for compatibility reasons, e.g. to allow users without
additional permissions to be able to read basic metadata about files
like in Unix.</p>
<p>WinFsp 2021 (version 1.9) introduced a new FUSE option
"FileSecurity", that allows the complete specification of file security
descriptors using <a
href="https://docs.microsoft.com/en-us/windows/win32/secauthz/security-descriptor-string-format">SDDL</a>.
With this you get detailed control of the resulting permissions,
compared to use of the POSIX permissions described above, and no
additional permissions will be added automatically for compatibility
with Unix. Some example use cases will following.</p>
<p>If you set POSIX permissions for only allowing access to the owner,
using <code>--file-perms 0600 --dir-perms 0700</code>, the user group
and the built-in "Everyone" group will still be given some special
permissions, as described above. Some programs may then (incorrectly)
interpret this as the file being accessible by everyone, for example an
SSH client may warn about "unprotected private key file". You can work
around this by specifying
<code>-o FileSecurity="D:P(A;;FA;;;OW)"</code>, which sets file all
access (FA) to the owner (OW), and nothing else.</p>
<p>When setting write permissions then, except for the owner, this does
not include the "write extended attributes" permission, as mentioned
above. This may prevent applications from writing to files, giving
permission denied error instead. To set working write permissions for
the built-in "Everyone" group, similar to what it gets by default but
with the addition of the "write extended attributes", you can specify
<code>-o FileSecurity="D:P(A;;FRFW;;;WD)"</code>, which sets file read
(FR) and file write (FW) to everyone (WD). If file execute (FX) is also
needed, then change to
<code>-o FileSecurity="D:P(A;;FRFWFX;;;WD)"</code>, or set file all
access (FA) to get full access permissions, including delete, with
<code>-o FileSecurity="D:P(A;;FA;;;WD)"</code>.</p>
<h3 id="windows-caveats-1">Windows caveats</h3>
<p>Drives created as Administrator are not visible to other accounts,
not even an account that was elevated to Administrator with the User
Account Control (UAC) feature. A result of this is that if you mount to
a drive letter from a Command Prompt run as Administrator, and then try
to access the same drive from Windows Explorer (which does not run as
Administrator), you will not be able to see the mounted drive.</p>
<p>If you don't need to access the drive from applications running with
administrative privileges, the easiest way around this is to always
create the mount from a non-elevated command prompt.</p>
<p>To make mapped drives available to the user account that created them
regardless if elevated or not, there is a special Windows setting called
<a
href="https://docs.microsoft.com/en-us/troubleshoot/windows-client/networking/mapped-drives-not-available-from-elevated-command#detail-to-configure-the-enablelinkedconnections-registry-entry">linked
connections</a> that can be enabled.</p>
<p>It is also possible to make a drive mount available to everyone on
the system, by running the process creating it as the built-in SYSTEM
account. There are several ways to do this: One is to use the
command-line utility <a
href="https://docs.microsoft.com/en-us/sysinternals/downloads/psexec">PsExec</a>,
from Microsoft's Sysinternals suite, which has option <code>-s</code> to
start processes as the SYSTEM account. Another alternative is to run the
mount command from a Windows Scheduled Task, or a Windows Service,
configured to run as the SYSTEM account. A third alternative is to use
the <a
href="https://github.com/winfsp/winfsp/wiki/WinFsp-Service-Architecture">WinFsp.Launcher
infrastructure</a>). Read more in the <a
href="https://rclone.org/install/">install documentation</a>. Note that
when running rclone as another user, it will not use the configuration
file from your profile unless you tell it to with the <a
href="https://rclone.org/docs/#config-string"><code>--config</code></a>
option. Note also that it is now the SYSTEM account that will have the
owner permissions, and other accounts will have permissions according to
the group or others scopes. As mentioned above, these will then not get
the "write extended attributes" permission, and this may prevent writing
to files. You can work around this with the FileSecurity option, see
example above.</p>
<p>Note that mapping to a directory path, instead of a drive letter,
does not suffer from the same limitations.</p>
<h2 id="mounting-on-macos-1">Mounting on macOS</h2>
<p>Mounting on macOS can be done either via <a
href="https://rclone.org/commands/rclone_serve_nfs/">built-in NFS
server</a>, <a href="https://osxfuse.github.io/">macFUSE</a> (also known
as osxfuse) or <a href="https://www.fuse-t.org/">FUSE-T</a>. macFUSE is
a traditional FUSE driver utilizing a macOS kernel extension (kext).
FUSE-T is an alternative FUSE system which "mounts" via an NFSv4 local
server.</p>
<h3 id="unicode-normalization-1">Unicode Normalization</h3>
<p>It is highly recommended to keep the default of
<code>--no-unicode-normalization=false</code> for all <code>mount</code>
and <code>serve</code> commands on macOS. For details, see <a
href="https://rclone.org/commands/rclone_mount/#vfs-case-sensitivity">vfs-case-sensitivity</a>.</p>
<h3 id="nfs-mount-1">NFS mount</h3>
<p>For macOS (and other platforms where this path is supported), prefer
the dedicated <a
href="https://rclone.org/commands/rclone_nfsmount/">rclone nfsmount</a>
command. It starts the NFS server and performs the mount for you.
<code>rclone mount</code> itself still uses FUSE (macFUSE/FUSE-T) and
does not switch to NFS via a flag.</p>
<p>This method spins up an NFS server using <a
href="https://rclone.org/commands/rclone_serve_nfs/">serve nfs</a>
command and mounts it to the specified mountpoint. If you run this in
background mode using |--daemon|, you will need to send SIGTERM signal
to the rclone process using |kill| command to stop the mount.</p>
<p>Note that <code>--nfs-cache-handle-limit</code> controls the maximum
number of cached file handles stored by the <code>nfsmount</code>
caching handler. This should not be set too low or you may experience
errors when trying to access files. The default is 1000000, but consider
lowering this limit if the server's system resource usage causes
problems.</p>
<h3 id="macfuse-notes-1">macFUSE Notes</h3>
<p>If installing macFUSE using <a
href="https://github.com/osxfuse/osxfuse/releases">dmg packages</a> from
the website, rclone will locate the macFUSE libraries without any
further intervention. If however, macFUSE is installed using the <a
href="https://www.macports.org/">macports</a> package manager, the
following addition steps are required.</p>
<pre class="console"><code>sudo mkdir /usr/local/lib
cd /usr/local/lib
sudo ln -s /opt/local/lib/libfuse.2.dylib</code></pre>
<h3 id="fuse-t-limitations-caveats-and-notes-1">FUSE-T Limitations,
Caveats, and Notes</h3>
<p>There are some limitations, caveats, and notes about how it works.
These are current as of FUSE-T version 1.0.14.</p>
<h4 id="modtime-update-on-read-1">ModTime update on read</h4>
<p>As per the <a
href="https://github.com/macos-fuse-t/fuse-t/wiki#caveats">FUSE-T
wiki</a>:</p>
<blockquote>
<p>File access and modification times cannot be set separately as it
seems to be an issue with the NFS client which always modifies both. Can
be reproduced with <code>touch -m</code> and <code>touch -a</code>
commands</p>
</blockquote>
<p>This means that viewing files with various tools, notably macOS
Finder, will cause rlcone to update the modification time of the file.
This may make rclone upload a full new copy of the file.</p>
<h4 id="read-only-mounts-1">Read Only mounts</h4>
<p>When mounting with <code>--read-only</code>, attempts to write to
files will fail <em>silently</em> as opposed to with a clear warning as
in macFUSE.</p>
<h2 id="mounting-on-linux-1">Mounting on Linux</h2>
<p>On newer versions of Ubuntu, you may encounter the following error
when running <code>rclone mount</code>:</p>
<blockquote>
<p>NOTICE: mount helper error: fusermount3: mount failed: Permission
denied CRITICAL: Fatal error: failed to mount FUSE fs: fusermount: exit
status 1</p>
</blockquote>
<p>This may be due to newer <a
href="https://wiki.ubuntu.com/AppArmor">Apparmor</a> restrictions, which
can be disabled with <code>sudo aa-disable /usr/bin/fusermount3</code>
(you may need to <code>sudo apt install apparmor-utils</code>
beforehand).</p>
<h2 id="mounting-on-openbsd-1">Mounting on OpenBSD</h2>
<p><code>rclone nfsmount</code> works on OpenBSD by spinning up the <a
href="https://rclone.org/commands/rclone_serve_nfs/">serve nfs</a>
server and mounting it with the system <code>mount_nfs(8)</code>, the
same approach used for the NFS mount method on macOS. There is no
FUSE-based mount option on OpenBSD, so <code>nfsmount</code> is the only
way to mount rclone remotes as a local file system there.</p>
<h3 id="portmap-registration-1">portmap registration</h3>
<p>OpenBSD's kernel NFS client locates <code>mountd</code> through the
system portmapper rather than connecting to a fixed port, so rclone's
in-process NFS server needs to be registered with portmap before it can
be mounted. Start the <code>serve nfs</code> server on a fixed port,
stop the system NFS services so they don't conflict with it, then
register that port with portmap for both the <code>nfs</code> and
<code>mountd</code> RPC programs (this is the recipe from <a
href="https://github.com/rclone/rclone/issues/8578#issuecomment-2799229652">hjicks
in #8578</a>):</p>
<pre class="console"><code>rclone serve nfs --addr localhost:&lt;PORT&gt; remote:path

doas rcctl stop nfsd portmap
doas pkill -9 mountd   # mountd can&#39;t be stopped via rcctl(8)
doas rcctl -f start portmap
doas rpcinfo -s nfs 3 &lt;PORT&gt;
doas rpcinfo -s mountd 3 &lt;PORT&gt;</code></pre>
<p>Replace <code>&lt;PORT&gt;</code> with the port passed to
<code>--addr</code>. Port 2049 works too, but needs either running
rclone as root or adjusting <code>sysctl(8)</code> at securelevel 0, so
a non-privileged port is simpler for testing.</p>
<h3 id="use-mount_nfs--t-not-mount-1">Use <code>mount_nfs -T</code>, not
<code>mount</code></h3>
<p>Mount the exported NFS share directly with <code>mount_nfs(8)</code>
using the <code>-T</code> flag to force TCP, rather than the generic
<code>mount(8)</code> wrapper - OpenBSD's <code>mount(8)</code> does not
understand <code>-T</code> and rejects it with
<code>unknown option -- T</code>:</p>
<pre class="console"><code>mount_nfs -T localhost:/ /path/to/local/mount</code></pre>
<p><code>rclone nfsmount</code> does this for you automatically on
OpenBSD (it calls <code>mount_nfs</code> directly with <code>-T</code>
instead of going through <code>mount</code>), so this is only needed if
you are mounting the <code>serve nfs</code> export by hand.</p>
<h3 id="auth_unix-and-existing-limitations-1">AUTH_UNIX and existing
limitations</h3>
<p>OpenBSD's (and the other BSDs') kernel NFS client requires the server
to offer the <code>AUTH_UNIX</code> authentication flavor during the
MOUNT RPC handshake; a server that only offers <code>AUTH_NULL</code> is
rejected with
<code>mount_nfs: can't access /: Authentication error</code>. rclone's
NFS server advertises <code>AUTH_UNIX</code> for this reason, though it
does not implement any per-user access control on top of it - see <a
href="https://github.com/rclone/rclone/issues/8578">issue #8578</a> for
the background on this and for the current state of OpenBSD support.</p>
<h2 id="limitations-1">Limitations</h2>
<p>Without the use of <code>--vfs-cache-mode</code> this can only write
files sequentially, it can only seek when reading. This means that many
applications won't work with their files on an rclone mount without
<code>--vfs-cache-mode writes</code> or
<code>--vfs-cache-mode full</code>. See the <a
href="#vfs-file-caching">VFS File Caching</a> section for more info.
When using NFS mount on macOS, if you don't specify |--vfs-cache-mode|
the mount point will be read-only.</p>
<p>Bucket-based remotes - Azure Blob, Swift, S3, Google Cloud Storage
and B2 - can't store empty directories. Of these, only Azure Blob,
Google Cloud Storage and S3 can preserve them when you add
<code>--xxx-directory_markers</code>; otherwise, empty directories will
vanish once they drop out of the directory cache.</p>
<p>When <code>rclone mount</code> is invoked on Unix with
<code>--daemon</code> flag, the main rclone program will wait for the
background mount to become ready or until the timeout specified by the
<code>--daemon-wait</code> flag. On Linux it can check mount status
using ProcFS so the flag in fact sets <strong>maximum</strong> time to
wait, while the real wait can be less. On macOS / BSD the time to wait
is constant and the check is performed only at the end. We advise you to
set wait time on macOS reasonably.</p>
<p>Only supported on Linux, FreeBSD, OS X and Windows at the moment.</p>
<h2 id="rclone-nfsmount-vs-rclone-synccopy">rclone nfsmount vs rclone
sync/copy</h2>
<p>File systems expect things to be 100% reliable, whereas cloud storage
systems are a long way from 100% reliable. The rclone sync/copy commands
cope with this with lots of retries. However rclone nfsmount can't use
retries in the same way without making local copies of the uploads. Look
at the <a href="#vfs-file-caching">VFS File Caching</a> for solutions to
make nfsmount more reliable.</p>
<h2 id="attribute-caching-1">Attribute caching</h2>
<p>You can use the flag <code>--attr-timeout</code> to set the time the
kernel caches the attributes (size, modification time, etc.) for
directory entries.</p>
<p>The default is <code>1s</code> which caches files just long enough to
avoid too many callbacks to rclone from the kernel.</p>
<p>In theory 0s should be the correct value for filesystems which can
change outside the control of the kernel. However this causes quite a
few problems such as <a
href="https://github.com/rclone/rclone/issues/2157">rclone using too
much memory</a>, <a
href="https://forum.rclone.org/t/rclone-1-39-vs-1-40-mount-issue/5112">rclone
not serving files to samba</a> and <a
href="https://github.com/rclone/rclone/issues/2095#issuecomment-371141147">excessive
time listing directories</a>.</p>
<p>The kernel can cache the info about a file for the time given by
<code>--attr-timeout</code>. You may see corruption if the remote file
changes length during this window. It will show up as either a truncated
file or a file with garbage on the end. With
<code>--attr-timeout 1s</code> this is very unlikely but not impossible.
The higher you set <code>--attr-timeout</code> the more likely it is.
The default setting of "1s" is the lowest setting which mitigates the
problems above.</p>
<p>If you set it higher (<code>10s</code> or <code>1m</code> say) then
the kernel will call back to rclone less often making it more efficient,
however there is more chance of the corruption issue above.</p>
<p>If files don't change on the remote outside of the control of rclone
then there is no chance of corruption.</p>
<p>This is the same as setting the attr_timeout option in
mount.fuse.</p>
<h2 id="filters-2">Filters</h2>
<p>Note that all the rclone filters can be used to select a subset of
the files to be visible in the mount.</p>
<h2 id="systemd-1">systemd</h2>
<p>When running rclone nfsmount as a systemd service, it is possible to
use Type=notify. In this case the service will enter the started state
after the mountpoint has been successfully set up. Units having the
rclone nfsmount service specified as a requirement will see all files
and folders immediately in this mode.</p>
<p>Note that systemd runs mount units without any environment variables
including <code>PATH</code> or <code>HOME</code>. This means that tilde
(<code>~</code>) expansion will not work and you should provide
<code>--config</code> and <code>--cache-dir</code> explicitly as
absolute paths via rclone arguments. Since mounting requires the
<code>fusermount</code> or <code>fusermount3</code> program, rclone will
use the fallback PATH of <code>/bin:/usr/bin</code> in this scenario.
Please ensure that <code>fusermount</code>/<code>fusermount3</code> is
present on this PATH.</p>
<h2 id="rclone-as-unix-mount-helper-1">Rclone as Unix mount helper</h2>
<p>The core Unix program <code>/bin/mount</code> normally takes the
<code>-t FSTYPE</code> argument then runs the
<code>/sbin/mount.FSTYPE</code> helper program passing it mount options
as <code>-o key=val,...</code> or <code>--opt=...</code>. Automount
(classic or systemd) behaves in a similar way.</p>
<p>rclone by default expects GNU-style flags <code>--key val</code>. To
run it as a mount helper you should symlink rclone binary to
<code>/sbin/mount.rclone</code> and optionally
<code>/usr/bin/rclonefs</code>, e.g.
<code>ln -s /usr/bin/rclone /sbin/mount.rclone</code>. rclone will
detect it and translate command-line arguments appropriately.</p>
<p>Now you can run classic mounts like this:</p>
<pre class="console"><code>mount sftp1:subdir /mnt/data -t rclone -o vfs_cache_mode=writes,sftp_key_file=/path/to/pem</code></pre>
<p>or create systemd mount units:</p>
<div class="sourceCode" id="cb427"><pre
class="sourceCode ini"><code class="sourceCode ini"><span id="cb427-1"><a href="#cb427-1" aria-hidden="true" tabindex="-1"></a><span class="co"># /etc/systemd/system/mnt-data.mount</span></span>
<span id="cb427-2"><a href="#cb427-2" aria-hidden="true" tabindex="-1"></a><span class="kw">[Unit]</span></span>
<span id="cb427-3"><a href="#cb427-3" aria-hidden="true" tabindex="-1"></a><span class="dt">Description</span><span class="ot">=</span><span class="st">Mount for /mnt/data</span></span>
<span id="cb427-4"><a href="#cb427-4" aria-hidden="true" tabindex="-1"></a><span class="kw">[Mount]</span></span>
<span id="cb427-5"><a href="#cb427-5" aria-hidden="true" tabindex="-1"></a><span class="dt">Type</span><span class="ot">=</span><span class="st">rclone</span></span>
<span id="cb427-6"><a href="#cb427-6" aria-hidden="true" tabindex="-1"></a><span class="dt">What</span><span class="ot">=</span><span class="st">sftp1:subdir</span></span>
<span id="cb427-7"><a href="#cb427-7" aria-hidden="true" tabindex="-1"></a><span class="dt">Where</span><span class="ot">=</span><span class="st">/mnt/data</span></span>
<span id="cb427-8"><a href="#cb427-8" aria-hidden="true" tabindex="-1"></a><span class="dt">Options</span><span class="ot">=</span><span class="st">rw,_netdev,allow_other,args2env,vfs-cache-mode=writes,config=/etc/rclone.conf,cache-dir=/var/rclone</span></span></code></pre></div>
<p>optionally accompanied by systemd automount unit</p>
<div class="sourceCode" id="cb428"><pre
class="sourceCode ini"><code class="sourceCode ini"><span id="cb428-1"><a href="#cb428-1" aria-hidden="true" tabindex="-1"></a><span class="co"># /etc/systemd/system/mnt-data.automount</span></span>
<span id="cb428-2"><a href="#cb428-2" aria-hidden="true" tabindex="-1"></a><span class="kw">[Unit]</span></span>
<span id="cb428-3"><a href="#cb428-3" aria-hidden="true" tabindex="-1"></a><span class="dt">Description</span><span class="ot">=</span><span class="st">AutoMount for /mnt/data</span></span>
<span id="cb428-4"><a href="#cb428-4" aria-hidden="true" tabindex="-1"></a><span class="kw">[Automount]</span></span>
<span id="cb428-5"><a href="#cb428-5" aria-hidden="true" tabindex="-1"></a><span class="dt">Where</span><span class="ot">=</span><span class="st">/mnt/data</span></span>
<span id="cb428-6"><a href="#cb428-6" aria-hidden="true" tabindex="-1"></a><span class="dt">TimeoutIdleSec</span><span class="ot">=</span><span class="dv">600</span></span>
<span id="cb428-7"><a href="#cb428-7" aria-hidden="true" tabindex="-1"></a><span class="kw">[Install]</span></span>
<span id="cb428-8"><a href="#cb428-8" aria-hidden="true" tabindex="-1"></a><span class="dt">WantedBy</span><span class="ot">=</span><span class="st">multi-user.target</span></span></code></pre></div>
<p>or add in <code>/etc/fstab</code> a line like</p>
<pre class="console"><code>sftp1:subdir /mnt/data rclone rw,noauto,nofail,_netdev,x-systemd.automount,args2env,vfs_cache_mode=writes,config=/etc/rclone.conf,cache_dir=/var/cache/rclone 0 0</code></pre>
<p>or use classic Automountd. Remember to provide explicit
<code>config=...,cache-dir=...</code> as a workaround for mount units
being run without <code>HOME</code>.</p>
<p>Rclone in the mount helper mode will split <code>-o</code>
argument(s) by comma, replace <code>_</code> by <code>-</code> and
prepend <code>--</code> to get the command-line flags. Options
containing commas or spaces can be wrapped in single or double quotes.
Any inner quotes inside outer quotes of the same type should be
doubled.</p>
<p>Mount option syntax includes a few extra options treated
specially:</p>
<ul>
<li><code>env.NAME=VALUE</code> will set an environment variable for the
mount process. This helps with Automountd and Systemd.mount which don't
allow setting custom environment for mount helpers. Typically you will
use <code>env.HTTPS_PROXY=proxy.host:3128</code> or
<code>env.HOME=/root</code></li>
<li><code>command=cmount</code> can be used to run <code>cmount</code>
or any other rclone command rather than the default
<code>mount</code>.</li>
<li><code>args2env</code> will pass mount options to the mount helper
running in background via environment variables instead of command line
arguments. This allows to hide secrets from such commands as
<code>ps</code> or <code>pgrep</code>.</li>
<li><code>vv...</code> will be transformed into appropriate
<code>--verbose=N</code></li>
<li>standard mount options like <code>x-systemd.automount</code>,
<code>_netdev</code>, <code>nosuid</code> and alike are intended only
for Automountd and ignored by rclone.</li>
</ul>
<h2 id="vfs---virtual-file-system-1">VFS - Virtual File System</h2>
<p>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.</p>
<p>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.</p>
<p>The VFS layer also implements a directory cache - this caches info
about files and directories (but not the data) in memory.</p>
<h2 id="vfs-directory-cache-1">VFS Directory Cache</h2>
<p>Using the <code>--dir-cache-time</code> 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.</p>
<pre class="text"><code>    --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)</code></pre>
<p>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.</p>
<p>You can send a <code>SIGHUP</code> 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:</p>
<pre class="console"><code>kill -SIGHUP $(pidof rclone)</code></pre>
<p>If you configure rclone with a <a href="/rc">remote control</a> then
you can use rclone rc to flush the whole directory cache:</p>
<pre class="console"><code>rclone rc vfs/forget</code></pre>
<p>Or individual files or directories:</p>
<pre class="console"><code>rclone rc vfs/forget file=path/to/file dir=path/to/dir</code></pre>
<h2 id="vfs-file-buffering-1">VFS File Buffering</h2>
<p>The <code>--buffer-size</code> flag determines the amount of memory,
that will be used to buffer data in advance.</p>
<p>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.</p>
<p>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 yet
read. If the buffer is empty, only a small amount of memory will be
used.</p>
<p>The maximum memory used by rclone for buffering can be up to
<code>--buffer-size * open files</code>.</p>
<h2 id="vfs-file-caching-1">VFS File Caching</h2>
<p>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 cost of some compatibility.</p>
<p>For example you'll need to enable VFS caching if you want to read and
write simultaneously to a file. See below for more details.</p>
<p>Note that the VFS cache is separate from the cache backend and you
may find that you need one or the other or both.</p>
<pre class="text"><code>    --cache-dir string                     Directory rclone will use for caching.
    --vfs-cache-mode CacheMode             Cache mode off|minimal|writes|full (default off)
    --vfs-cache-max-age duration           Max time since last access of objects in the cache (default 1h0m0s)
    --vfs-cache-max-size SizeSuffix        Max total size of objects in the cache (default off)
    --vfs-cache-min-free-space SizeSuffix  Target minimum free space on the disk containing the cache (default off)
    --vfs-cache-poll-interval duration     Interval to poll the cache for stale objects (default 1m0s)
    --vfs-write-back duration              Time to writeback files after last use when using cache (default 5s)</code></pre>
<p>If run with <code>-vv</code> rclone will print the location of the
file cache. The files are stored in the user cache file area which is OS
dependent but can be controlled with <code>--cache-dir</code> or setting
the appropriate environment variable.</p>
<p>The cache has 4 different modes selected by
<code>--vfs-cache-mode</code>. The higher the cache mode the more
compatible rclone becomes at the cost of using disk space.</p>
<p>Note that files are written back to the remote only when they are
closed and if they haven't been accessed for
<code>--vfs-write-back</code> seconds. If rclone is quit or dies with
files that haven't been uploaded, these will be uploaded next time
rclone is run with the same flags.</p>
<p>If using <code>--vfs-cache-max-size</code> or
<code>--vfs-cache-min-free-space</code> note that the cache may exceed
these quotas for two reasons. Firstly because it is only checked every
<code>--vfs-cache-poll-interval</code>. Secondly because open files
cannot be evicted from the cache. When <code>--vfs-cache-max-size</code>
or <code>--vfs-cache-min-free-space</code> is exceeded, rclone will
attempt to evict the least accessed files from the cache first. rclone
will start with files that haven't been accessed for the longest. This
cache flushing strategy is efficient and more relevant files are likely
to remain cached.</p>
<p>The <code>--vfs-cache-max-age</code> will evict files from the cache
after the set time since last access has passed; it is based on access
time, not on when the file was first added to the cache. The default
value of 1 hour will start evicting files from cache that haven't been
accessed for 1 hour. When a cached file is accessed the 1 hour timer is
reset to 0 and will wait for 1 more hour before evicting. Specify the
time with standard notation, s, m, h, d, w .</p>
<p>You <strong>should not</strong> run two copies of rclone using the
same VFS cache with the same or overlapping remotes if using
<code>--vfs-cache-mode &gt; off</code>. This can potentially cause data
corruption if you do. You can work around this by giving each rclone its
own cache hierarchy with <code>--cache-dir</code>. You don't need to
worry about this if the remotes in use don't overlap.</p>
<h3 id="vfs-cache-mode-off-1">--vfs-cache-mode off</h3>
<p>In this mode (the default) the cache will read directly from the
remote and write directly to the remote without caching anything on
disk.</p>
<p>This will mean some operations are not possible</p>
<ul>
<li>Files can't be opened for both read AND write</li>
<li>Files opened for write can't be seeked</li>
<li>Existing files opened for write must have O_TRUNC set</li>
<li>Files open for read with O_TRUNC will be opened write only</li>
<li>Files open for write only will behave as if O_TRUNC was
supplied</li>
<li>Open modes O_APPEND, O_TRUNC are ignored</li>
<li>If an upload fails it can't be retried</li>
</ul>
<h3 id="vfs-cache-mode-minimal-1">--vfs-cache-mode minimal</h3>
<p>This is very similar to "off" except that files opened for read AND
write will be buffered to disk. This means that files opened for write
will be a lot more compatible, but uses the minimal disk space.</p>
<p>These operations are not possible</p>
<ul>
<li>Files opened for write only can't be seeked</li>
<li>Existing files opened for write must have O_TRUNC set</li>
<li>Files opened for write only will ignore O_APPEND, O_TRUNC</li>
<li>If an upload fails it can't be retried</li>
</ul>
<h3 id="vfs-cache-mode-writes-1">--vfs-cache-mode writes</h3>
<p>In this mode files opened for read only are still read directly from
the remote, write only and read/write files are buffered to disk
first.</p>
<p>This mode should support all normal file system operations.</p>
<p>If an upload fails it will be retried at exponentially increasing
intervals up to 1 minute.</p>
<h3 id="vfs-cache-mode-full-1">--vfs-cache-mode full</h3>
<p>In this mode all reads and writes are buffered to and from disk. When
data is read from the remote this is buffered to disk as well.</p>
<p>In this mode the files in the cache will be sparse files and rclone
will keep track of which bits of the files it has downloaded.</p>
<p>So if an application only reads the starts of each file, then rclone
will only buffer the start of the file. These files will appear to be
their full size in the cache, but they will be sparse files with only
the data that has been downloaded present in them.</p>
<p>This mode should support all normal file system operations and is
otherwise identical to <code>--vfs-cache-mode</code> writes.</p>
<p>When reading a file rclone will read <code>--buffer-size</code> plus
<code>--vfs-read-ahead</code> bytes ahead. The
<code>--buffer-size</code> is buffered in memory whereas the
<code>--vfs-read-ahead</code> is buffered on disk.</p>
<p>When using this mode it is recommended that
<code>--buffer-size</code> is not set too large and
<code>--vfs-read-ahead</code> is set large if required.</p>
<p><strong>IMPORTANT</strong> not all file systems support sparse files.
In particular FAT/exFAT do not. Rclone will perform very badly if the
cache directory is on a filesystem which doesn't support sparse files
and it will log an ERROR message if one is detected.</p>
<h3 id="fingerprinting-1">Fingerprinting</h3>
<p>Various parts of the VFS use fingerprinting to see if a local file
copy has changed relative to a remote file. Fingerprints are made
from:</p>
<ul>
<li>size</li>
<li>modification time</li>
<li>hash</li>
</ul>
<p>where available on an object.</p>
<p>On some backends some of these attributes are slow to read (they take
an extra API call per object, or extra work per object).</p>
<p>For example <code>hash</code> is slow with the <code>local</code> and
<code>sftp</code> backends as they have to read the entire file and hash
it, and <code>modtime</code> is slow with the <code>s3</code>,
<code>swift</code>, <code>ftp</code> and <code>qinqstor</code> backends
because they need to do an extra API call to fetch it.</p>
<p>If you use the <code>--vfs-fast-fingerprint</code> flag then rclone
will not include the slow operations in the fingerprint. This makes the
fingerprinting less accurate but much faster and will improve the
opening time of cached files.</p>
<p>If you are running a vfs cache over <code>local</code>,
<code>s3</code> or <code>swift</code> backends then using this flag is
recommended.</p>
<p>Note that if you change the value of this flag, the fingerprints of
the files in the cache may be invalidated and the files will need to be
downloaded again.</p>
<h2 id="vfs-chunked-reading-1">VFS Chunked Reading</h2>
<p>When rclone reads files from a remote it reads them in chunks. This
means that rather than requesting the whole file rclone reads the chunk
specified. This can reduce the used download quota for some remotes by
requesting only chunks from the remote that are actually read, at the
cost of an increased number of requests.</p>
<p>These flags control the chunking:</p>
<pre class="text"><code>    --vfs-read-chunk-size SizeSuffix        Read the source objects in chunks (default 128M)
    --vfs-read-chunk-size-limit SizeSuffix  Max chunk doubling size (default off)
    --vfs-read-chunk-streams int            The number of parallel streams to read at once</code></pre>
<p>The chunking behaves differently depending on the
<code>--vfs-read-chunk-streams</code> parameter.</p>
<h3
id="vfs-read-chunk-streams-0-2"><code>--vfs-read-chunk-streams</code> ==
0</h3>
<p>Rclone will start reading a chunk of size
<code>--vfs-read-chunk-size</code>, and then double the size for each
read. When <code>--vfs-read-chunk-size-limit</code> is specified, and
greater than <code>--vfs-read-chunk-size</code>, the chunk size for each
open file will get doubled only until the specified value is reached. If
the value is "off", which is the default, the limit is disabled and the
chunk size will grow indefinitely.</p>
<p>With <code>--vfs-read-chunk-size 100M</code> and
<code>--vfs-read-chunk-size-limit 0</code> the following parts will be
downloaded: 0-100M, 100M-200M, 200M-300M, 300M-400M and so on. When
<code>--vfs-read-chunk-size-limit 500M</code> is specified, the result
would be 0-100M, 100M-300M, 300M-700M, 700M-1200M, 1200M-1700M and so
on.</p>
<p>Setting <code>--vfs-read-chunk-size</code> to <code>0</code> or "off"
disables chunked reading.</p>
<p>The chunks will not be buffered in memory.</p>
<h3
id="vfs-read-chunk-streams-0-3"><code>--vfs-read-chunk-streams</code>
&gt; 0</h3>
<p>Rclone reads <code>--vfs-read-chunk-streams</code> chunks of size
<code>--vfs-read-chunk-size</code> concurrently. The size for each read
will stay constant.</p>
<p>This improves performance massively on high latency links or very
high bandwidth links to high performance object stores.</p>
<p>Some experimentation will be needed to find the optimum values of
<code>--vfs-read-chunk-size</code> and
<code>--vfs-read-chunk-streams</code> as these will depend on the
backend in use and the latency to the backend.</p>
<p>For high performance object stores (eg AWS S3) a reasonable place to
start might be <code>--vfs-read-chunk-streams 16</code> and
<code>--vfs-read-chunk-size 4M</code>. In testing with AWS S3 the
performance scaled roughly as the <code>--vfs-read-chunk-streams</code>
setting.</p>
<p>Similar settings should work for high latency links, but depending on
the latency they may need more <code>--vfs-read-chunk-streams</code> in
order to get the throughput.</p>
<h2 id="vfs-performance-1">VFS Performance</h2>
<p>These flags may be used to enable/disable features of the VFS for
performance or other reasons. See also the <a
href="#vfs-chunked-reading">chunked reading</a> feature.</p>
<p>In particular S3 and Swift benefit hugely from the
<code>--no-modtime</code> flag (or use <code>--use-server-modtime</code>
for a slightly different effect) as each read of the modification time
takes a transaction.</p>
<pre class="text"><code>    --no-checksum     Don&#39;t compare checksums on up/download.
    --no-modtime      Don&#39;t read/write the modification time (can speed things up).
    --no-seek         Don&#39;t allow seeking in files.
    --read-only       Only allow read-only access.</code></pre>
<p>Sometimes rclone is delivered reads or writes out of order. Rather
than seeking rclone will wait a short time for the in sequence read or
write to come in. These flags only come into effect when not using an on
disk cache file.</p>
<pre class="text"><code>    --vfs-read-wait duration   Time to wait for in-sequence read before seeking (default 20ms)
    --vfs-write-wait duration  Time to wait for in-sequence write before giving error (default 1s)</code></pre>
<p>When using VFS write caching (<code>--vfs-cache-mode</code> with
value writes or full), the global flag <code>--transfers</code> can be
set to adjust the number of parallel uploads of modified files from the
cache (the related global flag <code>--checkers</code> has no effect on
the VFS).</p>
<pre class="text"><code>    --transfers int  Number of file transfers to run in parallel (default 4)</code></pre>
<h2 id="symlinks-1">Symlinks</h2>
<p>By default the VFS does not support symlinks. However this may be
enabled with either of the following flags:</p>
<pre class="text"><code>    --links      Translate symlinks to/from regular files with a &#39;.rclonelink&#39; extension.
    --vfs-links  Translate symlinks to/from regular files with a &#39;.rclonelink&#39; extension for the VFS</code></pre>
<p>As most cloud storage systems do not support symlinks directly,
rclone stores the symlink as a normal file with a special extension. So
a file which appears as a symlink <code>link-to-file.txt</code> would be
stored on cloud storage as <code>link-to-file.txt.rclonelink</code> and
the contents would be the path to the symlink destination.</p>
<p>Note that <code>--links</code> enables symlink translation globally
in rclone - this includes any backend which supports the concept (for
example the local backend). <code>--vfs-links</code> just enables it for
the VFS layer.</p>
<p>This scheme is compatible with that used by the <a
href="https://rclone.org/local/#symlinks-junction-points">local backend
with the --local-links flag</a>.</p>
<p>The <code>--vfs-links</code> flag has been designed for
<code>rclone mount</code>, <code>rclone nfsmount</code> and
<code>rclone serve nfs</code>.</p>
<p>It hasn't been tested with the other <code>rclone serve</code>
commands yet.</p>
<p>A limitation of the current implementation is that it expects the
caller to resolve sub-symlinks. For example given this directory
tree</p>
<pre class="text"><code>.
├── dir
│   └── file.txt
└── linked-dir -&gt; dir</code></pre>
<p>The VFS will correctly resolve <code>linked-dir</code> but not
<code>linked-dir/file.txt</code>. This is not a problem for the tested
commands but may be for other commands.</p>
<p><strong>Note</strong> that there is an outstanding issue with symlink
support <a href="https://github.com/rclone/rclone/issues/8245">issue
#8245</a> with duplicate files being created when symlinks are moved
into directories where there is a file of the same name (or vice
versa).</p>
<h2 id="vfs-case-sensitivity-1">VFS Case Sensitivity</h2>
<p>Linux file systems are case-sensitive: two files can differ only by
case, and the exact case must be used when opening a file.</p>
<p>File systems in modern Windows are case-insensitive but
case-preserving: although existing files can be opened using any case,
the exact case used to create the file is preserved and available for
programs to query. It is not allowed for two files in the same directory
to differ only by case.</p>
<p>Usually file systems on macOS are case-insensitive. It is possible to
make macOS file systems case-sensitive but that is not the default.</p>
<p>The <code>--vfs-case-insensitive</code> VFS flag controls how rclone
handles these two cases. If its value is "false", rclone passes file
names to the remote as-is. If the flag is "true" (or appears without a
value on the command line), rclone may perform a "fixup" as explained
below.</p>
<p>The user may specify a file name to open/delete/rename/etc with a
case different than what is stored on the remote. If an argument refers
to an existing file with exactly the same name, then the case of the
existing file on the disk will be used. However, if a file name with
exactly the same name is not found but a name differing only by case
exists, rclone will transparently fixup the name. This fixup happens
only when an existing file is requested. Case sensitivity of file names
created anew by rclone is controlled by the underlying remote.</p>
<p>Note that case sensitivity of the operating system running rclone
(the target) may differ from case sensitivity of a file system presented
by rclone (the source). The flag controls whether "fixup" is performed
to satisfy the target.</p>
<p>If the flag is not provided on the command line, then its default
value depends on the operating system where rclone runs: "true" on
Windows and macOS, "false" otherwise. If the flag is provided without a
value, then it is "true".</p>
<p>The <code>--no-unicode-normalization</code> flag controls whether a
similar "fixup" is performed for filenames that differ but are <a
href="https://en.wikipedia.org/wiki/Unicode_equivalence">canonically
equivalent</a> with respect to unicode. Unicode normalization can be
particularly helpful for users of macOS, which prefers form NFD instead
of the NFC used by most other platforms. It is therefore highly
recommended to keep the default of <code>false</code> on macOS, to avoid
encoding compatibility issues.</p>
<p>In the (probably unlikely) event that a directory has multiple
duplicate filenames after applying case and unicode normalization, the
<code>--vfs-block-norm-dupes</code> flag allows hiding these duplicates.
This comes with a performance tradeoff, as rclone will have to scan the
entire directory for duplicates when listing a directory. For this
reason, it is recommended to leave this disabled if not needed. However,
macOS users may wish to consider using it, as otherwise, if a remote
directory contains both NFC and NFD versions of the same filename, an
odd situation will occur: both versions of the file will be visible in
the mount, and both will appear to be editable, however, editing either
version will actually result in only the NFD version getting edited
under the hood. <code>--vfs-block- norm-dupes</code> prevents this
confusion by detecting this scenario, hiding the duplicates, and logging
an error, similar to how this is handled in
<code>rclone sync</code>.</p>
<h2 id="vfs-disk-options-1">VFS Disk Options</h2>
<p>This flag allows you to manually set the statistics about the filing
system. It can be useful when those statistics cannot be read correctly
automatically.</p>
<pre class="text"><code>    --vfs-disk-space-total-size    Manually set the total disk space size (example: 256G, default: -1)</code></pre>
<h2 id="alternate-report-of-used-bytes-1">Alternate report of used
bytes</h2>
<p>Some backends, most notably S3, do not report the amount of bytes
used. If you need this information to be available when running
<code>df</code> on the filesystem, then pass the flag
<code>--vfs-used-is-size</code> to rclone. With this flag set, instead
of relying on the backend to report this information, rclone will scan
the whole remote similar to <code>rclone size</code> and compute the
total used space itself.</p>
<p><strong>WARNING</strong>: Contrary to <code>rclone size</code>, this
flag ignores filters so that the result is accurate. However, this is
very inefficient and may cost lots of API calls resulting in extra
charges. Use it as a last resort and only with caching.</p>
<h2 id="vfs-metadata-1">VFS Metadata</h2>
<p>If you use the <code>--vfs-metadata-extension</code> flag you can get
the VFS to expose files which contain the <a
href="https://rclone.org/docs/#metadata">metadata</a> as a JSON blob.
These files will not appear in the directory listing, but can be
<code>stat</code>-ed and opened and once they have been they
<strong>will</strong> appear in directory listings until the directory
cache expires.</p>
<p>Note that some backends won't create metadata unless you pass in the
<code>--metadata</code> flag.</p>
<p>For example, using <code>rclone mount</code> with
<code>--metadata --vfs-metadata-extension .metadata</code> we get</p>
<pre class="console"><code>$ ls -l /mnt/
total 1048577
-rw-rw-r-- 1 user user 1073741824 Mar  3 16:03 1G

$ cat /mnt/1G.metadata
{
        &quot;atime&quot;: &quot;2025-03-04T17:34:22.317069787Z&quot;,
        &quot;btime&quot;: &quot;2025-03-03T16:03:37.708253808Z&quot;,
        &quot;gid&quot;: &quot;1000&quot;,
        &quot;mode&quot;: &quot;100664&quot;,
        &quot;mtime&quot;: &quot;2025-03-03T16:03:39.640238323Z&quot;,
        &quot;uid&quot;: &quot;1000&quot;
}

$ ls -l /mnt/
total 1048578
-rw-rw-r-- 1 user user 1073741824 Mar  3 16:03 1G
-rw-rw-r-- 1 user user        185 Mar  3 16:03 1G.metadata</code></pre>
<p>If the file has no metadata it will be returned as <code>{}</code>
and if there is an error reading the metadata the error will be returned
as <code>{"error":"error string"}</code>.</p>
<pre><code>rclone nfsmount remote:path /path/to/mountpoint [flags]</code></pre>
<h2 id="options-72">Options</h2>
<pre><code>      --addr string                            IPaddress:Port or :Port to bind server to
      --allow-idmap                            Allow id-mapped mounts (Linux 6.12+, mount2 only)
      --allow-non-empty                        Allow mounting over a non-empty directory (not supported on Windows)
      --allow-other                            Allow access to other users (not supported on Windows)
      --allow-root                             Allow access to root user (not supported on Windows)
      --async-read                             Use asynchronous reads (not supported on Windows) (default true)
      --attr-timeout Duration                  Time for which file/directory attributes are cached (default 1s)
      --daemon                                 Run mount in background and exit parent process (as background output is suppressed, use --log-file with --log-format=pid,... to monitor) (not supported on Windows)
      --daemon-timeout Duration                Time limit for rclone to respond to kernel (not supported on Windows) (default 0s)
      --daemon-wait Duration                   Time to wait for ready mount from daemon (maximum time on Linux, constant sleep time on OSX/BSD) (not supported on Windows) (default 1m0s)
      --debug-fuse                             Debug the FUSE internals - needs -v
      --default-permissions                    Makes kernel enforce access control based on the file mode (not supported on Windows)
      --devname string                         Set the device name - default is remote:path
      --dir-cache-time Duration                Time to cache directory entries for (default 5m0s)
      --dir-perms FileMode                     Directory permissions (default 777)
      --direct-io                              Use Direct IO, disables caching of data
      --file-perms FileMode                    File permissions (default 666)
      --fuse-flag stringArray                  Flags or arguments to be passed direct to libfuse/WinFsp (repeat if required)
      --gid uint32                             Override the gid field set by the filesystem (not supported on Windows) (default 1000)
  -h, --help                                   help for nfsmount
      --link-perms FileMode                    Link permissions (default 666)
      --max-read-ahead SizeSuffix              The number of bytes that can be prefetched for sequential reads (not supported on Windows) (default 128Ki)
      --mount-case-insensitive Tristate        Tell the OS the mount is case insensitive (true) or sensitive (false) regardless of the backend (auto) (default unset)
      --network-mode                           Mount as remote network drive, instead of fixed disk drive (supported on Windows only)
      --nfs-cache-dir string                   The directory the NFS handle cache will use if set
      --nfs-cache-handle-limit int             max file handles cached simultaneously (min 5) (default 1000000)
      --nfs-cache-type memory|disk|symlink     Type of NFS handle cache to use (default memory)
      --nfs-mount-path string                  Subpath of the remote to mount via NFS (must be an existing directory). (default &quot;/&quot;)
      --no-checksum                            Don&#39;t compare checksums on up/download
      --no-modtime                             Don&#39;t read/write the modification time (can speed things up)
      --no-seek                                Don&#39;t allow seeking in files
      --noappledouble                          Ignore Apple Double (._) and .DS_Store files (supported on OSX only) (default true)
      --noapplexattr                           Ignore all &quot;com.apple.*&quot; extended attributes (supported on OSX only)
  -o, --option stringArray                     Option for libfuse/WinFsp (repeat if required)
      --poll-interval Duration                 Time to wait between polling for changes, must be smaller than dir-cache-time and only on supported remotes (set 0 to disable) (default 1m0s)
      --read-only                              Only allow read-only access
      --sudo                                   Use sudo to run the mount/umount commands as root.
      --uid uint32                             Override the uid field set by the filesystem (not supported on Windows) (default 1000)
      --umask FileMode                         Override the permission bits set by the filesystem (not supported on Windows) (default 002)
      --vfs-block-norm-dupes                   If duplicate filenames exist in the same directory (after normalization), log an error and hide the duplicates (may have a performance cost)
      --vfs-cache-max-age Duration             Max time since last access of objects in the cache (default 1h0m0s)
      --vfs-cache-max-size SizeSuffix          Max total size of objects in the cache (default off)
      --vfs-cache-min-free-space SizeSuffix    Target minimum free space on the disk containing the cache (default off)
      --vfs-cache-mode CacheMode               Cache mode off|minimal|writes|full (default off)
      --vfs-cache-poll-interval Duration       Interval to poll the cache for stale objects (default 1m0s)
      --vfs-case-insensitive                   If a file name not found, find a case insensitive match
      --vfs-disk-space-total-size SizeSuffix   Specify the total space of disk (default off)
      --vfs-fast-fingerprint                   Use fast (less accurate) fingerprints for change detection
      --vfs-handle-caching Duration            Time to keep file handle and downloaders alive after last close (default 5s)
      --vfs-links                              Translate symlinks to/from regular files with a &#39;.rclonelink&#39; extension for the VFS
      --vfs-metadata-extension string          Set the extension to read metadata from
      --vfs-read-ahead SizeSuffix              Extra read ahead over --buffer-size when using cache-mode full
      --vfs-read-chunk-size SizeSuffix         Read the source objects in chunks (default 128Mi)
      --vfs-read-chunk-size-limit SizeSuffix   If greater than --vfs-read-chunk-size, double the chunk size after each chunk read, until the limit is reached (&#39;off&#39; is unlimited) (default off)
      --vfs-read-chunk-streams int             The number of parallel streams to read at once
      --vfs-read-wait Duration                 Time to wait for in-sequence read before seeking (default 20ms)
      --vfs-refresh                            Refreshes the directory cache recursively in the background on start
      --vfs-used-is-size rclone size           Use the rclone size algorithm for Used size
      --vfs-write-back Duration                Time to writeback files after last use when using cache (default 5s)
      --vfs-write-wait Duration                Time to wait for in-sequence write before giving error (default 1s)
      --volname string                         Set the volume name (supported on Windows and OSX only)
      --write-back-cache                       Makes kernel buffer writes before sending them to rclone (without this, writethrough caching is used) (not supported on Windows)</code></pre>
<p>Options shared with other commands are described next. See the <a
href="https://rclone.org/flags/">global flags page</a> for global
options not listed here.</p>
<h3 id="filter-options-24">Filter Options</h3>
<p>Flags for filtering directory listings</p>
<pre class="text"><code>      --delete-excluded                     Delete files on dest excluded from sync
      --exclude stringArray                 Exclude files matching pattern
      --exclude-from stringArray            Read file exclude patterns from file (use - to read from stdin)
      --exclude-if-present stringArray      Exclude directories if filename is present
      --files-from stringArray              Read list of source-file names from file (use - to read from stdin)
      --files-from-raw stringArray          Read list of source-file names from file without any processing of lines (use - to read from stdin)
      --files-from0 stringArray             Read list of source-file names from file using NUL as separator (use - to read from stdin)
  -f, --filter stringArray                  Add a file filtering rule
      --filter-from stringArray             Read file filtering patterns from a file (use - to read from stdin)
      --hash-filter string                  Partition filenames by hash k/n or randomly @/n
      --ignore-case                         Ignore case in filters (case insensitive)
      --include stringArray                 Include files matching pattern
      --include-from stringArray            Read file include patterns from file (use - to read from stdin)
      --max-age Duration                    Only transfer files younger than this in s or suffix ms|s|m|h|d|w|M|y (default off)
      --max-depth int                       If set limits the recursion depth to this (default -1)
      --max-size SizeSuffix                 Only transfer files smaller than this in KiB or suffix B|K|M|G|T|P (default off)
      --metadata-exclude stringArray        Exclude metadatas matching pattern
      --metadata-exclude-from stringArray   Read metadata exclude patterns from file (use - to read from stdin)
      --metadata-filter stringArray         Add a metadata filtering rule
      --metadata-filter-from stringArray    Read metadata filtering patterns from a file (use - to read from stdin)
      --metadata-include stringArray        Include metadatas matching pattern
      --metadata-include-from stringArray   Read metadata include patterns from file (use - to read from stdin)
      --min-age Duration                    Only transfer files older than this in s or suffix ms|s|m|h|d|w|M|y (default off)
      --min-size SizeSuffix                 Only transfer files bigger than this in KiB or suffix B|K|M|G|T|P (default off)</code></pre>
<h2 id="see-also-72">See Also</h2>
<!-- markdownlint-capture -->
<!-- markdownlint-disable ul-style line-length -->
<ul>
<li><a href="https://rclone.org/commands/rclone/">rclone</a> - Show help
for rclone commands, flags and backends.</li>
</ul>
<!-- markdownlint-restore -->
<h1 id="rclone-obscure">rclone obscure</h1>
<p>Obscure password for use in the rclone config file.</p>
<h2 id="synopsis-66">Synopsis</h2>
<p>In the rclone config file, human-readable passwords are obscured.
Obscuring them is done by encrypting them and writing them out in
base64. This is <strong>not</strong> a secure way of encrypting these
passwords as rclone can decrypt them - it is to prevent "eyedropping" -
namely someone seeing a password in the rclone config file by
accident.</p>
<p>Many equally important things (like access tokens) are not obscured
in the config file. However it is very hard to shoulder surf a 64
character hex token.</p>
<p>This command can also accept a password through STDIN instead of an
argument by passing a hyphen as an argument. This will use the first
line of STDIN as the password not including the trailing newline.</p>
<pre class="console"><code>echo &#39;secretpassword&#39; | rclone obscure -</code></pre>
<p>If there is no data on STDIN to read, rclone obscure will default to
obfuscating the hyphen itself.</p>
<p>If you want to encrypt the config file then please use config file
encryption - see <a
href="https://rclone.org/commands/rclone_config/">rclone config</a> for
more info.</p>
<pre><code>rclone obscure password [flags]</code></pre>
<h2 id="options-73">Options</h2>
<pre><code>  -h, --help   help for obscure</code></pre>
<p>See the <a href="https://rclone.org/flags/">global flags page</a> for
global options not listed here.</p>
<h2 id="see-also-73">See Also</h2>
<!-- markdownlint-capture -->
<!-- markdownlint-disable ul-style line-length -->
<ul>
<li><a href="https://rclone.org/commands/rclone/">rclone</a> - Show help
for rclone commands, flags and backends.</li>
</ul>
<!-- markdownlint-restore -->
<h1 id="rclone-rc">rclone rc</h1>
<p>Run a command against a running rclone.</p>
<h2 id="synopsis-67">Synopsis</h2>
<p>This runs a command against a running rclone. Use the
<code>--url</code> flag to specify an non default URL to connect on.
This can be either a ":port" which is taken to mean <a
href="http://localhost:port" class="uri">http://localhost:port</a> or a
"host:port" which is taken to mean <a href="http://host:port"
class="uri">http://host:port</a>.</p>
<p>A username and password can be passed in with <code>--user</code> and
<code>--pass</code>.</p>
<p>Note that <code>--rc-addr</code>, <code>--rc-user</code>,
<code>--rc-pass</code> will be read also for <code>--url</code>,
<code>--user</code>, <code>--pass</code>.</p>
<p>The <code>--unix-socket</code> flag can be used to connect over a
unix socket like this</p>
<div class="sourceCode" id="cb449"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb449-1"><a href="#cb449-1" aria-hidden="true" tabindex="-1"></a><span class="co"># start server on /tmp/my.socket</span></span>
<span id="cb449-2"><a href="#cb449-2" aria-hidden="true" tabindex="-1"></a><span class="ex">rclone</span> rcd <span class="at">--rc-addr</span> unix:///tmp/my.socket</span>
<span id="cb449-3"><a href="#cb449-3" aria-hidden="true" tabindex="-1"></a><span class="co"># Connect to it</span></span>
<span id="cb449-4"><a href="#cb449-4" aria-hidden="true" tabindex="-1"></a><span class="ex">rclone</span> rc <span class="at">--unix-socket</span> /tmp/my.socket core/stats</span></code></pre></div>
<p>Arguments should be passed in as parameter=value.</p>
<p>The result will be returned as a JSON object by default.</p>
<p>The <code>--json</code> parameter can be used to pass in a JSON blob
as an input instead of key=value arguments. This is the only way of
passing in more complicated values.</p>
<p>The <code>-o</code>/<code>--opt</code> option can be used to set a
key "opt" with key, value options in the form <code>-o key=value</code>
or <code>-o key</code>. It can be repeated as many times as required.
This is useful for rc commands which take the "opt" parameter which by
convention is a dictionary of strings.</p>
<pre class="text"><code>-o key=value -o key2</code></pre>
<p>Will place this in the "opt" value</p>
<div class="sourceCode" id="cb451"><pre
class="sourceCode json"><code class="sourceCode json"><span id="cb451-1"><a href="#cb451-1" aria-hidden="true" tabindex="-1"></a><span class="fu">{</span><span class="dt">&quot;key&quot;</span><span class="fu">:</span><span class="st">&quot;value&quot;</span><span class="fu">,</span> <span class="dt">&quot;key2&quot;</span><span class="fu">,</span><span class="dt">&quot;&quot;</span><span class="er">)</span></span></code></pre></div>
<p>The <code>-a</code>/<code>--arg</code> option can be used to set
strings in the "arg" value. It can be repeated as many times as
required. This is useful for rc commands which take the "arg" parameter
which by convention is a list of strings.</p>
<pre class="text"><code>-a value -a value2</code></pre>
<p>Will place this in the "arg" value</p>
<div class="sourceCode" id="cb453"><pre
class="sourceCode json"><code class="sourceCode json"><span id="cb453-1"><a href="#cb453-1" aria-hidden="true" tabindex="-1"></a><span class="ot">[</span><span class="st">&quot;value&quot;</span><span class="ot">,</span> <span class="st">&quot;value2&quot;</span><span class="ot">]</span></span></code></pre></div>
<p>Use <code>--loopback</code> to connect to the rclone instance running
<code>rclone rc</code>. This is very useful for testing commands without
having to run an rclone rc server, e.g.:</p>
<div class="sourceCode" id="cb454"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb454-1"><a href="#cb454-1" aria-hidden="true" tabindex="-1"></a><span class="ex">rclone</span> rc <span class="at">--loopback</span> operations/about fs=/</span></code></pre></div>
<p>Use <code>rclone rc</code> to see a list of all possible
commands.</p>
<pre><code>rclone rc commands parameter [flags]</code></pre>
<h2 id="options-74">Options</h2>
<pre><code>  -a, --arg stringArray      Argument placed in the &quot;arg&quot; array
  -h, --help                 help for rc
      --json string          Input JSON - use instead of key=value args
      --loopback             If set connect to this rclone instance not via HTTP
      --no-output            If set, don&#39;t output the JSON result
  -o, --opt stringArray      Option in the form name=value or name placed in the &quot;opt&quot; array
      --pass string          Password to use to connect to rclone remote control
      --unix-socket string   Path to a unix domain socket to dial to, instead of opening a TCP connection directly
      --url string           URL to connect to rclone remote control (default &quot;http://localhost:5572/&quot;)
      --user string          Username to use to rclone remote control</code></pre>
<p>See the <a href="https://rclone.org/flags/">global flags page</a> for
global options not listed here.</p>
<h2 id="see-also-74">See Also</h2>
<!-- markdownlint-capture -->
<!-- markdownlint-disable ul-style line-length -->
<ul>
<li><a href="https://rclone.org/commands/rclone/">rclone</a> - Show help
for rclone commands, flags and backends.</li>
</ul>
<!-- markdownlint-restore -->
<h1 id="rclone-rcat">rclone rcat</h1>
<p>Copies standard input to file on remote.</p>
<h2 id="synopsis-68">Synopsis</h2>
<p>Reads from standard input (stdin) and copies it to a single remote
file.</p>
<pre class="console"><code>echo &quot;hello world&quot; | rclone rcat remote:path/to/file
ffmpeg - | rclone rcat remote:path/to/file</code></pre>
<p>If the remote file already exists, it will be overwritten.</p>
<p>rcat will try to upload small files in a single request, which is
usually more efficient than the streaming/chunked upload endpoints,
which use multiple requests. Exact behaviour depends on the remote. What
is considered a small file may be set through
<code>--streaming-upload-cutoff</code>. Uploading only starts after the
cutoff is reached or if the file ends before that. The data must fit
into RAM. The cutoff needs to be small enough to adhere the limits of
your remote, please see there. Generally speaking, setting this cutoff
too high will decrease your performance.</p>
<p>Use the <code>--size</code> flag to preallocate the file in advance
at the remote end and actually stream it, even if remote backend doesn't
support streaming.</p>
<p><code>--size</code> should be the exact size of the input stream in
bytes. If the size of the stream is different in length to the
<code>--size</code> passed in then the transfer will likely fail.</p>
<p>Note that the upload cannot be retried because the data is not
stored. If the backend supports multipart uploading then individual
chunks can be retried. If you need to transfer a lot of data, you may be
better off caching it locally and then <code>rclone move</code> it to
the destination which can use retries.</p>
<pre><code>rclone rcat remote:path [flags]</code></pre>
<h2 id="options-75">Options</h2>
<pre><code>  -h, --help       help for rcat
      --size int   File size hint to preallocate (default -1)</code></pre>
<p>Options shared with other commands are described next. See the <a
href="https://rclone.org/flags/">global flags page</a> for global
options not listed here.</p>
<h3 id="important-options-17">Important Options</h3>
<p>Important flags useful for most commands</p>
<pre class="text"><code>  -n, --dry-run         Do a trial run with no permanent changes
  -i, --interactive     Enable interactive mode
  -v, --verbose count   Print lots more stuff (repeat for more)</code></pre>
<h2 id="see-also-75">See Also</h2>
<!-- markdownlint-capture -->
<!-- markdownlint-disable ul-style line-length -->
<ul>
<li><a href="https://rclone.org/commands/rclone/">rclone</a> - Show help
for rclone commands, flags and backends.</li>
</ul>
<!-- markdownlint-restore -->
<h1 id="rclone-rcd">rclone rcd</h1>
<p>Run rclone listening to remote control commands only.</p>
<h2 id="synopsis-69">Synopsis</h2>
<p>This runs rclone so that it only listens to remote control
commands.</p>
<p>This is useful if you are controlling rclone via the rc API.</p>
<p>If you pass in a path to a directory, rclone will serve that
directory for GET requests on the URL passed in. It will also open the
URL in the browser when rclone is run.</p>
<p>See the <a href="https://rclone.org/rc/">rc documentation</a> for
more info on the rc flags.</p>
<h2 id="server-options">Server options</h2>
<p>Use <code>--rc-addr</code> to specify which IP address and port the
server should listen on, eg <code>--rc-addr 1.2.3.4:8000</code> or
<code>--rc-addr :8080</code> to listen to all IPs. By default it only
listens on localhost. You can use port :0 to let the OS choose an
available port.</p>
<p>If you set <code>--rc-addr</code> to listen on a public or LAN
accessible IP address then using Authentication is advised - see the
next section for info.</p>
<p>You can use a unix socket by setting the url to
<code>unix:///path/to/socket</code> or just by using an absolute path
name.</p>
<p><code>--rc-addr</code> may be repeated to listen on multiple
IPs/ports/sockets. Socket activation, described further below, can also
be used to accomplish the same.</p>
<p><code>--rc-server-read-timeout</code> and
<code>--rc-server-write-timeout</code> can be used to control the
timeouts on the server. Note that this is the total time for a
transfer.</p>
<p><code>--rc-max-header-bytes</code> controls the maximum number of
bytes the server will accept in the HTTP header.</p>
<p><code>--rc-response-header</code> can be used to set an HTTP header
for all responses, will overriding existing values. The flag may be
repeated to add multiple headers. Use the format
<code>Header-Name: value</code>.</p>
<p><code>--rc-allow-origin</code> enables cross-origin (CORS) requests
from browsers by setting the <code>Access-Control-Allow-Origin</code>
header on every response to the origin given, e.g.
<code>--rc-allow-origin https://app.example.com</code>. Browser CORS
preflight OPTIONS requests are answered by rclone without needing
authentication as browsers never send credentials with them. Setting
this to <code>*</code> allows any origin which is a security risk on an
authenticated server.</p>
<p><code>--rc-baseurl</code> controls the URL prefix that rclone serves
from. By default rclone will serve from the root. If you used
<code>--rc-baseurl "/rclone"</code> then rclone would serve from a URL
starting with "/rclone/". This is useful if you wish to proxy rclone
serve. Rclone automatically inserts leading and trailing "/" on
<code>--rc-baseurl</code>, so <code>--rc-baseurl "rclone"</code>,
<code>--rc-baseurl "/rclone"</code> and
<code>--rc-baseurl "/rclone/"</code> are all treated identically.</p>
<p><code>--rc-disable-zip</code> may be set to disable the zipping
download option.</p>
<h3 id="protocol">Protocol</h3>
<p>The server supports HTTP/1.1 and HTTP/2. HTTP/2 is used automatically
for TLS connections. For non-TLS connections, HTTP/2 cleartext (h2c) is
supported, allowing HTTP/2 without encryption.</p>
<h3 id="tls-ssl">TLS (SSL)</h3>
<p>By default this will serve over http. If you want you can serve over
https. You will need to supply the <code>--rc-cert</code> and
<code>--rc-key</code> flags. If you wish to do client side certificate
validation then you will need to supply <code>--rc-client-ca</code>
also.</p>
<p>When TLS is configured every listener given with
<code>--rc-addr</code> serves TLS. An individual listener can be
prefixed with <code>http://</code> to serve unencrypted HTTP on that
address, or with <code>tls://</code> to state explicitly that it must
serve TLS. Using a <code>tls://</code> address without
<code>--rc-cert</code> and <code>--rc-key</code> is an error.</p>
<p><code>--rc-cert</code> must be set to the path of a file containing
either a PEM encoded certificate, or a concatenation of that with the CA
certificate. <code>--rc-key</code> must be set to the path of a file
with the PEM encoded private key. If setting
<code>--rc-client-ca</code>, it should be set to the path of a file with
PEM encoded client certificate authority certificates.</p>
<p><code>--rc-min-tls-version</code> is minimum TLS version that is
acceptable. Valid values are "tls1.0", "tls1.1", "tls1.2" and "tls1.3"
(default "tls1.0").</p>
<h2 id="socket-activation">Socket activation</h2>
<p>Instead of the listening addresses specified above, rclone will
listen to all FDs passed by the service manager, if any (and ignore any
arguments passed by <code>--rc-addr</code>).</p>
<p>This allows rclone to be a socket-activated service. It can be
configured with .socket and .service unit files as described in <a
href="https://www.freedesktop.org/software/systemd/man/latest/systemd.socket.html"
class="uri">https://www.freedesktop.org/software/systemd/man/latest/systemd.socket.html</a>.</p>
<p>Socket activation can be tested ad-hoc with the
<code>systemd-socket-activate</code>command</p>
<pre class="console"><code>systemd-socket-activate -l 8000 -- rclone serve</code></pre>
<p>This will socket-activate rclone on the first connection to port 8000
over TCP.</p>
<h3 id="template">Template</h3>
<p><code>--rc-template</code> allows a user to specify a custom markup
template for HTTP and WebDAV serve functions. The server exports the
following markup to be used within the template to server pages:</p>
<table>
<colgroup>
<col style="width: 32%" />
<col style="width: 35%" />
<col style="width: 32%" />
</colgroup>
<thead>
<tr class="header">
<th style="text-align: left;">Parameter</th>
<th style="text-align: left;">Subparameter</th>
<th style="text-align: left;">Description</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;">.Name</td>
<td style="text-align: left;"></td>
<td style="text-align: left;">The full path of a file/directory.</td>
</tr>
<tr class="even">
<td style="text-align: left;">.Title</td>
<td style="text-align: left;"></td>
<td style="text-align: left;">Directory listing of '.Name'.</td>
</tr>
<tr class="odd">
<td style="text-align: left;">.Sort</td>
<td style="text-align: left;"></td>
<td style="text-align: left;">The current sort used. This is changeable
via '?sort=' parameter. Possible values: namedirfirst, name, size, time
(default namedirfirst).</td>
</tr>
<tr class="even">
<td style="text-align: left;">.Order</td>
<td style="text-align: left;"></td>
<td style="text-align: left;">The current ordering used. This is
changeable via '?order=' parameter. Possible values: asc, desc (default
asc).</td>
</tr>
<tr class="odd">
<td style="text-align: left;">.Query</td>
<td style="text-align: left;"></td>
<td style="text-align: left;">Currently unused.</td>
</tr>
<tr class="even">
<td style="text-align: left;">.Path</td>
<td style="text-align: left;"></td>
<td style="text-align: left;">The path of the directory from the root
with leading and trailing slashes, e.g. '/dir/'.</td>
</tr>
<tr class="odd">
<td style="text-align: left;">.IsRoot</td>
<td style="text-align: left;"></td>
<td style="text-align: left;">Boolean for if this is the root
directory.</td>
</tr>
<tr class="even">
<td style="text-align: left;">.UpLink</td>
<td style="text-align: left;"></td>
<td style="text-align: left;">The link to the parent directory.</td>
</tr>
<tr class="odd">
<td style="text-align: left;">.Static</td>
<td style="text-align: left;"></td>
<td style="text-align: left;">Boolean for if the listing is being
written as a static page by rclone index.</td>
</tr>
<tr class="even">
<td style="text-align: left;">.NumDirs</td>
<td style="text-align: left;"></td>
<td style="text-align: left;">The number of directories in the
listing.</td>
</tr>
<tr class="odd">
<td style="text-align: left;">.NumFiles</td>
<td style="text-align: left;"></td>
<td style="text-align: left;">The number of files in the listing.</td>
</tr>
<tr class="even">
<td style="text-align: left;">.TotalSize</td>
<td style="text-align: left;"></td>
<td style="text-align: left;">The total size in bytes of the files in
the listing.</td>
</tr>
<tr class="odd">
<td style="text-align: left;">.Breadcrumb</td>
<td style="text-align: left;"></td>
<td style="text-align: left;">Allows for creating a relative
navigation.</td>
</tr>
<tr class="even">
<td style="text-align: left;"></td>
<td style="text-align: left;">.Link</td>
<td style="text-align: left;">The link of the Text relative to the
root.</td>
</tr>
<tr class="odd">
<td style="text-align: left;"></td>
<td style="text-align: left;">.Text</td>
<td style="text-align: left;">The Name of the directory.</td>
</tr>
<tr class="even">
<td style="text-align: left;">.Entries</td>
<td style="text-align: left;"></td>
<td style="text-align: left;">Information about a specific
file/directory.</td>
</tr>
<tr class="odd">
<td style="text-align: left;"></td>
<td style="text-align: left;">.URL</td>
<td style="text-align: left;">The url of an entry.</td>
</tr>
<tr class="even">
<td style="text-align: left;"></td>
<td style="text-align: left;">.Leaf</td>
<td style="text-align: left;">Currently same as '.URL' but intended to
be just the name.</td>
</tr>
<tr class="odd">
<td style="text-align: left;"></td>
<td style="text-align: left;">.IsDir</td>
<td style="text-align: left;">Boolean for if an entry is a directory or
not.</td>
</tr>
<tr class="even">
<td style="text-align: left;"></td>
<td style="text-align: left;">.Size</td>
<td style="text-align: left;">Size in bytes of the entry.</td>
</tr>
<tr class="odd">
<td style="text-align: left;"></td>
<td style="text-align: left;">.ModTime</td>
<td style="text-align: left;">The UTC timestamp of an entry.</td>
</tr>
<tr class="even">
<td style="text-align: left;"></td>
<td style="text-align: left;">.MimeType</td>
<td style="text-align: left;">The MIME type of an entry guessed from its
name, or 'inode/directory'.</td>
</tr>
</tbody>
</table>
<p>The server also makes the following functions available so that they
can be used within the template. These functions help extend the options
for dynamic rendering of HTML. They can be used to render HTML based on
specific conditions.</p>
<table>
<colgroup>
<col style="width: 50%" />
<col style="width: 50%" />
</colgroup>
<thead>
<tr class="header">
<th style="text-align: left;">Function</th>
<th style="text-align: left;">Description</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;">afterEpoch</td>
<td style="text-align: left;">Returns the time since the epoch for the
given time.</td>
</tr>
<tr class="even">
<td style="text-align: left;">contains</td>
<td style="text-align: left;">Checks whether a given substring is
present or not in a given string.</td>
</tr>
<tr class="odd">
<td style="text-align: left;">hasPrefix</td>
<td style="text-align: left;">Checks whether the given string begins
with the specified prefix.</td>
</tr>
<tr class="even">
<td style="text-align: left;">hasSuffix</td>
<td style="text-align: left;">Checks whether the given string end with
the specified suffix.</td>
</tr>
</tbody>
</table>
<h3 id="authentication">Authentication</h3>
<p>By default this will serve files without needing a login.</p>
<p>You can either use an htpasswd file which can take lots of users, or
set a single username and password with the <code>--rc-user</code> and
<code>--rc-pass</code> flags.</p>
<p>Alternatively, you can have the reverse proxy manage authentication
and use the username provided in the configured header with
<code>--user-from-header</code> (e.g.,
<code>--rc-user-from-header=x-remote-user</code>). Ensure the proxy is
trusted and headers cannot be spoofed, as misconfiguration may lead to
unauthorized access.</p>
<p>If either of the above authentication methods is not configured and
client certificates are required by the <code>--client-ca</code> flag
passed to the server, the client certificate common name will be
considered as the username.</p>
<p>Use <code>--rc-htpasswd /path/to/htpasswd</code> to provide an
htpasswd file. This is in standard apache format and supports MD5, SHA1
and BCrypt for basic authentication. Bcrypt is recommended.</p>
<p>To create an htpasswd file:</p>
<pre class="console"><code>touch htpasswd
htpasswd -B htpasswd user
htpasswd -B htpasswd anotherUser</code></pre>
<p>Use the same hash format and cost for every entry in the file. If the
entries differ, the time taken to reject a wrong password can reveal
which usernames exist.</p>
<p>The password file can be updated while rclone is running.</p>
<p>When authentication is enabled every request must be authenticated,
including HTTP OPTIONS requests, as the answer to an OPTIONS request can
reveal whether a path exists. Health checks or monitoring which use
unauthenticated OPTIONS requests will need to send credentials. The
exception is browser CORS preflight requests when
<code>--rc-allow-origin</code> is set, which are answered without
authentication as browsers never send credentials with them.</p>
<p>Use <code>--rc-realm</code> to set the authentication realm.</p>
<p>Use <code>--rc-salt</code> to change the password hashing salt from
the default.</p>
<pre><code>rclone rcd &lt;path to files to serve&gt;* [flags]</code></pre>
<h2 id="options-76">Options</h2>
<pre><code>  -h, --help   help for rcd</code></pre>
<p>Options shared with other commands are described next. See the <a
href="https://rclone.org/flags/">global flags page</a> for global
options not listed here.</p>
<h3 id="rc-options-1">RC Options</h3>
<p>Flags to control the Remote Control API</p>
<pre class="text"><code>      --rc                                 Enable the remote control server
      --rc-addr stringArray                IPaddress:Port or :Port to bind server to (default localhost:5572)
      --rc-allow-origin string             Origin which cross-domain request (CORS) can be executed from
      --rc-baseurl string                  Prefix for URLs - leave blank for root
      --rc-cert string                     TLS PEM key (concatenation of certificate and CA certificate)
      --rc-client-ca string                Client certificate authority to verify clients with
      --rc-enable-metrics                  Enable the Prometheus metrics path at the remote control server
      --rc-files string                    Path to local files to serve on the HTTP server
      --rc-htpasswd string                 A htpasswd file - if not provided no authentication is done
      --rc-job-expire-duration Duration    Expire finished async jobs older than this value (default 1m0s)
      --rc-job-expire-interval Duration    Interval to check for expired async jobs (default 10s)
      --rc-key string                      TLS PEM Private key
      --rc-max-header-bytes int            Maximum size of request header (default 4096)
      --rc-min-tls-version string          Minimum TLS version that is acceptable (default &quot;tls1.0&quot;)
      --rc-no-auth                         Don&#39;t require auth for certain methods
      --rc-pass string                     Password for authentication
      --rc-realm string                    Realm for authentication
      --rc-response-header stringArray     Set HTTP header for all responses, overriding existing values
      --rc-salt string                     Password hashing salt (default &quot;dlPL2MqE&quot;)
      --rc-serve                           Enable the serving of remote objects
      --rc-serve-no-modtime                Don&#39;t read the modification time (can speed things up)
      --rc-server-read-timeout Duration    Timeout for server reading data (default 1h0m0s)
      --rc-server-write-timeout Duration   Timeout for server writing data (default 1h0m0s)
      --rc-template string                 User-specified template
      --rc-user string                     User name for authentication
      --rc-user-from-header string         User name from a defined HTTP header</code></pre>
<h2 id="see-also-76">See Also</h2>
<!-- markdownlint-capture -->
<!-- markdownlint-disable ul-style line-length -->
<ul>
<li><a href="https://rclone.org/commands/rclone/">rclone</a> - Show help
for rclone commands, flags and backends.</li>
</ul>
<!-- markdownlint-restore -->
<h1 id="rclone-rmdirs">rclone rmdirs</h1>
<p>Remove empty directories under the path.</p>
<h2 id="synopsis-70">Synopsis</h2>
<p>This recursively removes any empty directories (including directories
that only contain empty directories), that it finds under the path. The
root path itself will also be removed if it is empty, unless you supply
the <code>--leave-root</code> flag.</p>
<p>Use command <a
href="https://rclone.org/commands/rclone_rmdir/">rmdir</a> to delete
just the empty directory given by path, not recurse.</p>
<p>This is useful for tidying up remotes that rclone has left a lot of
empty directories in. For example the <a
href="https://rclone.org/commands/rclone_delete/">delete</a> command
will delete files but leave the directory structure (unless used with
option <code>--rmdirs</code>).</p>
<p>This will delete <code>--checkers</code> directories concurrently so
if you have thousands of empty directories consider increasing this
number.</p>
<p>To delete a path and any objects in it, use the <a
href="https://rclone.org/commands/rclone_purge/">purge</a> command.</p>
<pre><code>rclone rmdirs remote:path [flags]</code></pre>
<h2 id="options-77">Options</h2>
<pre><code>  -h, --help         help for rmdirs
      --leave-root   Do not remove root directory if empty</code></pre>
<p>Options shared with other commands are described next. See the <a
href="https://rclone.org/flags/">global flags page</a> for global
options not listed here.</p>
<h3 id="important-options-18">Important Options</h3>
<p>Important flags useful for most commands</p>
<pre class="text"><code>  -n, --dry-run         Do a trial run with no permanent changes
  -i, --interactive     Enable interactive mode
  -v, --verbose count   Print lots more stuff (repeat for more)</code></pre>
<h2 id="see-also-77">See Also</h2>
<!-- markdownlint-capture -->
<!-- markdownlint-disable ul-style line-length -->
<ul>
<li><a href="https://rclone.org/commands/rclone/">rclone</a> - Show help
for rclone commands, flags and backends.</li>
</ul>
<!-- markdownlint-restore -->
<h1 id="rclone-selfupdate">rclone selfupdate</h1>
<p>Update the rclone binary.</p>
<h2 id="synopsis-71">Synopsis</h2>
<p>This command downloads the latest release of rclone and replaces the
currently running binary. The download is verified with a hashsum and
cryptographically signed signature; see <a
href="https://rclone.org/release_signing/">the release signing docs</a>
for details.</p>
<p>If used without flags (or with implied <code>--stable</code> flag),
this command will install the latest stable release. However, some
issues may be fixed (or features added) only in the latest beta release.
In such cases you should run the command with the <code>--beta</code>
flag, i.e. <code>rclone selfupdate --beta</code>. You can check in
advance what version would be installed by adding the
<code>--check</code> flag, then repeat the command without it when you
are satisfied.</p>
<p>Sometimes the rclone team may recommend you a concrete beta or stable
rclone release to troubleshoot your issue or add a bleeding edge
feature. The <code>--version VER</code> flag, if given, will update to
the concrete version instead of the latest one. If you omit micro
version from <code>VER</code> (for example <code>1.53</code>), the
latest matching micro version will be used.</p>
<p>Upon successful update rclone will print a message that contains a
previous version number. You will need it if you later decide to revert
your update for some reason. Then you'll have to note the previous
version and run the following command:
<code>rclone selfupdate [--beta] OLDVER</code>. If the old version
contains only dots and digits (for example <code>v1.54.0</code>) then
it's a stable release so you won't need the <code>--beta</code> flag.
Beta releases have an additional information similar to
<code>v1.54.0-beta.5111.06f1c0c61</code>. (if you are a developer and
use a locally built rclone, the version number will end with
<code>-DEV</code>, you will have to rebuild it as it obviously can't be
distributed).</p>
<p>If you previously installed rclone via a package manager, the package
may include local documentation or configure services. You may wish to
update with the flag <code>--package deb</code> or
<code>--package rpm</code> (whichever is correct for your OS) to update
these too. This command with the default <code>--package zip</code> will
update only the rclone executable so the local manual may become
inaccurate after it.</p>
<p>The <a href="https://rclone.org/commands/rclone_mount/">rclone
mount</a> command may or may not support extended FUSE options depending
on the build and OS. <code>selfupdate</code> will refuse to update if
the capability would be discarded.</p>
<p>Note: Windows forbids deletion of a currently running executable so
this command will rename the old executable to 'rclone.old.exe' upon
success.</p>
<p>Please note that this command was not available before rclone version
1.55. If it fails for you with the message
<code>unknown command "selfupdate"</code> then you will need to update
manually following the <a href="https://rclone.org/install/">install
documentation</a>.</p>
<pre><code>rclone selfupdate [flags]</code></pre>
<h2 id="options-78">Options</h2>
<pre><code>      --beta             Install beta release
      --check            Check for latest release, do not download
  -h, --help             help for selfupdate
      --output string    Save the downloaded binary at a given path (default: replace running binary)
      --package string   Package format: zip|deb|rpm (default: zip)
      --stable           Install stable release (this is the default)
      --version string   Install the given rclone version (default: latest)</code></pre>
<p>See the <a href="https://rclone.org/flags/">global flags page</a> for
global options not listed here.</p>
<h2 id="see-also-78">See Also</h2>
<!-- markdownlint-capture -->
<!-- markdownlint-disable ul-style line-length -->
<ul>
<li><a href="https://rclone.org/commands/rclone/">rclone</a> - Show help
for rclone commands, flags and backends.</li>
</ul>
<!-- markdownlint-restore -->
<h1 id="rclone-serve">rclone serve</h1>
<p>Serve a remote over a protocol.</p>
<h2 id="synopsis-72">Synopsis</h2>
<p>Serve a remote over a given protocol. Requires the use of a
subcommand to specify the protocol, e.g.</p>
<pre class="console"><code>rclone serve http remote:</code></pre>
<p>When the "--metadata" flag is enabled, the following metadata fields
will be provided as headers: - "content-disposition" - "cache-control" -
"content-language" - "content-encoding" Note: The availability of these
fields depends on whether the remote supports metadata.</p>
<p>Each subcommand has its own options which you can see in their
help.</p>
<pre><code>rclone serve &lt;protocol&gt; [opts] &lt;remote&gt; [flags]</code></pre>
<h2 id="options-79">Options</h2>
<pre><code>  -h, --help   help for serve</code></pre>
<p>See the <a href="https://rclone.org/flags/">global flags page</a> for
global options not listed here.</p>
<h2 id="see-also-79">See Also</h2>
<!-- markdownlint-capture -->
<!-- markdownlint-disable ul-style line-length -->
<ul>
<li><a href="https://rclone.org/commands/rclone/">rclone</a> - Show help
for rclone commands, flags and backends.</li>
<li><a href="https://rclone.org/commands/rclone_serve_dlna/">rclone
serve dlna</a> - Serve remote:path over DLNA</li>
<li><a href="https://rclone.org/commands/rclone_serve_docker/">rclone
serve docker</a> - Serve any remote on docker's volume plugin API.</li>
<li><a href="https://rclone.org/commands/rclone_serve_ftp/">rclone serve
ftp</a> - Serve remote:path over FTP.</li>
<li><a href="https://rclone.org/commands/rclone_serve_http/">rclone
serve http</a> - Serve the remote over HTTP.</li>
<li><a href="https://rclone.org/commands/rclone_serve_nfs/">rclone serve
nfs</a> - Serve the remote as an NFS mount</li>
<li><a href="https://rclone.org/commands/rclone_serve_restic/">rclone
serve restic</a> - Serve the remote for restic's REST API.</li>
<li><a href="https://rclone.org/commands/rclone_serve_s3/">rclone serve
s3</a> - Serve remote:path over s3.</li>
<li><a href="https://rclone.org/commands/rclone_serve_sftp/">rclone
serve sftp</a> - Serve the remote over SFTP.</li>
<li><a href="https://rclone.org/commands/rclone_serve_webdav/">rclone
serve webdav</a> - Serve remote:path over WebDAV.</li>
</ul>
<!-- markdownlint-restore -->
<h1 id="rclone-serve-dlna">rclone serve dlna</h1>
<p>Serve remote:path over DLNA</p>
<h2 id="synopsis-73">Synopsis</h2>
<p>Run a DLNA media server for media stored in an rclone remote. Many
devices, such as the Xbox and PlayStation, can automatically discover
this server in the LAN and play audio/video from it. VLC is also
supported. Service discovery uses UDP multicast packets (SSDP) and will
thus only work on LANs.</p>
<p>Rclone will list all files present in the remote, without filtering
based on media formats or file extensions. Additionally, there is no
media transcoding support. This means that some players might show files
that they are not able to play back correctly.</p>
<p>Rclone will add external subtitle files (.srt) to videos if they have
the same filename as the video file itself (except the extension),
either in the same directory as the video, or in a "Subs"
subdirectory.</p>
<h2 id="server-options-1">Server options</h2>
<p>Use <code>--addr</code> to specify which IP address and port the
server should listen on, e.g. <code>--addr 1.2.3.4:8000</code> or
<code>--addr :8080</code> to listen to all IPs.</p>
<p>Use <code>--name</code> to choose the friendly server name, which is
by default "rclone (hostname)".</p>
<p>Use <code>--log-trace</code> in conjunction with <code>-vv</code> to
enable additional debug logging of all UPNP traffic.</p>
<h2 id="vfs---virtual-file-system-2">VFS - Virtual File System</h2>
<p>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.</p>
<p>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.</p>
<p>The VFS layer also implements a directory cache - this caches info
about files and directories (but not the data) in memory.</p>
<h2 id="vfs-directory-cache-2">VFS Directory Cache</h2>
<p>Using the <code>--dir-cache-time</code> 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.</p>
<pre class="text"><code>    --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)</code></pre>
<p>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.</p>
<p>You can send a <code>SIGHUP</code> 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:</p>
<pre class="console"><code>kill -SIGHUP $(pidof rclone)</code></pre>
<p>If you configure rclone with a <a href="/rc">remote control</a> then
you can use rclone rc to flush the whole directory cache:</p>
<pre class="console"><code>rclone rc vfs/forget</code></pre>
<p>Or individual files or directories:</p>
<pre class="console"><code>rclone rc vfs/forget file=path/to/file dir=path/to/dir</code></pre>
<h2 id="vfs-file-buffering-2">VFS File Buffering</h2>
<p>The <code>--buffer-size</code> flag determines the amount of memory,
that will be used to buffer data in advance.</p>
<p>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.</p>
<p>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 yet
read. If the buffer is empty, only a small amount of memory will be
used.</p>
<p>The maximum memory used by rclone for buffering can be up to
<code>--buffer-size * open files</code>.</p>
<h2 id="vfs-file-caching-2">VFS File Caching</h2>
<p>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 cost of some compatibility.</p>
<p>For example you'll need to enable VFS caching if you want to read and
write simultaneously to a file. See below for more details.</p>
<p>Note that the VFS cache is separate from the cache backend and you
may find that you need one or the other or both.</p>
<pre class="text"><code>    --cache-dir string                     Directory rclone will use for caching.
    --vfs-cache-mode CacheMode             Cache mode off|minimal|writes|full (default off)
    --vfs-cache-max-age duration           Max time since last access of objects in the cache (default 1h0m0s)
    --vfs-cache-max-size SizeSuffix        Max total size of objects in the cache (default off)
    --vfs-cache-min-free-space SizeSuffix  Target minimum free space on the disk containing the cache (default off)
    --vfs-cache-poll-interval duration     Interval to poll the cache for stale objects (default 1m0s)
    --vfs-write-back duration              Time to writeback files after last use when using cache (default 5s)</code></pre>
<p>If run with <code>-vv</code> rclone will print the location of the
file cache. The files are stored in the user cache file area which is OS
dependent but can be controlled with <code>--cache-dir</code> or setting
the appropriate environment variable.</p>
<p>The cache has 4 different modes selected by
<code>--vfs-cache-mode</code>. The higher the cache mode the more
compatible rclone becomes at the cost of using disk space.</p>
<p>Note that files are written back to the remote only when they are
closed and if they haven't been accessed for
<code>--vfs-write-back</code> seconds. If rclone is quit or dies with
files that haven't been uploaded, these will be uploaded next time
rclone is run with the same flags.</p>
<p>If using <code>--vfs-cache-max-size</code> or
<code>--vfs-cache-min-free-space</code> note that the cache may exceed
these quotas for two reasons. Firstly because it is only checked every
<code>--vfs-cache-poll-interval</code>. Secondly because open files
cannot be evicted from the cache. When <code>--vfs-cache-max-size</code>
or <code>--vfs-cache-min-free-space</code> is exceeded, rclone will
attempt to evict the least accessed files from the cache first. rclone
will start with files that haven't been accessed for the longest. This
cache flushing strategy is efficient and more relevant files are likely
to remain cached.</p>
<p>The <code>--vfs-cache-max-age</code> will evict files from the cache
after the set time since last access has passed; it is based on access
time, not on when the file was first added to the cache. The default
value of 1 hour will start evicting files from cache that haven't been
accessed for 1 hour. When a cached file is accessed the 1 hour timer is
reset to 0 and will wait for 1 more hour before evicting. Specify the
time with standard notation, s, m, h, d, w .</p>
<p>You <strong>should not</strong> run two copies of rclone using the
same VFS cache with the same or overlapping remotes if using
<code>--vfs-cache-mode &gt; off</code>. This can potentially cause data
corruption if you do. You can work around this by giving each rclone its
own cache hierarchy with <code>--cache-dir</code>. You don't need to
worry about this if the remotes in use don't overlap.</p>
<h3 id="vfs-cache-mode-off-2">--vfs-cache-mode off</h3>
<p>In this mode (the default) the cache will read directly from the
remote and write directly to the remote without caching anything on
disk.</p>
<p>This will mean some operations are not possible</p>
<ul>
<li>Files can't be opened for both read AND write</li>
<li>Files opened for write can't be seeked</li>
<li>Existing files opened for write must have O_TRUNC set</li>
<li>Files open for read with O_TRUNC will be opened write only</li>
<li>Files open for write only will behave as if O_TRUNC was
supplied</li>
<li>Open modes O_APPEND, O_TRUNC are ignored</li>
<li>If an upload fails it can't be retried</li>
</ul>
<h3 id="vfs-cache-mode-minimal-2">--vfs-cache-mode minimal</h3>
<p>This is very similar to "off" except that files opened for read AND
write will be buffered to disk. This means that files opened for write
will be a lot more compatible, but uses the minimal disk space.</p>
<p>These operations are not possible</p>
<ul>
<li>Files opened for write only can't be seeked</li>
<li>Existing files opened for write must have O_TRUNC set</li>
<li>Files opened for write only will ignore O_APPEND, O_TRUNC</li>
<li>If an upload fails it can't be retried</li>
</ul>
<h3 id="vfs-cache-mode-writes-2">--vfs-cache-mode writes</h3>
<p>In this mode files opened for read only are still read directly from
the remote, write only and read/write files are buffered to disk
first.</p>
<p>This mode should support all normal file system operations.</p>
<p>If an upload fails it will be retried at exponentially increasing
intervals up to 1 minute.</p>
<h3 id="vfs-cache-mode-full-2">--vfs-cache-mode full</h3>
<p>In this mode all reads and writes are buffered to and from disk. When
data is read from the remote this is buffered to disk as well.</p>
<p>In this mode the files in the cache will be sparse files and rclone
will keep track of which bits of the files it has downloaded.</p>
<p>So if an application only reads the starts of each file, then rclone
will only buffer the start of the file. These files will appear to be
their full size in the cache, but they will be sparse files with only
the data that has been downloaded present in them.</p>
<p>This mode should support all normal file system operations and is
otherwise identical to <code>--vfs-cache-mode</code> writes.</p>
<p>When reading a file rclone will read <code>--buffer-size</code> plus
<code>--vfs-read-ahead</code> bytes ahead. The
<code>--buffer-size</code> is buffered in memory whereas the
<code>--vfs-read-ahead</code> is buffered on disk.</p>
<p>When using this mode it is recommended that
<code>--buffer-size</code> is not set too large and
<code>--vfs-read-ahead</code> is set large if required.</p>
<p><strong>IMPORTANT</strong> not all file systems support sparse files.
In particular FAT/exFAT do not. Rclone will perform very badly if the
cache directory is on a filesystem which doesn't support sparse files
and it will log an ERROR message if one is detected.</p>
<h3 id="fingerprinting-2">Fingerprinting</h3>
<p>Various parts of the VFS use fingerprinting to see if a local file
copy has changed relative to a remote file. Fingerprints are made
from:</p>
<ul>
<li>size</li>
<li>modification time</li>
<li>hash</li>
</ul>
<p>where available on an object.</p>
<p>On some backends some of these attributes are slow to read (they take
an extra API call per object, or extra work per object).</p>
<p>For example <code>hash</code> is slow with the <code>local</code> and
<code>sftp</code> backends as they have to read the entire file and hash
it, and <code>modtime</code> is slow with the <code>s3</code>,
<code>swift</code>, <code>ftp</code> and <code>qinqstor</code> backends
because they need to do an extra API call to fetch it.</p>
<p>If you use the <code>--vfs-fast-fingerprint</code> flag then rclone
will not include the slow operations in the fingerprint. This makes the
fingerprinting less accurate but much faster and will improve the
opening time of cached files.</p>
<p>If you are running a vfs cache over <code>local</code>,
<code>s3</code> or <code>swift</code> backends then using this flag is
recommended.</p>
<p>Note that if you change the value of this flag, the fingerprints of
the files in the cache may be invalidated and the files will need to be
downloaded again.</p>
<h2 id="vfs-chunked-reading-2">VFS Chunked Reading</h2>
<p>When rclone reads files from a remote it reads them in chunks. This
means that rather than requesting the whole file rclone reads the chunk
specified. This can reduce the used download quota for some remotes by
requesting only chunks from the remote that are actually read, at the
cost of an increased number of requests.</p>
<p>These flags control the chunking:</p>
<pre class="text"><code>    --vfs-read-chunk-size SizeSuffix        Read the source objects in chunks (default 128M)
    --vfs-read-chunk-size-limit SizeSuffix  Max chunk doubling size (default off)
    --vfs-read-chunk-streams int            The number of parallel streams to read at once</code></pre>
<p>The chunking behaves differently depending on the
<code>--vfs-read-chunk-streams</code> parameter.</p>
<h3
id="vfs-read-chunk-streams-0-4"><code>--vfs-read-chunk-streams</code> ==
0</h3>
<p>Rclone will start reading a chunk of size
<code>--vfs-read-chunk-size</code>, and then double the size for each
read. When <code>--vfs-read-chunk-size-limit</code> is specified, and
greater than <code>--vfs-read-chunk-size</code>, the chunk size for each
open file will get doubled only until the specified value is reached. If
the value is "off", which is the default, the limit is disabled and the
chunk size will grow indefinitely.</p>
<p>With <code>--vfs-read-chunk-size 100M</code> and
<code>--vfs-read-chunk-size-limit 0</code> the following parts will be
downloaded: 0-100M, 100M-200M, 200M-300M, 300M-400M and so on. When
<code>--vfs-read-chunk-size-limit 500M</code> is specified, the result
would be 0-100M, 100M-300M, 300M-700M, 700M-1200M, 1200M-1700M and so
on.</p>
<p>Setting <code>--vfs-read-chunk-size</code> to <code>0</code> or "off"
disables chunked reading.</p>
<p>The chunks will not be buffered in memory.</p>
<h3
id="vfs-read-chunk-streams-0-5"><code>--vfs-read-chunk-streams</code>
&gt; 0</h3>
<p>Rclone reads <code>--vfs-read-chunk-streams</code> chunks of size
<code>--vfs-read-chunk-size</code> concurrently. The size for each read
will stay constant.</p>
<p>This improves performance massively on high latency links or very
high bandwidth links to high performance object stores.</p>
<p>Some experimentation will be needed to find the optimum values of
<code>--vfs-read-chunk-size</code> and
<code>--vfs-read-chunk-streams</code> as these will depend on the
backend in use and the latency to the backend.</p>
<p>For high performance object stores (eg AWS S3) a reasonable place to
start might be <code>--vfs-read-chunk-streams 16</code> and
<code>--vfs-read-chunk-size 4M</code>. In testing with AWS S3 the
performance scaled roughly as the <code>--vfs-read-chunk-streams</code>
setting.</p>
<p>Similar settings should work for high latency links, but depending on
the latency they may need more <code>--vfs-read-chunk-streams</code> in
order to get the throughput.</p>
<h2 id="vfs-performance-2">VFS Performance</h2>
<p>These flags may be used to enable/disable features of the VFS for
performance or other reasons. See also the <a
href="#vfs-chunked-reading">chunked reading</a> feature.</p>
<p>In particular S3 and Swift benefit hugely from the
<code>--no-modtime</code> flag (or use <code>--use-server-modtime</code>
for a slightly different effect) as each read of the modification time
takes a transaction.</p>
<pre class="text"><code>    --no-checksum     Don&#39;t compare checksums on up/download.
    --no-modtime      Don&#39;t read/write the modification time (can speed things up).
    --no-seek         Don&#39;t allow seeking in files.
    --read-only       Only allow read-only access.</code></pre>
<p>Sometimes rclone is delivered reads or writes out of order. Rather
than seeking rclone will wait a short time for the in sequence read or
write to come in. These flags only come into effect when not using an on
disk cache file.</p>
<pre class="text"><code>    --vfs-read-wait duration   Time to wait for in-sequence read before seeking (default 20ms)
    --vfs-write-wait duration  Time to wait for in-sequence write before giving error (default 1s)</code></pre>
<p>When using VFS write caching (<code>--vfs-cache-mode</code> with
value writes or full), the global flag <code>--transfers</code> can be
set to adjust the number of parallel uploads of modified files from the
cache (the related global flag <code>--checkers</code> has no effect on
the VFS).</p>
<pre class="text"><code>    --transfers int  Number of file transfers to run in parallel (default 4)</code></pre>
<h2 id="symlinks-2">Symlinks</h2>
<p>By default the VFS does not support symlinks. However this may be
enabled with either of the following flags:</p>
<pre class="text"><code>    --links      Translate symlinks to/from regular files with a &#39;.rclonelink&#39; extension.
    --vfs-links  Translate symlinks to/from regular files with a &#39;.rclonelink&#39; extension for the VFS</code></pre>
<p>As most cloud storage systems do not support symlinks directly,
rclone stores the symlink as a normal file with a special extension. So
a file which appears as a symlink <code>link-to-file.txt</code> would be
stored on cloud storage as <code>link-to-file.txt.rclonelink</code> and
the contents would be the path to the symlink destination.</p>
<p>Note that <code>--links</code> enables symlink translation globally
in rclone - this includes any backend which supports the concept (for
example the local backend). <code>--vfs-links</code> just enables it for
the VFS layer.</p>
<p>This scheme is compatible with that used by the <a
href="https://rclone.org/local/#symlinks-junction-points">local backend
with the --local-links flag</a>.</p>
<p>The <code>--vfs-links</code> flag has been designed for
<code>rclone mount</code>, <code>rclone nfsmount</code> and
<code>rclone serve nfs</code>.</p>
<p>It hasn't been tested with the other <code>rclone serve</code>
commands yet.</p>
<p>A limitation of the current implementation is that it expects the
caller to resolve sub-symlinks. For example given this directory
tree</p>
<pre class="text"><code>.
├── dir
│   └── file.txt
└── linked-dir -&gt; dir</code></pre>
<p>The VFS will correctly resolve <code>linked-dir</code> but not
<code>linked-dir/file.txt</code>. This is not a problem for the tested
commands but may be for other commands.</p>
<p><strong>Note</strong> that there is an outstanding issue with symlink
support <a href="https://github.com/rclone/rclone/issues/8245">issue
#8245</a> with duplicate files being created when symlinks are moved
into directories where there is a file of the same name (or vice
versa).</p>
<h2 id="vfs-case-sensitivity-2">VFS Case Sensitivity</h2>
<p>Linux file systems are case-sensitive: two files can differ only by
case, and the exact case must be used when opening a file.</p>
<p>File systems in modern Windows are case-insensitive but
case-preserving: although existing files can be opened using any case,
the exact case used to create the file is preserved and available for
programs to query. It is not allowed for two files in the same directory
to differ only by case.</p>
<p>Usually file systems on macOS are case-insensitive. It is possible to
make macOS file systems case-sensitive but that is not the default.</p>
<p>The <code>--vfs-case-insensitive</code> VFS flag controls how rclone
handles these two cases. If its value is "false", rclone passes file
names to the remote as-is. If the flag is "true" (or appears without a
value on the command line), rclone may perform a "fixup" as explained
below.</p>
<p>The user may specify a file name to open/delete/rename/etc with a
case different than what is stored on the remote. If an argument refers
to an existing file with exactly the same name, then the case of the
existing file on the disk will be used. However, if a file name with
exactly the same name is not found but a name differing only by case
exists, rclone will transparently fixup the name. This fixup happens
only when an existing file is requested. Case sensitivity of file names
created anew by rclone is controlled by the underlying remote.</p>
<p>Note that case sensitivity of the operating system running rclone
(the target) may differ from case sensitivity of a file system presented
by rclone (the source). The flag controls whether "fixup" is performed
to satisfy the target.</p>
<p>If the flag is not provided on the command line, then its default
value depends on the operating system where rclone runs: "true" on
Windows and macOS, "false" otherwise. If the flag is provided without a
value, then it is "true".</p>
<p>The <code>--no-unicode-normalization</code> flag controls whether a
similar "fixup" is performed for filenames that differ but are <a
href="https://en.wikipedia.org/wiki/Unicode_equivalence">canonically
equivalent</a> with respect to unicode. Unicode normalization can be
particularly helpful for users of macOS, which prefers form NFD instead
of the NFC used by most other platforms. It is therefore highly
recommended to keep the default of <code>false</code> on macOS, to avoid
encoding compatibility issues.</p>
<p>In the (probably unlikely) event that a directory has multiple
duplicate filenames after applying case and unicode normalization, the
<code>--vfs-block-norm-dupes</code> flag allows hiding these duplicates.
This comes with a performance tradeoff, as rclone will have to scan the
entire directory for duplicates when listing a directory. For this
reason, it is recommended to leave this disabled if not needed. However,
macOS users may wish to consider using it, as otherwise, if a remote
directory contains both NFC and NFD versions of the same filename, an
odd situation will occur: both versions of the file will be visible in
the mount, and both will appear to be editable, however, editing either
version will actually result in only the NFD version getting edited
under the hood. <code>--vfs-block- norm-dupes</code> prevents this
confusion by detecting this scenario, hiding the duplicates, and logging
an error, similar to how this is handled in
<code>rclone sync</code>.</p>
<h2 id="vfs-disk-options-2">VFS Disk Options</h2>
<p>This flag allows you to manually set the statistics about the filing
system. It can be useful when those statistics cannot be read correctly
automatically.</p>
<pre class="text"><code>    --vfs-disk-space-total-size    Manually set the total disk space size (example: 256G, default: -1)</code></pre>
<h2 id="alternate-report-of-used-bytes-2">Alternate report of used
bytes</h2>
<p>Some backends, most notably S3, do not report the amount of bytes
used. If you need this information to be available when running
<code>df</code> on the filesystem, then pass the flag
<code>--vfs-used-is-size</code> to rclone. With this flag set, instead
of relying on the backend to report this information, rclone will scan
the whole remote similar to <code>rclone size</code> and compute the
total used space itself.</p>
<p><strong>WARNING</strong>: Contrary to <code>rclone size</code>, this
flag ignores filters so that the result is accurate. However, this is
very inefficient and may cost lots of API calls resulting in extra
charges. Use it as a last resort and only with caching.</p>
<h2 id="vfs-metadata-2">VFS Metadata</h2>
<p>If you use the <code>--vfs-metadata-extension</code> flag you can get
the VFS to expose files which contain the <a
href="https://rclone.org/docs/#metadata">metadata</a> as a JSON blob.
These files will not appear in the directory listing, but can be
<code>stat</code>-ed and opened and once they have been they
<strong>will</strong> appear in directory listings until the directory
cache expires.</p>
<p>Note that some backends won't create metadata unless you pass in the
<code>--metadata</code> flag.</p>
<p>For example, using <code>rclone mount</code> with
<code>--metadata --vfs-metadata-extension .metadata</code> we get</p>
<pre class="console"><code>$ ls -l /mnt/
total 1048577
-rw-rw-r-- 1 user user 1073741824 Mar  3 16:03 1G

$ cat /mnt/1G.metadata
{
        &quot;atime&quot;: &quot;2025-03-04T17:34:22.317069787Z&quot;,
        &quot;btime&quot;: &quot;2025-03-03T16:03:37.708253808Z&quot;,
        &quot;gid&quot;: &quot;1000&quot;,
        &quot;mode&quot;: &quot;100664&quot;,
        &quot;mtime&quot;: &quot;2025-03-03T16:03:39.640238323Z&quot;,
        &quot;uid&quot;: &quot;1000&quot;
}

$ ls -l /mnt/
total 1048578
-rw-rw-r-- 1 user user 1073741824 Mar  3 16:03 1G
-rw-rw-r-- 1 user user        185 Mar  3 16:03 1G.metadata</code></pre>
<p>If the file has no metadata it will be returned as <code>{}</code>
and if there is an error reading the metadata the error will be returned
as <code>{"error":"error string"}</code>.</p>
<pre><code>rclone serve dlna remote:path [flags]</code></pre>
<h2 id="options-80">Options</h2>
<pre><code>      --addr string                            The ip:port or :port to bind the DLNA http server to (default &quot;:7879&quot;)
      --announce-interval Duration             The interval between SSDP announcements (default 12m0s)
      --dir-cache-time Duration                Time to cache directory entries for (default 5m0s)
      --dir-perms FileMode                     Directory permissions (default 777)
      --file-perms FileMode                    File permissions (default 666)
      --gid uint32                             Override the gid field set by the filesystem (not supported on Windows) (default 1000)
  -h, --help                                   help for dlna
      --interface stringArray                  The interface to use for SSDP (repeat as necessary)
      --link-perms FileMode                    Link permissions (default 666)
      --log-trace                              Enable trace logging of SOAP traffic
      --name string                            Name of DLNA server
      --no-checksum                            Don&#39;t compare checksums on up/download
      --no-modtime                             Don&#39;t read/write the modification time (can speed things up)
      --no-seek                                Don&#39;t allow seeking in files
      --poll-interval Duration                 Time to wait between polling for changes, must be smaller than dir-cache-time and only on supported remotes (set 0 to disable) (default 1m0s)
      --read-only                              Only allow read-only access
      --uid uint32                             Override the uid field set by the filesystem (not supported on Windows) (default 1000)
      --umask FileMode                         Override the permission bits set by the filesystem (not supported on Windows) (default 002)
      --vfs-block-norm-dupes                   If duplicate filenames exist in the same directory (after normalization), log an error and hide the duplicates (may have a performance cost)
      --vfs-cache-max-age Duration             Max time since last access of objects in the cache (default 1h0m0s)
      --vfs-cache-max-size SizeSuffix          Max total size of objects in the cache (default off)
      --vfs-cache-min-free-space SizeSuffix    Target minimum free space on the disk containing the cache (default off)
      --vfs-cache-mode CacheMode               Cache mode off|minimal|writes|full (default off)
      --vfs-cache-poll-interval Duration       Interval to poll the cache for stale objects (default 1m0s)
      --vfs-case-insensitive                   If a file name not found, find a case insensitive match
      --vfs-disk-space-total-size SizeSuffix   Specify the total space of disk (default off)
      --vfs-fast-fingerprint                   Use fast (less accurate) fingerprints for change detection
      --vfs-handle-caching Duration            Time to keep file handle and downloaders alive after last close (default 5s)
      --vfs-links                              Translate symlinks to/from regular files with a &#39;.rclonelink&#39; extension for the VFS
      --vfs-metadata-extension string          Set the extension to read metadata from
      --vfs-read-ahead SizeSuffix              Extra read ahead over --buffer-size when using cache-mode full
      --vfs-read-chunk-size SizeSuffix         Read the source objects in chunks (default 128Mi)
      --vfs-read-chunk-size-limit SizeSuffix   If greater than --vfs-read-chunk-size, double the chunk size after each chunk read, until the limit is reached (&#39;off&#39; is unlimited) (default off)
      --vfs-read-chunk-streams int             The number of parallel streams to read at once
      --vfs-read-wait Duration                 Time to wait for in-sequence read before seeking (default 20ms)
      --vfs-refresh                            Refreshes the directory cache recursively in the background on start
      --vfs-used-is-size rclone size           Use the rclone size algorithm for Used size
      --vfs-write-back Duration                Time to writeback files after last use when using cache (default 5s)
      --vfs-write-wait Duration                Time to wait for in-sequence write before giving error (default 1s)</code></pre>
<p>Options shared with other commands are described next. See the <a
href="https://rclone.org/flags/">global flags page</a> for global
options not listed here.</p>
<h3 id="filter-options-25">Filter Options</h3>
<p>Flags for filtering directory listings</p>
<pre class="text"><code>      --delete-excluded                     Delete files on dest excluded from sync
      --exclude stringArray                 Exclude files matching pattern
      --exclude-from stringArray            Read file exclude patterns from file (use - to read from stdin)
      --exclude-if-present stringArray      Exclude directories if filename is present
      --files-from stringArray              Read list of source-file names from file (use - to read from stdin)
      --files-from-raw stringArray          Read list of source-file names from file without any processing of lines (use - to read from stdin)
      --files-from0 stringArray             Read list of source-file names from file using NUL as separator (use - to read from stdin)
  -f, --filter stringArray                  Add a file filtering rule
      --filter-from stringArray             Read file filtering patterns from a file (use - to read from stdin)
      --hash-filter string                  Partition filenames by hash k/n or randomly @/n
      --ignore-case                         Ignore case in filters (case insensitive)
      --include stringArray                 Include files matching pattern
      --include-from stringArray            Read file include patterns from file (use - to read from stdin)
      --max-age Duration                    Only transfer files younger than this in s or suffix ms|s|m|h|d|w|M|y (default off)
      --max-depth int                       If set limits the recursion depth to this (default -1)
      --max-size SizeSuffix                 Only transfer files smaller than this in KiB or suffix B|K|M|G|T|P (default off)
      --metadata-exclude stringArray        Exclude metadatas matching pattern
      --metadata-exclude-from stringArray   Read metadata exclude patterns from file (use - to read from stdin)
      --metadata-filter stringArray         Add a metadata filtering rule
      --metadata-filter-from stringArray    Read metadata filtering patterns from a file (use - to read from stdin)
      --metadata-include stringArray        Include metadatas matching pattern
      --metadata-include-from stringArray   Read metadata include patterns from file (use - to read from stdin)
      --min-age Duration                    Only transfer files older than this in s or suffix ms|s|m|h|d|w|M|y (default off)
      --min-size SizeSuffix                 Only transfer files bigger than this in KiB or suffix B|K|M|G|T|P (default off)</code></pre>
<h2 id="see-also-80">See Also</h2>
<!-- markdownlint-capture -->
<!-- markdownlint-disable ul-style line-length -->
<ul>
<li><a href="https://rclone.org/commands/rclone_serve/">rclone serve</a>
- Serve a remote over a protocol.</li>
</ul>
<!-- markdownlint-restore -->
<h1 id="rclone-serve-docker">rclone serve docker</h1>
<p>Serve any remote on docker's volume plugin API.</p>
<h2 id="synopsis-74">Synopsis</h2>
<p>This command implements the Docker volume plugin API allowing docker
to use rclone as a data storage mechanism for various cloud providers.
rclone provides <a href="/docker">docker volume plugin</a> based on
it.</p>
<p>To create a docker plugin, one must create a Unix or TCP socket that
Docker will look for when you use the plugin and then it listens for
commands from docker daemon and runs the corresponding code when
necessary. Docker plugins can run as a managed plugin under control of
the docker daemon or as an independent native service. For testing, you
can just run it directly from the command line, for example:</p>
<pre class="console"><code>sudo rclone serve docker --base-dir /tmp/rclone-volumes --socket-addr localhost:8787 -vv</code></pre>
<p>Running <code>rclone serve docker</code> will create the said socket,
listening for commands from Docker to create the necessary Volumes.
Normally you need not give the <code>--socket-addr</code> flag. The API
will listen on the unix domain socket at
<code>/run/docker/plugins/rclone.sock</code>. In the example above
rclone will create a TCP socket and a small file
<code>/etc/docker/plugins/rclone.spec</code> containing the socket
address. We use <code>sudo</code> because both paths are writeable only
by the root user.</p>
<p>If you later decide to change listening socket, the docker daemon
must be restarted to reconnect to
<code>/run/docker/plugins/rclone.sock</code> or parse new
<code>/etc/docker/plugins/rclone.spec</code>. Until you restart, any
volume related docker commands will timeout trying to access the old
socket. Running directly is supported on <strong>Linux only</strong>,
not on Windows or MacOS. This is not a problem with managed plugin mode
described in details in the <a href="https://rclone.org/docker">full
documentation</a>.</p>
<p>The command will create volume mounts under the path given by
<code>--base-dir</code> (by default
<code>/var/lib/docker-volumes/rclone</code> available only to root) and
maintain the JSON formatted file <code>docker-plugin.state</code> in the
rclone cache directory with book-keeping records of created and mounted
volumes.</p>
<p>All mount and VFS options are submitted by the docker daemon via API,
but you can also provide defaults on the command line as well as set
path to the config file and cache directory or adjust logging
verbosity.</p>
<h1 id="restarting-or-upgrading-the-plugin">Restarting or upgrading the
plugin</h1>
<p>When the plugin is restarted (for example with
<code>docker plugin disable rclone &amp;&amp; docker plugin enable rclone</code>,
when upgrading the plugin, or when the host reboots) rclone reads its
<code>docker-plugin.state</code> file and restores the volumes and
mounts that were active before. The plugin starts serving its socket
straight away and re-establishes the mounts in the background, so a slow
or unreachable remote no longer prevents the plugin from coming back
up.</p>
<p>However, restarting the plugin necessarily stops and restarts the
process that serves the FUSE mounts. Any container that is
<strong>already running</strong> and holding files open on an rclone
volume keeps a handle to the old, now dead mount, so those handles start
returning <code>transport endpoint is not connected</code> until the
container is restarted. This is a limitation of replacing the process
behind a live FUSE mount and cannot be avoided by rclone - the plugin
itself recovers and newly started containers work normally, but:</p>
<ul>
<li><strong>Restart any containers that were using rclone
volumes</strong> after you restart or upgrade the plugin (e.g.
<code>docker restart &lt;container&gt;</code>), or stop them before and
start them after.</li>
<li>Databases and other applications that keep files open continuously
(Grafana, Prometheus, SQLite-backed apps, etc.) are the most affected
and should always be restarted.</li>
</ul>
<h1 id="security">Security</h1>
<p>The plugin API accepts a <code>remote</code> (aka <code>fs</code>)
option on volume creation, and this is parsed exactly like an rclone
connection string. Connection strings are trusted configuration: they
may carry inline backend options, and some backends use those options to
run local commands (for example the <code>sftp</code> backend's
<code>ssh</code> option spawns an external binary). Anyone who can send
requests to the plugin socket can therefore make rclone run arbitrary
commands as the user running <code>rclone serve docker</code> (typically
root). Treat access to the socket as equivalent to that level of access
and only expose it to trusted callers.</p>
<p>When listening on the default unix socket at
<code>/run/docker/plugins/rclone.sock</code> rclone creates it with mode
<code>0660</code> owned by <code>root</code> and the group given by
<code>--socket-gid</code> (the process GID by default), so only root and
members of that group - normally just the docker daemon - can reach it.
Do not loosen these permissions or hand the group to untrusted
users.</p>
<p>When using <code>--socket-addr</code> to listen on a TCP socket there
is no authentication and the API is reachable by anyone who can open the
port, so bind it to a loopback or otherwise trusted address and protect
it with a firewall. Note that holding Docker daemon access is already
equivalent to root on the host, so a caller able to issue
<code>docker volume create</code> does not gain anything new from this;
the concern is exposing the socket more widely than the daemon
itself.</p>
<h2 id="vfs---virtual-file-system-3">VFS - Virtual File System</h2>
<p>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.</p>
<p>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.</p>
<p>The VFS layer also implements a directory cache - this caches info
about files and directories (but not the data) in memory.</p>
<h2 id="vfs-directory-cache-3">VFS Directory Cache</h2>
<p>Using the <code>--dir-cache-time</code> 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.</p>
<pre class="text"><code>    --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)</code></pre>
<p>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.</p>
<p>You can send a <code>SIGHUP</code> 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:</p>
<pre class="console"><code>kill -SIGHUP $(pidof rclone)</code></pre>
<p>If you configure rclone with a <a href="/rc">remote control</a> then
you can use rclone rc to flush the whole directory cache:</p>
<pre class="console"><code>rclone rc vfs/forget</code></pre>
<p>Or individual files or directories:</p>
<pre class="console"><code>rclone rc vfs/forget file=path/to/file dir=path/to/dir</code></pre>
<h2 id="vfs-file-buffering-3">VFS File Buffering</h2>
<p>The <code>--buffer-size</code> flag determines the amount of memory,
that will be used to buffer data in advance.</p>
<p>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.</p>
<p>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 yet
read. If the buffer is empty, only a small amount of memory will be
used.</p>
<p>The maximum memory used by rclone for buffering can be up to
<code>--buffer-size * open files</code>.</p>
<h2 id="vfs-file-caching-3">VFS File Caching</h2>
<p>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 cost of some compatibility.</p>
<p>For example you'll need to enable VFS caching if you want to read and
write simultaneously to a file. See below for more details.</p>
<p>Note that the VFS cache is separate from the cache backend and you
may find that you need one or the other or both.</p>
<pre class="text"><code>    --cache-dir string                     Directory rclone will use for caching.
    --vfs-cache-mode CacheMode             Cache mode off|minimal|writes|full (default off)
    --vfs-cache-max-age duration           Max time since last access of objects in the cache (default 1h0m0s)
    --vfs-cache-max-size SizeSuffix        Max total size of objects in the cache (default off)
    --vfs-cache-min-free-space SizeSuffix  Target minimum free space on the disk containing the cache (default off)
    --vfs-cache-poll-interval duration     Interval to poll the cache for stale objects (default 1m0s)
    --vfs-write-back duration              Time to writeback files after last use when using cache (default 5s)</code></pre>
<p>If run with <code>-vv</code> rclone will print the location of the
file cache. The files are stored in the user cache file area which is OS
dependent but can be controlled with <code>--cache-dir</code> or setting
the appropriate environment variable.</p>
<p>The cache has 4 different modes selected by
<code>--vfs-cache-mode</code>. The higher the cache mode the more
compatible rclone becomes at the cost of using disk space.</p>
<p>Note that files are written back to the remote only when they are
closed and if they haven't been accessed for
<code>--vfs-write-back</code> seconds. If rclone is quit or dies with
files that haven't been uploaded, these will be uploaded next time
rclone is run with the same flags.</p>
<p>If using <code>--vfs-cache-max-size</code> or
<code>--vfs-cache-min-free-space</code> note that the cache may exceed
these quotas for two reasons. Firstly because it is only checked every
<code>--vfs-cache-poll-interval</code>. Secondly because open files
cannot be evicted from the cache. When <code>--vfs-cache-max-size</code>
or <code>--vfs-cache-min-free-space</code> is exceeded, rclone will
attempt to evict the least accessed files from the cache first. rclone
will start with files that haven't been accessed for the longest. This
cache flushing strategy is efficient and more relevant files are likely
to remain cached.</p>
<p>The <code>--vfs-cache-max-age</code> will evict files from the cache
after the set time since last access has passed; it is based on access
time, not on when the file was first added to the cache. The default
value of 1 hour will start evicting files from cache that haven't been
accessed for 1 hour. When a cached file is accessed the 1 hour timer is
reset to 0 and will wait for 1 more hour before evicting. Specify the
time with standard notation, s, m, h, d, w .</p>
<p>You <strong>should not</strong> run two copies of rclone using the
same VFS cache with the same or overlapping remotes if using
<code>--vfs-cache-mode &gt; off</code>. This can potentially cause data
corruption if you do. You can work around this by giving each rclone its
own cache hierarchy with <code>--cache-dir</code>. You don't need to
worry about this if the remotes in use don't overlap.</p>
<h3 id="vfs-cache-mode-off-3">--vfs-cache-mode off</h3>
<p>In this mode (the default) the cache will read directly from the
remote and write directly to the remote without caching anything on
disk.</p>
<p>This will mean some operations are not possible</p>
<ul>
<li>Files can't be opened for both read AND write</li>
<li>Files opened for write can't be seeked</li>
<li>Existing files opened for write must have O_TRUNC set</li>
<li>Files open for read with O_TRUNC will be opened write only</li>
<li>Files open for write only will behave as if O_TRUNC was
supplied</li>
<li>Open modes O_APPEND, O_TRUNC are ignored</li>
<li>If an upload fails it can't be retried</li>
</ul>
<h3 id="vfs-cache-mode-minimal-3">--vfs-cache-mode minimal</h3>
<p>This is very similar to "off" except that files opened for read AND
write will be buffered to disk. This means that files opened for write
will be a lot more compatible, but uses the minimal disk space.</p>
<p>These operations are not possible</p>
<ul>
<li>Files opened for write only can't be seeked</li>
<li>Existing files opened for write must have O_TRUNC set</li>
<li>Files opened for write only will ignore O_APPEND, O_TRUNC</li>
<li>If an upload fails it can't be retried</li>
</ul>
<h3 id="vfs-cache-mode-writes-3">--vfs-cache-mode writes</h3>
<p>In this mode files opened for read only are still read directly from
the remote, write only and read/write files are buffered to disk
first.</p>
<p>This mode should support all normal file system operations.</p>
<p>If an upload fails it will be retried at exponentially increasing
intervals up to 1 minute.</p>
<h3 id="vfs-cache-mode-full-3">--vfs-cache-mode full</h3>
<p>In this mode all reads and writes are buffered to and from disk. When
data is read from the remote this is buffered to disk as well.</p>
<p>In this mode the files in the cache will be sparse files and rclone
will keep track of which bits of the files it has downloaded.</p>
<p>So if an application only reads the starts of each file, then rclone
will only buffer the start of the file. These files will appear to be
their full size in the cache, but they will be sparse files with only
the data that has been downloaded present in them.</p>
<p>This mode should support all normal file system operations and is
otherwise identical to <code>--vfs-cache-mode</code> writes.</p>
<p>When reading a file rclone will read <code>--buffer-size</code> plus
<code>--vfs-read-ahead</code> bytes ahead. The
<code>--buffer-size</code> is buffered in memory whereas the
<code>--vfs-read-ahead</code> is buffered on disk.</p>
<p>When using this mode it is recommended that
<code>--buffer-size</code> is not set too large and
<code>--vfs-read-ahead</code> is set large if required.</p>
<p><strong>IMPORTANT</strong> not all file systems support sparse files.
In particular FAT/exFAT do not. Rclone will perform very badly if the
cache directory is on a filesystem which doesn't support sparse files
and it will log an ERROR message if one is detected.</p>
<h3 id="fingerprinting-3">Fingerprinting</h3>
<p>Various parts of the VFS use fingerprinting to see if a local file
copy has changed relative to a remote file. Fingerprints are made
from:</p>
<ul>
<li>size</li>
<li>modification time</li>
<li>hash</li>
</ul>
<p>where available on an object.</p>
<p>On some backends some of these attributes are slow to read (they take
an extra API call per object, or extra work per object).</p>
<p>For example <code>hash</code> is slow with the <code>local</code> and
<code>sftp</code> backends as they have to read the entire file and hash
it, and <code>modtime</code> is slow with the <code>s3</code>,
<code>swift</code>, <code>ftp</code> and <code>qinqstor</code> backends
because they need to do an extra API call to fetch it.</p>
<p>If you use the <code>--vfs-fast-fingerprint</code> flag then rclone
will not include the slow operations in the fingerprint. This makes the
fingerprinting less accurate but much faster and will improve the
opening time of cached files.</p>
<p>If you are running a vfs cache over <code>local</code>,
<code>s3</code> or <code>swift</code> backends then using this flag is
recommended.</p>
<p>Note that if you change the value of this flag, the fingerprints of
the files in the cache may be invalidated and the files will need to be
downloaded again.</p>
<h2 id="vfs-chunked-reading-3">VFS Chunked Reading</h2>
<p>When rclone reads files from a remote it reads them in chunks. This
means that rather than requesting the whole file rclone reads the chunk
specified. This can reduce the used download quota for some remotes by
requesting only chunks from the remote that are actually read, at the
cost of an increased number of requests.</p>
<p>These flags control the chunking:</p>
<pre class="text"><code>    --vfs-read-chunk-size SizeSuffix        Read the source objects in chunks (default 128M)
    --vfs-read-chunk-size-limit SizeSuffix  Max chunk doubling size (default off)
    --vfs-read-chunk-streams int            The number of parallel streams to read at once</code></pre>
<p>The chunking behaves differently depending on the
<code>--vfs-read-chunk-streams</code> parameter.</p>
<h3
id="vfs-read-chunk-streams-0-6"><code>--vfs-read-chunk-streams</code> ==
0</h3>
<p>Rclone will start reading a chunk of size
<code>--vfs-read-chunk-size</code>, and then double the size for each
read. When <code>--vfs-read-chunk-size-limit</code> is specified, and
greater than <code>--vfs-read-chunk-size</code>, the chunk size for each
open file will get doubled only until the specified value is reached. If
the value is "off", which is the default, the limit is disabled and the
chunk size will grow indefinitely.</p>
<p>With <code>--vfs-read-chunk-size 100M</code> and
<code>--vfs-read-chunk-size-limit 0</code> the following parts will be
downloaded: 0-100M, 100M-200M, 200M-300M, 300M-400M and so on. When
<code>--vfs-read-chunk-size-limit 500M</code> is specified, the result
would be 0-100M, 100M-300M, 300M-700M, 700M-1200M, 1200M-1700M and so
on.</p>
<p>Setting <code>--vfs-read-chunk-size</code> to <code>0</code> or "off"
disables chunked reading.</p>
<p>The chunks will not be buffered in memory.</p>
<h3
id="vfs-read-chunk-streams-0-7"><code>--vfs-read-chunk-streams</code>
&gt; 0</h3>
<p>Rclone reads <code>--vfs-read-chunk-streams</code> chunks of size
<code>--vfs-read-chunk-size</code> concurrently. The size for each read
will stay constant.</p>
<p>This improves performance massively on high latency links or very
high bandwidth links to high performance object stores.</p>
<p>Some experimentation will be needed to find the optimum values of
<code>--vfs-read-chunk-size</code> and
<code>--vfs-read-chunk-streams</code> as these will depend on the
backend in use and the latency to the backend.</p>
<p>For high performance object stores (eg AWS S3) a reasonable place to
start might be <code>--vfs-read-chunk-streams 16</code> and
<code>--vfs-read-chunk-size 4M</code>. In testing with AWS S3 the
performance scaled roughly as the <code>--vfs-read-chunk-streams</code>
setting.</p>
<p>Similar settings should work for high latency links, but depending on
the latency they may need more <code>--vfs-read-chunk-streams</code> in
order to get the throughput.</p>
<h2 id="vfs-performance-3">VFS Performance</h2>
<p>These flags may be used to enable/disable features of the VFS for
performance or other reasons. See also the <a
href="#vfs-chunked-reading">chunked reading</a> feature.</p>
<p>In particular S3 and Swift benefit hugely from the
<code>--no-modtime</code> flag (or use <code>--use-server-modtime</code>
for a slightly different effect) as each read of the modification time
takes a transaction.</p>
<pre class="text"><code>    --no-checksum     Don&#39;t compare checksums on up/download.
    --no-modtime      Don&#39;t read/write the modification time (can speed things up).
    --no-seek         Don&#39;t allow seeking in files.
    --read-only       Only allow read-only access.</code></pre>
<p>Sometimes rclone is delivered reads or writes out of order. Rather
than seeking rclone will wait a short time for the in sequence read or
write to come in. These flags only come into effect when not using an on
disk cache file.</p>
<pre class="text"><code>    --vfs-read-wait duration   Time to wait for in-sequence read before seeking (default 20ms)
    --vfs-write-wait duration  Time to wait for in-sequence write before giving error (default 1s)</code></pre>
<p>When using VFS write caching (<code>--vfs-cache-mode</code> with
value writes or full), the global flag <code>--transfers</code> can be
set to adjust the number of parallel uploads of modified files from the
cache (the related global flag <code>--checkers</code> has no effect on
the VFS).</p>
<pre class="text"><code>    --transfers int  Number of file transfers to run in parallel (default 4)</code></pre>
<h2 id="symlinks-3">Symlinks</h2>
<p>By default the VFS does not support symlinks. However this may be
enabled with either of the following flags:</p>
<pre class="text"><code>    --links      Translate symlinks to/from regular files with a &#39;.rclonelink&#39; extension.
    --vfs-links  Translate symlinks to/from regular files with a &#39;.rclonelink&#39; extension for the VFS</code></pre>
<p>As most cloud storage systems do not support symlinks directly,
rclone stores the symlink as a normal file with a special extension. So
a file which appears as a symlink <code>link-to-file.txt</code> would be
stored on cloud storage as <code>link-to-file.txt.rclonelink</code> and
the contents would be the path to the symlink destination.</p>
<p>Note that <code>--links</code> enables symlink translation globally
in rclone - this includes any backend which supports the concept (for
example the local backend). <code>--vfs-links</code> just enables it for
the VFS layer.</p>
<p>This scheme is compatible with that used by the <a
href="https://rclone.org/local/#symlinks-junction-points">local backend
with the --local-links flag</a>.</p>
<p>The <code>--vfs-links</code> flag has been designed for
<code>rclone mount</code>, <code>rclone nfsmount</code> and
<code>rclone serve nfs</code>.</p>
<p>It hasn't been tested with the other <code>rclone serve</code>
commands yet.</p>
<p>A limitation of the current implementation is that it expects the
caller to resolve sub-symlinks. For example given this directory
tree</p>
<pre class="text"><code>.
├── dir
│   └── file.txt
└── linked-dir -&gt; dir</code></pre>
<p>The VFS will correctly resolve <code>linked-dir</code> but not
<code>linked-dir/file.txt</code>. This is not a problem for the tested
commands but may be for other commands.</p>
<p><strong>Note</strong> that there is an outstanding issue with symlink
support <a href="https://github.com/rclone/rclone/issues/8245">issue
#8245</a> with duplicate files being created when symlinks are moved
into directories where there is a file of the same name (or vice
versa).</p>
<h2 id="vfs-case-sensitivity-3">VFS Case Sensitivity</h2>
<p>Linux file systems are case-sensitive: two files can differ only by
case, and the exact case must be used when opening a file.</p>
<p>File systems in modern Windows are case-insensitive but
case-preserving: although existing files can be opened using any case,
the exact case used to create the file is preserved and available for
programs to query. It is not allowed for two files in the same directory
to differ only by case.</p>
<p>Usually file systems on macOS are case-insensitive. It is possible to
make macOS file systems case-sensitive but that is not the default.</p>
<p>The <code>--vfs-case-insensitive</code> VFS flag controls how rclone
handles these two cases. If its value is "false", rclone passes file
names to the remote as-is. If the flag is "true" (or appears without a
value on the command line), rclone may perform a "fixup" as explained
below.</p>
<p>The user may specify a file name to open/delete/rename/etc with a
case different than what is stored on the remote. If an argument refers
to an existing file with exactly the same name, then the case of the
existing file on the disk will be used. However, if a file name with
exactly the same name is not found but a name differing only by case
exists, rclone will transparently fixup the name. This fixup happens
only when an existing file is requested. Case sensitivity of file names
created anew by rclone is controlled by the underlying remote.</p>
<p>Note that case sensitivity of the operating system running rclone
(the target) may differ from case sensitivity of a file system presented
by rclone (the source). The flag controls whether "fixup" is performed
to satisfy the target.</p>
<p>If the flag is not provided on the command line, then its default
value depends on the operating system where rclone runs: "true" on
Windows and macOS, "false" otherwise. If the flag is provided without a
value, then it is "true".</p>
<p>The <code>--no-unicode-normalization</code> flag controls whether a
similar "fixup" is performed for filenames that differ but are <a
href="https://en.wikipedia.org/wiki/Unicode_equivalence">canonically
equivalent</a> with respect to unicode. Unicode normalization can be
particularly helpful for users of macOS, which prefers form NFD instead
of the NFC used by most other platforms. It is therefore highly
recommended to keep the default of <code>false</code> on macOS, to avoid
encoding compatibility issues.</p>
<p>In the (probably unlikely) event that a directory has multiple
duplicate filenames after applying case and unicode normalization, the
<code>--vfs-block-norm-dupes</code> flag allows hiding these duplicates.
This comes with a performance tradeoff, as rclone will have to scan the
entire directory for duplicates when listing a directory. For this
reason, it is recommended to leave this disabled if not needed. However,
macOS users may wish to consider using it, as otherwise, if a remote
directory contains both NFC and NFD versions of the same filename, an
odd situation will occur: both versions of the file will be visible in
the mount, and both will appear to be editable, however, editing either
version will actually result in only the NFD version getting edited
under the hood. <code>--vfs-block- norm-dupes</code> prevents this
confusion by detecting this scenario, hiding the duplicates, and logging
an error, similar to how this is handled in
<code>rclone sync</code>.</p>
<h2 id="vfs-disk-options-3">VFS Disk Options</h2>
<p>This flag allows you to manually set the statistics about the filing
system. It can be useful when those statistics cannot be read correctly
automatically.</p>
<pre class="text"><code>    --vfs-disk-space-total-size    Manually set the total disk space size (example: 256G, default: -1)</code></pre>
<h2 id="alternate-report-of-used-bytes-3">Alternate report of used
bytes</h2>
<p>Some backends, most notably S3, do not report the amount of bytes
used. If you need this information to be available when running
<code>df</code> on the filesystem, then pass the flag
<code>--vfs-used-is-size</code> to rclone. With this flag set, instead
of relying on the backend to report this information, rclone will scan
the whole remote similar to <code>rclone size</code> and compute the
total used space itself.</p>
<p><strong>WARNING</strong>: Contrary to <code>rclone size</code>, this
flag ignores filters so that the result is accurate. However, this is
very inefficient and may cost lots of API calls resulting in extra
charges. Use it as a last resort and only with caching.</p>
<h2 id="vfs-metadata-3">VFS Metadata</h2>
<p>If you use the <code>--vfs-metadata-extension</code> flag you can get
the VFS to expose files which contain the <a
href="https://rclone.org/docs/#metadata">metadata</a> as a JSON blob.
These files will not appear in the directory listing, but can be
<code>stat</code>-ed and opened and once they have been they
<strong>will</strong> appear in directory listings until the directory
cache expires.</p>
<p>Note that some backends won't create metadata unless you pass in the
<code>--metadata</code> flag.</p>
<p>For example, using <code>rclone mount</code> with
<code>--metadata --vfs-metadata-extension .metadata</code> we get</p>
<pre class="console"><code>$ ls -l /mnt/
total 1048577
-rw-rw-r-- 1 user user 1073741824 Mar  3 16:03 1G

$ cat /mnt/1G.metadata
{
        &quot;atime&quot;: &quot;2025-03-04T17:34:22.317069787Z&quot;,
        &quot;btime&quot;: &quot;2025-03-03T16:03:37.708253808Z&quot;,
        &quot;gid&quot;: &quot;1000&quot;,
        &quot;mode&quot;: &quot;100664&quot;,
        &quot;mtime&quot;: &quot;2025-03-03T16:03:39.640238323Z&quot;,
        &quot;uid&quot;: &quot;1000&quot;
}

$ ls -l /mnt/
total 1048578
-rw-rw-r-- 1 user user 1073741824 Mar  3 16:03 1G
-rw-rw-r-- 1 user user        185 Mar  3 16:03 1G.metadata</code></pre>
<p>If the file has no metadata it will be returned as <code>{}</code>
and if there is an error reading the metadata the error will be returned
as <code>{"error":"error string"}</code>.</p>
<pre><code>rclone serve docker [flags]</code></pre>
<h2 id="options-81">Options</h2>
<pre><code>      --allow-idmap                            Allow id-mapped mounts (Linux 6.12+, mount2 only)
      --allow-non-empty                        Allow mounting over a non-empty directory (not supported on Windows)
      --allow-other                            Allow access to other users (not supported on Windows)
      --allow-root                             Allow access to root user (not supported on Windows)
      --async-read                             Use asynchronous reads (not supported on Windows) (default true)
      --attr-timeout Duration                  Time for which file/directory attributes are cached (default 1s)
      --base-dir string                        Base directory for volumes (default &quot;/var/lib/docker-volumes/rclone&quot;)
      --daemon                                 Run mount in background and exit parent process (as background output is suppressed, use --log-file with --log-format=pid,... to monitor) (not supported on Windows)
      --daemon-timeout Duration                Time limit for rclone to respond to kernel (not supported on Windows) (default 0s)
      --daemon-wait Duration                   Time to wait for ready mount from daemon (maximum time on Linux, constant sleep time on OSX/BSD) (not supported on Windows) (default 1m0s)
      --debug-fuse                             Debug the FUSE internals - needs -v
      --default-permissions                    Makes kernel enforce access control based on the file mode (not supported on Windows)
      --devname string                         Set the device name - default is remote:path
      --dir-cache-time Duration                Time to cache directory entries for (default 5m0s)
      --dir-perms FileMode                     Directory permissions (default 777)
      --direct-io                              Use Direct IO, disables caching of data
      --file-perms FileMode                    File permissions (default 666)
      --forget-state                           Skip restoring previous state
      --fuse-flag stringArray                  Flags or arguments to be passed direct to libfuse/WinFsp (repeat if required)
      --gid uint32                             Override the gid field set by the filesystem (not supported on Windows) (default 1000)
  -h, --help                                   help for docker
      --link-perms FileMode                    Link permissions (default 666)
      --max-read-ahead SizeSuffix              The number of bytes that can be prefetched for sequential reads (not supported on Windows) (default 128Ki)
      --mount-case-insensitive Tristate        Tell the OS the mount is case insensitive (true) or sensitive (false) regardless of the backend (auto) (default unset)
      --network-mode                           Mount as remote network drive, instead of fixed disk drive (supported on Windows only)
      --no-checksum                            Don&#39;t compare checksums on up/download
      --no-modtime                             Don&#39;t read/write the modification time (can speed things up)
      --no-seek                                Don&#39;t allow seeking in files
      --no-spec                                Do not write spec file
      --noappledouble                          Ignore Apple Double (._) and .DS_Store files (supported on OSX only) (default true)
      --noapplexattr                           Ignore all &quot;com.apple.*&quot; extended attributes (supported on OSX only)
  -o, --option stringArray                     Option for libfuse/WinFsp (repeat if required)
      --poll-interval Duration                 Time to wait between polling for changes, must be smaller than dir-cache-time and only on supported remotes (set 0 to disable) (default 1m0s)
      --read-only                              Only allow read-only access
      --socket-addr string                     Address &lt;host:port&gt; or absolute path (default: /run/docker/plugins/rclone.sock)
      --socket-gid int                         GID for unix socket (default: current process GID) (default 1000)
      --uid uint32                             Override the uid field set by the filesystem (not supported on Windows) (default 1000)
      --umask FileMode                         Override the permission bits set by the filesystem (not supported on Windows) (default 002)
      --vfs-block-norm-dupes                   If duplicate filenames exist in the same directory (after normalization), log an error and hide the duplicates (may have a performance cost)
      --vfs-cache-max-age Duration             Max time since last access of objects in the cache (default 1h0m0s)
      --vfs-cache-max-size SizeSuffix          Max total size of objects in the cache (default off)
      --vfs-cache-min-free-space SizeSuffix    Target minimum free space on the disk containing the cache (default off)
      --vfs-cache-mode CacheMode               Cache mode off|minimal|writes|full (default off)
      --vfs-cache-poll-interval Duration       Interval to poll the cache for stale objects (default 1m0s)
      --vfs-case-insensitive                   If a file name not found, find a case insensitive match
      --vfs-disk-space-total-size SizeSuffix   Specify the total space of disk (default off)
      --vfs-fast-fingerprint                   Use fast (less accurate) fingerprints for change detection
      --vfs-handle-caching Duration            Time to keep file handle and downloaders alive after last close (default 5s)
      --vfs-links                              Translate symlinks to/from regular files with a &#39;.rclonelink&#39; extension for the VFS
      --vfs-metadata-extension string          Set the extension to read metadata from
      --vfs-read-ahead SizeSuffix              Extra read ahead over --buffer-size when using cache-mode full
      --vfs-read-chunk-size SizeSuffix         Read the source objects in chunks (default 128Mi)
      --vfs-read-chunk-size-limit SizeSuffix   If greater than --vfs-read-chunk-size, double the chunk size after each chunk read, until the limit is reached (&#39;off&#39; is unlimited) (default off)
      --vfs-read-chunk-streams int             The number of parallel streams to read at once
      --vfs-read-wait Duration                 Time to wait for in-sequence read before seeking (default 20ms)
      --vfs-refresh                            Refreshes the directory cache recursively in the background on start
      --vfs-used-is-size rclone size           Use the rclone size algorithm for Used size
      --vfs-write-back Duration                Time to writeback files after last use when using cache (default 5s)
      --vfs-write-wait Duration                Time to wait for in-sequence write before giving error (default 1s)
      --volname string                         Set the volume name (supported on Windows and OSX only)
      --write-back-cache                       Makes kernel buffer writes before sending them to rclone (without this, writethrough caching is used) (not supported on Windows)</code></pre>
<p>Options shared with other commands are described next. See the <a
href="https://rclone.org/flags/">global flags page</a> for global
options not listed here.</p>
<h3 id="filter-options-26">Filter Options</h3>
<p>Flags for filtering directory listings</p>
<pre class="text"><code>      --delete-excluded                     Delete files on dest excluded from sync
      --exclude stringArray                 Exclude files matching pattern
      --exclude-from stringArray            Read file exclude patterns from file (use - to read from stdin)
      --exclude-if-present stringArray      Exclude directories if filename is present
      --files-from stringArray              Read list of source-file names from file (use - to read from stdin)
      --files-from-raw stringArray          Read list of source-file names from file without any processing of lines (use - to read from stdin)
      --files-from0 stringArray             Read list of source-file names from file using NUL as separator (use - to read from stdin)
  -f, --filter stringArray                  Add a file filtering rule
      --filter-from stringArray             Read file filtering patterns from a file (use - to read from stdin)
      --hash-filter string                  Partition filenames by hash k/n or randomly @/n
      --ignore-case                         Ignore case in filters (case insensitive)
      --include stringArray                 Include files matching pattern
      --include-from stringArray            Read file include patterns from file (use - to read from stdin)
      --max-age Duration                    Only transfer files younger than this in s or suffix ms|s|m|h|d|w|M|y (default off)
      --max-depth int                       If set limits the recursion depth to this (default -1)
      --max-size SizeSuffix                 Only transfer files smaller than this in KiB or suffix B|K|M|G|T|P (default off)
      --metadata-exclude stringArray        Exclude metadatas matching pattern
      --metadata-exclude-from stringArray   Read metadata exclude patterns from file (use - to read from stdin)
      --metadata-filter stringArray         Add a metadata filtering rule
      --metadata-filter-from stringArray    Read metadata filtering patterns from a file (use - to read from stdin)
      --metadata-include stringArray        Include metadatas matching pattern
      --metadata-include-from stringArray   Read metadata include patterns from file (use - to read from stdin)
      --min-age Duration                    Only transfer files older than this in s or suffix ms|s|m|h|d|w|M|y (default off)
      --min-size SizeSuffix                 Only transfer files bigger than this in KiB or suffix B|K|M|G|T|P (default off)</code></pre>
<h2 id="see-also-81">See Also</h2>
<!-- markdownlint-capture -->
<!-- markdownlint-disable ul-style line-length -->
<ul>
<li><a href="https://rclone.org/commands/rclone_serve/">rclone serve</a>
- Serve a remote over a protocol.</li>
</ul>
<!-- markdownlint-restore -->
<h1 id="rclone-serve-ftp">rclone serve ftp</h1>
<p>Serve remote:path over FTP.</p>
<h2 id="synopsis-75">Synopsis</h2>
<p>Run a basic FTP server to serve a remote over FTP protocol. This can
be viewed with a FTP client or you can make a remote of type FTP to read
and write it.</p>
<h2 id="server-options-2">Server options</h2>
<p>Use --addr to specify which IP address and port the server should
listen on, e.g. --addr 1.2.3.4:8000 or --addr :8080 to listen to all
IPs. By default it only listens on localhost. You can use port :0 to let
the OS choose an available port.</p>
<p>If you set --addr to listen on a public or LAN accessible IP address
then using Authentication is advised - see the next section for
info.</p>
<h3 id="authentication-1">Authentication</h3>
<p>By default this will serve files without needing a login.</p>
<p>You can set a single username and password with the --user and --pass
flags.</p>
<h2 id="vfs---virtual-file-system-4">VFS - Virtual File System</h2>
<p>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.</p>
<p>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.</p>
<p>The VFS layer also implements a directory cache - this caches info
about files and directories (but not the data) in memory.</p>
<h2 id="vfs-directory-cache-4">VFS Directory Cache</h2>
<p>Using the <code>--dir-cache-time</code> 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.</p>
<pre class="text"><code>    --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)</code></pre>
<p>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.</p>
<p>You can send a <code>SIGHUP</code> 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:</p>
<pre class="console"><code>kill -SIGHUP $(pidof rclone)</code></pre>
<p>If you configure rclone with a <a href="/rc">remote control</a> then
you can use rclone rc to flush the whole directory cache:</p>
<pre class="console"><code>rclone rc vfs/forget</code></pre>
<p>Or individual files or directories:</p>
<pre class="console"><code>rclone rc vfs/forget file=path/to/file dir=path/to/dir</code></pre>
<h2 id="vfs-file-buffering-4">VFS File Buffering</h2>
<p>The <code>--buffer-size</code> flag determines the amount of memory,
that will be used to buffer data in advance.</p>
<p>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.</p>
<p>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 yet
read. If the buffer is empty, only a small amount of memory will be
used.</p>
<p>The maximum memory used by rclone for buffering can be up to
<code>--buffer-size * open files</code>.</p>
<h2 id="vfs-file-caching-4">VFS File Caching</h2>
<p>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 cost of some compatibility.</p>
<p>For example you'll need to enable VFS caching if you want to read and
write simultaneously to a file. See below for more details.</p>
<p>Note that the VFS cache is separate from the cache backend and you
may find that you need one or the other or both.</p>
<pre class="text"><code>    --cache-dir string                     Directory rclone will use for caching.
    --vfs-cache-mode CacheMode             Cache mode off|minimal|writes|full (default off)
    --vfs-cache-max-age duration           Max time since last access of objects in the cache (default 1h0m0s)
    --vfs-cache-max-size SizeSuffix        Max total size of objects in the cache (default off)
    --vfs-cache-min-free-space SizeSuffix  Target minimum free space on the disk containing the cache (default off)
    --vfs-cache-poll-interval duration     Interval to poll the cache for stale objects (default 1m0s)
    --vfs-write-back duration              Time to writeback files after last use when using cache (default 5s)</code></pre>
<p>If run with <code>-vv</code> rclone will print the location of the
file cache. The files are stored in the user cache file area which is OS
dependent but can be controlled with <code>--cache-dir</code> or setting
the appropriate environment variable.</p>
<p>The cache has 4 different modes selected by
<code>--vfs-cache-mode</code>. The higher the cache mode the more
compatible rclone becomes at the cost of using disk space.</p>
<p>Note that files are written back to the remote only when they are
closed and if they haven't been accessed for
<code>--vfs-write-back</code> seconds. If rclone is quit or dies with
files that haven't been uploaded, these will be uploaded next time
rclone is run with the same flags.</p>
<p>If using <code>--vfs-cache-max-size</code> or
<code>--vfs-cache-min-free-space</code> note that the cache may exceed
these quotas for two reasons. Firstly because it is only checked every
<code>--vfs-cache-poll-interval</code>. Secondly because open files
cannot be evicted from the cache. When <code>--vfs-cache-max-size</code>
or <code>--vfs-cache-min-free-space</code> is exceeded, rclone will
attempt to evict the least accessed files from the cache first. rclone
will start with files that haven't been accessed for the longest. This
cache flushing strategy is efficient and more relevant files are likely
to remain cached.</p>
<p>The <code>--vfs-cache-max-age</code> will evict files from the cache
after the set time since last access has passed; it is based on access
time, not on when the file was first added to the cache. The default
value of 1 hour will start evicting files from cache that haven't been
accessed for 1 hour. When a cached file is accessed the 1 hour timer is
reset to 0 and will wait for 1 more hour before evicting. Specify the
time with standard notation, s, m, h, d, w .</p>
<p>You <strong>should not</strong> run two copies of rclone using the
same VFS cache with the same or overlapping remotes if using
<code>--vfs-cache-mode &gt; off</code>. This can potentially cause data
corruption if you do. You can work around this by giving each rclone its
own cache hierarchy with <code>--cache-dir</code>. You don't need to
worry about this if the remotes in use don't overlap.</p>
<h3 id="vfs-cache-mode-off-4">--vfs-cache-mode off</h3>
<p>In this mode (the default) the cache will read directly from the
remote and write directly to the remote without caching anything on
disk.</p>
<p>This will mean some operations are not possible</p>
<ul>
<li>Files can't be opened for both read AND write</li>
<li>Files opened for write can't be seeked</li>
<li>Existing files opened for write must have O_TRUNC set</li>
<li>Files open for read with O_TRUNC will be opened write only</li>
<li>Files open for write only will behave as if O_TRUNC was
supplied</li>
<li>Open modes O_APPEND, O_TRUNC are ignored</li>
<li>If an upload fails it can't be retried</li>
</ul>
<h3 id="vfs-cache-mode-minimal-4">--vfs-cache-mode minimal</h3>
<p>This is very similar to "off" except that files opened for read AND
write will be buffered to disk. This means that files opened for write
will be a lot more compatible, but uses the minimal disk space.</p>
<p>These operations are not possible</p>
<ul>
<li>Files opened for write only can't be seeked</li>
<li>Existing files opened for write must have O_TRUNC set</li>
<li>Files opened for write only will ignore O_APPEND, O_TRUNC</li>
<li>If an upload fails it can't be retried</li>
</ul>
<h3 id="vfs-cache-mode-writes-4">--vfs-cache-mode writes</h3>
<p>In this mode files opened for read only are still read directly from
the remote, write only and read/write files are buffered to disk
first.</p>
<p>This mode should support all normal file system operations.</p>
<p>If an upload fails it will be retried at exponentially increasing
intervals up to 1 minute.</p>
<h3 id="vfs-cache-mode-full-4">--vfs-cache-mode full</h3>
<p>In this mode all reads and writes are buffered to and from disk. When
data is read from the remote this is buffered to disk as well.</p>
<p>In this mode the files in the cache will be sparse files and rclone
will keep track of which bits of the files it has downloaded.</p>
<p>So if an application only reads the starts of each file, then rclone
will only buffer the start of the file. These files will appear to be
their full size in the cache, but they will be sparse files with only
the data that has been downloaded present in them.</p>
<p>This mode should support all normal file system operations and is
otherwise identical to <code>--vfs-cache-mode</code> writes.</p>
<p>When reading a file rclone will read <code>--buffer-size</code> plus
<code>--vfs-read-ahead</code> bytes ahead. The
<code>--buffer-size</code> is buffered in memory whereas the
<code>--vfs-read-ahead</code> is buffered on disk.</p>
<p>When using this mode it is recommended that
<code>--buffer-size</code> is not set too large and
<code>--vfs-read-ahead</code> is set large if required.</p>
<p><strong>IMPORTANT</strong> not all file systems support sparse files.
In particular FAT/exFAT do not. Rclone will perform very badly if the
cache directory is on a filesystem which doesn't support sparse files
and it will log an ERROR message if one is detected.</p>
<h3 id="fingerprinting-4">Fingerprinting</h3>
<p>Various parts of the VFS use fingerprinting to see if a local file
copy has changed relative to a remote file. Fingerprints are made
from:</p>
<ul>
<li>size</li>
<li>modification time</li>
<li>hash</li>
</ul>
<p>where available on an object.</p>
<p>On some backends some of these attributes are slow to read (they take
an extra API call per object, or extra work per object).</p>
<p>For example <code>hash</code> is slow with the <code>local</code> and
<code>sftp</code> backends as they have to read the entire file and hash
it, and <code>modtime</code> is slow with the <code>s3</code>,
<code>swift</code>, <code>ftp</code> and <code>qinqstor</code> backends
because they need to do an extra API call to fetch it.</p>
<p>If you use the <code>--vfs-fast-fingerprint</code> flag then rclone
will not include the slow operations in the fingerprint. This makes the
fingerprinting less accurate but much faster and will improve the
opening time of cached files.</p>
<p>If you are running a vfs cache over <code>local</code>,
<code>s3</code> or <code>swift</code> backends then using this flag is
recommended.</p>
<p>Note that if you change the value of this flag, the fingerprints of
the files in the cache may be invalidated and the files will need to be
downloaded again.</p>
<h2 id="vfs-chunked-reading-4">VFS Chunked Reading</h2>
<p>When rclone reads files from a remote it reads them in chunks. This
means that rather than requesting the whole file rclone reads the chunk
specified. This can reduce the used download quota for some remotes by
requesting only chunks from the remote that are actually read, at the
cost of an increased number of requests.</p>
<p>These flags control the chunking:</p>
<pre class="text"><code>    --vfs-read-chunk-size SizeSuffix        Read the source objects in chunks (default 128M)
    --vfs-read-chunk-size-limit SizeSuffix  Max chunk doubling size (default off)
    --vfs-read-chunk-streams int            The number of parallel streams to read at once</code></pre>
<p>The chunking behaves differently depending on the
<code>--vfs-read-chunk-streams</code> parameter.</p>
<h3
id="vfs-read-chunk-streams-0-8"><code>--vfs-read-chunk-streams</code> ==
0</h3>
<p>Rclone will start reading a chunk of size
<code>--vfs-read-chunk-size</code>, and then double the size for each
read. When <code>--vfs-read-chunk-size-limit</code> is specified, and
greater than <code>--vfs-read-chunk-size</code>, the chunk size for each
open file will get doubled only until the specified value is reached. If
the value is "off", which is the default, the limit is disabled and the
chunk size will grow indefinitely.</p>
<p>With <code>--vfs-read-chunk-size 100M</code> and
<code>--vfs-read-chunk-size-limit 0</code> the following parts will be
downloaded: 0-100M, 100M-200M, 200M-300M, 300M-400M and so on. When
<code>--vfs-read-chunk-size-limit 500M</code> is specified, the result
would be 0-100M, 100M-300M, 300M-700M, 700M-1200M, 1200M-1700M and so
on.</p>
<p>Setting <code>--vfs-read-chunk-size</code> to <code>0</code> or "off"
disables chunked reading.</p>
<p>The chunks will not be buffered in memory.</p>
<h3
id="vfs-read-chunk-streams-0-9"><code>--vfs-read-chunk-streams</code>
&gt; 0</h3>
<p>Rclone reads <code>--vfs-read-chunk-streams</code> chunks of size
<code>--vfs-read-chunk-size</code> concurrently. The size for each read
will stay constant.</p>
<p>This improves performance massively on high latency links or very
high bandwidth links to high performance object stores.</p>
<p>Some experimentation will be needed to find the optimum values of
<code>--vfs-read-chunk-size</code> and
<code>--vfs-read-chunk-streams</code> as these will depend on the
backend in use and the latency to the backend.</p>
<p>For high performance object stores (eg AWS S3) a reasonable place to
start might be <code>--vfs-read-chunk-streams 16</code> and
<code>--vfs-read-chunk-size 4M</code>. In testing with AWS S3 the
performance scaled roughly as the <code>--vfs-read-chunk-streams</code>
setting.</p>
<p>Similar settings should work for high latency links, but depending on
the latency they may need more <code>--vfs-read-chunk-streams</code> in
order to get the throughput.</p>
<h2 id="vfs-performance-4">VFS Performance</h2>
<p>These flags may be used to enable/disable features of the VFS for
performance or other reasons. See also the <a
href="#vfs-chunked-reading">chunked reading</a> feature.</p>
<p>In particular S3 and Swift benefit hugely from the
<code>--no-modtime</code> flag (or use <code>--use-server-modtime</code>
for a slightly different effect) as each read of the modification time
takes a transaction.</p>
<pre class="text"><code>    --no-checksum     Don&#39;t compare checksums on up/download.
    --no-modtime      Don&#39;t read/write the modification time (can speed things up).
    --no-seek         Don&#39;t allow seeking in files.
    --read-only       Only allow read-only access.</code></pre>
<p>Sometimes rclone is delivered reads or writes out of order. Rather
than seeking rclone will wait a short time for the in sequence read or
write to come in. These flags only come into effect when not using an on
disk cache file.</p>
<pre class="text"><code>    --vfs-read-wait duration   Time to wait for in-sequence read before seeking (default 20ms)
    --vfs-write-wait duration  Time to wait for in-sequence write before giving error (default 1s)</code></pre>
<p>When using VFS write caching (<code>--vfs-cache-mode</code> with
value writes or full), the global flag <code>--transfers</code> can be
set to adjust the number of parallel uploads of modified files from the
cache (the related global flag <code>--checkers</code> has no effect on
the VFS).</p>
<pre class="text"><code>    --transfers int  Number of file transfers to run in parallel (default 4)</code></pre>
<h2 id="symlinks-4">Symlinks</h2>
<p>By default the VFS does not support symlinks. However this may be
enabled with either of the following flags:</p>
<pre class="text"><code>    --links      Translate symlinks to/from regular files with a &#39;.rclonelink&#39; extension.
    --vfs-links  Translate symlinks to/from regular files with a &#39;.rclonelink&#39; extension for the VFS</code></pre>
<p>As most cloud storage systems do not support symlinks directly,
rclone stores the symlink as a normal file with a special extension. So
a file which appears as a symlink <code>link-to-file.txt</code> would be
stored on cloud storage as <code>link-to-file.txt.rclonelink</code> and
the contents would be the path to the symlink destination.</p>
<p>Note that <code>--links</code> enables symlink translation globally
in rclone - this includes any backend which supports the concept (for
example the local backend). <code>--vfs-links</code> just enables it for
the VFS layer.</p>
<p>This scheme is compatible with that used by the <a
href="https://rclone.org/local/#symlinks-junction-points">local backend
with the --local-links flag</a>.</p>
<p>The <code>--vfs-links</code> flag has been designed for
<code>rclone mount</code>, <code>rclone nfsmount</code> and
<code>rclone serve nfs</code>.</p>
<p>It hasn't been tested with the other <code>rclone serve</code>
commands yet.</p>
<p>A limitation of the current implementation is that it expects the
caller to resolve sub-symlinks. For example given this directory
tree</p>
<pre class="text"><code>.
├── dir
│   └── file.txt
└── linked-dir -&gt; dir</code></pre>
<p>The VFS will correctly resolve <code>linked-dir</code> but not
<code>linked-dir/file.txt</code>. This is not a problem for the tested
commands but may be for other commands.</p>
<p><strong>Note</strong> that there is an outstanding issue with symlink
support <a href="https://github.com/rclone/rclone/issues/8245">issue
#8245</a> with duplicate files being created when symlinks are moved
into directories where there is a file of the same name (or vice
versa).</p>
<h2 id="vfs-case-sensitivity-4">VFS Case Sensitivity</h2>
<p>Linux file systems are case-sensitive: two files can differ only by
case, and the exact case must be used when opening a file.</p>
<p>File systems in modern Windows are case-insensitive but
case-preserving: although existing files can be opened using any case,
the exact case used to create the file is preserved and available for
programs to query. It is not allowed for two files in the same directory
to differ only by case.</p>
<p>Usually file systems on macOS are case-insensitive. It is possible to
make macOS file systems case-sensitive but that is not the default.</p>
<p>The <code>--vfs-case-insensitive</code> VFS flag controls how rclone
handles these two cases. If its value is "false", rclone passes file
names to the remote as-is. If the flag is "true" (or appears without a
value on the command line), rclone may perform a "fixup" as explained
below.</p>
<p>The user may specify a file name to open/delete/rename/etc with a
case different than what is stored on the remote. If an argument refers
to an existing file with exactly the same name, then the case of the
existing file on the disk will be used. However, if a file name with
exactly the same name is not found but a name differing only by case
exists, rclone will transparently fixup the name. This fixup happens
only when an existing file is requested. Case sensitivity of file names
created anew by rclone is controlled by the underlying remote.</p>
<p>Note that case sensitivity of the operating system running rclone
(the target) may differ from case sensitivity of a file system presented
by rclone (the source). The flag controls whether "fixup" is performed
to satisfy the target.</p>
<p>If the flag is not provided on the command line, then its default
value depends on the operating system where rclone runs: "true" on
Windows and macOS, "false" otherwise. If the flag is provided without a
value, then it is "true".</p>
<p>The <code>--no-unicode-normalization</code> flag controls whether a
similar "fixup" is performed for filenames that differ but are <a
href="https://en.wikipedia.org/wiki/Unicode_equivalence">canonically
equivalent</a> with respect to unicode. Unicode normalization can be
particularly helpful for users of macOS, which prefers form NFD instead
of the NFC used by most other platforms. It is therefore highly
recommended to keep the default of <code>false</code> on macOS, to avoid
encoding compatibility issues.</p>
<p>In the (probably unlikely) event that a directory has multiple
duplicate filenames after applying case and unicode normalization, the
<code>--vfs-block-norm-dupes</code> flag allows hiding these duplicates.
This comes with a performance tradeoff, as rclone will have to scan the
entire directory for duplicates when listing a directory. For this
reason, it is recommended to leave this disabled if not needed. However,
macOS users may wish to consider using it, as otherwise, if a remote
directory contains both NFC and NFD versions of the same filename, an
odd situation will occur: both versions of the file will be visible in
the mount, and both will appear to be editable, however, editing either
version will actually result in only the NFD version getting edited
under the hood. <code>--vfs-block- norm-dupes</code> prevents this
confusion by detecting this scenario, hiding the duplicates, and logging
an error, similar to how this is handled in
<code>rclone sync</code>.</p>
<h2 id="vfs-disk-options-4">VFS Disk Options</h2>
<p>This flag allows you to manually set the statistics about the filing
system. It can be useful when those statistics cannot be read correctly
automatically.</p>
<pre class="text"><code>    --vfs-disk-space-total-size    Manually set the total disk space size (example: 256G, default: -1)</code></pre>
<h2 id="alternate-report-of-used-bytes-4">Alternate report of used
bytes</h2>
<p>Some backends, most notably S3, do not report the amount of bytes
used. If you need this information to be available when running
<code>df</code> on the filesystem, then pass the flag
<code>--vfs-used-is-size</code> to rclone. With this flag set, instead
of relying on the backend to report this information, rclone will scan
the whole remote similar to <code>rclone size</code> and compute the
total used space itself.</p>
<p><strong>WARNING</strong>: Contrary to <code>rclone size</code>, this
flag ignores filters so that the result is accurate. However, this is
very inefficient and may cost lots of API calls resulting in extra
charges. Use it as a last resort and only with caching.</p>
<h2 id="vfs-metadata-4">VFS Metadata</h2>
<p>If you use the <code>--vfs-metadata-extension</code> flag you can get
the VFS to expose files which contain the <a
href="https://rclone.org/docs/#metadata">metadata</a> as a JSON blob.
These files will not appear in the directory listing, but can be
<code>stat</code>-ed and opened and once they have been they
<strong>will</strong> appear in directory listings until the directory
cache expires.</p>
<p>Note that some backends won't create metadata unless you pass in the
<code>--metadata</code> flag.</p>
<p>For example, using <code>rclone mount</code> with
<code>--metadata --vfs-metadata-extension .metadata</code> we get</p>
<pre class="console"><code>$ ls -l /mnt/
total 1048577
-rw-rw-r-- 1 user user 1073741824 Mar  3 16:03 1G

$ cat /mnt/1G.metadata
{
        &quot;atime&quot;: &quot;2025-03-04T17:34:22.317069787Z&quot;,
        &quot;btime&quot;: &quot;2025-03-03T16:03:37.708253808Z&quot;,
        &quot;gid&quot;: &quot;1000&quot;,
        &quot;mode&quot;: &quot;100664&quot;,
        &quot;mtime&quot;: &quot;2025-03-03T16:03:39.640238323Z&quot;,
        &quot;uid&quot;: &quot;1000&quot;
}

$ ls -l /mnt/
total 1048578
-rw-rw-r-- 1 user user 1073741824 Mar  3 16:03 1G
-rw-rw-r-- 1 user user        185 Mar  3 16:03 1G.metadata</code></pre>
<p>If the file has no metadata it will be returned as <code>{}</code>
and if there is an error reading the metadata the error will be returned
as <code>{"error":"error string"}</code>.</p>
<h2 id="auth-proxy">Auth Proxy</h2>
<p>If you supply the parameter
<code>--auth-proxy /path/to/program</code> then rclone will use that
program to generate backends on the fly which then are used to
authenticate incoming requests. This uses a simple JSON based protocol
with input on STDIN and output on STDOUT.</p>
<p><strong>PLEASE NOTE:</strong> <code>--auth-proxy</code> and
<code>--authorized-keys</code> cannot be used together, if
<code>--auth-proxy</code> is set the authorized keys option will be
ignored.</p>
<p>There is an example program <a
href="https://github.com/rclone/rclone/blob/master/bin/test_proxy.py">bin/test_proxy.py</a>
in the rclone source code.</p>
<p>The program's job is to take a <code>user</code> and
<code>pass</code> on the input and turn those into the config for a
backend on STDOUT in JSON format. This config will have any default
parameters for the backend added, but it won't use configuration from
environment variables or command line options - it is the job of the
proxy program to make a complete config.</p>
<p>This config generated must have this extra parameter</p>
<ul>
<li><code>_root</code> - root to use for the backend</li>
</ul>
<p>And it may have these parameters</p>
<ul>
<li><code>_obscure</code> - comma separated strings for parameters to
obscure</li>
<li><code>_secret_access_key</code> - the secret for S3 access key auth
(see below)</li>
</ul>
<p>If password authentication was used by the client, input to the proxy
process (on STDIN) would look similar to this:</p>
<div class="sourceCode" id="cb520"><pre
class="sourceCode json"><code class="sourceCode json"><span id="cb520-1"><a href="#cb520-1" aria-hidden="true" tabindex="-1"></a><span class="fu">{</span></span>
<span id="cb520-2"><a href="#cb520-2" aria-hidden="true" tabindex="-1"></a>  <span class="dt">&quot;user&quot;</span><span class="fu">:</span> <span class="st">&quot;me&quot;</span><span class="fu">,</span></span>
<span id="cb520-3"><a href="#cb520-3" aria-hidden="true" tabindex="-1"></a>  <span class="dt">&quot;pass&quot;</span><span class="fu">:</span> <span class="st">&quot;mypassword&quot;</span><span class="fu">,</span></span>
<span id="cb520-4"><a href="#cb520-4" aria-hidden="true" tabindex="-1"></a>  <span class="dt">&quot;client_ip&quot;</span><span class="fu">:</span> <span class="st">&quot;192.168.1.1&quot;</span></span>
<span id="cb520-5"><a href="#cb520-5" aria-hidden="true" tabindex="-1"></a><span class="fu">}</span></span></code></pre></div>
<p>If public-key authentication was used by the client, input to the
proxy process (on STDIN) would look similar to this:</p>
<div class="sourceCode" id="cb521"><pre
class="sourceCode json"><code class="sourceCode json"><span id="cb521-1"><a href="#cb521-1" aria-hidden="true" tabindex="-1"></a><span class="fu">{</span></span>
<span id="cb521-2"><a href="#cb521-2" aria-hidden="true" tabindex="-1"></a>  <span class="dt">&quot;user&quot;</span><span class="fu">:</span> <span class="st">&quot;me&quot;</span><span class="fu">,</span></span>
<span id="cb521-3"><a href="#cb521-3" aria-hidden="true" tabindex="-1"></a>  <span class="dt">&quot;public_key&quot;</span><span class="fu">:</span> <span class="st">&quot;AAAAB3NzaC1yc2EAAAADAQABAAABAQDuwESFdAe14hVS6omeyX7edc...JQdf&quot;</span><span class="fu">,</span></span>
<span id="cb521-4"><a href="#cb521-4" aria-hidden="true" tabindex="-1"></a>  <span class="dt">&quot;client_ip&quot;</span><span class="fu">:</span> <span class="st">&quot;192.168.1.1&quot;</span></span>
<span id="cb521-5"><a href="#cb521-5" aria-hidden="true" tabindex="-1"></a><span class="fu">}</span></span></code></pre></div>
<p>If the client authenticated with an S3 access key
(<code>rclone serve s3</code>), the client never sends its secret, only
a signature made with it, so the input contains just the access key ID
as the <code>user</code> with no <code>pass</code> or
<code>public_key</code>:</p>
<div class="sourceCode" id="cb522"><pre
class="sourceCode json"><code class="sourceCode json"><span id="cb522-1"><a href="#cb522-1" aria-hidden="true" tabindex="-1"></a><span class="fu">{</span></span>
<span id="cb522-2"><a href="#cb522-2" aria-hidden="true" tabindex="-1"></a>  <span class="dt">&quot;user&quot;</span><span class="fu">:</span> <span class="st">&quot;AKIAIOSFODNN7EXAMPLE&quot;</span><span class="fu">,</span></span>
<span id="cb522-3"><a href="#cb522-3" aria-hidden="true" tabindex="-1"></a>  <span class="dt">&quot;client_ip&quot;</span><span class="fu">:</span> <span class="st">&quot;192.168.1.1&quot;</span></span>
<span id="cb522-4"><a href="#cb522-4" aria-hidden="true" tabindex="-1"></a><span class="fu">}</span></span></code></pre></div>
<p>In this case the program must look up the secret access key for that
access key ID and return it in the <code>_secret_access_key</code> field
of the output. Rclone then uses that secret to verify the signature on
the request, refusing the request if it does not match. This means the
proxy program is the source of truth for both the credentials and the
backend they map to. If the program does not return
<code>_secret_access_key</code> or returns it empty the request is
refused.</p>
<p>The program's answer for an access key ID is cached (see below) but
is checked with the program again after 5 minutes even if the access key
ID is in constant use, so revoking an access key ID in the program takes
effect within 5 minutes. A rotated secret takes effect on the first
request signed with it.</p>
<p>The <code>client_ip</code> key holds the IP address the client
connected from, without a port number. It can be used to restrict logins
to certain networks, or to log authentication attempts centrally. It is
omitted if the client has no IP address, for example when connecting
over a unix socket. Note that if rclone is behind a reverse proxy this
will be the address of the reverse proxy and not the original
client.</p>
<p>And as an example return this on STDOUT</p>
<div class="sourceCode" id="cb523"><pre
class="sourceCode json"><code class="sourceCode json"><span id="cb523-1"><a href="#cb523-1" aria-hidden="true" tabindex="-1"></a><span class="fu">{</span></span>
<span id="cb523-2"><a href="#cb523-2" aria-hidden="true" tabindex="-1"></a>  <span class="dt">&quot;type&quot;</span><span class="fu">:</span> <span class="st">&quot;sftp&quot;</span><span class="fu">,</span></span>
<span id="cb523-3"><a href="#cb523-3" aria-hidden="true" tabindex="-1"></a>  <span class="dt">&quot;_root&quot;</span><span class="fu">:</span> <span class="st">&quot;&quot;</span><span class="fu">,</span></span>
<span id="cb523-4"><a href="#cb523-4" aria-hidden="true" tabindex="-1"></a>  <span class="dt">&quot;_obscure&quot;</span><span class="fu">:</span> <span class="st">&quot;pass&quot;</span><span class="fu">,</span></span>
<span id="cb523-5"><a href="#cb523-5" aria-hidden="true" tabindex="-1"></a>  <span class="dt">&quot;user&quot;</span><span class="fu">:</span> <span class="st">&quot;me&quot;</span><span class="fu">,</span></span>
<span id="cb523-6"><a href="#cb523-6" aria-hidden="true" tabindex="-1"></a>  <span class="dt">&quot;pass&quot;</span><span class="fu">:</span> <span class="st">&quot;mypassword&quot;</span><span class="fu">,</span></span>
<span id="cb523-7"><a href="#cb523-7" aria-hidden="true" tabindex="-1"></a>  <span class="dt">&quot;host&quot;</span><span class="fu">:</span> <span class="st">&quot;sftp.example.com&quot;</span></span>
<span id="cb523-8"><a href="#cb523-8" aria-hidden="true" tabindex="-1"></a><span class="fu">}</span></span></code></pre></div>
<p>This would mean that an SFTP backend would be created on the fly for
the <code>user</code> and <code>pass</code>/<code>public_key</code>
returned in the output to the host given. Note that since
<code>_obscure</code> is set to <code>pass</code>, rclone will obscure
the <code>pass</code> parameter before creating the backend (which is
required for sftp backends).</p>
<p>The program can manipulate the supplied <code>user</code> in any way,
for example to make proxy to many different sftp backends, you could
make the <code>user</code> be <code>[email protected]</code> and then set
the <code>host</code> to <code>example.com</code> in the output and the
user to <code>user</code>. For security you'd probably want to restrict
the <code>host</code> to a limited list.</p>
<p>An internal cache of backends is keyed on the <code>user</code>, the
kind of credential presented, a hash of the <code>pass</code> or
<code>public_key</code>, and the <code>client_ip</code>. This means that
if a user's password or public-key changes, the client connects from a
new IP address, or the proxy returns different config parameters (eg a
rotated <code>api_key</code>), a fresh backend will be created on the
next request rather than the cached one being reused. A backend created
for a public key login is never reused for a password login, so a public
key cannot be sent as a password to skip the program.</p>
<p>A cached answer is checked with the program again after 5 minutes
even if the user is in constant use, so revoking a user in the program
takes effect within 5 minutes. For <code>serve sftp</code> this applies
to new logins - an existing connection is not closed.</p>
<p>This can be used to build general purpose proxies to any kind of
backend that rclone supports.</p>
<pre><code>rclone serve ftp remote:path [flags]</code></pre>
<h2 id="options-82">Options</h2>
<pre><code>      --addr string                            IPaddress:Port or :Port to bind server to (default &quot;localhost:2121&quot;)
      --auth-proxy string                      A program to use to create the backend from the auth
      --cert string                            TLS PEM key (concatenation of certificate and CA certificate)
      --dir-cache-time Duration                Time to cache directory entries for (default 5m0s)
      --dir-perms FileMode                     Directory permissions (default 777)
      --file-perms FileMode                    File permissions (default 666)
      --gid uint32                             Override the gid field set by the filesystem (not supported on Windows) (default 1000)
  -h, --help                                   help for ftp
      --key string                             TLS PEM Private key
      --link-perms FileMode                    Link permissions (default 666)
      --no-checksum                            Don&#39;t compare checksums on up/download
      --no-modtime                             Don&#39;t read/write the modification time (can speed things up)
      --no-seek                                Don&#39;t allow seeking in files
      --pass string                            Password for authentication (empty value allow every password)
      --passive-port string                    Passive port range to use (default &quot;30000-32000&quot;)
      --poll-interval Duration                 Time to wait between polling for changes, must be smaller than dir-cache-time and only on supported remotes (set 0 to disable) (default 1m0s)
      --public-ip string                       Public IP address to advertise for passive connections
      --read-only                              Only allow read-only access
      --uid uint32                             Override the uid field set by the filesystem (not supported on Windows) (default 1000)
      --umask FileMode                         Override the permission bits set by the filesystem (not supported on Windows) (default 002)
      --user string                            User name for authentication (default &quot;anonymous&quot;)
      --vfs-block-norm-dupes                   If duplicate filenames exist in the same directory (after normalization), log an error and hide the duplicates (may have a performance cost)
      --vfs-cache-max-age Duration             Max time since last access of objects in the cache (default 1h0m0s)
      --vfs-cache-max-size SizeSuffix          Max total size of objects in the cache (default off)
      --vfs-cache-min-free-space SizeSuffix    Target minimum free space on the disk containing the cache (default off)
      --vfs-cache-mode CacheMode               Cache mode off|minimal|writes|full (default off)
      --vfs-cache-poll-interval Duration       Interval to poll the cache for stale objects (default 1m0s)
      --vfs-case-insensitive                   If a file name not found, find a case insensitive match
      --vfs-disk-space-total-size SizeSuffix   Specify the total space of disk (default off)
      --vfs-fast-fingerprint                   Use fast (less accurate) fingerprints for change detection
      --vfs-handle-caching Duration            Time to keep file handle and downloaders alive after last close (default 5s)
      --vfs-links                              Translate symlinks to/from regular files with a &#39;.rclonelink&#39; extension for the VFS
      --vfs-metadata-extension string          Set the extension to read metadata from
      --vfs-read-ahead SizeSuffix              Extra read ahead over --buffer-size when using cache-mode full
      --vfs-read-chunk-size SizeSuffix         Read the source objects in chunks (default 128Mi)
      --vfs-read-chunk-size-limit SizeSuffix   If greater than --vfs-read-chunk-size, double the chunk size after each chunk read, until the limit is reached (&#39;off&#39; is unlimited) (default off)
      --vfs-read-chunk-streams int             The number of parallel streams to read at once
      --vfs-read-wait Duration                 Time to wait for in-sequence read before seeking (default 20ms)
      --vfs-refresh                            Refreshes the directory cache recursively in the background on start
      --vfs-used-is-size rclone size           Use the rclone size algorithm for Used size
      --vfs-write-back Duration                Time to writeback files after last use when using cache (default 5s)
      --vfs-write-wait Duration                Time to wait for in-sequence write before giving error (default 1s)</code></pre>
<p>Options shared with other commands are described next. See the <a
href="https://rclone.org/flags/">global flags page</a> for global
options not listed here.</p>
<h3 id="filter-options-27">Filter Options</h3>
<p>Flags for filtering directory listings</p>
<pre class="text"><code>      --delete-excluded                     Delete files on dest excluded from sync
      --exclude stringArray                 Exclude files matching pattern
      --exclude-from stringArray            Read file exclude patterns from file (use - to read from stdin)
      --exclude-if-present stringArray      Exclude directories if filename is present
      --files-from stringArray              Read list of source-file names from file (use - to read from stdin)
      --files-from-raw stringArray          Read list of source-file names from file without any processing of lines (use - to read from stdin)
      --files-from0 stringArray             Read list of source-file names from file using NUL as separator (use - to read from stdin)
  -f, --filter stringArray                  Add a file filtering rule
      --filter-from stringArray             Read file filtering patterns from a file (use - to read from stdin)
      --hash-filter string                  Partition filenames by hash k/n or randomly @/n
      --ignore-case                         Ignore case in filters (case insensitive)
      --include stringArray                 Include files matching pattern
      --include-from stringArray            Read file include patterns from file (use - to read from stdin)
      --max-age Duration                    Only transfer files younger than this in s or suffix ms|s|m|h|d|w|M|y (default off)
      --max-depth int                       If set limits the recursion depth to this (default -1)
      --max-size SizeSuffix                 Only transfer files smaller than this in KiB or suffix B|K|M|G|T|P (default off)
      --metadata-exclude stringArray        Exclude metadatas matching pattern
      --metadata-exclude-from stringArray   Read metadata exclude patterns from file (use - to read from stdin)
      --metadata-filter stringArray         Add a metadata filtering rule
      --metadata-filter-from stringArray    Read metadata filtering patterns from a file (use - to read from stdin)
      --metadata-include stringArray        Include metadatas matching pattern
      --metadata-include-from stringArray   Read metadata include patterns from file (use - to read from stdin)
      --min-age Duration                    Only transfer files older than this in s or suffix ms|s|m|h|d|w|M|y (default off)
      --min-size SizeSuffix                 Only transfer files bigger than this in KiB or suffix B|K|M|G|T|P (default off)</code></pre>
<h2 id="see-also-82">See Also</h2>
<!-- markdownlint-capture -->
<!-- markdownlint-disable ul-style line-length -->
<ul>
<li><a href="https://rclone.org/commands/rclone_serve/">rclone serve</a>
- Serve a remote over a protocol.</li>
</ul>
<!-- markdownlint-restore -->
<h1 id="rclone-serve-http">rclone serve http</h1>
<p>Serve the remote over HTTP.</p>
<h2 id="synopsis-76">Synopsis</h2>
<p>Run a basic web server to serve a remote over HTTP. This can be
viewed in a web browser or you can make a remote of type http read from
it.</p>
<p>You can use the filter flags (e.g. <code>--include</code>,
<code>--exclude</code>) to control what is served.</p>
<p>The server will log errors. Use <code>-v</code> to see access
logs.</p>
<p><code>--bwlimit</code> will be respected for file transfers. Use
<code>--stats</code> to control the stats printing.</p>
<h2 id="server-options-3">Server options</h2>
<p>Use <code>--addr</code> to specify which IP address and port the
server should listen on, eg <code>--addr 1.2.3.4:8000</code> or
<code>--addr :8080</code> to listen to all IPs. By default it only
listens on localhost. You can use port :0 to let the OS choose an
available port.</p>
<p>If you set <code>--addr</code> to listen on a public or LAN
accessible IP address then using Authentication is advised - see the
next section for info.</p>
<p>You can use a unix socket by setting the url to
<code>unix:///path/to/socket</code> or just by using an absolute path
name.</p>
<p><code>--addr</code> may be repeated to listen on multiple
IPs/ports/sockets. Socket activation, described further below, can also
be used to accomplish the same.</p>
<p><code>--server-read-timeout</code> and
<code>--server-write-timeout</code> can be used to control the timeouts
on the server. Note that this is the total time for a transfer.</p>
<p><code>--max-header-bytes</code> controls the maximum number of bytes
the server will accept in the HTTP header.</p>
<p><code>--response-header</code> can be used to set an HTTP header for
all responses, will overriding existing values. The flag may be repeated
to add multiple headers. Use the format
<code>Header-Name: value</code>.</p>
<p><code>--allow-origin</code> enables cross-origin (CORS) requests from
browsers by setting the <code>Access-Control-Allow-Origin</code> header
on every response to the origin given, e.g.
<code>--allow-origin https://app.example.com</code>. Browser CORS
preflight OPTIONS requests are answered by rclone without needing
authentication as browsers never send credentials with them. Setting
this to <code>*</code> allows any origin which is a security risk on an
authenticated server.</p>
<p><code>--baseurl</code> controls the URL prefix that rclone serves
from. By default rclone will serve from the root. If you used
<code>--baseurl "/rclone"</code> then rclone would serve from a URL
starting with "/rclone/". This is useful if you wish to proxy rclone
serve. Rclone automatically inserts leading and trailing "/" on
<code>--baseurl</code>, so <code>--baseurl "rclone"</code>,
<code>--baseurl "/rclone"</code> and <code>--baseurl "/rclone/"</code>
are all treated identically.</p>
<p><code>--disable-zip</code> may be set to disable the zipping download
option.</p>
<h3 id="protocol-1">Protocol</h3>
<p>The server supports HTTP/1.1 and HTTP/2. HTTP/2 is used automatically
for TLS connections. For non-TLS connections, HTTP/2 cleartext (h2c) is
supported, allowing HTTP/2 without encryption.</p>
<h3 id="tls-ssl-1">TLS (SSL)</h3>
<p>By default this will serve over http. If you want you can serve over
https. You will need to supply the <code>--cert</code> and
<code>--key</code> flags. If you wish to do client side certificate
validation then you will need to supply <code>--client-ca</code>
also.</p>
<p>When TLS is configured every listener given with <code>--addr</code>
serves TLS. An individual listener can be prefixed with
<code>http://</code> to serve unencrypted HTTP on that address, or with
<code>tls://</code> to state explicitly that it must serve TLS. Using a
<code>tls://</code> address without <code>--cert</code> and
<code>--key</code> is an error.</p>
<p><code>--cert</code> must be set to the path of a file containing
either a PEM encoded certificate, or a concatenation of that with the CA
certificate. <code>--key</code> must be set to the path of a file with
the PEM encoded private key. If setting <code>--client-ca</code>, it
should be set to the path of a file with PEM encoded client certificate
authority certificates.</p>
<p><code>--min-tls-version</code> is minimum TLS version that is
acceptable. Valid values are "tls1.0", "tls1.1", "tls1.2" and "tls1.3"
(default "tls1.0").</p>
<h2 id="socket-activation-1">Socket activation</h2>
<p>Instead of the listening addresses specified above, rclone will
listen to all FDs passed by the service manager, if any (and ignore any
arguments passed by <code>--addr</code>).</p>
<p>This allows rclone to be a socket-activated service. It can be
configured with .socket and .service unit files as described in <a
href="https://www.freedesktop.org/software/systemd/man/latest/systemd.socket.html"
class="uri">https://www.freedesktop.org/software/systemd/man/latest/systemd.socket.html</a>.</p>
<p>Socket activation can be tested ad-hoc with the
<code>systemd-socket-activate</code>command</p>
<pre class="console"><code>systemd-socket-activate -l 8000 -- rclone serve</code></pre>
<p>This will socket-activate rclone on the first connection to port 8000
over TCP.</p>
<h3 id="template-1">Template</h3>
<p><code>--template</code> allows a user to specify a custom markup
template for HTTP and WebDAV serve functions. The server exports the
following markup to be used within the template to server pages:</p>
<table>
<colgroup>
<col style="width: 32%" />
<col style="width: 35%" />
<col style="width: 32%" />
</colgroup>
<thead>
<tr class="header">
<th style="text-align: left;">Parameter</th>
<th style="text-align: left;">Subparameter</th>
<th style="text-align: left;">Description</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;">.Name</td>
<td style="text-align: left;"></td>
<td style="text-align: left;">The full path of a file/directory.</td>
</tr>
<tr class="even">
<td style="text-align: left;">.Title</td>
<td style="text-align: left;"></td>
<td style="text-align: left;">Directory listing of '.Name'.</td>
</tr>
<tr class="odd">
<td style="text-align: left;">.Sort</td>
<td style="text-align: left;"></td>
<td style="text-align: left;">The current sort used. This is changeable
via '?sort=' parameter. Possible values: namedirfirst, name, size, time
(default namedirfirst).</td>
</tr>
<tr class="even">
<td style="text-align: left;">.Order</td>
<td style="text-align: left;"></td>
<td style="text-align: left;">The current ordering used. This is
changeable via '?order=' parameter. Possible values: asc, desc (default
asc).</td>
</tr>
<tr class="odd">
<td style="text-align: left;">.Query</td>
<td style="text-align: left;"></td>
<td style="text-align: left;">Currently unused.</td>
</tr>
<tr class="even">
<td style="text-align: left;">.Path</td>
<td style="text-align: left;"></td>
<td style="text-align: left;">The path of the directory from the root
with leading and trailing slashes, e.g. '/dir/'.</td>
</tr>
<tr class="odd">
<td style="text-align: left;">.IsRoot</td>
<td style="text-align: left;"></td>
<td style="text-align: left;">Boolean for if this is the root
directory.</td>
</tr>
<tr class="even">
<td style="text-align: left;">.UpLink</td>
<td style="text-align: left;"></td>
<td style="text-align: left;">The link to the parent directory.</td>
</tr>
<tr class="odd">
<td style="text-align: left;">.Static</td>
<td style="text-align: left;"></td>
<td style="text-align: left;">Boolean for if the listing is being
written as a static page by rclone index.</td>
</tr>
<tr class="even">
<td style="text-align: left;">.NumDirs</td>
<td style="text-align: left;"></td>
<td style="text-align: left;">The number of directories in the
listing.</td>
</tr>
<tr class="odd">
<td style="text-align: left;">.NumFiles</td>
<td style="text-align: left;"></td>
<td style="text-align: left;">The number of files in the listing.</td>
</tr>
<tr class="even">
<td style="text-align: left;">.TotalSize</td>
<td style="text-align: left;"></td>
<td style="text-align: left;">The total size in bytes of the files in
the listing.</td>
</tr>
<tr class="odd">
<td style="text-align: left;">.Breadcrumb</td>
<td style="text-align: left;"></td>
<td style="text-align: left;">Allows for creating a relative
navigation.</td>
</tr>
<tr class="even">
<td style="text-align: left;"></td>
<td style="text-align: left;">.Link</td>
<td style="text-align: left;">The link of the Text relative to the
root.</td>
</tr>
<tr class="odd">
<td style="text-align: left;"></td>
<td style="text-align: left;">.Text</td>
<td style="text-align: left;">The Name of the directory.</td>
</tr>
<tr class="even">
<td style="text-align: left;">.Entries</td>
<td style="text-align: left;"></td>
<td style="text-align: left;">Information about a specific
file/directory.</td>
</tr>
<tr class="odd">
<td style="text-align: left;"></td>
<td style="text-align: left;">.URL</td>
<td style="text-align: left;">The url of an entry.</td>
</tr>
<tr class="even">
<td style="text-align: left;"></td>
<td style="text-align: left;">.Leaf</td>
<td style="text-align: left;">Currently same as '.URL' but intended to
be just the name.</td>
</tr>
<tr class="odd">
<td style="text-align: left;"></td>
<td style="text-align: left;">.IsDir</td>
<td style="text-align: left;">Boolean for if an entry is a directory or
not.</td>
</tr>
<tr class="even">
<td style="text-align: left;"></td>
<td style="text-align: left;">.Size</td>
<td style="text-align: left;">Size in bytes of the entry.</td>
</tr>
<tr class="odd">
<td style="text-align: left;"></td>
<td style="text-align: left;">.ModTime</td>
<td style="text-align: left;">The UTC timestamp of an entry.</td>
</tr>
<tr class="even">
<td style="text-align: left;"></td>
<td style="text-align: left;">.MimeType</td>
<td style="text-align: left;">The MIME type of an entry guessed from its
name, or 'inode/directory'.</td>
</tr>
</tbody>
</table>
<p>The server also makes the following functions available so that they
can be used within the template. These functions help extend the options
for dynamic rendering of HTML. They can be used to render HTML based on
specific conditions.</p>
<table>
<colgroup>
<col style="width: 50%" />
<col style="width: 50%" />
</colgroup>
<thead>
<tr class="header">
<th style="text-align: left;">Function</th>
<th style="text-align: left;">Description</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;">afterEpoch</td>
<td style="text-align: left;">Returns the time since the epoch for the
given time.</td>
</tr>
<tr class="even">
<td style="text-align: left;">contains</td>
<td style="text-align: left;">Checks whether a given substring is
present or not in a given string.</td>
</tr>
<tr class="odd">
<td style="text-align: left;">hasPrefix</td>
<td style="text-align: left;">Checks whether the given string begins
with the specified prefix.</td>
</tr>
<tr class="even">
<td style="text-align: left;">hasSuffix</td>
<td style="text-align: left;">Checks whether the given string end with
the specified suffix.</td>
</tr>
</tbody>
</table>
<h3 id="authentication-2">Authentication</h3>
<p>By default this will serve files without needing a login.</p>
<p>You can either use an htpasswd file which can take lots of users, or
set a single username and password with the <code>--user</code> and
<code>--pass</code> flags.</p>
<p>Alternatively, you can have the reverse proxy manage authentication
and use the username provided in the configured header with
<code>--user-from-header</code> (e.g.,
<code>--user-from-header=x-remote-user</code>). Ensure the proxy is
trusted and headers cannot be spoofed, as misconfiguration may lead to
unauthorized access.</p>
<p>If either of the above authentication methods is not configured and
client certificates are required by the <code>--client-ca</code> flag
passed to the server, the client certificate common name will be
considered as the username.</p>
<p>Use <code>--htpasswd /path/to/htpasswd</code> to provide an htpasswd
file. This is in standard apache format and supports MD5, SHA1 and
BCrypt for basic authentication. Bcrypt is recommended.</p>
<p>To create an htpasswd file:</p>
<pre class="console"><code>touch htpasswd
htpasswd -B htpasswd user
htpasswd -B htpasswd anotherUser</code></pre>
<p>Use the same hash format and cost for every entry in the file. If the
entries differ, the time taken to reject a wrong password can reveal
which usernames exist.</p>
<p>The password file can be updated while rclone is running.</p>
<p>When authentication is enabled every request must be authenticated,
including HTTP OPTIONS requests, as the answer to an OPTIONS request can
reveal whether a path exists. Health checks or monitoring which use
unauthenticated OPTIONS requests will need to send credentials. The
exception is browser CORS preflight requests when
<code>--allow-origin</code> is set, which are answered without
authentication as browsers never send credentials with them.</p>
<p>Use <code>--realm</code> to set the authentication realm.</p>
<p>Use <code>--salt</code> to change the password hashing salt from the
default.</p>
<h2 id="vfs---virtual-file-system-5">VFS - Virtual File System</h2>
<p>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.</p>
<p>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.</p>
<p>The VFS layer also implements a directory cache - this caches info
about files and directories (but not the data) in memory.</p>
<h2 id="vfs-directory-cache-5">VFS Directory Cache</h2>
<p>Using the <code>--dir-cache-time</code> 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.</p>
<pre class="text"><code>    --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)</code></pre>
<p>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.</p>
<p>You can send a <code>SIGHUP</code> 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:</p>
<pre class="console"><code>kill -SIGHUP $(pidof rclone)</code></pre>
<p>If you configure rclone with a <a href="/rc">remote control</a> then
you can use rclone rc to flush the whole directory cache:</p>
<pre class="console"><code>rclone rc vfs/forget</code></pre>
<p>Or individual files or directories:</p>
<pre class="console"><code>rclone rc vfs/forget file=path/to/file dir=path/to/dir</code></pre>
<h2 id="vfs-file-buffering-5">VFS File Buffering</h2>
<p>The <code>--buffer-size</code> flag determines the amount of memory,
that will be used to buffer data in advance.</p>
<p>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.</p>
<p>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 yet
read. If the buffer is empty, only a small amount of memory will be
used.</p>
<p>The maximum memory used by rclone for buffering can be up to
<code>--buffer-size * open files</code>.</p>
<h2 id="vfs-file-caching-5">VFS File Caching</h2>
<p>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 cost of some compatibility.</p>
<p>For example you'll need to enable VFS caching if you want to read and
write simultaneously to a file. See below for more details.</p>
<p>Note that the VFS cache is separate from the cache backend and you
may find that you need one or the other or both.</p>
<pre class="text"><code>    --cache-dir string                     Directory rclone will use for caching.
    --vfs-cache-mode CacheMode             Cache mode off|minimal|writes|full (default off)
    --vfs-cache-max-age duration           Max time since last access of objects in the cache (default 1h0m0s)
    --vfs-cache-max-size SizeSuffix        Max total size of objects in the cache (default off)
    --vfs-cache-min-free-space SizeSuffix  Target minimum free space on the disk containing the cache (default off)
    --vfs-cache-poll-interval duration     Interval to poll the cache for stale objects (default 1m0s)
    --vfs-write-back duration              Time to writeback files after last use when using cache (default 5s)</code></pre>
<p>If run with <code>-vv</code> rclone will print the location of the
file cache. The files are stored in the user cache file area which is OS
dependent but can be controlled with <code>--cache-dir</code> or setting
the appropriate environment variable.</p>
<p>The cache has 4 different modes selected by
<code>--vfs-cache-mode</code>. The higher the cache mode the more
compatible rclone becomes at the cost of using disk space.</p>
<p>Note that files are written back to the remote only when they are
closed and if they haven't been accessed for
<code>--vfs-write-back</code> seconds. If rclone is quit or dies with
files that haven't been uploaded, these will be uploaded next time
rclone is run with the same flags.</p>
<p>If using <code>--vfs-cache-max-size</code> or
<code>--vfs-cache-min-free-space</code> note that the cache may exceed
these quotas for two reasons. Firstly because it is only checked every
<code>--vfs-cache-poll-interval</code>. Secondly because open files
cannot be evicted from the cache. When <code>--vfs-cache-max-size</code>
or <code>--vfs-cache-min-free-space</code> is exceeded, rclone will
attempt to evict the least accessed files from the cache first. rclone
will start with files that haven't been accessed for the longest. This
cache flushing strategy is efficient and more relevant files are likely
to remain cached.</p>
<p>The <code>--vfs-cache-max-age</code> will evict files from the cache
after the set time since last access has passed; it is based on access
time, not on when the file was first added to the cache. The default
value of 1 hour will start evicting files from cache that haven't been
accessed for 1 hour. When a cached file is accessed the 1 hour timer is
reset to 0 and will wait for 1 more hour before evicting. Specify the
time with standard notation, s, m, h, d, w .</p>
<p>You <strong>should not</strong> run two copies of rclone using the
same VFS cache with the same or overlapping remotes if using
<code>--vfs-cache-mode &gt; off</code>. This can potentially cause data
corruption if you do. You can work around this by giving each rclone its
own cache hierarchy with <code>--cache-dir</code>. You don't need to
worry about this if the remotes in use don't overlap.</p>
<h3 id="vfs-cache-mode-off-5">--vfs-cache-mode off</h3>
<p>In this mode (the default) the cache will read directly from the
remote and write directly to the remote without caching anything on
disk.</p>
<p>This will mean some operations are not possible</p>
<ul>
<li>Files can't be opened for both read AND write</li>
<li>Files opened for write can't be seeked</li>
<li>Existing files opened for write must have O_TRUNC set</li>
<li>Files open for read with O_TRUNC will be opened write only</li>
<li>Files open for write only will behave as if O_TRUNC was
supplied</li>
<li>Open modes O_APPEND, O_TRUNC are ignored</li>
<li>If an upload fails it can't be retried</li>
</ul>
<h3 id="vfs-cache-mode-minimal-5">--vfs-cache-mode minimal</h3>
<p>This is very similar to "off" except that files opened for read AND
write will be buffered to disk. This means that files opened for write
will be a lot more compatible, but uses the minimal disk space.</p>
<p>These operations are not possible</p>
<ul>
<li>Files opened for write only can't be seeked</li>
<li>Existing files opened for write must have O_TRUNC set</li>
<li>Files opened for write only will ignore O_APPEND, O_TRUNC</li>
<li>If an upload fails it can't be retried</li>
</ul>
<h3 id="vfs-cache-mode-writes-5">--vfs-cache-mode writes</h3>
<p>In this mode files opened for read only are still read directly from
the remote, write only and read/write files are buffered to disk
first.</p>
<p>This mode should support all normal file system operations.</p>
<p>If an upload fails it will be retried at exponentially increasing
intervals up to 1 minute.</p>
<h3 id="vfs-cache-mode-full-5">--vfs-cache-mode full</h3>
<p>In this mode all reads and writes are buffered to and from disk. When
data is read from the remote this is buffered to disk as well.</p>
<p>In this mode the files in the cache will be sparse files and rclone
will keep track of which bits of the files it has downloaded.</p>
<p>So if an application only reads the starts of each file, then rclone
will only buffer the start of the file. These files will appear to be
their full size in the cache, but they will be sparse files with only
the data that has been downloaded present in them.</p>
<p>This mode should support all normal file system operations and is
otherwise identical to <code>--vfs-cache-mode</code> writes.</p>
<p>When reading a file rclone will read <code>--buffer-size</code> plus
<code>--vfs-read-ahead</code> bytes ahead. The
<code>--buffer-size</code> is buffered in memory whereas the
<code>--vfs-read-ahead</code> is buffered on disk.</p>
<p>When using this mode it is recommended that
<code>--buffer-size</code> is not set too large and
<code>--vfs-read-ahead</code> is set large if required.</p>
<p><strong>IMPORTANT</strong> not all file systems support sparse files.
In particular FAT/exFAT do not. Rclone will perform very badly if the
cache directory is on a filesystem which doesn't support sparse files
and it will log an ERROR message if one is detected.</p>
<h3 id="fingerprinting-5">Fingerprinting</h3>
<p>Various parts of the VFS use fingerprinting to see if a local file
copy has changed relative to a remote file. Fingerprints are made
from:</p>
<ul>
<li>size</li>
<li>modification time</li>
<li>hash</li>
</ul>
<p>where available on an object.</p>
<p>On some backends some of these attributes are slow to read (they take
an extra API call per object, or extra work per object).</p>
<p>For example <code>hash</code> is slow with the <code>local</code> and
<code>sftp</code> backends as they have to read the entire file and hash
it, and <code>modtime</code> is slow with the <code>s3</code>,
<code>swift</code>, <code>ftp</code> and <code>qinqstor</code> backends
because they need to do an extra API call to fetch it.</p>
<p>If you use the <code>--vfs-fast-fingerprint</code> flag then rclone
will not include the slow operations in the fingerprint. This makes the
fingerprinting less accurate but much faster and will improve the
opening time of cached files.</p>
<p>If you are running a vfs cache over <code>local</code>,
<code>s3</code> or <code>swift</code> backends then using this flag is
recommended.</p>
<p>Note that if you change the value of this flag, the fingerprints of
the files in the cache may be invalidated and the files will need to be
downloaded again.</p>
<h2 id="vfs-chunked-reading-5">VFS Chunked Reading</h2>
<p>When rclone reads files from a remote it reads them in chunks. This
means that rather than requesting the whole file rclone reads the chunk
specified. This can reduce the used download quota for some remotes by
requesting only chunks from the remote that are actually read, at the
cost of an increased number of requests.</p>
<p>These flags control the chunking:</p>
<pre class="text"><code>    --vfs-read-chunk-size SizeSuffix        Read the source objects in chunks (default 128M)
    --vfs-read-chunk-size-limit SizeSuffix  Max chunk doubling size (default off)
    --vfs-read-chunk-streams int            The number of parallel streams to read at once</code></pre>
<p>The chunking behaves differently depending on the
<code>--vfs-read-chunk-streams</code> parameter.</p>
<h3
id="vfs-read-chunk-streams-0-10"><code>--vfs-read-chunk-streams</code>
== 0</h3>
<p>Rclone will start reading a chunk of size
<code>--vfs-read-chunk-size</code>, and then double the size for each
read. When <code>--vfs-read-chunk-size-limit</code> is specified, and
greater than <code>--vfs-read-chunk-size</code>, the chunk size for each
open file will get doubled only until the specified value is reached. If
the value is "off", which is the default, the limit is disabled and the
chunk size will grow indefinitely.</p>
<p>With <code>--vfs-read-chunk-size 100M</code> and
<code>--vfs-read-chunk-size-limit 0</code> the following parts will be
downloaded: 0-100M, 100M-200M, 200M-300M, 300M-400M and so on. When
<code>--vfs-read-chunk-size-limit 500M</code> is specified, the result
would be 0-100M, 100M-300M, 300M-700M, 700M-1200M, 1200M-1700M and so
on.</p>
<p>Setting <code>--vfs-read-chunk-size</code> to <code>0</code> or "off"
disables chunked reading.</p>
<p>The chunks will not be buffered in memory.</p>
<h3
id="vfs-read-chunk-streams-0-11"><code>--vfs-read-chunk-streams</code>
&gt; 0</h3>
<p>Rclone reads <code>--vfs-read-chunk-streams</code> chunks of size
<code>--vfs-read-chunk-size</code> concurrently. The size for each read
will stay constant.</p>
<p>This improves performance massively on high latency links or very
high bandwidth links to high performance object stores.</p>
<p>Some experimentation will be needed to find the optimum values of
<code>--vfs-read-chunk-size</code> and
<code>--vfs-read-chunk-streams</code> as these will depend on the
backend in use and the latency to the backend.</p>
<p>For high performance object stores (eg AWS S3) a reasonable place to
start might be <code>--vfs-read-chunk-streams 16</code> and
<code>--vfs-read-chunk-size 4M</code>. In testing with AWS S3 the
performance scaled roughly as the <code>--vfs-read-chunk-streams</code>
setting.</p>
<p>Similar settings should work for high latency links, but depending on
the latency they may need more <code>--vfs-read-chunk-streams</code> in
order to get the throughput.</p>
<h2 id="vfs-performance-5">VFS Performance</h2>
<p>These flags may be used to enable/disable features of the VFS for
performance or other reasons. See also the <a
href="#vfs-chunked-reading">chunked reading</a> feature.</p>
<p>In particular S3 and Swift benefit hugely from the
<code>--no-modtime</code> flag (or use <code>--use-server-modtime</code>
for a slightly different effect) as each read of the modification time
takes a transaction.</p>
<pre class="text"><code>    --no-checksum     Don&#39;t compare checksums on up/download.
    --no-modtime      Don&#39;t read/write the modification time (can speed things up).
    --no-seek         Don&#39;t allow seeking in files.
    --read-only       Only allow read-only access.</code></pre>
<p>Sometimes rclone is delivered reads or writes out of order. Rather
than seeking rclone will wait a short time for the in sequence read or
write to come in. These flags only come into effect when not using an on
disk cache file.</p>
<pre class="text"><code>    --vfs-read-wait duration   Time to wait for in-sequence read before seeking (default 20ms)
    --vfs-write-wait duration  Time to wait for in-sequence write before giving error (default 1s)</code></pre>
<p>When using VFS write caching (<code>--vfs-cache-mode</code> with
value writes or full), the global flag <code>--transfers</code> can be
set to adjust the number of parallel uploads of modified files from the
cache (the related global flag <code>--checkers</code> has no effect on
the VFS).</p>
<pre class="text"><code>    --transfers int  Number of file transfers to run in parallel (default 4)</code></pre>
<h2 id="symlinks-5">Symlinks</h2>
<p>By default the VFS does not support symlinks. However this may be
enabled with either of the following flags:</p>
<pre class="text"><code>    --links      Translate symlinks to/from regular files with a &#39;.rclonelink&#39; extension.
    --vfs-links  Translate symlinks to/from regular files with a &#39;.rclonelink&#39; extension for the VFS</code></pre>
<p>As most cloud storage systems do not support symlinks directly,
rclone stores the symlink as a normal file with a special extension. So
a file which appears as a symlink <code>link-to-file.txt</code> would be
stored on cloud storage as <code>link-to-file.txt.rclonelink</code> and
the contents would be the path to the symlink destination.</p>
<p>Note that <code>--links</code> enables symlink translation globally
in rclone - this includes any backend which supports the concept (for
example the local backend). <code>--vfs-links</code> just enables it for
the VFS layer.</p>
<p>This scheme is compatible with that used by the <a
href="https://rclone.org/local/#symlinks-junction-points">local backend
with the --local-links flag</a>.</p>
<p>The <code>--vfs-links</code> flag has been designed for
<code>rclone mount</code>, <code>rclone nfsmount</code> and
<code>rclone serve nfs</code>.</p>
<p>It hasn't been tested with the other <code>rclone serve</code>
commands yet.</p>
<p>A limitation of the current implementation is that it expects the
caller to resolve sub-symlinks. For example given this directory
tree</p>
<pre class="text"><code>.
├── dir
│   └── file.txt
└── linked-dir -&gt; dir</code></pre>
<p>The VFS will correctly resolve <code>linked-dir</code> but not
<code>linked-dir/file.txt</code>. This is not a problem for the tested
commands but may be for other commands.</p>
<p><strong>Note</strong> that there is an outstanding issue with symlink
support <a href="https://github.com/rclone/rclone/issues/8245">issue
#8245</a> with duplicate files being created when symlinks are moved
into directories where there is a file of the same name (or vice
versa).</p>
<h2 id="vfs-case-sensitivity-5">VFS Case Sensitivity</h2>
<p>Linux file systems are case-sensitive: two files can differ only by
case, and the exact case must be used when opening a file.</p>
<p>File systems in modern Windows are case-insensitive but
case-preserving: although existing files can be opened using any case,
the exact case used to create the file is preserved and available for
programs to query. It is not allowed for two files in the same directory
to differ only by case.</p>
<p>Usually file systems on macOS are case-insensitive. It is possible to
make macOS file systems case-sensitive but that is not the default.</p>
<p>The <code>--vfs-case-insensitive</code> VFS flag controls how rclone
handles these two cases. If its value is "false", rclone passes file
names to the remote as-is. If the flag is "true" (or appears without a
value on the command line), rclone may perform a "fixup" as explained
below.</p>
<p>The user may specify a file name to open/delete/rename/etc with a
case different than what is stored on the remote. If an argument refers
to an existing file with exactly the same name, then the case of the
existing file on the disk will be used. However, if a file name with
exactly the same name is not found but a name differing only by case
exists, rclone will transparently fixup the name. This fixup happens
only when an existing file is requested. Case sensitivity of file names
created anew by rclone is controlled by the underlying remote.</p>
<p>Note that case sensitivity of the operating system running rclone
(the target) may differ from case sensitivity of a file system presented
by rclone (the source). The flag controls whether "fixup" is performed
to satisfy the target.</p>
<p>If the flag is not provided on the command line, then its default
value depends on the operating system where rclone runs: "true" on
Windows and macOS, "false" otherwise. If the flag is provided without a
value, then it is "true".</p>
<p>The <code>--no-unicode-normalization</code> flag controls whether a
similar "fixup" is performed for filenames that differ but are <a
href="https://en.wikipedia.org/wiki/Unicode_equivalence">canonically
equivalent</a> with respect to unicode. Unicode normalization can be
particularly helpful for users of macOS, which prefers form NFD instead
of the NFC used by most other platforms. It is therefore highly
recommended to keep the default of <code>false</code> on macOS, to avoid
encoding compatibility issues.</p>
<p>In the (probably unlikely) event that a directory has multiple
duplicate filenames after applying case and unicode normalization, the
<code>--vfs-block-norm-dupes</code> flag allows hiding these duplicates.
This comes with a performance tradeoff, as rclone will have to scan the
entire directory for duplicates when listing a directory. For this
reason, it is recommended to leave this disabled if not needed. However,
macOS users may wish to consider using it, as otherwise, if a remote
directory contains both NFC and NFD versions of the same filename, an
odd situation will occur: both versions of the file will be visible in
the mount, and both will appear to be editable, however, editing either
version will actually result in only the NFD version getting edited
under the hood. <code>--vfs-block- norm-dupes</code> prevents this
confusion by detecting this scenario, hiding the duplicates, and logging
an error, similar to how this is handled in
<code>rclone sync</code>.</p>
<h2 id="vfs-disk-options-5">VFS Disk Options</h2>
<p>This flag allows you to manually set the statistics about the filing
system. It can be useful when those statistics cannot be read correctly
automatically.</p>
<pre class="text"><code>    --vfs-disk-space-total-size    Manually set the total disk space size (example: 256G, default: -1)</code></pre>
<h2 id="alternate-report-of-used-bytes-5">Alternate report of used
bytes</h2>
<p>Some backends, most notably S3, do not report the amount of bytes
used. If you need this information to be available when running
<code>df</code> on the filesystem, then pass the flag
<code>--vfs-used-is-size</code> to rclone. With this flag set, instead
of relying on the backend to report this information, rclone will scan
the whole remote similar to <code>rclone size</code> and compute the
total used space itself.</p>
<p><strong>WARNING</strong>: Contrary to <code>rclone size</code>, this
flag ignores filters so that the result is accurate. However, this is
very inefficient and may cost lots of API calls resulting in extra
charges. Use it as a last resort and only with caching.</p>
<h2 id="vfs-metadata-5">VFS Metadata</h2>
<p>If you use the <code>--vfs-metadata-extension</code> flag you can get
the VFS to expose files which contain the <a
href="https://rclone.org/docs/#metadata">metadata</a> as a JSON blob.
These files will not appear in the directory listing, but can be
<code>stat</code>-ed and opened and once they have been they
<strong>will</strong> appear in directory listings until the directory
cache expires.</p>
<p>Note that some backends won't create metadata unless you pass in the
<code>--metadata</code> flag.</p>
<p>For example, using <code>rclone mount</code> with
<code>--metadata --vfs-metadata-extension .metadata</code> we get</p>
<pre class="console"><code>$ ls -l /mnt/
total 1048577
-rw-rw-r-- 1 user user 1073741824 Mar  3 16:03 1G

$ cat /mnt/1G.metadata
{
        &quot;atime&quot;: &quot;2025-03-04T17:34:22.317069787Z&quot;,
        &quot;btime&quot;: &quot;2025-03-03T16:03:37.708253808Z&quot;,
        &quot;gid&quot;: &quot;1000&quot;,
        &quot;mode&quot;: &quot;100664&quot;,
        &quot;mtime&quot;: &quot;2025-03-03T16:03:39.640238323Z&quot;,
        &quot;uid&quot;: &quot;1000&quot;
}

$ ls -l /mnt/
total 1048578
-rw-rw-r-- 1 user user 1073741824 Mar  3 16:03 1G
-rw-rw-r-- 1 user user        185 Mar  3 16:03 1G.metadata</code></pre>
<p>If the file has no metadata it will be returned as <code>{}</code>
and if there is an error reading the metadata the error will be returned
as <code>{"error":"error string"}</code>.</p>
<h2 id="auth-proxy-1">Auth Proxy</h2>
<p>If you supply the parameter
<code>--auth-proxy /path/to/program</code> then rclone will use that
program to generate backends on the fly which then are used to
authenticate incoming requests. This uses a simple JSON based protocol
with input on STDIN and output on STDOUT.</p>
<p><strong>PLEASE NOTE:</strong> <code>--auth-proxy</code> and
<code>--authorized-keys</code> cannot be used together, if
<code>--auth-proxy</code> is set the authorized keys option will be
ignored.</p>
<p>There is an example program <a
href="https://github.com/rclone/rclone/blob/master/bin/test_proxy.py">bin/test_proxy.py</a>
in the rclone source code.</p>
<p>The program's job is to take a <code>user</code> and
<code>pass</code> on the input and turn those into the config for a
backend on STDOUT in JSON format. This config will have any default
parameters for the backend added, but it won't use configuration from
environment variables or command line options - it is the job of the
proxy program to make a complete config.</p>
<p>This config generated must have this extra parameter</p>
<ul>
<li><code>_root</code> - root to use for the backend</li>
</ul>
<p>And it may have these parameters</p>
<ul>
<li><code>_obscure</code> - comma separated strings for parameters to
obscure</li>
<li><code>_secret_access_key</code> - the secret for S3 access key auth
(see below)</li>
</ul>
<p>If password authentication was used by the client, input to the proxy
process (on STDIN) would look similar to this:</p>
<div class="sourceCode" id="cb542"><pre
class="sourceCode json"><code class="sourceCode json"><span id="cb542-1"><a href="#cb542-1" aria-hidden="true" tabindex="-1"></a><span class="fu">{</span></span>
<span id="cb542-2"><a href="#cb542-2" aria-hidden="true" tabindex="-1"></a>  <span class="dt">&quot;user&quot;</span><span class="fu">:</span> <span class="st">&quot;me&quot;</span><span class="fu">,</span></span>
<span id="cb542-3"><a href="#cb542-3" aria-hidden="true" tabindex="-1"></a>  <span class="dt">&quot;pass&quot;</span><span class="fu">:</span> <span class="st">&quot;mypassword&quot;</span><span class="fu">,</span></span>
<span id="cb542-4"><a href="#cb542-4" aria-hidden="true" tabindex="-1"></a>  <span class="dt">&quot;client_ip&quot;</span><span class="fu">:</span> <span class="st">&quot;192.168.1.1&quot;</span></span>
<span id="cb542-5"><a href="#cb542-5" aria-hidden="true" tabindex="-1"></a><span class="fu">}</span></span></code></pre></div>
<p>If public-key authentication was used by the client, input to the
proxy process (on STDIN) would look similar to this:</p>
<div class="sourceCode" id="cb543"><pre
class="sourceCode json"><code class="sourceCode json"><span id="cb543-1"><a href="#cb543-1" aria-hidden="true" tabindex="-1"></a><span class="fu">{</span></span>
<span id="cb543-2"><a href="#cb543-2" aria-hidden="true" tabindex="-1"></a>  <span class="dt">&quot;user&quot;</span><span class="fu">:</span> <span class="st">&quot;me&quot;</span><span class="fu">,</span></span>
<span id="cb543-3"><a href="#cb543-3" aria-hidden="true" tabindex="-1"></a>  <span class="dt">&quot;public_key&quot;</span><span class="fu">:</span> <span class="st">&quot;AAAAB3NzaC1yc2EAAAADAQABAAABAQDuwESFdAe14hVS6omeyX7edc...JQdf&quot;</span><span class="fu">,</span></span>
<span id="cb543-4"><a href="#cb543-4" aria-hidden="true" tabindex="-1"></a>  <span class="dt">&quot;client_ip&quot;</span><span class="fu">:</span> <span class="st">&quot;192.168.1.1&quot;</span></span>
<span id="cb543-5"><a href="#cb543-5" aria-hidden="true" tabindex="-1"></a><span class="fu">}</span></span></code></pre></div>
<p>If the client authenticated with an S3 access key
(<code>rclone serve s3</code>), the client never sends its secret, only
a signature made with it, so the input contains just the access key ID
as the <code>user</code> with no <code>pass</code> or
<code>public_key</code>:</p>
<div class="sourceCode" id="cb544"><pre
class="sourceCode json"><code class="sourceCode json"><span id="cb544-1"><a href="#cb544-1" aria-hidden="true" tabindex="-1"></a><span class="fu">{</span></span>
<span id="cb544-2"><a href="#cb544-2" aria-hidden="true" tabindex="-1"></a>  <span class="dt">&quot;user&quot;</span><span class="fu">:</span> <span class="st">&quot;AKIAIOSFODNN7EXAMPLE&quot;</span><span class="fu">,</span></span>
<span id="cb544-3"><a href="#cb544-3" aria-hidden="true" tabindex="-1"></a>  <span class="dt">&quot;client_ip&quot;</span><span class="fu">:</span> <span class="st">&quot;192.168.1.1&quot;</span></span>
<span id="cb544-4"><a href="#cb544-4" aria-hidden="true" tabindex="-1"></a><span class="fu">}</span></span></code></pre></div>
<p>In this case the program must look up the secret access key for that
access key ID and return it in the <code>_secret_access_key</code> field
of the output. Rclone then uses that secret to verify the signature on
the request, refusing the request if it does not match. This means the
proxy program is the source of truth for both the credentials and the
backend they map to. If the program does not return
<code>_secret_access_key</code> or returns it empty the request is
refused.</p>
<p>The program's answer for an access key ID is cached (see below) but
is checked with the program again after 5 minutes even if the access key
ID is in constant use, so revoking an access key ID in the program takes
effect within 5 minutes. A rotated secret takes effect on the first
request signed with it.</p>
<p>The <code>client_ip</code> key holds the IP address the client
connected from, without a port number. It can be used to restrict logins
to certain networks, or to log authentication attempts centrally. It is
omitted if the client has no IP address, for example when connecting
over a unix socket. Note that if rclone is behind a reverse proxy this
will be the address of the reverse proxy and not the original
client.</p>
<p>And as an example return this on STDOUT</p>
<div class="sourceCode" id="cb545"><pre
class="sourceCode json"><code class="sourceCode json"><span id="cb545-1"><a href="#cb545-1" aria-hidden="true" tabindex="-1"></a><span class="fu">{</span></span>
<span id="cb545-2"><a href="#cb545-2" aria-hidden="true" tabindex="-1"></a>  <span class="dt">&quot;type&quot;</span><span class="fu">:</span> <span class="st">&quot;sftp&quot;</span><span class="fu">,</span></span>
<span id="cb545-3"><a href="#cb545-3" aria-hidden="true" tabindex="-1"></a>  <span class="dt">&quot;_root&quot;</span><span class="fu">:</span> <span class="st">&quot;&quot;</span><span class="fu">,</span></span>
<span id="cb545-4"><a href="#cb545-4" aria-hidden="true" tabindex="-1"></a>  <span class="dt">&quot;_obscure&quot;</span><span class="fu">:</span> <span class="st">&quot;pass&quot;</span><span class="fu">,</span></span>
<span id="cb545-5"><a href="#cb545-5" aria-hidden="true" tabindex="-1"></a>  <span class="dt">&quot;user&quot;</span><span class="fu">:</span> <span class="st">&quot;me&quot;</span><span class="fu">,</span></span>
<span id="cb545-6"><a href="#cb545-6" aria-hidden="true" tabindex="-1"></a>  <span class="dt">&quot;pass&quot;</span><span class="fu">:</span> <span class="st">&quot;mypassword&quot;</span><span class="fu">,</span></span>
<span id="cb545-7"><a href="#cb545-7" aria-hidden="true" tabindex="-1"></a>  <span class="dt">&quot;host&quot;</span><span class="fu">:</span> <span class="st">&quot;sftp.example.com&quot;</span></span>
<span id="cb545-8"><a href="#cb545-8" aria-hidden="true" tabindex="-1"></a><span class="fu">}</span></span></code></pre></div>
<p>This would mean that an SFTP backend would be created on the fly for
the <code>user</code> and <code>pass</code>/<code>public_key</code>
returned in the output to the host given. Note that since
<code>_obscure</code> is set to <code>pass</code>, rclone will obscure
the <code>pass</code> parameter before creating the backend (which is
required for sftp backends).</p>
<p>The program can manipulate the supplied <code>user</code> in any way,
for example to make proxy to many different sftp backends, you could
make the <code>user</code> be <code>[email protected]</code> and then set
the <code>host</code> to <code>example.com</code> in the output and the
user to <code>user</code>. For security you'd probably want to restrict
the <code>host</code> to a limited list.</p>
<p>An internal cache of backends is keyed on the <code>user</code>, the
kind of credential presented, a hash of the <code>pass</code> or
<code>public_key</code>, and the <code>client_ip</code>. This means that
if a user's password or public-key changes, the client connects from a
new IP address, or the proxy returns different config parameters (eg a
rotated <code>api_key</code>), a fresh backend will be created on the
next request rather than the cached one being reused. A backend created
for a public key login is never reused for a password login, so a public
key cannot be sent as a password to skip the program.</p>
<p>A cached answer is checked with the program again after 5 minutes
even if the user is in constant use, so revoking a user in the program
takes effect within 5 minutes. For <code>serve sftp</code> this applies
to new logins - an existing connection is not closed.</p>
<p>This can be used to build general purpose proxies to any kind of
backend that rclone supports.</p>
<pre><code>rclone serve http remote:path [flags]</code></pre>
<h2 id="options-83">Options</h2>
<pre><code>      --addr stringArray                       IPaddress:Port or :Port to bind server to (default 127.0.0.1:8080)
      --allow-origin string                    Origin which cross-domain request (CORS) can be executed from
      --auth-proxy string                      A program to use to create the backend from the auth
      --baseurl string                         Prefix for URLs - leave blank for root
      --cert string                            TLS PEM key (concatenation of certificate and CA certificate)
      --client-ca string                       Client certificate authority to verify clients with
      --dir-cache-time Duration                Time to cache directory entries for (default 5m0s)
      --dir-perms FileMode                     Directory permissions (default 777)
      --disable-dir-list                       Disable HTML directory list on GET request for a directory
      --disable-zip                            Disable zip download of directories
      --file-perms FileMode                    File permissions (default 666)
      --gid uint32                             Override the gid field set by the filesystem (not supported on Windows) (default 1000)
  -h, --help                                   help for http
      --htpasswd string                        A htpasswd file - if not provided no authentication is done
      --key string                             TLS PEM Private key
      --link-perms FileMode                    Link permissions (default 666)
      --max-header-bytes int                   Maximum size of request header (default 4096)
      --min-tls-version string                 Minimum TLS version that is acceptable (default &quot;tls1.0&quot;)
      --no-checksum                            Don&#39;t compare checksums on up/download
      --no-modtime                             Don&#39;t read/write the modification time (can speed things up)
      --no-seek                                Don&#39;t allow seeking in files
      --pass string                            Password for authentication
      --poll-interval Duration                 Time to wait between polling for changes, must be smaller than dir-cache-time and only on supported remotes (set 0 to disable) (default 1m0s)
      --read-only                              Only allow read-only access
      --realm string                           Realm for authentication
      --response-header stringArray            Set HTTP header for all responses, overriding existing values
      --salt string                            Password hashing salt (default &quot;dlPL2MqE&quot;)
      --server-read-timeout Duration           Timeout for server reading data (default 1h0m0s)
      --server-write-timeout Duration          Timeout for server writing data (default 1h0m0s)
      --template string                        User-specified template
      --uid uint32                             Override the uid field set by the filesystem (not supported on Windows) (default 1000)
      --umask FileMode                         Override the permission bits set by the filesystem (not supported on Windows) (default 002)
      --user string                            User name for authentication
      --user-from-header string                User name from a defined HTTP header
      --vfs-block-norm-dupes                   If duplicate filenames exist in the same directory (after normalization), log an error and hide the duplicates (may have a performance cost)
      --vfs-cache-max-age Duration             Max time since last access of objects in the cache (default 1h0m0s)
      --vfs-cache-max-size SizeSuffix          Max total size of objects in the cache (default off)
      --vfs-cache-min-free-space SizeSuffix    Target minimum free space on the disk containing the cache (default off)
      --vfs-cache-mode CacheMode               Cache mode off|minimal|writes|full (default off)
      --vfs-cache-poll-interval Duration       Interval to poll the cache for stale objects (default 1m0s)
      --vfs-case-insensitive                   If a file name not found, find a case insensitive match
      --vfs-disk-space-total-size SizeSuffix   Specify the total space of disk (default off)
      --vfs-fast-fingerprint                   Use fast (less accurate) fingerprints for change detection
      --vfs-handle-caching Duration            Time to keep file handle and downloaders alive after last close (default 5s)
      --vfs-links                              Translate symlinks to/from regular files with a &#39;.rclonelink&#39; extension for the VFS
      --vfs-metadata-extension string          Set the extension to read metadata from
      --vfs-read-ahead SizeSuffix              Extra read ahead over --buffer-size when using cache-mode full
      --vfs-read-chunk-size SizeSuffix         Read the source objects in chunks (default 128Mi)
      --vfs-read-chunk-size-limit SizeSuffix   If greater than --vfs-read-chunk-size, double the chunk size after each chunk read, until the limit is reached (&#39;off&#39; is unlimited) (default off)
      --vfs-read-chunk-streams int             The number of parallel streams to read at once
      --vfs-read-wait Duration                 Time to wait for in-sequence read before seeking (default 20ms)
      --vfs-refresh                            Refreshes the directory cache recursively in the background on start
      --vfs-used-is-size rclone size           Use the rclone size algorithm for Used size
      --vfs-write-back Duration                Time to writeback files after last use when using cache (default 5s)
      --vfs-write-wait Duration                Time to wait for in-sequence write before giving error (default 1s)</code></pre>
<p>Options shared with other commands are described next. See the <a
href="https://rclone.org/flags/">global flags page</a> for global
options not listed here.</p>
<h3 id="filter-options-28">Filter Options</h3>
<p>Flags for filtering directory listings</p>
<pre class="text"><code>      --delete-excluded                     Delete files on dest excluded from sync
      --exclude stringArray                 Exclude files matching pattern
      --exclude-from stringArray            Read file exclude patterns from file (use - to read from stdin)
      --exclude-if-present stringArray      Exclude directories if filename is present
      --files-from stringArray              Read list of source-file names from file (use - to read from stdin)
      --files-from-raw stringArray          Read list of source-file names from file without any processing of lines (use - to read from stdin)
      --files-from0 stringArray             Read list of source-file names from file using NUL as separator (use - to read from stdin)
  -f, --filter stringArray                  Add a file filtering rule
      --filter-from stringArray             Read file filtering patterns from a file (use - to read from stdin)
      --hash-filter string                  Partition filenames by hash k/n or randomly @/n
      --ignore-case                         Ignore case in filters (case insensitive)
      --include stringArray                 Include files matching pattern
      --include-from stringArray            Read file include patterns from file (use - to read from stdin)
      --max-age Duration                    Only transfer files younger than this in s or suffix ms|s|m|h|d|w|M|y (default off)
      --max-depth int                       If set limits the recursion depth to this (default -1)
      --max-size SizeSuffix                 Only transfer files smaller than this in KiB or suffix B|K|M|G|T|P (default off)
      --metadata-exclude stringArray        Exclude metadatas matching pattern
      --metadata-exclude-from stringArray   Read metadata exclude patterns from file (use - to read from stdin)
      --metadata-filter stringArray         Add a metadata filtering rule
      --metadata-filter-from stringArray    Read metadata filtering patterns from a file (use - to read from stdin)
      --metadata-include stringArray        Include metadatas matching pattern
      --metadata-include-from stringArray   Read metadata include patterns from file (use - to read from stdin)
      --min-age Duration                    Only transfer files older than this in s or suffix ms|s|m|h|d|w|M|y (default off)
      --min-size SizeSuffix                 Only transfer files bigger than this in KiB or suffix B|K|M|G|T|P (default off)</code></pre>
<h2 id="see-also-83">See Also</h2>
<!-- markdownlint-capture -->
<!-- markdownlint-disable ul-style line-length -->
<ul>
<li><a href="https://rclone.org/commands/rclone_serve/">rclone serve</a>
- Serve a remote over a protocol.</li>
</ul>
<!-- markdownlint-restore -->
<h1 id="rclone-serve-nfs">rclone serve nfs</h1>
<p>Serve the remote as an NFS mount</p>
<h2 id="synopsis-77">Synopsis</h2>
<p>Create an NFS server that serves the given remote over the
network.</p>
<p>This implements an NFSv3 server to serve any rclone remote via
NFS.</p>
<p>The primary purpose for this command is to enable the <a
href="https://rclone.org/commands/rclone_mount/">mount command</a> on
recent macOS versions where installing FUSE is very cumbersome.</p>
<p>This server does not implement any authentication so any client will
be able to access the data. To limit access, you can use
<code>serve nfs</code> on the loopback address or rely on secure tunnels
(such as SSH) or use firewalling.</p>
<p>For this reason, by default, a random TCP port is chosen and the
loopback interface is used for the listening address by default; meaning
that it is only available to the local machine. If you want other
machines to access the NFS mount over local network, you need to specify
the listening address and port using the <code>--addr</code> flag.</p>
<p>Modifying files through the NFS protocol requires VFS caching.
Usually you will need to specify <code>--vfs-cache-mode</code> in order
to be able to write to the mountpoint (<code>full</code> is
recommended). If you don't specify VFS cache mode, the mount will be
read-only.</p>
<p><code>--nfs-cache-type</code> controls the type of the NFS handle
cache. By default this is <code>memory</code> where new handles will be
randomly allocated when needed. These are stored in memory. If the
server is restarted the handle cache will be lost and connected NFS
clients will get stale handle errors.</p>
<p><code>--nfs-cache-type disk</code> uses an on disk NFS handle cache.
Rclone hashes the path of the object and stores it in a file named after
the hash. These hashes are stored on disk the directory controlled by
<code>--cache-dir</code> or the exact directory may be specified with
<code>--nfs-cache-dir</code>. Using this means that the NFS server can
be restarted at will without affecting the connected clients.</p>
<p><code>--nfs-cache-type symlink</code> is similar to
<code>--nfs-cache-type disk</code> in that it uses an on disk cache, but
the cache entries are held as symlinks. Rclone will use the handle of
the underlying file as the NFS handle which improves performance. This
sort of cache can't be backed up and restored as the underlying handles
will change. This is Linux only. It requires running rclone as root or
with <code>CAP_DAC_READ_SEARCH</code>. You can run rclone with this
extra permission by doing this to the rclone binary
<code>sudo setcap cap_dac_read_search+ep /path/to/rclone</code>.</p>
<p><code>--nfs-cache-handle-limit</code> controls the maximum number of
cached NFS handles stored by the caching handler. This should not be set
too low or you may experience errors when trying to access files. The
default is <code>1000000</code>, but consider lowering this limit if the
server's system resource usage causes problems. This is only used by the
<code>memory</code> type cache.</p>
<p>To serve NFS over the network use following command:</p>
<div class="sourceCode" id="cb549"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb549-1"><a href="#cb549-1" aria-hidden="true" tabindex="-1"></a><span class="ex">rclone</span> serve nfs remote: <span class="at">--addr</span> 0.0.0.0:<span class="va">$PORT</span> <span class="at">--vfs-cache-mode</span><span class="op">=</span>full</span></code></pre></div>
<p>This specifies a port that can be used in the mount command. To mount
the server under Linux/macOS, use the following command:</p>
<div class="sourceCode" id="cb550"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb550-1"><a href="#cb550-1" aria-hidden="true" tabindex="-1"></a><span class="fu">mount</span> <span class="at">-t</span> nfs <span class="at">-o</span> port=<span class="va">$PORT</span>,mountport=<span class="va">$PORT</span>,tcp <span class="va">$HOSTNAME</span>:/ path/to/mountpoint</span></code></pre></div>
<p>Where <code>$PORT</code> is the same port number used in the
<code>serve nfs</code> command and <code>$HOSTNAME</code> is the network
address of the machine that <code>serve nfs</code> was run on.</p>
<p>NFS clients can also mount a subdirectory of the served remote by
including it in the mount path. For example to mount only the
<code>photos/2024</code> subdirectory:</p>
<div class="sourceCode" id="cb551"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb551-1"><a href="#cb551-1" aria-hidden="true" tabindex="-1"></a><span class="fu">mount</span> <span class="at">-t</span> nfs <span class="at">-o</span> port=<span class="va">$PORT</span>,mountport=<span class="va">$PORT</span>,tcp <span class="va">$HOSTNAME</span>:/photos/2024 path/to/mountpoint</span></code></pre></div>
<p>The subpath is resolved within the served remote and must refer to an
existing directory (not a file or a symlink). Subpath mounts are a
convenience equivalent to mounting <code>/</code> and changing
directory: they share access to the same underlying VFS and the same
file handles, so they do not isolate the client from siblings or parents
of the mounted subdirectory.</p>
<p>If <code>--vfs-metadata-extension</code> is in use then for the
<code>--nfs-cache-type disk</code> and
<code>--nfs-cache-type cache</code> the metadata files will have the
file handle of their parent file suffixed with
<code>0x00, 0x00, 0x00, 0x01</code>. This means they can be looked up
directly from the parent file handle is desired.</p>
<p>This command is only available on Unix platforms.</p>
<h2 id="vfs---virtual-file-system-6">VFS - Virtual File System</h2>
<p>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.</p>
<p>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.</p>
<p>The VFS layer also implements a directory cache - this caches info
about files and directories (but not the data) in memory.</p>
<h2 id="vfs-directory-cache-6">VFS Directory Cache</h2>
<p>Using the <code>--dir-cache-time</code> 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.</p>
<pre class="text"><code>    --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)</code></pre>
<p>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.</p>
<p>You can send a <code>SIGHUP</code> 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:</p>
<pre class="console"><code>kill -SIGHUP $(pidof rclone)</code></pre>
<p>If you configure rclone with a <a href="/rc">remote control</a> then
you can use rclone rc to flush the whole directory cache:</p>
<pre class="console"><code>rclone rc vfs/forget</code></pre>
<p>Or individual files or directories:</p>
<pre class="console"><code>rclone rc vfs/forget file=path/to/file dir=path/to/dir</code></pre>
<h2 id="vfs-file-buffering-6">VFS File Buffering</h2>
<p>The <code>--buffer-size</code> flag determines the amount of memory,
that will be used to buffer data in advance.</p>
<p>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.</p>
<p>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 yet
read. If the buffer is empty, only a small amount of memory will be
used.</p>
<p>The maximum memory used by rclone for buffering can be up to
<code>--buffer-size * open files</code>.</p>
<h2 id="vfs-file-caching-6">VFS File Caching</h2>
<p>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 cost of some compatibility.</p>
<p>For example you'll need to enable VFS caching if you want to read and
write simultaneously to a file. See below for more details.</p>
<p>Note that the VFS cache is separate from the cache backend and you
may find that you need one or the other or both.</p>
<pre class="text"><code>    --cache-dir string                     Directory rclone will use for caching.
    --vfs-cache-mode CacheMode             Cache mode off|minimal|writes|full (default off)
    --vfs-cache-max-age duration           Max time since last access of objects in the cache (default 1h0m0s)
    --vfs-cache-max-size SizeSuffix        Max total size of objects in the cache (default off)
    --vfs-cache-min-free-space SizeSuffix  Target minimum free space on the disk containing the cache (default off)
    --vfs-cache-poll-interval duration     Interval to poll the cache for stale objects (default 1m0s)
    --vfs-write-back duration              Time to writeback files after last use when using cache (default 5s)</code></pre>
<p>If run with <code>-vv</code> rclone will print the location of the
file cache. The files are stored in the user cache file area which is OS
dependent but can be controlled with <code>--cache-dir</code> or setting
the appropriate environment variable.</p>
<p>The cache has 4 different modes selected by
<code>--vfs-cache-mode</code>. The higher the cache mode the more
compatible rclone becomes at the cost of using disk space.</p>
<p>Note that files are written back to the remote only when they are
closed and if they haven't been accessed for
<code>--vfs-write-back</code> seconds. If rclone is quit or dies with
files that haven't been uploaded, these will be uploaded next time
rclone is run with the same flags.</p>
<p>If using <code>--vfs-cache-max-size</code> or
<code>--vfs-cache-min-free-space</code> note that the cache may exceed
these quotas for two reasons. Firstly because it is only checked every
<code>--vfs-cache-poll-interval</code>. Secondly because open files
cannot be evicted from the cache. When <code>--vfs-cache-max-size</code>
or <code>--vfs-cache-min-free-space</code> is exceeded, rclone will
attempt to evict the least accessed files from the cache first. rclone
will start with files that haven't been accessed for the longest. This
cache flushing strategy is efficient and more relevant files are likely
to remain cached.</p>
<p>The <code>--vfs-cache-max-age</code> will evict files from the cache
after the set time since last access has passed; it is based on access
time, not on when the file was first added to the cache. The default
value of 1 hour will start evicting files from cache that haven't been
accessed for 1 hour. When a cached file is accessed the 1 hour timer is
reset to 0 and will wait for 1 more hour before evicting. Specify the
time with standard notation, s, m, h, d, w .</p>
<p>You <strong>should not</strong> run two copies of rclone using the
same VFS cache with the same or overlapping remotes if using
<code>--vfs-cache-mode &gt; off</code>. This can potentially cause data
corruption if you do. You can work around this by giving each rclone its
own cache hierarchy with <code>--cache-dir</code>. You don't need to
worry about this if the remotes in use don't overlap.</p>
<h3 id="vfs-cache-mode-off-6">--vfs-cache-mode off</h3>
<p>In this mode (the default) the cache will read directly from the
remote and write directly to the remote without caching anything on
disk.</p>
<p>This will mean some operations are not possible</p>
<ul>
<li>Files can't be opened for both read AND write</li>
<li>Files opened for write can't be seeked</li>
<li>Existing files opened for write must have O_TRUNC set</li>
<li>Files open for read with O_TRUNC will be opened write only</li>
<li>Files open for write only will behave as if O_TRUNC was
supplied</li>
<li>Open modes O_APPEND, O_TRUNC are ignored</li>
<li>If an upload fails it can't be retried</li>
</ul>
<h3 id="vfs-cache-mode-minimal-6">--vfs-cache-mode minimal</h3>
<p>This is very similar to "off" except that files opened for read AND
write will be buffered to disk. This means that files opened for write
will be a lot more compatible, but uses the minimal disk space.</p>
<p>These operations are not possible</p>
<ul>
<li>Files opened for write only can't be seeked</li>
<li>Existing files opened for write must have O_TRUNC set</li>
<li>Files opened for write only will ignore O_APPEND, O_TRUNC</li>
<li>If an upload fails it can't be retried</li>
</ul>
<h3 id="vfs-cache-mode-writes-6">--vfs-cache-mode writes</h3>
<p>In this mode files opened for read only are still read directly from
the remote, write only and read/write files are buffered to disk
first.</p>
<p>This mode should support all normal file system operations.</p>
<p>If an upload fails it will be retried at exponentially increasing
intervals up to 1 minute.</p>
<h3 id="vfs-cache-mode-full-6">--vfs-cache-mode full</h3>
<p>In this mode all reads and writes are buffered to and from disk. When
data is read from the remote this is buffered to disk as well.</p>
<p>In this mode the files in the cache will be sparse files and rclone
will keep track of which bits of the files it has downloaded.</p>
<p>So if an application only reads the starts of each file, then rclone
will only buffer the start of the file. These files will appear to be
their full size in the cache, but they will be sparse files with only
the data that has been downloaded present in them.</p>
<p>This mode should support all normal file system operations and is
otherwise identical to <code>--vfs-cache-mode</code> writes.</p>
<p>When reading a file rclone will read <code>--buffer-size</code> plus
<code>--vfs-read-ahead</code> bytes ahead. The
<code>--buffer-size</code> is buffered in memory whereas the
<code>--vfs-read-ahead</code> is buffered on disk.</p>
<p>When using this mode it is recommended that
<code>--buffer-size</code> is not set too large and
<code>--vfs-read-ahead</code> is set large if required.</p>
<p><strong>IMPORTANT</strong> not all file systems support sparse files.
In particular FAT/exFAT do not. Rclone will perform very badly if the
cache directory is on a filesystem which doesn't support sparse files
and it will log an ERROR message if one is detected.</p>
<h3 id="fingerprinting-6">Fingerprinting</h3>
<p>Various parts of the VFS use fingerprinting to see if a local file
copy has changed relative to a remote file. Fingerprints are made
from:</p>
<ul>
<li>size</li>
<li>modification time</li>
<li>hash</li>
</ul>
<p>where available on an object.</p>
<p>On some backends some of these attributes are slow to read (they take
an extra API call per object, or extra work per object).</p>
<p>For example <code>hash</code> is slow with the <code>local</code> and
<code>sftp</code> backends as they have to read the entire file and hash
it, and <code>modtime</code> is slow with the <code>s3</code>,
<code>swift</code>, <code>ftp</code> and <code>qinqstor</code> backends
because they need to do an extra API call to fetch it.</p>
<p>If you use the <code>--vfs-fast-fingerprint</code> flag then rclone
will not include the slow operations in the fingerprint. This makes the
fingerprinting less accurate but much faster and will improve the
opening time of cached files.</p>
<p>If you are running a vfs cache over <code>local</code>,
<code>s3</code> or <code>swift</code> backends then using this flag is
recommended.</p>
<p>Note that if you change the value of this flag, the fingerprints of
the files in the cache may be invalidated and the files will need to be
downloaded again.</p>
<h2 id="vfs-chunked-reading-6">VFS Chunked Reading</h2>
<p>When rclone reads files from a remote it reads them in chunks. This
means that rather than requesting the whole file rclone reads the chunk
specified. This can reduce the used download quota for some remotes by
requesting only chunks from the remote that are actually read, at the
cost of an increased number of requests.</p>
<p>These flags control the chunking:</p>
<pre class="text"><code>    --vfs-read-chunk-size SizeSuffix        Read the source objects in chunks (default 128M)
    --vfs-read-chunk-size-limit SizeSuffix  Max chunk doubling size (default off)
    --vfs-read-chunk-streams int            The number of parallel streams to read at once</code></pre>
<p>The chunking behaves differently depending on the
<code>--vfs-read-chunk-streams</code> parameter.</p>
<h3
id="vfs-read-chunk-streams-0-12"><code>--vfs-read-chunk-streams</code>
== 0</h3>
<p>Rclone will start reading a chunk of size
<code>--vfs-read-chunk-size</code>, and then double the size for each
read. When <code>--vfs-read-chunk-size-limit</code> is specified, and
greater than <code>--vfs-read-chunk-size</code>, the chunk size for each
open file will get doubled only until the specified value is reached. If
the value is "off", which is the default, the limit is disabled and the
chunk size will grow indefinitely.</p>
<p>With <code>--vfs-read-chunk-size 100M</code> and
<code>--vfs-read-chunk-size-limit 0</code> the following parts will be
downloaded: 0-100M, 100M-200M, 200M-300M, 300M-400M and so on. When
<code>--vfs-read-chunk-size-limit 500M</code> is specified, the result
would be 0-100M, 100M-300M, 300M-700M, 700M-1200M, 1200M-1700M and so
on.</p>
<p>Setting <code>--vfs-read-chunk-size</code> to <code>0</code> or "off"
disables chunked reading.</p>
<p>The chunks will not be buffered in memory.</p>
<h3
id="vfs-read-chunk-streams-0-13"><code>--vfs-read-chunk-streams</code>
&gt; 0</h3>
<p>Rclone reads <code>--vfs-read-chunk-streams</code> chunks of size
<code>--vfs-read-chunk-size</code> concurrently. The size for each read
will stay constant.</p>
<p>This improves performance massively on high latency links or very
high bandwidth links to high performance object stores.</p>
<p>Some experimentation will be needed to find the optimum values of
<code>--vfs-read-chunk-size</code> and
<code>--vfs-read-chunk-streams</code> as these will depend on the
backend in use and the latency to the backend.</p>
<p>For high performance object stores (eg AWS S3) a reasonable place to
start might be <code>--vfs-read-chunk-streams 16</code> and
<code>--vfs-read-chunk-size 4M</code>. In testing with AWS S3 the
performance scaled roughly as the <code>--vfs-read-chunk-streams</code>
setting.</p>
<p>Similar settings should work for high latency links, but depending on
the latency they may need more <code>--vfs-read-chunk-streams</code> in
order to get the throughput.</p>
<h2 id="vfs-performance-6">VFS Performance</h2>
<p>These flags may be used to enable/disable features of the VFS for
performance or other reasons. See also the <a
href="#vfs-chunked-reading">chunked reading</a> feature.</p>
<p>In particular S3 and Swift benefit hugely from the
<code>--no-modtime</code> flag (or use <code>--use-server-modtime</code>
for a slightly different effect) as each read of the modification time
takes a transaction.</p>
<pre class="text"><code>    --no-checksum     Don&#39;t compare checksums on up/download.
    --no-modtime      Don&#39;t read/write the modification time (can speed things up).
    --no-seek         Don&#39;t allow seeking in files.
    --read-only       Only allow read-only access.</code></pre>
<p>Sometimes rclone is delivered reads or writes out of order. Rather
than seeking rclone will wait a short time for the in sequence read or
write to come in. These flags only come into effect when not using an on
disk cache file.</p>
<pre class="text"><code>    --vfs-read-wait duration   Time to wait for in-sequence read before seeking (default 20ms)
    --vfs-write-wait duration  Time to wait for in-sequence write before giving error (default 1s)</code></pre>
<p>When using VFS write caching (<code>--vfs-cache-mode</code> with
value writes or full), the global flag <code>--transfers</code> can be
set to adjust the number of parallel uploads of modified files from the
cache (the related global flag <code>--checkers</code> has no effect on
the VFS).</p>
<pre class="text"><code>    --transfers int  Number of file transfers to run in parallel (default 4)</code></pre>
<h2 id="symlinks-6">Symlinks</h2>
<p>By default the VFS does not support symlinks. However this may be
enabled with either of the following flags:</p>
<pre class="text"><code>    --links      Translate symlinks to/from regular files with a &#39;.rclonelink&#39; extension.
    --vfs-links  Translate symlinks to/from regular files with a &#39;.rclonelink&#39; extension for the VFS</code></pre>
<p>As most cloud storage systems do not support symlinks directly,
rclone stores the symlink as a normal file with a special extension. So
a file which appears as a symlink <code>link-to-file.txt</code> would be
stored on cloud storage as <code>link-to-file.txt.rclonelink</code> and
the contents would be the path to the symlink destination.</p>
<p>Note that <code>--links</code> enables symlink translation globally
in rclone - this includes any backend which supports the concept (for
example the local backend). <code>--vfs-links</code> just enables it for
the VFS layer.</p>
<p>This scheme is compatible with that used by the <a
href="https://rclone.org/local/#symlinks-junction-points">local backend
with the --local-links flag</a>.</p>
<p>The <code>--vfs-links</code> flag has been designed for
<code>rclone mount</code>, <code>rclone nfsmount</code> and
<code>rclone serve nfs</code>.</p>
<p>It hasn't been tested with the other <code>rclone serve</code>
commands yet.</p>
<p>A limitation of the current implementation is that it expects the
caller to resolve sub-symlinks. For example given this directory
tree</p>
<pre class="text"><code>.
├── dir
│   └── file.txt
└── linked-dir -&gt; dir</code></pre>
<p>The VFS will correctly resolve <code>linked-dir</code> but not
<code>linked-dir/file.txt</code>. This is not a problem for the tested
commands but may be for other commands.</p>
<p><strong>Note</strong> that there is an outstanding issue with symlink
support <a href="https://github.com/rclone/rclone/issues/8245">issue
#8245</a> with duplicate files being created when symlinks are moved
into directories where there is a file of the same name (or vice
versa).</p>
<h2 id="vfs-case-sensitivity-6">VFS Case Sensitivity</h2>
<p>Linux file systems are case-sensitive: two files can differ only by
case, and the exact case must be used when opening a file.</p>
<p>File systems in modern Windows are case-insensitive but
case-preserving: although existing files can be opened using any case,
the exact case used to create the file is preserved and available for
programs to query. It is not allowed for two files in the same directory
to differ only by case.</p>
<p>Usually file systems on macOS are case-insensitive. It is possible to
make macOS file systems case-sensitive but that is not the default.</p>
<p>The <code>--vfs-case-insensitive</code> VFS flag controls how rclone
handles these two cases. If its value is "false", rclone passes file
names to the remote as-is. If the flag is "true" (or appears without a
value on the command line), rclone may perform a "fixup" as explained
below.</p>
<p>The user may specify a file name to open/delete/rename/etc with a
case different than what is stored on the remote. If an argument refers
to an existing file with exactly the same name, then the case of the
existing file on the disk will be used. However, if a file name with
exactly the same name is not found but a name differing only by case
exists, rclone will transparently fixup the name. This fixup happens
only when an existing file is requested. Case sensitivity of file names
created anew by rclone is controlled by the underlying remote.</p>
<p>Note that case sensitivity of the operating system running rclone
(the target) may differ from case sensitivity of a file system presented
by rclone (the source). The flag controls whether "fixup" is performed
to satisfy the target.</p>
<p>If the flag is not provided on the command line, then its default
value depends on the operating system where rclone runs: "true" on
Windows and macOS, "false" otherwise. If the flag is provided without a
value, then it is "true".</p>
<p>The <code>--no-unicode-normalization</code> flag controls whether a
similar "fixup" is performed for filenames that differ but are <a
href="https://en.wikipedia.org/wiki/Unicode_equivalence">canonically
equivalent</a> with respect to unicode. Unicode normalization can be
particularly helpful for users of macOS, which prefers form NFD instead
of the NFC used by most other platforms. It is therefore highly
recommended to keep the default of <code>false</code> on macOS, to avoid
encoding compatibility issues.</p>
<p>In the (probably unlikely) event that a directory has multiple
duplicate filenames after applying case and unicode normalization, the
<code>--vfs-block-norm-dupes</code> flag allows hiding these duplicates.
This comes with a performance tradeoff, as rclone will have to scan the
entire directory for duplicates when listing a directory. For this
reason, it is recommended to leave this disabled if not needed. However,
macOS users may wish to consider using it, as otherwise, if a remote
directory contains both NFC and NFD versions of the same filename, an
odd situation will occur: both versions of the file will be visible in
the mount, and both will appear to be editable, however, editing either
version will actually result in only the NFD version getting edited
under the hood. <code>--vfs-block- norm-dupes</code> prevents this
confusion by detecting this scenario, hiding the duplicates, and logging
an error, similar to how this is handled in
<code>rclone sync</code>.</p>
<h2 id="vfs-disk-options-6">VFS Disk Options</h2>
<p>This flag allows you to manually set the statistics about the filing
system. It can be useful when those statistics cannot be read correctly
automatically.</p>
<pre class="text"><code>    --vfs-disk-space-total-size    Manually set the total disk space size (example: 256G, default: -1)</code></pre>
<h2 id="alternate-report-of-used-bytes-6">Alternate report of used
bytes</h2>
<p>Some backends, most notably S3, do not report the amount of bytes
used. If you need this information to be available when running
<code>df</code> on the filesystem, then pass the flag
<code>--vfs-used-is-size</code> to rclone. With this flag set, instead
of relying on the backend to report this information, rclone will scan
the whole remote similar to <code>rclone size</code> and compute the
total used space itself.</p>
<p><strong>WARNING</strong>: Contrary to <code>rclone size</code>, this
flag ignores filters so that the result is accurate. However, this is
very inefficient and may cost lots of API calls resulting in extra
charges. Use it as a last resort and only with caching.</p>
<h2 id="vfs-metadata-6">VFS Metadata</h2>
<p>If you use the <code>--vfs-metadata-extension</code> flag you can get
the VFS to expose files which contain the <a
href="https://rclone.org/docs/#metadata">metadata</a> as a JSON blob.
These files will not appear in the directory listing, but can be
<code>stat</code>-ed and opened and once they have been they
<strong>will</strong> appear in directory listings until the directory
cache expires.</p>
<p>Note that some backends won't create metadata unless you pass in the
<code>--metadata</code> flag.</p>
<p>For example, using <code>rclone mount</code> with
<code>--metadata --vfs-metadata-extension .metadata</code> we get</p>
<pre class="console"><code>$ ls -l /mnt/
total 1048577
-rw-rw-r-- 1 user user 1073741824 Mar  3 16:03 1G

$ cat /mnt/1G.metadata
{
        &quot;atime&quot;: &quot;2025-03-04T17:34:22.317069787Z&quot;,
        &quot;btime&quot;: &quot;2025-03-03T16:03:37.708253808Z&quot;,
        &quot;gid&quot;: &quot;1000&quot;,
        &quot;mode&quot;: &quot;100664&quot;,
        &quot;mtime&quot;: &quot;2025-03-03T16:03:39.640238323Z&quot;,
        &quot;uid&quot;: &quot;1000&quot;
}

$ ls -l /mnt/
total 1048578
-rw-rw-r-- 1 user user 1073741824 Mar  3 16:03 1G
-rw-rw-r-- 1 user user        185 Mar  3 16:03 1G.metadata</code></pre>
<p>If the file has no metadata it will be returned as <code>{}</code>
and if there is an error reading the metadata the error will be returned
as <code>{"error":"error string"}</code>.</p>
<pre><code>rclone serve nfs remote:path [flags]</code></pre>
<h2 id="options-84">Options</h2>
<pre><code>      --addr string                            IPaddress:Port or :Port to bind server to
      --dir-cache-time Duration                Time to cache directory entries for (default 5m0s)
      --dir-perms FileMode                     Directory permissions (default 777)
      --file-perms FileMode                    File permissions (default 666)
      --gid uint32                             Override the gid field set by the filesystem (not supported on Windows) (default 1000)
  -h, --help                                   help for nfs
      --link-perms FileMode                    Link permissions (default 666)
      --nfs-cache-dir string                   The directory the NFS handle cache will use if set
      --nfs-cache-handle-limit int             max file handles cached simultaneously (min 5) (default 1000000)
      --nfs-cache-type memory|disk|symlink     Type of NFS handle cache to use (default memory)
      --no-checksum                            Don&#39;t compare checksums on up/download
      --no-modtime                             Don&#39;t read/write the modification time (can speed things up)
      --no-seek                                Don&#39;t allow seeking in files
      --poll-interval Duration                 Time to wait between polling for changes, must be smaller than dir-cache-time and only on supported remotes (set 0 to disable) (default 1m0s)
      --read-only                              Only allow read-only access
      --uid uint32                             Override the uid field set by the filesystem (not supported on Windows) (default 1000)
      --umask FileMode                         Override the permission bits set by the filesystem (not supported on Windows) (default 002)
      --vfs-block-norm-dupes                   If duplicate filenames exist in the same directory (after normalization), log an error and hide the duplicates (may have a performance cost)
      --vfs-cache-max-age Duration             Max time since last access of objects in the cache (default 1h0m0s)
      --vfs-cache-max-size SizeSuffix          Max total size of objects in the cache (default off)
      --vfs-cache-min-free-space SizeSuffix    Target minimum free space on the disk containing the cache (default off)
      --vfs-cache-mode CacheMode               Cache mode off|minimal|writes|full (default off)
      --vfs-cache-poll-interval Duration       Interval to poll the cache for stale objects (default 1m0s)
      --vfs-case-insensitive                   If a file name not found, find a case insensitive match
      --vfs-disk-space-total-size SizeSuffix   Specify the total space of disk (default off)
      --vfs-fast-fingerprint                   Use fast (less accurate) fingerprints for change detection
      --vfs-handle-caching Duration            Time to keep file handle and downloaders alive after last close (default 5s)
      --vfs-links                              Translate symlinks to/from regular files with a &#39;.rclonelink&#39; extension for the VFS
      --vfs-metadata-extension string          Set the extension to read metadata from
      --vfs-read-ahead SizeSuffix              Extra read ahead over --buffer-size when using cache-mode full
      --vfs-read-chunk-size SizeSuffix         Read the source objects in chunks (default 128Mi)
      --vfs-read-chunk-size-limit SizeSuffix   If greater than --vfs-read-chunk-size, double the chunk size after each chunk read, until the limit is reached (&#39;off&#39; is unlimited) (default off)
      --vfs-read-chunk-streams int             The number of parallel streams to read at once
      --vfs-read-wait Duration                 Time to wait for in-sequence read before seeking (default 20ms)
      --vfs-refresh                            Refreshes the directory cache recursively in the background on start
      --vfs-used-is-size rclone size           Use the rclone size algorithm for Used size
      --vfs-write-back Duration                Time to writeback files after last use when using cache (default 5s)
      --vfs-write-wait Duration                Time to wait for in-sequence write before giving error (default 1s)</code></pre>
<p>Options shared with other commands are described next. See the <a
href="https://rclone.org/flags/">global flags page</a> for global
options not listed here.</p>
<h3 id="filter-options-29">Filter Options</h3>
<p>Flags for filtering directory listings</p>
<pre class="text"><code>      --delete-excluded                     Delete files on dest excluded from sync
      --exclude stringArray                 Exclude files matching pattern
      --exclude-from stringArray            Read file exclude patterns from file (use - to read from stdin)
      --exclude-if-present stringArray      Exclude directories if filename is present
      --files-from stringArray              Read list of source-file names from file (use - to read from stdin)
      --files-from-raw stringArray          Read list of source-file names from file without any processing of lines (use - to read from stdin)
      --files-from0 stringArray             Read list of source-file names from file using NUL as separator (use - to read from stdin)
  -f, --filter stringArray                  Add a file filtering rule
      --filter-from stringArray             Read file filtering patterns from a file (use - to read from stdin)
      --hash-filter string                  Partition filenames by hash k/n or randomly @/n
      --ignore-case                         Ignore case in filters (case insensitive)
      --include stringArray                 Include files matching pattern
      --include-from stringArray            Read file include patterns from file (use - to read from stdin)
      --max-age Duration                    Only transfer files younger than this in s or suffix ms|s|m|h|d|w|M|y (default off)
      --max-depth int                       If set limits the recursion depth to this (default -1)
      --max-size SizeSuffix                 Only transfer files smaller than this in KiB or suffix B|K|M|G|T|P (default off)
      --metadata-exclude stringArray        Exclude metadatas matching pattern
      --metadata-exclude-from stringArray   Read metadata exclude patterns from file (use - to read from stdin)
      --metadata-filter stringArray         Add a metadata filtering rule
      --metadata-filter-from stringArray    Read metadata filtering patterns from a file (use - to read from stdin)
      --metadata-include stringArray        Include metadatas matching pattern
      --metadata-include-from stringArray   Read metadata include patterns from file (use - to read from stdin)
      --min-age Duration                    Only transfer files older than this in s or suffix ms|s|m|h|d|w|M|y (default off)
      --min-size SizeSuffix                 Only transfer files bigger than this in KiB or suffix B|K|M|G|T|P (default off)</code></pre>
<h2 id="see-also-84">See Also</h2>
<!-- markdownlint-capture -->
<!-- markdownlint-disable ul-style line-length -->
<ul>
<li><a href="https://rclone.org/commands/rclone_serve/">rclone serve</a>
- Serve a remote over a protocol.</li>
</ul>
<!-- markdownlint-restore -->
<h1 id="rclone-serve-restic">rclone serve restic</h1>
<p>Serve the remote for restic's REST API.</p>
<h2 id="synopsis-78">Synopsis</h2>
<p>Run a basic web server to serve a remote over restic's REST backend
API over HTTP. This allows restic to use rclone as a data storage
mechanism for cloud providers that restic does not support directly.</p>
<p><a href="https://restic.net/">Restic</a> is a command-line program
for doing backups.</p>
<p>The server will log errors. Use -v to see access logs.</p>
<p><code>--bwlimit</code> will be respected for file transfers. Use
<code>--stats</code> to control the stats printing.</p>
<h2 id="setting-up-rclone-for-use-by-restic">Setting up rclone for use
by restic</h2>
<p>First <a href="https://rclone.org/docs/#configure">set up a remote
for your chosen cloud provider</a>.</p>
<p>Once you have set up the remote, check it is working with, for
example "rclone lsd remote:". You may have called the remote something
other than "remote:" - just substitute whatever you called it in the
following instructions.</p>
<p>Now start the rclone restic server</p>
<pre class="console"><code>rclone serve restic -v remote:backup</code></pre>
<p>Where you can replace "backup" in the above by whatever path in the
remote you wish to use.</p>
<p>By default this will serve on "localhost:8080" you can change this
with use of the <code>--addr</code> flag.</p>
<p>You might wish to start this server on boot.</p>
<p>Adding <code>--cache-objects=false</code> will cause rclone to stop
caching objects returned from the List call. Caching is normally
desirable as it speeds up downloading objects, saves transactions and
uses very little memory.</p>
<h2 id="setting-up-restic-to-use-rclone">Setting up restic to use
rclone</h2>
<p>Now you can <a
href="http://restic.readthedocs.io/en/latest/030_preparing_a_new_repo.html#rest-server">follow
the restic instructions</a> on setting up restic.</p>
<p>Note that you will need restic 0.8.2 or later to interoperate with
rclone.</p>
<p>For the example above you will want to use "http://localhost:8080/"
as the URL for the REST server.</p>
<p>For example:</p>
<pre class="console"><code>$ export RESTIC_REPOSITORY=rest:http://localhost:8080/
$ export RESTIC_PASSWORD=yourpassword
$ restic init
created restic backend 8b1a4b56ae at rest:http://localhost:8080/

Please note that knowledge of your password is required to access
the repository. Losing your password means that your data is
irrecoverably lost.
$ restic backup /path/to/files/to/backup
scan [/path/to/files/to/backup]
scanned 189 directories, 312 files in 0:00
[0:00] 100.00%  38.128 MiB / 38.128 MiB  501 / 501 items  0 errors  ETA 0:00
duration: 0:00
snapshot 45c8fdd8 saved
</code></pre>
<h3 id="multiple-repositories">Multiple repositories</h3>
<p>Note that you can use the endpoint to host multiple repositories. Do
this by adding a directory name or path after the URL. Note that these
<strong>must</strong> end with /. Eg</p>
<pre class="console"><code>$ export RESTIC_REPOSITORY=rest:http://localhost:8080/user1repo/
# backup user1 stuff
$ export RESTIC_REPOSITORY=rest:http://localhost:8080/user2repo/
# backup user2 stuff</code></pre>
<h3 id="private-repositories">Private repositories</h3>
<p>The<code>--private-repos</code> flag can be used to limit users to
repositories starting with a path of
<code>/&lt;username&gt;/</code>.</p>
<h2 id="server-options-4">Server options</h2>
<p>Use <code>--addr</code> to specify which IP address and port the
server should listen on, eg <code>--addr 1.2.3.4:8000</code> or
<code>--addr :8080</code> to listen to all IPs. By default it only
listens on localhost. You can use port :0 to let the OS choose an
available port.</p>
<p>If you set <code>--addr</code> to listen on a public or LAN
accessible IP address then using Authentication is advised - see the
next section for info.</p>
<p>You can use a unix socket by setting the url to
<code>unix:///path/to/socket</code> or just by using an absolute path
name.</p>
<p><code>--addr</code> may be repeated to listen on multiple
IPs/ports/sockets. Socket activation, described further below, can also
be used to accomplish the same.</p>
<p><code>--server-read-timeout</code> and
<code>--server-write-timeout</code> can be used to control the timeouts
on the server. Note that this is the total time for a transfer.</p>
<p><code>--max-header-bytes</code> controls the maximum number of bytes
the server will accept in the HTTP header.</p>
<p><code>--response-header</code> can be used to set an HTTP header for
all responses, will overriding existing values. The flag may be repeated
to add multiple headers. Use the format
<code>Header-Name: value</code>.</p>
<p><code>--allow-origin</code> enables cross-origin (CORS) requests from
browsers by setting the <code>Access-Control-Allow-Origin</code> header
on every response to the origin given, e.g.
<code>--allow-origin https://app.example.com</code>. Browser CORS
preflight OPTIONS requests are answered by rclone without needing
authentication as browsers never send credentials with them. Setting
this to <code>*</code> allows any origin which is a security risk on an
authenticated server.</p>
<p><code>--baseurl</code> controls the URL prefix that rclone serves
from. By default rclone will serve from the root. If you used
<code>--baseurl "/rclone"</code> then rclone would serve from a URL
starting with "/rclone/". This is useful if you wish to proxy rclone
serve. Rclone automatically inserts leading and trailing "/" on
<code>--baseurl</code>, so <code>--baseurl "rclone"</code>,
<code>--baseurl "/rclone"</code> and <code>--baseurl "/rclone/"</code>
are all treated identically.</p>
<p><code>--disable-zip</code> may be set to disable the zipping download
option.</p>
<h3 id="protocol-2">Protocol</h3>
<p>The server supports HTTP/1.1 and HTTP/2. HTTP/2 is used automatically
for TLS connections. For non-TLS connections, HTTP/2 cleartext (h2c) is
supported, allowing HTTP/2 without encryption.</p>
<h3 id="tls-ssl-2">TLS (SSL)</h3>
<p>By default this will serve over http. If you want you can serve over
https. You will need to supply the <code>--cert</code> and
<code>--key</code> flags. If you wish to do client side certificate
validation then you will need to supply <code>--client-ca</code>
also.</p>
<p>When TLS is configured every listener given with <code>--addr</code>
serves TLS. An individual listener can be prefixed with
<code>http://</code> to serve unencrypted HTTP on that address, or with
<code>tls://</code> to state explicitly that it must serve TLS. Using a
<code>tls://</code> address without <code>--cert</code> and
<code>--key</code> is an error.</p>
<p><code>--cert</code> must be set to the path of a file containing
either a PEM encoded certificate, or a concatenation of that with the CA
certificate. <code>--key</code> must be set to the path of a file with
the PEM encoded private key. If setting <code>--client-ca</code>, it
should be set to the path of a file with PEM encoded client certificate
authority certificates.</p>
<p><code>--min-tls-version</code> is minimum TLS version that is
acceptable. Valid values are "tls1.0", "tls1.1", "tls1.2" and "tls1.3"
(default "tls1.0").</p>
<h2 id="socket-activation-2">Socket activation</h2>
<p>Instead of the listening addresses specified above, rclone will
listen to all FDs passed by the service manager, if any (and ignore any
arguments passed by <code>--addr</code>).</p>
<p>This allows rclone to be a socket-activated service. It can be
configured with .socket and .service unit files as described in <a
href="https://www.freedesktop.org/software/systemd/man/latest/systemd.socket.html"
class="uri">https://www.freedesktop.org/software/systemd/man/latest/systemd.socket.html</a>.</p>
<p>Socket activation can be tested ad-hoc with the
<code>systemd-socket-activate</code>command</p>
<pre class="console"><code>systemd-socket-activate -l 8000 -- rclone serve</code></pre>
<p>This will socket-activate rclone on the first connection to port 8000
over TCP.</p>
<h3 id="authentication-3">Authentication</h3>
<p>By default this will serve files without needing a login.</p>
<p>You can either use an htpasswd file which can take lots of users, or
set a single username and password with the <code>--user</code> and
<code>--pass</code> flags.</p>
<p>Alternatively, you can have the reverse proxy manage authentication
and use the username provided in the configured header with
<code>--user-from-header</code> (e.g.,
<code>--user-from-header=x-remote-user</code>). Ensure the proxy is
trusted and headers cannot be spoofed, as misconfiguration may lead to
unauthorized access.</p>
<p>If either of the above authentication methods is not configured and
client certificates are required by the <code>--client-ca</code> flag
passed to the server, the client certificate common name will be
considered as the username.</p>
<p>Use <code>--htpasswd /path/to/htpasswd</code> to provide an htpasswd
file. This is in standard apache format and supports MD5, SHA1 and
BCrypt for basic authentication. Bcrypt is recommended.</p>
<p>To create an htpasswd file:</p>
<pre class="console"><code>touch htpasswd
htpasswd -B htpasswd user
htpasswd -B htpasswd anotherUser</code></pre>
<p>Use the same hash format and cost for every entry in the file. If the
entries differ, the time taken to reject a wrong password can reveal
which usernames exist.</p>
<p>The password file can be updated while rclone is running.</p>
<p>When authentication is enabled every request must be authenticated,
including HTTP OPTIONS requests, as the answer to an OPTIONS request can
reveal whether a path exists. Health checks or monitoring which use
unauthenticated OPTIONS requests will need to send credentials. The
exception is browser CORS preflight requests when
<code>--allow-origin</code> is set, which are answered without
authentication as browsers never send credentials with them.</p>
<p>Use <code>--realm</code> to set the authentication realm.</p>
<p>Use <code>--salt</code> to change the password hashing salt from the
default.</p>
<pre><code>rclone serve restic remote:path [flags]</code></pre>
<h2 id="options-85">Options</h2>
<pre><code>      --addr stringArray                IPaddress:Port or :Port to bind server to (default 127.0.0.1:8080)
      --allow-origin string             Origin which cross-domain request (CORS) can be executed from
      --append-only                     Disallow deletion of repository data
      --baseurl string                  Prefix for URLs - leave blank for root
      --cache-objects                   Cache listed objects (default true)
      --cert string                     TLS PEM key (concatenation of certificate and CA certificate)
      --client-ca string                Client certificate authority to verify clients with
  -h, --help                            help for restic
      --htpasswd string                 A htpasswd file - if not provided no authentication is done
      --key string                      TLS PEM Private key
      --max-header-bytes int            Maximum size of request header (default 4096)
      --min-tls-version string          Minimum TLS version that is acceptable (default &quot;tls1.0&quot;)
      --pass string                     Password for authentication
      --private-repos                   Users can only access their private repo
      --realm string                    Realm for authentication
      --response-header stringArray     Set HTTP header for all responses, overriding existing values
      --salt string                     Password hashing salt (default &quot;dlPL2MqE&quot;)
      --server-read-timeout Duration    Timeout for server reading data (default 1h0m0s)
      --server-write-timeout Duration   Timeout for server writing data (default 1h0m0s)
      --stdio                           Run an HTTP2 server on stdin/stdout
      --user string                     User name for authentication
      --user-from-header string         User name from a defined HTTP header</code></pre>
<p>See the <a href="https://rclone.org/flags/">global flags page</a> for
global options not listed here.</p>
<h2 id="see-also-85">See Also</h2>
<!-- markdownlint-capture -->
<!-- markdownlint-disable ul-style line-length -->
<ul>
<li><a href="https://rclone.org/commands/rclone_serve/">rclone serve</a>
- Serve a remote over a protocol.</li>
</ul>
<!-- markdownlint-restore -->
<h1 id="rclone-serve-s3">rclone serve s3</h1>
<p>Serve remote:path over s3.</p>
<h2 id="synopsis-79">Synopsis</h2>
<p><code>serve s3</code> implements a basic s3 server that serves a
remote via s3. This can be viewed with an s3 client, or you can make an
<a href="https://rclone.org/s3/">s3 type remote</a> to read and write to
it with rclone.</p>
<p><code>serve s3</code> is considered <strong>Experimental</strong> so
use with care.</p>
<p>S3 server supports Signature Version 4 authentication. Just use
<code>--auth-key accessKey,secretKey</code> and set the
<code>Authorization</code> header correctly in the request. (See the <a
href="https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html">AWS
docs</a>).</p>
<p><code>--auth-key</code> can be repeated for multiple auth pairs. If
<code>--auth-key</code> is not provided then <code>serve s3</code> will
allow anonymous access.</p>
<p>Alternatively <code>--auth-proxy</code> can be used to look up the
secret for each access key ID and choose the backend it maps to (see <a
href="#auth-proxy">Auth Proxy</a> below). When an auth proxy is in use
<code>--auth-key</code> is ignored and every request must be signed with
the secret the proxy returns for its access key ID. Each access key ID
is a separate user, whose multipart uploads and object metadata are
private to it, even if the proxy maps several access key IDs to the same
backend.</p>
<p>As on AWS, every <code>x-amz-*</code> header in an authenticated
request must be in its signed headers list; a request with an unsigned
<code>x-amz-*</code> header is refused with <code>AccessDenied</code>.
S3 clients sign these headers as a matter of course, but a header added
after signing (for example by a proxy in front of the server, or
<code>x-amz-meta-*</code> headers sent with a presigned URL which only
signs the host) is refused.</p>
<p>Like all rclone flags <code>--auth-key</code> can be set via
environment variables, in this case <code>RCLONE_AUTH_KEY</code>. Since
this flag can be repeated, the input to <code>RCLONE_AUTH_KEY</code> is
CSV encoded. Because the <code>accessKey,secretKey</code> has a comma
in, this means it needs to be in quotes.</p>
<pre class="console"><code>export RCLONE_AUTH_KEY=&#39;&quot;user,pass&quot;&#39;
rclone serve s3 ...</code></pre>
<p>Or to supply multiple identities:</p>
<pre class="console"><code>export RCLONE_AUTH_KEY=&#39;&quot;user1,pass1&quot;,&quot;user2,pass2&quot;&#39;
rclone serve s3 ...</code></pre>
<p>Setting this variable without quotes will produce an error.</p>
<p>Please note that some clients may require HTTPS endpoints. See <a
href="#tls-ssl">the SSL docs</a> for more information.</p>
<p>This command uses the <a href="#vfs-virtual-file-system">VFS
directory cache</a>. All the functionality will work with
<code>--vfs-cache-mode off</code>. Using
<code>--vfs-cache-mode full</code> (or <code>writes</code>) can be used
to cache objects locally to improve performance.</p>
<p>Use <code>--force-path-style=false</code> if you want to use the
bucket name as a part of the hostname (such as mybucket.local)</p>
<p>Use <code>--etag-hash</code> if you want to change the hash uses for
the <code>ETag</code>. Note that using anything other than
<code>MD5</code> (the default) is likely to cause problems for S3
clients which rely on the Etag being the MD5. Use
<code>--etag-hash auto</code> to use the best hash the backend supports
- with <code>--auth-proxy</code> that of each user's backend.</p>
<p>The <code>ETag</code> of an object made by a multipart upload is its
hash, like any other object, rather than the <code>-N</code> suffixed
<code>ETag</code> AWS S3 gives these. If the remote doesn't have the MD5
of objects, <code>HeadObject</code> and listings only return the MD5 of
objects uploaded through <code>serve s3</code> while the object's
metadata is kept (see below).</p>
<h2 id="quickstart-1">Quickstart</h2>
<p>For a simple set up, to serve <code>remote:path</code> over s3, run
the server like this:</p>
<pre class="console"><code>rclone serve s3 --auth-key ACCESS_KEY_ID,SECRET_ACCESS_KEY remote:path</code></pre>
<p>For example, to use a simple folder in the filesystem, run the server
with a command like this:</p>
<pre class="console"><code>rclone serve s3 --auth-key ACCESS_KEY_ID,SECRET_ACCESS_KEY local:/path/to/folder</code></pre>
<p>The <code>rclone.conf</code> for the server could look like this:</p>
<div class="sourceCode" id="cb579"><pre
class="sourceCode ini"><code class="sourceCode ini"><span id="cb579-1"><a href="#cb579-1" aria-hidden="true" tabindex="-1"></a><span class="kw">[local]</span></span>
<span id="cb579-2"><a href="#cb579-2" aria-hidden="true" tabindex="-1"></a><span class="dt">type </span><span class="ot">=</span><span class="st"> local</span></span></code></pre></div>
<p>The <code>local</code> configuration is optional though. If you run
the server with a <code>remote:path</code> like
<code>/path/to/folder</code> (without the <code>local:</code> prefix and
without an <code>rclone.conf</code> file), rclone will fall back to a
default configuration, which will be visible as a warning in the logs.
But it will run nonetheless.</p>
<p>This will be compatible with an rclone (client) remote configuration
which is defined like this:</p>
<div class="sourceCode" id="cb580"><pre
class="sourceCode ini"><code class="sourceCode ini"><span id="cb580-1"><a href="#cb580-1" aria-hidden="true" tabindex="-1"></a><span class="kw">[serves3]</span></span>
<span id="cb580-2"><a href="#cb580-2" aria-hidden="true" tabindex="-1"></a><span class="dt">type </span><span class="ot">=</span><span class="st"> s3</span></span>
<span id="cb580-3"><a href="#cb580-3" aria-hidden="true" tabindex="-1"></a><span class="dt">provider </span><span class="ot">=</span><span class="st"> Rclone</span></span>
<span id="cb580-4"><a href="#cb580-4" aria-hidden="true" tabindex="-1"></a><span class="dt">endpoint </span><span class="ot">=</span><span class="st"> http://127.0.0.1:8080/</span></span>
<span id="cb580-5"><a href="#cb580-5" aria-hidden="true" tabindex="-1"></a><span class="dt">access_key_id </span><span class="ot">=</span><span class="st"> ACCESS_KEY_ID</span></span>
<span id="cb580-6"><a href="#cb580-6" aria-hidden="true" tabindex="-1"></a><span class="dt">secret_access_key </span><span class="ot">=</span><span class="st"> SECRET_ACCESS_KEY</span></span></code></pre></div>
<h2 id="object-uploads-put">Object uploads (PUT)</h2>
<p>A <code>PutObject</code> upload only ever changes the object at its
key atomically, on success, a failed or interrupted PUT neither removes
nor overwrites the object already stored at the key, and never leaves a
partial object visible at it.</p>
<p>Remotes that upload atomically (e.g. object stores such as
<code>s3</code>) are streamed straight to the destination. On remotes
where a partial upload would otherwise be visible (e.g.
<code>local</code>), and whenever <code>--vfs-cache-mode</code> is
<code>writes</code> or above, the upload is written to a temporary
object that is renamed into place on success; these remotes need to
support a server-side move or copy for this (nearly all do - without
move or copy the upload is written directly and a failed PUT may leave a
partial object at the key). If <code>serve s3</code> is killed part-way
through an upload the temporary object (named with a leading
<code>.rclone_temp_put_</code>) may be left behind; it is hidden from S3
listings but must be removed manually.</p>
<h2 id="multipart-uploads">Multipart uploads</h2>
<p>Multipart uploads are written, in part-number order, to a temporary
object which is renamed into place, server-side, on completion, so the
upload is atomic. The object at the key only ever changes on a
successful completion. A failed or aborted upload never affects any
object already stored under that name and a partly-uploaded object never
becomes visible under it.</p>
<p>With the default <code>--vfs-cache-mode off</code>
<code>serve s3</code> <strong>streams</strong> each multipart upload, in
part-number order, into a single streaming upload to the underlying
remote, so the whole file is never buffered in memory: only parts which
arrive out of order are buffered, within the limits described below. The
remote then performs its own internal upload (for example its own
multipart upload, still with bounded memory). Remotes that don't support
streaming uploads (those that must know the file size before the upload
starts, such as <code>onedrive</code>, <code>pcloud</code>,
<code>jottacloud</code>, <code>mailru</code>, <code>opendrive</code>,
<code>putio</code>, <code>protondrive</code> and <code>zoho</code>) have
the parts spooled to a temporary file on <strong>local disk</strong>
instead, and uploaded with the size then known on completion, so they
need local disk space for the largest objects in flight rather than
memory.</p>
<p>With <code>--vfs-cache-mode writes</code> (or <code>full</code>) the
parts are written to a temporary file in the VFS cache and uploaded by
the VFS write-back - see <a
href="#multipart-uploads-and-the-vfs-cache">Multipart uploads and the
VFS cache</a> below.</p>
<p>The rename into place needs the remote to support a server-side move
or copy, which nearly all do. It is a cheap rename on most remotes, but
on object stores without a real rename (such as <code>s3</code> itself)
the move is performed as a server-side copy and delete of the whole
object, which can take time and API calls for large objects. Concurrent
multipart uploads of the same key (which S3 permits) are safe. Each
writes its own temporary object and the last to complete wins.</p>
<p>On the few remotes that support neither server side move nor copy,
the parts are written straight to the destination object instead and
never buffered in memory. This is at some cost in atomicity - the
incomplete object is visible under its final name while the upload is in
flight, as it also is for a plain object PUT on such remotes, and
concurrent multipart uploads of the same key write to the same object
and can interleave. A failed or aborted upload still leaves any
pre-existing object untouched provided the remote uploads atomically and
the VFS cache is off; on a remote where partial uploads are visible it
may leave partial data at the key (like a plain PUT there), and with
<code>--vfs-cache-mode writes</code> (or <code>full</code>) a write to
the cache cannot be abandoned, so an aborted upload's partial data is
written back to the remote as if it had completed.</p>
<p><strong>Features</strong></p>
<ul>
<li>The whole object is never buffered in memory; only parts arriving
out of order are, within fixed limits, whatever the upload size.</li>
<li>Parts can be any size. Clients that don't produce uniform-sized
parts work fine - for example PostgreSQL backup tools such as
<strong>pgBarman</strong> and <strong>pgBackRest</strong>, which flush
an upload buffer once it grows past the chunk size, so each part is the
chunk size plus a variable overshoot.</li>
<li>Works through <code>crypt</code> for any part size, since the object
is encrypted as one continuous stream.</li>
<li>The destination object only ever changes atomically, on completion:
an aborted or failed upload leaves any pre-existing object of the same
name untouched, and a partly-uploaded object never becomes visible
(except on the few remotes with no server-side move or copy, as
above).</li>
<li>Multipart uploads go through the VFS like any other upload, so they
show in rclone's transfer stats and obey <code>--bwlimit</code>.</li>
<li>Backend-agnostic - it only needs the remote to support a server-side
move or copy for the rename into place, which nearly all do; a remote
without streaming upload support spools to local disk as above.</li>
</ul>
<p><strong>Limitations</strong></p>
<ul>
<li>Parts must arrive in ascending, contiguous part-number order (1, 2,
3, ...). The part the stream needs next is written straight through as
it arrives, so it is never buffered, whatever its size. Parts the client
uploads concurrently or out of order are buffered until their turn. The
memory used for this buffering is capped, per upload, by
<code>--multipart-streaming-buffer-limit</code> (default
<code>256M</code>, <code>0</code> for no limit), and across all the
uploads of each user (each access key) by
<code>--multipart-streaming-buffer-total</code> (default
<code>1G</code>, <code>0</code> for no limit), counting each buffered
part in the whole 1 MiB memory pages it occupies: a part that would take
the buffer over either limit is stalled until the stream drains (or, if
it is bigger than the limits, until it is the next part), so a client
that uploads faster than the remote can accept sees backpressure rather
than unbounded server memory use. A stalled part holds its HTTP request
open, and one stalled for more than a minute is failed with a
<code>SlowDown</code> error, which S3 clients retry. Clients whose
upload concurrency times part size exceeds the limits will see these
stalls and retries when the remote is slower than the client.
Non-contiguous part numbers are rejected on completion. Configure the
client to upload in part order, ideally with low concurrency, for the
lowest memory use.</li>
<li>A part uploaded again before completion - typically a client
retrying after a timeout - is accepted: if the earlier copy is still
buffered it is replaced, and if it has already been streamed an
identical re-upload is a no-op (a re-upload which arrives while the part
is being streamed waits for it to finish first). If a part fails part
way through being streamed (for example the client's connection drops)
the client's retry of it carries on where it stopped, provided it has
the same content. What isn't possible is replacing a part that has
already been streamed, in whole or in part, with <em>different</em>
content - that is rejected. A part which arrives in full but is then
rejected, for example because it doesn't match the
<code>Content-MD5</code> the client declared, has already been streamed,
so the whole upload is failed and the client must start it again. So is
a failure in the stream to the remote itself. (The remote's own upload
still retries its internal chunks.)</li>
<li>A <code>CompleteMultipartUpload</code> which fails because the parts
it lists don't match those uploaded, or there is a gap in the part
numbers, leaves the upload open, as on S3, so the client can upload any
missing parts and complete it again. If writing the completed object to
the remote fails, the upload is failed and must be started again.</li>
<li>Parts are serialised into one stream, so ingest from the client is
effectively single-threaded. When streaming, the remote's own upload
runs concurrently with the parts arriving; with the local disk spool or
the VFS cache the upload to the remote only starts on completion.</li>
<li>If <code>serve s3</code> is killed part-way through an upload the
temporary object (named with a leading
<code>.rclone_temp_multipart_</code>) may be left behind; it is hidden
from S3 listings but must be removed manually.</li>
</ul>
<h3 id="multipart-uploads-and-the-vfs-cache">Multipart uploads and the
VFS cache</h3>
<p>With <code>--vfs-cache-mode writes</code> (or <code>full</code>)
multipart uploads do not stream to the remote at all. The parts are
written, in part-number order, to a temporary file in the VFS cache. On
completion the file is renamed into place and uploaded by the VFS
write-back, exactly like a plain object PUT. This needs no streaming
upload support from the remote. The rename normally happens in the cache
before the upload has started, but the VFS requires the remote to
support a server-side move or copy to rename files at all (and uses one
if the temporary file has already been written back, e.g. with
<code>--vfs-write-back 0</code>). On remotes without either, the parts
are written to the cache directly under the final key instead: the
upload still never touches memory, but it loses its atomicity - the
in-flight upload is visible at the key, and an aborted upload cannot be
abandoned once in the cache, so its partial data is written back to the
remote as if it were a completed object.</p>
<p>Remotes that benefit from <code>--vfs-cache-mode writes</code>:</p>
<ul>
<li><strong>Remotes over slow or unreliable links.</strong> A failure in
a streamed upload aborts the whole multipart upload and the client must
start again from the first part; a failed write-back upload is retried
by the VFS (see <code>--vfs-cache-max-age</code> and friends) without
the client being involved. Ingest from the client also runs at local
disk speed rather than being throttled to the remote's pace.</li>
<li><strong>Workloads that read back or overwrite what they just
wrote.</strong> The completed object stays in the cache, so subsequent
<code>GET</code>/<code>HEAD</code> requests are served locally, and
plain PUTs and multipart uploads to the same key go through the same
cache entry so the last write wins regardless of upload style.</li>
</ul>
<p>The trade-offs of the VFS cache:</p>
<ul>
<li>The whole object lands on local disk, so the cache
(<code>--cache-dir</code>) needs space for the largest objects in
flight; <code>--vfs-cache-max-size</code> cannot evict files which are
still being uploaded.</li>
<li>The <code>200 OK</code> for <code>CompleteMultipartUpload</code>
means the data is safely in the <strong>local cache</strong>, not yet on
the remote - the same durability the cache gives plain PUTs. If an
acknowledgement must mean the data has reached the remote (for example
WAL archiving), use the default <code>--vfs-cache-mode off</code>.</li>
<li>The upload to the remote only starts on completion, rather than
overlapping with the parts arriving, so the data reaches the remote
later than with streaming.</li>
<li>If <code>serve s3</code> is killed part-way through an upload, the
temporary file survives in the cache and the VFS cache recovery uploads
it to the remote on restart as a temporary object (named with a leading
<code>.rclone_temp_multipart_</code>); as with the streaming path, it is
hidden from S3 listings but must be removed manually.</li>
</ul>
<h3 id="cleaning-up-temporary-objects">Cleaning up temporary
objects</h3>
<p>If <code>serve s3</code> is killed part-way through an upload it can
leave a temporary object behind, named with a leading
<code>.rclone_temp_</code>. This whole prefix is reserved: any object
whose name (the last <code>/</code>-separated segment of its key) starts
with <code>.rclone_temp_</code> is hidden from S3 listings, so don't
give real objects such names - an existing object with such a name
disappears from listings (though it stays accessible directly by its
key: only listings hide reserved names, <code>GET</code>,
<code>HEAD</code> and <code>DELETE</code> of the exact key still work).
A temporary object never holds acknowledged data - uploads whose
temporary object survived were never confirmed to the client - so old
ones are safe to delete:</p>
<pre><code>rclone delete --min-age 24h --include &quot;.rclone_temp_*&quot; remote:path</code></pre>
<p>The <code>--min-age</code> protects uploads which are still in
progress: make sure it is longer than your longest upload, especially if
several <code>serve s3</code> instances share the same remote.</p>
<p>rclone v1.75 named its temporary multipart objects
<code>.rclone_multipart_upload_*</code>; leftovers from an older server
are also hidden from listings and can be cleaned up the same way.</p>
<h3 id="abandoned-uploads">Abandoned uploads</h3>
<p>A client which starts a multipart upload and vanishes without either
completing or aborting it would otherwise hold on to its resources
forever.</p>
<p>An incomplete multipart upload which has had no activity for
<code>--multipart-expiry</code> (default <code>24h</code>) is therefore
aborted and cleaned up, exactly as if the client had called
<code>AbortMultipartUpload</code>, and a <code>NOTICE</code> is
logged.</p>
<p>An upload with a part still being received is never expired, however
slowly the part is arriving, and each completed part restarts the clock,
so the expiry only needs to outlast the client's pauses <em>between</em>
parts, not the whole upload.</p>
<p>Late operations on an expired upload fail with
<code>NoSuchUpload</code>, as they do on real S3 when a lifecycle rule
has aborted the upload. Set <code>--multipart-expiry 0</code> to keep
incomplete uploads forever - but note that abandoned uploads are then
never cleaned up and go on counting towards
<code>--multipart-max-uploads</code> below, so enough of them will stop
the user starting any new multipart upload until the server is
restarted.</p>
<p>Each multipart upload in progress holds server resources - for
example the buffers the remote's own upload uses once the first part has
arrived - so each user (each access key) can have no more than
<code>--multipart-max-uploads</code> (default <code>1000</code>,
<code>0</code> for no limit) in progress at once. Starting another fails
with a <code>SlowDown</code> error, which S3 clients retry, and a
one-off <code>NOTICE</code> is logged.</p>
<h3 id="disabling-streaming">Disabling streaming</h3>
<p>If you pass <code>--disable-multipart-streaming</code>, multipart
uploads are instead <strong>buffered in memory</strong> by the
underlying S3 library: every part is held in memory and the whole object
is written out in one go when the upload completes. This removes the
in-order/contiguous-part restriction above, so parts can be uploaded in
any order, but <strong>memory use grows with the size of the
upload</strong>, so it is only suitable for small objects. A one-off
<code>NOTICE</code> is logged the first time this happens. This flag is
the only thing that makes multipart uploads buffer in memory - it is
never done because of missing remote capabilities. The limits on
multipart uploads above
(<code>--multipart-streaming-buffer-limit</code>,
<code>--multipart-streaming-buffer-total</code> and
<code>--multipart-max-uploads</code>) do not apply to uploads buffered
in memory, so don't use this flag if the server is open to clients you
don't trust. Consider <code>--vfs-cache-mode writes</code> instead,
which buffers the upload in the VFS cache on disk and takes precedence
over <code>--disable-multipart-streaming</code>.</p>
<h2 id="memory-use">Memory use</h2>
<p><code>serve s3</code> never buffers whole objects in memory (except
with <code>--disable-multipart-streaming</code>, above), and limits the
memory each kind of request can use, so that a client, even a hostile
one, can't make it use unbounded memory.</p>
<ul>
<li><strong>Object data.</strong> <code>PutObject</code> bodies and
multipart parts arriving in order are streamed straight through to the
remote. Parts arriving out of order are buffered, up to
<code>--multipart-streaming-buffer-limit</code> per upload and
<code>--multipart-streaming-buffer-total</code> per user.</li>
<li><strong>Uploads in progress.</strong> Each user can have at most
<code>--multipart-max-uploads</code> multipart uploads in progress. An
upload holds little memory until its first part arrives. After that,
with <code>--vfs-cache-mode off</code>, it holds a
<code>--streaming-upload-cutoff</code> sized buffer plus whatever the
remote's own upload buffers, which for many remotes is up to their chunk
size times their upload concurrency (for example
<code>--s3-chunk-size</code> times
<code>--s3-upload-concurrency</code>). Plain <code>PutObject</code>
uploads use the same while they are in progress.</li>
<li><strong>Metadata.</strong> The metadata of at most
<code>--metadata-max-objects</code> objects of each user is kept, each
limited to 2 KB.</li>
<li><strong>Request bodies.</strong> The XML bodies of requests such as
<code>CompleteMultipartUpload</code> and <code>DeleteObjects</code> are
limited to 10 MiB, and <code>DeleteObjects</code> to 1000 keys. A
browser form (<code>POST</code>) upload holds at most 1 MiB in memory,
spooling the rest to a temporary file, and is limited to 5 GB.</li>
<li><strong>Listings.</strong> Each page of a <code>ListObjects</code>
listing reads only the directories needed to fill it, and returns at
most 1000 keys. Directory listings are cached by the <a
href="#vfs-directory-cache">VFS directory cache</a>.</li>
</ul>
<p>The largest of these is usually the remote's upload buffers, which
can be up to <code>--multipart-max-uploads</code> times the buffers of
one upload for each user if clients start many uploads and send part of
each. The limits apply to each user separately, so that one user can't
stop others uploading, which means the memory use grows with the number
of users. To limit it, lower <code>--multipart-max-uploads</code>, the
remote's chunk size or upload concurrency, or set
<code>--max-buffer-memory</code> to limit the memory used by the buffers
of all uploads to remotes which use rclone's buffer pool (including
<code>s3</code>, <code>azureblob</code> and <code>b2</code>). Buffered
multipart parts come from the same pool, so if you set
<code>--max-buffer-memory</code> make it comfortably bigger than
<code>--multipart-streaming-buffer-total</code> times the number of
users uploading at once, otherwise buffered parts can use up all the
memory the remote needs to upload the parts which would free them.</p>
<p>The number of connections is not limited, so if the server is open to
clients you don't trust, use <code>--auth-key</code> or
<code>--auth-proxy</code> and consider putting it behind a reverse proxy
which limits connections.</p>
<h2 id="design-goals">Design goals</h2>
<p>These goals explain many of the limitations below.</p>
<ul>
<li><strong>Objects are plain files on the remote.</strong> A bucket is
a directory in the root and a key is a path in it, so the remote stays
usable by other tools, such as <code>rclone mount</code> or
<code>rclone sync</code>. So keys must be paths (see <a
href="#object-names">Object names</a>).</li>
<li><strong>No database.</strong> <code>serve s3</code> stores nothing
but the objects. What the remote can't hold, such as user metadata,
tags, the MD5 <code>ETag</code> of an object on a remote without MD5 and
the directory markers put, is kept in memory as a best effort, and lost
on restart.</li>
<li><strong>Works with any rclone remote.</strong> What
<code>serve s3</code> can do depends on what the remote supports, such
as the hashes used for <code>ETag</code>s and modification times, rather
than needing a particular backend.</li>
<li><strong>Bounded memory.</strong> Uploads, including multipart
uploads, are streamed to the remote and the memory each request can use
is limited (see <a href="#memory-use">Memory use</a>). Nothing is
written to local disk unless the VFS cache is used or the remote can't
stream uploads (see <a href="#multipart-uploads">Multipart
uploads</a>).</li>
<li><strong>Refuse rather than ignore.</strong> Unsupported features are
refused, or answered as S3 answers when the feature isn't configured, so
a client is never told something was done which wasn't (see <a
href="#compatibility">Compatibility</a>).</li>
<li><strong>A storage gateway, not a full S3.</strong>
<code>serve s3</code> implements the parts of the S3 API clients use to
store and fetch objects. Versioning, ACLs, bucket policies, lifecycle
rules and the like are out of scope.</li>
<li><strong>Compatible with rclone's s3 backend.</strong> This includes
its directory markers, which the tests check.</li>
</ul>
<h2 id="bugs">Bugs</h2>
<p>For a current list of <code>serve s3</code> bugs see the <a
href="https://github.com/rclone/rclone/labels/serve%20s3">serve s3</a>
bug category on GitHub.</p>
<h2 id="limitations-2">Limitations</h2>
<p><code>serve s3</code> will treat all directories in the root as
buckets and ignore all files in the root. You can use
<code>CreateBucket</code> to create folders under the root, and put a
directory marker to create an empty folder below them (see <a
href="#object-names">Object names</a>).</p>
<p>When using <code>PutObject</code> or <code>DeleteObject</code>,
rclone will automatically create or clean up empty folders. If you don't
want to clean up empty folders automatically, use
<code>--directory-markers</code> (see <a href="#object-names">Object
names</a>). The deprecated <code>--no-cleanup</code> does the same.</p>
<p>When using <code>ListObjects</code> with the delimiter
<code>/</code>, rclone lists the directory the prefix is in, showing its
subdirectories as common prefixes, including empty ones. Without a
delimiter the listing is recursive: rclone walks the directory tree
below the prefix, reading only as many directories as it needs to fill
each page, and lists empty directories as their directory markers (see
below). Any other delimiter is supported too, but needs the whole
directory tree below the prefix walking, unless the delimiter is in the
directory names.</p>
<p>Versioning is not supported (see <a href="#design-goals">Design
goals</a>).</p>
<p>Conditional writes, <code>PutObject</code> and
<code>CompleteMultipartUpload</code> with <code>If-None-Match</code> or
<code>If-Match</code>, are supported. The conditions are checked before
the object is written, and again as it is moved into place when it is
written to a temporary object first. This happens for multipart uploads
and, for <code>PutObject</code>, with remotes which can upload partial
files (such as local disk) or with <code>--vfs-cache-mode minimal</code>
or above. The second check is atomic against other writes through
<code>serve s3</code>, but neither is atomic against changes made to the
remote some other way. If the remote doesn't support the
<code>--etag-hash</code>, objects have no <code>ETag</code> so
<code>If-Match</code> with an <code>ETag</code> always fails.</p>
<p>Metadata will only be saved in memory (see <a
href="#design-goals">Design goals</a>) other than the rclone
<code>mtime</code> metadata which will be set as the modification time
of the file. The metadata of at most <code>--metadata-max-objects</code>
objects (default <code>100000</code>, <code>0</code> for no limit) of
each user (each access key) is kept; after that the metadata of the
user's least recently used object is forgotten. The metadata of an
object is ignored once the object has been changed some other way, for
example by another <code>--auth-proxy</code> user or directly on the
backend. Object tags are kept with the metadata in the same way.</p>
<h2 id="object-names">Object names</h2>
<p><code>serve s3</code> stores objects as files in the backend, so
object keys are mapped to file paths rather than treated as the opaque
strings AWS S3 allows. Keys must be in canonical path form: keys that
contain <code>..</code> or <code>.</code> path segments, repeated
slashes (<code>//</code>), or a leading slash are rejected with a
<code>400 Bad Request</code> (<code>InvalidArgument</code>) instead of
being normalised, since normalising them could alias two distinct keys
to the same file or resolve a key outside its bucket. This matches the
behaviour of other S3 servers such as MinIO.</p>
<p>A key ending in <code>/</code>, such as <code>dir/</code>, is a
directory marker, standing for the directory <code>dir</code>. Putting
an empty directory marker creates the directory (one with data is
rejected with <code>400 Bad Request</code>), and deleting it removes the
directory if it is empty. Directory markers are found by
<code>HeadObject</code>, <code>GetObject</code> and
<code>CopyObject</code> for any directory, but only the markers of empty
directories, and of the directories a marker was put for, are listed as
objects, as other directories may not have been made by putting a
marker. The markers put are remembered in memory with the metadata (see
<a href="#limitations">Limitations</a>), so after a restart, or once
forgotten, the marker of a directory holding other keys is no longer
listed. While a marker is remembered its directory isn't removed when
the last key below it is deleted.</p>
<p>With <code>--directory-markers</code> every directory is listed as a
directory marker, so the markers are listed after a restart too, as
needed by clients which rely on them, such as rclone's s3 backend with
<code>--s3-directory-markers</code>. As every directory has a marker, a
directory isn't removed when the last key below it is deleted. Deleting
the marker of a directory which holds other keys stops it being listed,
and the directory is then removed with the last key below it, but this
is only remembered in memory, like the markers put without
<code>--directory-markers</code>.</p>
<p>As keys are file paths, a key can't be both an object and a directory
holding other objects, for example <code>a/b</code> and
<code>a/b/c</code>. Writing an object which would need this fails with
<code>400 Bad Request</code> (<code>InvalidRequest</code>).</p>
<h2 id="compatibility">Compatibility</h2>
<p><code>serve s3</code> implements the parts of the S3 API that S3
clients commonly use to store and fetch objects. Features it doesn't
support are refused with <code>501 NotImplemented</code>, or answered as
AWS S3 answers for a bucket without that feature configured, rather than
being silently ignored.</p>
<table>
<colgroup>
<col style="width: 33%" />
<col style="width: 42%" />
<col style="width: 23%" />
</colgroup>
<thead>
<tr class="header">
<th>Feature</th>
<th>Supported</th>
<th>Notes</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td><code>ListBuckets</code>, <code>CreateBucket</code>,
<code>DeleteBucket</code>, <code>HeadBucket</code>,
<code>GetBucketLocation</code></td>
<td>Yes</td>
<td>Buckets are the directories in the root of the remote.</td>
</tr>
<tr class="even">
<td><code>ListObjects</code>, <code>ListObjectsV2</code></td>
<td>Yes</td>
<td>Prefixes, delimiters, markers, <code>start-after</code>,
continuation tokens, <code>fetch-owner</code> and
<code>encoding-type=url</code> all work. Delimiters other than
<code>/</code> need the whole directory tree walking.</td>
</tr>
<tr class="odd">
<td><code>HeadObject</code>, <code>GetObject</code></td>
<td>Yes</td>
<td>Including <code>Range</code>, <code>partNumber</code>, the
<code>response-*</code> header overrides and the <code>If-Match</code>,
<code>If-None-Match</code>, <code>If-Modified-Since</code> and
<code>If-Unmodified-Since</code> conditions.</td>
</tr>
<tr class="even">
<td><code>PutObject</code></td>
<td>Yes</td>
<td>Including <code>Content-MD5</code>, <code>aws-chunked</code> uploads
and uploads with no <code>Content-Length</code>.</td>
</tr>
<tr class="odd">
<td><code>CopyObject</code></td>
<td>Yes</td>
<td>Including the metadata and tagging directives and the
<code>x-amz-copy-source-if-*</code> conditions.</td>
</tr>
<tr class="even">
<td><code>DeleteObject</code>, <code>DeleteObjects</code></td>
<td>Yes</td>
<td></td>
</tr>
<tr class="odd">
<td>Multipart uploads</td>
<td>Yes</td>
<td><code>CreateMultipartUpload</code>, <code>UploadPart</code>,
<code>UploadPartCopy</code>, <code>CompleteMultipartUpload</code>,
<code>AbortMultipartUpload</code>, <code>ListMultipartUploads</code> and
<code>ListParts</code>. The <code>ETag</code> of the object is its hash,
not the <code>-N</code> suffixed one AWS gives. The 5 MiB minimum part
size isn't enforced.</td>
</tr>
<tr class="even">
<td>Conditional writes</td>
<td>Partial</td>
<td><code>If-Match</code> and <code>If-None-Match</code> on
<code>PutObject</code> and <code>CompleteMultipartUpload</code> are
checked, but not atomically against changes made to the remote some
other way (see <a href="#limitations">Limitations</a>).</td>
</tr>
<tr class="odd">
<td>Authentication</td>
<td>Partial</td>
<td>AWS Signature Version 4, in headers, presigned URLs and browser form
(<code>POST</code>) uploads. Signature Version 2 isn't supported.</td>
</tr>
<tr class="even">
<td>Anonymous access</td>
<td>Partial</td>
<td>All requests are allowed without <code>--auth-key</code> or
<code>--auth-proxy</code>, and none are with them, as buckets and
objects can't be made public.</td>
</tr>
<tr class="odd">
<td>Metadata</td>
<td>Partial</td>
<td><code>x-amz-meta-*</code>, the storage class and the standard
headers such as <code>Content-Type</code> are kept in memory only (see
<a href="#limitations">Limitations</a>), except the modification time.
The storage class is only recorded, so doesn't change how the object is
stored.</td>
</tr>
<tr class="even">
<td>Directory markers</td>
<td>Partial</td>
<td>Keys ending in <code>/</code> are stored as directories, so can't
hold data. A marker put for a directory holding other keys is only
listed while it is remembered in memory, unless
<code>--directory-markers</code> is set (see <a
href="#object-names">Object names</a>).</td>
</tr>
<tr class="odd">
<td>Checksums</td>
<td>Partial</td>
<td>The <code>x-amz-checksum-*</code> of a <code>PutObject</code>
(CRC32, CRC32C, CRC64NVME, SHA1 or SHA256) is checked and returned with
the metadata. The <code>Content-MD5</code> and
<code>x-amz-checksum-*</code> of the bodies of other requests, such as
<code>DeleteObjects</code>, are checked. The checksums of multipart
uploads aren't supported.</td>
</tr>
<tr class="even">
<td><code>GetObjectAttributes</code></td>
<td>Partial</td>
<td>Everything but the checksums of multipart uploads.</td>
</tr>
<tr class="odd">
<td>Object tagging</td>
<td>Partial</td>
<td><code>GetObjectTagging</code>, <code>PutObjectTagging</code> and
<code>DeleteObjectTagging</code> work, but tags are kept in memory with
the metadata.</td>
</tr>
<tr class="even">
<td>Bucket owner</td>
<td>No</td>
<td><code>serve s3</code> has no AWS account IDs, so
<code>x-amz-expected-bucket-owner</code> and
<code>x-amz-source-expected-bucket-owner</code> are ignored.</td>
</tr>
<tr class="odd">
<td>ACLs</td>
<td>Partial</td>
<td><code>GetBucketAcl</code> and <code>GetObjectAcl</code> give the
owner full control. Only the <code>private</code> ACL can be set.</td>
</tr>
<tr class="even">
<td>CORS</td>
<td>Partial</td>
<td>Preflight (<code>OPTIONS</code>) requests are answered, allowing any
origin. CORS configuration (<code>PutBucketCors</code>) isn't
supported.</td>
</tr>
<tr class="odd">
<td>Server side encryption</td>
<td>No</td>
<td>SSE-S3 (<code>AES256</code>) is accepted but the data isn't
encrypted. SSE-KMS and SSE-C are refused.</td>
</tr>
<tr class="even">
<td>Versioning</td>
<td>No</td>
<td>Buckets are reported as unversioned and
<code>ListObjectVersions</code> lists each object as version
<code>null</code>. Enabling versioning is refused.</td>
</tr>
<tr class="odd">
<td>Object lock, retention and legal hold</td>
<td>No</td>
<td></td>
</tr>
<tr class="even">
<td>Bucket configuration</td>
<td>No</td>
<td>Bucket policies, tagging, lifecycle, logging, encryption, website,
replication, notifications and the like. Getting them fails as for a
bucket without them configured.</td>
</tr>
<tr class="odd">
<td><code>SelectObjectContent</code>, <code>RestoreObject</code>,
torrents</td>
<td>No</td>
<td></td>
</tr>
</tbody>
</table>
<p>The <a href="https://github.com/ceph/s3-tests">ceph s3-tests</a> can
be run against <code>serve s3</code> to check its compatibility. See <a
href="https://github.com/rclone/rclone/tree/master/cmd/serve/s3/s3tests">cmd/serve/s3/s3tests</a>
for how.</p>
<h3 id="authentication-4">Authentication</h3>
<p>By default this will serve files without needing a login.</p>
<p>You can either use an htpasswd file which can take lots of users, or
set a single username and password with the <code>--user</code> and
<code>--pass</code> flags.</p>
<p>Alternatively, you can have the reverse proxy manage authentication
and use the username provided in the configured header with
<code>--user-from-header</code> (e.g.,
<code>--user-from-header=x-remote-user</code>). Ensure the proxy is
trusted and headers cannot be spoofed, as misconfiguration may lead to
unauthorized access.</p>
<p>If either of the above authentication methods is not configured and
client certificates are required by the <code>--client-ca</code> flag
passed to the server, the client certificate common name will be
considered as the username.</p>
<p>Use <code>--htpasswd /path/to/htpasswd</code> to provide an htpasswd
file. This is in standard apache format and supports MD5, SHA1 and
BCrypt for basic authentication. Bcrypt is recommended.</p>
<p>To create an htpasswd file:</p>
<pre class="console"><code>touch htpasswd
htpasswd -B htpasswd user
htpasswd -B htpasswd anotherUser</code></pre>
<p>Use the same hash format and cost for every entry in the file. If the
entries differ, the time taken to reject a wrong password can reveal
which usernames exist.</p>
<p>The password file can be updated while rclone is running.</p>
<p>When authentication is enabled every request must be authenticated,
including HTTP OPTIONS requests, as the answer to an OPTIONS request can
reveal whether a path exists. Health checks or monitoring which use
unauthenticated OPTIONS requests will need to send credentials. The
exception is browser CORS preflight requests when
<code>--allow-origin</code> is set, which are answered without
authentication as browsers never send credentials with them.</p>
<p>Use <code>--realm</code> to set the authentication realm.</p>
<p>Use <code>--salt</code> to change the password hashing salt from the
default.</p>
<h2 id="server-options-5">Server options</h2>
<p>Use <code>--addr</code> to specify which IP address and port the
server should listen on, eg <code>--addr 1.2.3.4:8000</code> or
<code>--addr :8080</code> to listen to all IPs. By default it only
listens on localhost. You can use port :0 to let the OS choose an
available port.</p>
<p>If you set <code>--addr</code> to listen on a public or LAN
accessible IP address then using Authentication is advised - see the
next section for info.</p>
<p>You can use a unix socket by setting the url to
<code>unix:///path/to/socket</code> or just by using an absolute path
name.</p>
<p><code>--addr</code> may be repeated to listen on multiple
IPs/ports/sockets. Socket activation, described further below, can also
be used to accomplish the same.</p>
<p><code>--server-read-timeout</code> and
<code>--server-write-timeout</code> can be used to control the timeouts
on the server. Note that this is the total time for a transfer.</p>
<p><code>--max-header-bytes</code> controls the maximum number of bytes
the server will accept in the HTTP header.</p>
<p><code>--response-header</code> can be used to set an HTTP header for
all responses, will overriding existing values. The flag may be repeated
to add multiple headers. Use the format
<code>Header-Name: value</code>.</p>
<p><code>--allow-origin</code> enables cross-origin (CORS) requests from
browsers by setting the <code>Access-Control-Allow-Origin</code> header
on every response to the origin given, e.g.
<code>--allow-origin https://app.example.com</code>. Browser CORS
preflight OPTIONS requests are answered by rclone without needing
authentication as browsers never send credentials with them. Setting
this to <code>*</code> allows any origin which is a security risk on an
authenticated server.</p>
<p><code>--baseurl</code> controls the URL prefix that rclone serves
from. By default rclone will serve from the root. If you used
<code>--baseurl "/rclone"</code> then rclone would serve from a URL
starting with "/rclone/". This is useful if you wish to proxy rclone
serve. Rclone automatically inserts leading and trailing "/" on
<code>--baseurl</code>, so <code>--baseurl "rclone"</code>,
<code>--baseurl "/rclone"</code> and <code>--baseurl "/rclone/"</code>
are all treated identically.</p>
<p><code>--disable-zip</code> may be set to disable the zipping download
option.</p>
<h3 id="protocol-3">Protocol</h3>
<p>The server supports HTTP/1.1 and HTTP/2. HTTP/2 is used automatically
for TLS connections. For non-TLS connections, HTTP/2 cleartext (h2c) is
supported, allowing HTTP/2 without encryption.</p>
<h3 id="tls-ssl-3">TLS (SSL)</h3>
<p>By default this will serve over http. If you want you can serve over
https. You will need to supply the <code>--cert</code> and
<code>--key</code> flags. If you wish to do client side certificate
validation then you will need to supply <code>--client-ca</code>
also.</p>
<p>When TLS is configured every listener given with <code>--addr</code>
serves TLS. An individual listener can be prefixed with
<code>http://</code> to serve unencrypted HTTP on that address, or with
<code>tls://</code> to state explicitly that it must serve TLS. Using a
<code>tls://</code> address without <code>--cert</code> and
<code>--key</code> is an error.</p>
<p><code>--cert</code> must be set to the path of a file containing
either a PEM encoded certificate, or a concatenation of that with the CA
certificate. <code>--key</code> must be set to the path of a file with
the PEM encoded private key. If setting <code>--client-ca</code>, it
should be set to the path of a file with PEM encoded client certificate
authority certificates.</p>
<p><code>--min-tls-version</code> is minimum TLS version that is
acceptable. Valid values are "tls1.0", "tls1.1", "tls1.2" and "tls1.3"
(default "tls1.0").</p>
<h2 id="socket-activation-3">Socket activation</h2>
<p>Instead of the listening addresses specified above, rclone will
listen to all FDs passed by the service manager, if any (and ignore any
arguments passed by <code>--addr</code>).</p>
<p>This allows rclone to be a socket-activated service. It can be
configured with .socket and .service unit files as described in <a
href="https://www.freedesktop.org/software/systemd/man/latest/systemd.socket.html"
class="uri">https://www.freedesktop.org/software/systemd/man/latest/systemd.socket.html</a>.</p>
<p>Socket activation can be tested ad-hoc with the
<code>systemd-socket-activate</code>command</p>
<pre class="console"><code>systemd-socket-activate -l 8000 -- rclone serve</code></pre>
<p>This will socket-activate rclone on the first connection to port 8000
over TCP.</p>
<h2 id="vfs---virtual-file-system-7">VFS - Virtual File System</h2>
<p>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.</p>
<p>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.</p>
<p>The VFS layer also implements a directory cache - this caches info
about files and directories (but not the data) in memory.</p>
<h2 id="vfs-directory-cache-7">VFS Directory Cache</h2>
<p>Using the <code>--dir-cache-time</code> 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.</p>
<pre class="text"><code>    --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)</code></pre>
<p>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.</p>
<p>You can send a <code>SIGHUP</code> 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:</p>
<pre class="console"><code>kill -SIGHUP $(pidof rclone)</code></pre>
<p>If you configure rclone with a <a href="/rc">remote control</a> then
you can use rclone rc to flush the whole directory cache:</p>
<pre class="console"><code>rclone rc vfs/forget</code></pre>
<p>Or individual files or directories:</p>
<pre class="console"><code>rclone rc vfs/forget file=path/to/file dir=path/to/dir</code></pre>
<h2 id="vfs-file-buffering-7">VFS File Buffering</h2>
<p>The <code>--buffer-size</code> flag determines the amount of memory,
that will be used to buffer data in advance.</p>
<p>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.</p>
<p>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 yet
read. If the buffer is empty, only a small amount of memory will be
used.</p>
<p>The maximum memory used by rclone for buffering can be up to
<code>--buffer-size * open files</code>.</p>
<h2 id="vfs-file-caching-7">VFS File Caching</h2>
<p>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 cost of some compatibility.</p>
<p>For example you'll need to enable VFS caching if you want to read and
write simultaneously to a file. See below for more details.</p>
<p>Note that the VFS cache is separate from the cache backend and you
may find that you need one or the other or both.</p>
<pre class="text"><code>    --cache-dir string                     Directory rclone will use for caching.
    --vfs-cache-mode CacheMode             Cache mode off|minimal|writes|full (default off)
    --vfs-cache-max-age duration           Max time since last access of objects in the cache (default 1h0m0s)
    --vfs-cache-max-size SizeSuffix        Max total size of objects in the cache (default off)
    --vfs-cache-min-free-space SizeSuffix  Target minimum free space on the disk containing the cache (default off)
    --vfs-cache-poll-interval duration     Interval to poll the cache for stale objects (default 1m0s)
    --vfs-write-back duration              Time to writeback files after last use when using cache (default 5s)</code></pre>
<p>If run with <code>-vv</code> rclone will print the location of the
file cache. The files are stored in the user cache file area which is OS
dependent but can be controlled with <code>--cache-dir</code> or setting
the appropriate environment variable.</p>
<p>The cache has 4 different modes selected by
<code>--vfs-cache-mode</code>. The higher the cache mode the more
compatible rclone becomes at the cost of using disk space.</p>
<p>Note that files are written back to the remote only when they are
closed and if they haven't been accessed for
<code>--vfs-write-back</code> seconds. If rclone is quit or dies with
files that haven't been uploaded, these will be uploaded next time
rclone is run with the same flags.</p>
<p>If using <code>--vfs-cache-max-size</code> or
<code>--vfs-cache-min-free-space</code> note that the cache may exceed
these quotas for two reasons. Firstly because it is only checked every
<code>--vfs-cache-poll-interval</code>. Secondly because open files
cannot be evicted from the cache. When <code>--vfs-cache-max-size</code>
or <code>--vfs-cache-min-free-space</code> is exceeded, rclone will
attempt to evict the least accessed files from the cache first. rclone
will start with files that haven't been accessed for the longest. This
cache flushing strategy is efficient and more relevant files are likely
to remain cached.</p>
<p>The <code>--vfs-cache-max-age</code> will evict files from the cache
after the set time since last access has passed; it is based on access
time, not on when the file was first added to the cache. The default
value of 1 hour will start evicting files from cache that haven't been
accessed for 1 hour. When a cached file is accessed the 1 hour timer is
reset to 0 and will wait for 1 more hour before evicting. Specify the
time with standard notation, s, m, h, d, w .</p>
<p>You <strong>should not</strong> run two copies of rclone using the
same VFS cache with the same or overlapping remotes if using
<code>--vfs-cache-mode &gt; off</code>. This can potentially cause data
corruption if you do. You can work around this by giving each rclone its
own cache hierarchy with <code>--cache-dir</code>. You don't need to
worry about this if the remotes in use don't overlap.</p>
<h3 id="vfs-cache-mode-off-7">--vfs-cache-mode off</h3>
<p>In this mode (the default) the cache will read directly from the
remote and write directly to the remote without caching anything on
disk.</p>
<p>This will mean some operations are not possible</p>
<ul>
<li>Files can't be opened for both read AND write</li>
<li>Files opened for write can't be seeked</li>
<li>Existing files opened for write must have O_TRUNC set</li>
<li>Files open for read with O_TRUNC will be opened write only</li>
<li>Files open for write only will behave as if O_TRUNC was
supplied</li>
<li>Open modes O_APPEND, O_TRUNC are ignored</li>
<li>If an upload fails it can't be retried</li>
</ul>
<h3 id="vfs-cache-mode-minimal-7">--vfs-cache-mode minimal</h3>
<p>This is very similar to "off" except that files opened for read AND
write will be buffered to disk. This means that files opened for write
will be a lot more compatible, but uses the minimal disk space.</p>
<p>These operations are not possible</p>
<ul>
<li>Files opened for write only can't be seeked</li>
<li>Existing files opened for write must have O_TRUNC set</li>
<li>Files opened for write only will ignore O_APPEND, O_TRUNC</li>
<li>If an upload fails it can't be retried</li>
</ul>
<h3 id="vfs-cache-mode-writes-7">--vfs-cache-mode writes</h3>
<p>In this mode files opened for read only are still read directly from
the remote, write only and read/write files are buffered to disk
first.</p>
<p>This mode should support all normal file system operations.</p>
<p>If an upload fails it will be retried at exponentially increasing
intervals up to 1 minute.</p>
<h3 id="vfs-cache-mode-full-7">--vfs-cache-mode full</h3>
<p>In this mode all reads and writes are buffered to and from disk. When
data is read from the remote this is buffered to disk as well.</p>
<p>In this mode the files in the cache will be sparse files and rclone
will keep track of which bits of the files it has downloaded.</p>
<p>So if an application only reads the starts of each file, then rclone
will only buffer the start of the file. These files will appear to be
their full size in the cache, but they will be sparse files with only
the data that has been downloaded present in them.</p>
<p>This mode should support all normal file system operations and is
otherwise identical to <code>--vfs-cache-mode</code> writes.</p>
<p>When reading a file rclone will read <code>--buffer-size</code> plus
<code>--vfs-read-ahead</code> bytes ahead. The
<code>--buffer-size</code> is buffered in memory whereas the
<code>--vfs-read-ahead</code> is buffered on disk.</p>
<p>When using this mode it is recommended that
<code>--buffer-size</code> is not set too large and
<code>--vfs-read-ahead</code> is set large if required.</p>
<p><strong>IMPORTANT</strong> not all file systems support sparse files.
In particular FAT/exFAT do not. Rclone will perform very badly if the
cache directory is on a filesystem which doesn't support sparse files
and it will log an ERROR message if one is detected.</p>
<h3 id="fingerprinting-7">Fingerprinting</h3>
<p>Various parts of the VFS use fingerprinting to see if a local file
copy has changed relative to a remote file. Fingerprints are made
from:</p>
<ul>
<li>size</li>
<li>modification time</li>
<li>hash</li>
</ul>
<p>where available on an object.</p>
<p>On some backends some of these attributes are slow to read (they take
an extra API call per object, or extra work per object).</p>
<p>For example <code>hash</code> is slow with the <code>local</code> and
<code>sftp</code> backends as they have to read the entire file and hash
it, and <code>modtime</code> is slow with the <code>s3</code>,
<code>swift</code>, <code>ftp</code> and <code>qinqstor</code> backends
because they need to do an extra API call to fetch it.</p>
<p>If you use the <code>--vfs-fast-fingerprint</code> flag then rclone
will not include the slow operations in the fingerprint. This makes the
fingerprinting less accurate but much faster and will improve the
opening time of cached files.</p>
<p>If you are running a vfs cache over <code>local</code>,
<code>s3</code> or <code>swift</code> backends then using this flag is
recommended.</p>
<p>Note that if you change the value of this flag, the fingerprints of
the files in the cache may be invalidated and the files will need to be
downloaded again.</p>
<h2 id="vfs-chunked-reading-7">VFS Chunked Reading</h2>
<p>When rclone reads files from a remote it reads them in chunks. This
means that rather than requesting the whole file rclone reads the chunk
specified. This can reduce the used download quota for some remotes by
requesting only chunks from the remote that are actually read, at the
cost of an increased number of requests.</p>
<p>These flags control the chunking:</p>
<pre class="text"><code>    --vfs-read-chunk-size SizeSuffix        Read the source objects in chunks (default 128M)
    --vfs-read-chunk-size-limit SizeSuffix  Max chunk doubling size (default off)
    --vfs-read-chunk-streams int            The number of parallel streams to read at once</code></pre>
<p>The chunking behaves differently depending on the
<code>--vfs-read-chunk-streams</code> parameter.</p>
<h3
id="vfs-read-chunk-streams-0-14"><code>--vfs-read-chunk-streams</code>
== 0</h3>
<p>Rclone will start reading a chunk of size
<code>--vfs-read-chunk-size</code>, and then double the size for each
read. When <code>--vfs-read-chunk-size-limit</code> is specified, and
greater than <code>--vfs-read-chunk-size</code>, the chunk size for each
open file will get doubled only until the specified value is reached. If
the value is "off", which is the default, the limit is disabled and the
chunk size will grow indefinitely.</p>
<p>With <code>--vfs-read-chunk-size 100M</code> and
<code>--vfs-read-chunk-size-limit 0</code> the following parts will be
downloaded: 0-100M, 100M-200M, 200M-300M, 300M-400M and so on. When
<code>--vfs-read-chunk-size-limit 500M</code> is specified, the result
would be 0-100M, 100M-300M, 300M-700M, 700M-1200M, 1200M-1700M and so
on.</p>
<p>Setting <code>--vfs-read-chunk-size</code> to <code>0</code> or "off"
disables chunked reading.</p>
<p>The chunks will not be buffered in memory.</p>
<h3
id="vfs-read-chunk-streams-0-15"><code>--vfs-read-chunk-streams</code>
&gt; 0</h3>
<p>Rclone reads <code>--vfs-read-chunk-streams</code> chunks of size
<code>--vfs-read-chunk-size</code> concurrently. The size for each read
will stay constant.</p>
<p>This improves performance massively on high latency links or very
high bandwidth links to high performance object stores.</p>
<p>Some experimentation will be needed to find the optimum values of
<code>--vfs-read-chunk-size</code> and
<code>--vfs-read-chunk-streams</code> as these will depend on the
backend in use and the latency to the backend.</p>
<p>For high performance object stores (eg AWS S3) a reasonable place to
start might be <code>--vfs-read-chunk-streams 16</code> and
<code>--vfs-read-chunk-size 4M</code>. In testing with AWS S3 the
performance scaled roughly as the <code>--vfs-read-chunk-streams</code>
setting.</p>
<p>Similar settings should work for high latency links, but depending on
the latency they may need more <code>--vfs-read-chunk-streams</code> in
order to get the throughput.</p>
<h2 id="vfs-performance-7">VFS Performance</h2>
<p>These flags may be used to enable/disable features of the VFS for
performance or other reasons. See also the <a
href="#vfs-chunked-reading">chunked reading</a> feature.</p>
<p>In particular S3 and Swift benefit hugely from the
<code>--no-modtime</code> flag (or use <code>--use-server-modtime</code>
for a slightly different effect) as each read of the modification time
takes a transaction.</p>
<pre class="text"><code>    --no-checksum     Don&#39;t compare checksums on up/download.
    --no-modtime      Don&#39;t read/write the modification time (can speed things up).
    --no-seek         Don&#39;t allow seeking in files.
    --read-only       Only allow read-only access.</code></pre>
<p>Sometimes rclone is delivered reads or writes out of order. Rather
than seeking rclone will wait a short time for the in sequence read or
write to come in. These flags only come into effect when not using an on
disk cache file.</p>
<pre class="text"><code>    --vfs-read-wait duration   Time to wait for in-sequence read before seeking (default 20ms)
    --vfs-write-wait duration  Time to wait for in-sequence write before giving error (default 1s)</code></pre>
<p>When using VFS write caching (<code>--vfs-cache-mode</code> with
value writes or full), the global flag <code>--transfers</code> can be
set to adjust the number of parallel uploads of modified files from the
cache (the related global flag <code>--checkers</code> has no effect on
the VFS).</p>
<pre class="text"><code>    --transfers int  Number of file transfers to run in parallel (default 4)</code></pre>
<h2 id="symlinks-7">Symlinks</h2>
<p>By default the VFS does not support symlinks. However this may be
enabled with either of the following flags:</p>
<pre class="text"><code>    --links      Translate symlinks to/from regular files with a &#39;.rclonelink&#39; extension.
    --vfs-links  Translate symlinks to/from regular files with a &#39;.rclonelink&#39; extension for the VFS</code></pre>
<p>As most cloud storage systems do not support symlinks directly,
rclone stores the symlink as a normal file with a special extension. So
a file which appears as a symlink <code>link-to-file.txt</code> would be
stored on cloud storage as <code>link-to-file.txt.rclonelink</code> and
the contents would be the path to the symlink destination.</p>
<p>Note that <code>--links</code> enables symlink translation globally
in rclone - this includes any backend which supports the concept (for
example the local backend). <code>--vfs-links</code> just enables it for
the VFS layer.</p>
<p>This scheme is compatible with that used by the <a
href="https://rclone.org/local/#symlinks-junction-points">local backend
with the --local-links flag</a>.</p>
<p>The <code>--vfs-links</code> flag has been designed for
<code>rclone mount</code>, <code>rclone nfsmount</code> and
<code>rclone serve nfs</code>.</p>
<p>It hasn't been tested with the other <code>rclone serve</code>
commands yet.</p>
<p>A limitation of the current implementation is that it expects the
caller to resolve sub-symlinks. For example given this directory
tree</p>
<pre class="text"><code>.
├── dir
│   └── file.txt
└── linked-dir -&gt; dir</code></pre>
<p>The VFS will correctly resolve <code>linked-dir</code> but not
<code>linked-dir/file.txt</code>. This is not a problem for the tested
commands but may be for other commands.</p>
<p><strong>Note</strong> that there is an outstanding issue with symlink
support <a href="https://github.com/rclone/rclone/issues/8245">issue
#8245</a> with duplicate files being created when symlinks are moved
into directories where there is a file of the same name (or vice
versa).</p>
<h2 id="vfs-case-sensitivity-7">VFS Case Sensitivity</h2>
<p>Linux file systems are case-sensitive: two files can differ only by
case, and the exact case must be used when opening a file.</p>
<p>File systems in modern Windows are case-insensitive but
case-preserving: although existing files can be opened using any case,
the exact case used to create the file is preserved and available for
programs to query. It is not allowed for two files in the same directory
to differ only by case.</p>
<p>Usually file systems on macOS are case-insensitive. It is possible to
make macOS file systems case-sensitive but that is not the default.</p>
<p>The <code>--vfs-case-insensitive</code> VFS flag controls how rclone
handles these two cases. If its value is "false", rclone passes file
names to the remote as-is. If the flag is "true" (or appears without a
value on the command line), rclone may perform a "fixup" as explained
below.</p>
<p>The user may specify a file name to open/delete/rename/etc with a
case different than what is stored on the remote. If an argument refers
to an existing file with exactly the same name, then the case of the
existing file on the disk will be used. However, if a file name with
exactly the same name is not found but a name differing only by case
exists, rclone will transparently fixup the name. This fixup happens
only when an existing file is requested. Case sensitivity of file names
created anew by rclone is controlled by the underlying remote.</p>
<p>Note that case sensitivity of the operating system running rclone
(the target) may differ from case sensitivity of a file system presented
by rclone (the source). The flag controls whether "fixup" is performed
to satisfy the target.</p>
<p>If the flag is not provided on the command line, then its default
value depends on the operating system where rclone runs: "true" on
Windows and macOS, "false" otherwise. If the flag is provided without a
value, then it is "true".</p>
<p>The <code>--no-unicode-normalization</code> flag controls whether a
similar "fixup" is performed for filenames that differ but are <a
href="https://en.wikipedia.org/wiki/Unicode_equivalence">canonically
equivalent</a> with respect to unicode. Unicode normalization can be
particularly helpful for users of macOS, which prefers form NFD instead
of the NFC used by most other platforms. It is therefore highly
recommended to keep the default of <code>false</code> on macOS, to avoid
encoding compatibility issues.</p>
<p>In the (probably unlikely) event that a directory has multiple
duplicate filenames after applying case and unicode normalization, the
<code>--vfs-block-norm-dupes</code> flag allows hiding these duplicates.
This comes with a performance tradeoff, as rclone will have to scan the
entire directory for duplicates when listing a directory. For this
reason, it is recommended to leave this disabled if not needed. However,
macOS users may wish to consider using it, as otherwise, if a remote
directory contains both NFC and NFD versions of the same filename, an
odd situation will occur: both versions of the file will be visible in
the mount, and both will appear to be editable, however, editing either
version will actually result in only the NFD version getting edited
under the hood. <code>--vfs-block- norm-dupes</code> prevents this
confusion by detecting this scenario, hiding the duplicates, and logging
an error, similar to how this is handled in
<code>rclone sync</code>.</p>
<h2 id="vfs-disk-options-7">VFS Disk Options</h2>
<p>This flag allows you to manually set the statistics about the filing
system. It can be useful when those statistics cannot be read correctly
automatically.</p>
<pre class="text"><code>    --vfs-disk-space-total-size    Manually set the total disk space size (example: 256G, default: -1)</code></pre>
<h2 id="alternate-report-of-used-bytes-7">Alternate report of used
bytes</h2>
<p>Some backends, most notably S3, do not report the amount of bytes
used. If you need this information to be available when running
<code>df</code> on the filesystem, then pass the flag
<code>--vfs-used-is-size</code> to rclone. With this flag set, instead
of relying on the backend to report this information, rclone will scan
the whole remote similar to <code>rclone size</code> and compute the
total used space itself.</p>
<p><strong>WARNING</strong>: Contrary to <code>rclone size</code>, this
flag ignores filters so that the result is accurate. However, this is
very inefficient and may cost lots of API calls resulting in extra
charges. Use it as a last resort and only with caching.</p>
<h2 id="vfs-metadata-7">VFS Metadata</h2>
<p>If you use the <code>--vfs-metadata-extension</code> flag you can get
the VFS to expose files which contain the <a
href="https://rclone.org/docs/#metadata">metadata</a> as a JSON blob.
These files will not appear in the directory listing, but can be
<code>stat</code>-ed and opened and once they have been they
<strong>will</strong> appear in directory listings until the directory
cache expires.</p>
<p>Note that some backends won't create metadata unless you pass in the
<code>--metadata</code> flag.</p>
<p>For example, using <code>rclone mount</code> with
<code>--metadata --vfs-metadata-extension .metadata</code> we get</p>
<pre class="console"><code>$ ls -l /mnt/
total 1048577
-rw-rw-r-- 1 user user 1073741824 Mar  3 16:03 1G

$ cat /mnt/1G.metadata
{
        &quot;atime&quot;: &quot;2025-03-04T17:34:22.317069787Z&quot;,
        &quot;btime&quot;: &quot;2025-03-03T16:03:37.708253808Z&quot;,
        &quot;gid&quot;: &quot;1000&quot;,
        &quot;mode&quot;: &quot;100664&quot;,
        &quot;mtime&quot;: &quot;2025-03-03T16:03:39.640238323Z&quot;,
        &quot;uid&quot;: &quot;1000&quot;
}

$ ls -l /mnt/
total 1048578
-rw-rw-r-- 1 user user 1073741824 Mar  3 16:03 1G
-rw-rw-r-- 1 user user        185 Mar  3 16:03 1G.metadata</code></pre>
<p>If the file has no metadata it will be returned as <code>{}</code>
and if there is an error reading the metadata the error will be returned
as <code>{"error":"error string"}</code>.</p>
<h2 id="auth-proxy-2">Auth Proxy</h2>
<p>If you supply the parameter
<code>--auth-proxy /path/to/program</code> then rclone will use that
program to generate backends on the fly which then are used to
authenticate incoming requests. This uses a simple JSON based protocol
with input on STDIN and output on STDOUT.</p>
<p><strong>PLEASE NOTE:</strong> <code>--auth-proxy</code> and
<code>--authorized-keys</code> cannot be used together, if
<code>--auth-proxy</code> is set the authorized keys option will be
ignored.</p>
<p>There is an example program <a
href="https://github.com/rclone/rclone/blob/master/bin/test_proxy.py">bin/test_proxy.py</a>
in the rclone source code.</p>
<p>The program's job is to take a <code>user</code> and
<code>pass</code> on the input and turn those into the config for a
backend on STDOUT in JSON format. This config will have any default
parameters for the backend added, but it won't use configuration from
environment variables or command line options - it is the job of the
proxy program to make a complete config.</p>
<p>This config generated must have this extra parameter</p>
<ul>
<li><code>_root</code> - root to use for the backend</li>
</ul>
<p>And it may have these parameters</p>
<ul>
<li><code>_obscure</code> - comma separated strings for parameters to
obscure</li>
<li><code>_secret_access_key</code> - the secret for S3 access key auth
(see below)</li>
</ul>
<p>If password authentication was used by the client, input to the proxy
process (on STDIN) would look similar to this:</p>
<div class="sourceCode" id="cb597"><pre
class="sourceCode json"><code class="sourceCode json"><span id="cb597-1"><a href="#cb597-1" aria-hidden="true" tabindex="-1"></a><span class="fu">{</span></span>
<span id="cb597-2"><a href="#cb597-2" aria-hidden="true" tabindex="-1"></a>  <span class="dt">&quot;user&quot;</span><span class="fu">:</span> <span class="st">&quot;me&quot;</span><span class="fu">,</span></span>
<span id="cb597-3"><a href="#cb597-3" aria-hidden="true" tabindex="-1"></a>  <span class="dt">&quot;pass&quot;</span><span class="fu">:</span> <span class="st">&quot;mypassword&quot;</span><span class="fu">,</span></span>
<span id="cb597-4"><a href="#cb597-4" aria-hidden="true" tabindex="-1"></a>  <span class="dt">&quot;client_ip&quot;</span><span class="fu">:</span> <span class="st">&quot;192.168.1.1&quot;</span></span>
<span id="cb597-5"><a href="#cb597-5" aria-hidden="true" tabindex="-1"></a><span class="fu">}</span></span></code></pre></div>
<p>If public-key authentication was used by the client, input to the
proxy process (on STDIN) would look similar to this:</p>
<div class="sourceCode" id="cb598"><pre
class="sourceCode json"><code class="sourceCode json"><span id="cb598-1"><a href="#cb598-1" aria-hidden="true" tabindex="-1"></a><span class="fu">{</span></span>
<span id="cb598-2"><a href="#cb598-2" aria-hidden="true" tabindex="-1"></a>  <span class="dt">&quot;user&quot;</span><span class="fu">:</span> <span class="st">&quot;me&quot;</span><span class="fu">,</span></span>
<span id="cb598-3"><a href="#cb598-3" aria-hidden="true" tabindex="-1"></a>  <span class="dt">&quot;public_key&quot;</span><span class="fu">:</span> <span class="st">&quot;AAAAB3NzaC1yc2EAAAADAQABAAABAQDuwESFdAe14hVS6omeyX7edc...JQdf&quot;</span><span class="fu">,</span></span>
<span id="cb598-4"><a href="#cb598-4" aria-hidden="true" tabindex="-1"></a>  <span class="dt">&quot;client_ip&quot;</span><span class="fu">:</span> <span class="st">&quot;192.168.1.1&quot;</span></span>
<span id="cb598-5"><a href="#cb598-5" aria-hidden="true" tabindex="-1"></a><span class="fu">}</span></span></code></pre></div>
<p>If the client authenticated with an S3 access key
(<code>rclone serve s3</code>), the client never sends its secret, only
a signature made with it, so the input contains just the access key ID
as the <code>user</code> with no <code>pass</code> or
<code>public_key</code>:</p>
<div class="sourceCode" id="cb599"><pre
class="sourceCode json"><code class="sourceCode json"><span id="cb599-1"><a href="#cb599-1" aria-hidden="true" tabindex="-1"></a><span class="fu">{</span></span>
<span id="cb599-2"><a href="#cb599-2" aria-hidden="true" tabindex="-1"></a>  <span class="dt">&quot;user&quot;</span><span class="fu">:</span> <span class="st">&quot;AKIAIOSFODNN7EXAMPLE&quot;</span><span class="fu">,</span></span>
<span id="cb599-3"><a href="#cb599-3" aria-hidden="true" tabindex="-1"></a>  <span class="dt">&quot;client_ip&quot;</span><span class="fu">:</span> <span class="st">&quot;192.168.1.1&quot;</span></span>
<span id="cb599-4"><a href="#cb599-4" aria-hidden="true" tabindex="-1"></a><span class="fu">}</span></span></code></pre></div>
<p>In this case the program must look up the secret access key for that
access key ID and return it in the <code>_secret_access_key</code> field
of the output. Rclone then uses that secret to verify the signature on
the request, refusing the request if it does not match. This means the
proxy program is the source of truth for both the credentials and the
backend they map to. If the program does not return
<code>_secret_access_key</code> or returns it empty the request is
refused.</p>
<p>The program's answer for an access key ID is cached (see below) but
is checked with the program again after 5 minutes even if the access key
ID is in constant use, so revoking an access key ID in the program takes
effect within 5 minutes. A rotated secret takes effect on the first
request signed with it.</p>
<p>The <code>client_ip</code> key holds the IP address the client
connected from, without a port number. It can be used to restrict logins
to certain networks, or to log authentication attempts centrally. It is
omitted if the client has no IP address, for example when connecting
over a unix socket. Note that if rclone is behind a reverse proxy this
will be the address of the reverse proxy and not the original
client.</p>
<p>And as an example return this on STDOUT</p>
<div class="sourceCode" id="cb600"><pre
class="sourceCode json"><code class="sourceCode json"><span id="cb600-1"><a href="#cb600-1" aria-hidden="true" tabindex="-1"></a><span class="fu">{</span></span>
<span id="cb600-2"><a href="#cb600-2" aria-hidden="true" tabindex="-1"></a>  <span class="dt">&quot;type&quot;</span><span class="fu">:</span> <span class="st">&quot;sftp&quot;</span><span class="fu">,</span></span>
<span id="cb600-3"><a href="#cb600-3" aria-hidden="true" tabindex="-1"></a>  <span class="dt">&quot;_root&quot;</span><span class="fu">:</span> <span class="st">&quot;&quot;</span><span class="fu">,</span></span>
<span id="cb600-4"><a href="#cb600-4" aria-hidden="true" tabindex="-1"></a>  <span class="dt">&quot;_obscure&quot;</span><span class="fu">:</span> <span class="st">&quot;pass&quot;</span><span class="fu">,</span></span>
<span id="cb600-5"><a href="#cb600-5" aria-hidden="true" tabindex="-1"></a>  <span class="dt">&quot;user&quot;</span><span class="fu">:</span> <span class="st">&quot;me&quot;</span><span class="fu">,</span></span>
<span id="cb600-6"><a href="#cb600-6" aria-hidden="true" tabindex="-1"></a>  <span class="dt">&quot;pass&quot;</span><span class="fu">:</span> <span class="st">&quot;mypassword&quot;</span><span class="fu">,</span></span>
<span id="cb600-7"><a href="#cb600-7" aria-hidden="true" tabindex="-1"></a>  <span class="dt">&quot;host&quot;</span><span class="fu">:</span> <span class="st">&quot;sftp.example.com&quot;</span></span>
<span id="cb600-8"><a href="#cb600-8" aria-hidden="true" tabindex="-1"></a><span class="fu">}</span></span></code></pre></div>
<p>This would mean that an SFTP backend would be created on the fly for
the <code>user</code> and <code>pass</code>/<code>public_key</code>
returned in the output to the host given. Note that since
<code>_obscure</code> is set to <code>pass</code>, rclone will obscure
the <code>pass</code> parameter before creating the backend (which is
required for sftp backends).</p>
<p>The program can manipulate the supplied <code>user</code> in any way,
for example to make proxy to many different sftp backends, you could
make the <code>user</code> be <code>[email protected]</code> and then set
the <code>host</code> to <code>example.com</code> in the output and the
user to <code>user</code>. For security you'd probably want to restrict
the <code>host</code> to a limited list.</p>
<p>An internal cache of backends is keyed on the <code>user</code>, the
kind of credential presented, a hash of the <code>pass</code> or
<code>public_key</code>, and the <code>client_ip</code>. This means that
if a user's password or public-key changes, the client connects from a
new IP address, or the proxy returns different config parameters (eg a
rotated <code>api_key</code>), a fresh backend will be created on the
next request rather than the cached one being reused. A backend created
for a public key login is never reused for a password login, so a public
key cannot be sent as a password to skip the program.</p>
<p>A cached answer is checked with the program again after 5 minutes
even if the user is in constant use, so revoking a user in the program
takes effect within 5 minutes. For <code>serve sftp</code> this applies
to new logins - an existing connection is not closed.</p>
<p>This can be used to build general purpose proxies to any kind of
backend that rclone supports.</p>
<pre><code>rclone serve s3 remote:path [flags]</code></pre>
<h2 id="options-86">Options</h2>
<pre><code>      --addr stringArray                              IPaddress:Port or :Port to bind server to (default 127.0.0.1:8080)
      --allow-origin string                           Origin which cross-domain request (CORS) can be executed from
      --auth-key stringArray                          Set key pair for v4 authorization: access_key_id,secret_access_key
      --auth-proxy string                             A program to use to create the backend from the auth
      --baseurl string                                Prefix for URLs - leave blank for root
      --cert string                                   TLS PEM key (concatenation of certificate and CA certificate)
      --client-ca string                              Client certificate authority to verify clients with
      --dir-cache-time Duration                       Time to cache directory entries for (default 5m0s)
      --dir-perms FileMode                            Directory permissions (default 777)
      --directory-markers                             List every directory as a directory marker object
      --disable-multipart-streaming                   Buffer multipart uploads in memory instead of streaming them to the backend
      --etag-hash string                              Which hash to use for the ETag, or auto or blank for off (default &quot;MD5&quot;)
      --file-perms FileMode                           File permissions (default 666)
      --force-path-style                              If true use path style access if false use virtual hosted style (default true)
      --gid uint32                                    Override the gid field set by the filesystem (not supported on Windows) (default 1000)
  -h, --help                                          help for s3
      --htpasswd string                               A htpasswd file - if not provided no authentication is done
      --key string                                    TLS PEM Private key
      --link-perms FileMode                           Link permissions (default 666)
      --max-header-bytes int                          Maximum size of request header (default 4096)
      --metadata-max-objects int                      Maximum number of objects of a user whose metadata is kept in memory, 0 for unlimited (default 100000)
      --min-tls-version string                        Minimum TLS version that is acceptable (default &quot;tls1.0&quot;)
      --multipart-expiry Duration                     Abort incomplete multipart uploads idle for longer than this, 0 to keep forever (default 1d)
      --multipart-max-uploads int                     Maximum number of streamed multipart uploads a user can have in progress at once, 0 for unlimited (default 1000)
      --multipart-streaming-buffer-limit SizeSuffix   Maximum memory buffered per streamed multipart upload for parts arriving out of order, 0 for unlimited (default 256Mi)
      --multipart-streaming-buffer-total SizeSuffix   Maximum memory buffered by all the streamed multipart uploads of a user for parts arriving out of order, 0 for unlimited (default 1Gi)
      --no-checksum                                   Don&#39;t compare checksums on up/download
      --no-cleanup                                    Deprecated: use --directory-markers instead
      --no-modtime                                    Don&#39;t read/write the modification time (can speed things up)
      --no-seek                                       Don&#39;t allow seeking in files
      --pass string                                   Password for authentication
      --poll-interval Duration                        Time to wait between polling for changes, must be smaller than dir-cache-time and only on supported remotes (set 0 to disable) (default 1m0s)
      --read-only                                     Only allow read-only access
      --realm string                                  Realm for authentication
      --response-header stringArray                   Set HTTP header for all responses, overriding existing values
      --salt string                                   Password hashing salt (default &quot;dlPL2MqE&quot;)
      --server-read-timeout Duration                  Timeout for server reading data (default 1h0m0s)
      --server-write-timeout Duration                 Timeout for server writing data (default 1h0m0s)
      --uid uint32                                    Override the uid field set by the filesystem (not supported on Windows) (default 1000)
      --umask FileMode                                Override the permission bits set by the filesystem (not supported on Windows) (default 002)
      --user string                                   User name for authentication
      --user-from-header string                       User name from a defined HTTP header
      --vfs-block-norm-dupes                          If duplicate filenames exist in the same directory (after normalization), log an error and hide the duplicates (may have a performance cost)
      --vfs-cache-max-age Duration                    Max time since last access of objects in the cache (default 1h0m0s)
      --vfs-cache-max-size SizeSuffix                 Max total size of objects in the cache (default off)
      --vfs-cache-min-free-space SizeSuffix           Target minimum free space on the disk containing the cache (default off)
      --vfs-cache-mode CacheMode                      Cache mode off|minimal|writes|full (default off)
      --vfs-cache-poll-interval Duration              Interval to poll the cache for stale objects (default 1m0s)
      --vfs-case-insensitive                          If a file name not found, find a case insensitive match
      --vfs-disk-space-total-size SizeSuffix          Specify the total space of disk (default off)
      --vfs-fast-fingerprint                          Use fast (less accurate) fingerprints for change detection
      --vfs-handle-caching Duration                   Time to keep file handle and downloaders alive after last close (default 5s)
      --vfs-links                                     Translate symlinks to/from regular files with a &#39;.rclonelink&#39; extension for the VFS
      --vfs-metadata-extension string                 Set the extension to read metadata from
      --vfs-read-ahead SizeSuffix                     Extra read ahead over --buffer-size when using cache-mode full
      --vfs-read-chunk-size SizeSuffix                Read the source objects in chunks (default 128Mi)
      --vfs-read-chunk-size-limit SizeSuffix          If greater than --vfs-read-chunk-size, double the chunk size after each chunk read, until the limit is reached (&#39;off&#39; is unlimited) (default off)
      --vfs-read-chunk-streams int                    The number of parallel streams to read at once
      --vfs-read-wait Duration                        Time to wait for in-sequence read before seeking (default 20ms)
      --vfs-refresh                                   Refreshes the directory cache recursively in the background on start
      --vfs-used-is-size rclone size                  Use the rclone size algorithm for Used size
      --vfs-write-back Duration                       Time to writeback files after last use when using cache (default 5s)
      --vfs-write-wait Duration                       Time to wait for in-sequence write before giving error (default 1s)</code></pre>
<p>Options shared with other commands are described next. See the <a
href="https://rclone.org/flags/">global flags page</a> for global
options not listed here.</p>
<h3 id="filter-options-30">Filter Options</h3>
<p>Flags for filtering directory listings</p>
<pre class="text"><code>      --delete-excluded                     Delete files on dest excluded from sync
      --exclude stringArray                 Exclude files matching pattern
      --exclude-from stringArray            Read file exclude patterns from file (use - to read from stdin)
      --exclude-if-present stringArray      Exclude directories if filename is present
      --files-from stringArray              Read list of source-file names from file (use - to read from stdin)
      --files-from-raw stringArray          Read list of source-file names from file without any processing of lines (use - to read from stdin)
      --files-from0 stringArray             Read list of source-file names from file using NUL as separator (use - to read from stdin)
  -f, --filter stringArray                  Add a file filtering rule
      --filter-from stringArray             Read file filtering patterns from a file (use - to read from stdin)
      --hash-filter string                  Partition filenames by hash k/n or randomly @/n
      --ignore-case                         Ignore case in filters (case insensitive)
      --include stringArray                 Include files matching pattern
      --include-from stringArray            Read file include patterns from file (use - to read from stdin)
      --max-age Duration                    Only transfer files younger than this in s or suffix ms|s|m|h|d|w|M|y (default off)
      --max-depth int                       If set limits the recursion depth to this (default -1)
      --max-size SizeSuffix                 Only transfer files smaller than this in KiB or suffix B|K|M|G|T|P (default off)
      --metadata-exclude stringArray        Exclude metadatas matching pattern
      --metadata-exclude-from stringArray   Read metadata exclude patterns from file (use - to read from stdin)
      --metadata-filter stringArray         Add a metadata filtering rule
      --metadata-filter-from stringArray    Read metadata filtering patterns from a file (use - to read from stdin)
      --metadata-include stringArray        Include metadatas matching pattern
      --metadata-include-from stringArray   Read metadata include patterns from file (use - to read from stdin)
      --min-age Duration                    Only transfer files older than this in s or suffix ms|s|m|h|d|w|M|y (default off)
      --min-size SizeSuffix                 Only transfer files bigger than this in KiB or suffix B|K|M|G|T|P (default off)</code></pre>
<h2 id="see-also-86">See Also</h2>
<!-- markdownlint-capture -->
<!-- markdownlint-disable ul-style line-length -->
<ul>
<li><a href="https://rclone.org/commands/rclone_serve/">rclone serve</a>
- Serve a remote over a protocol.</li>
</ul>
<!-- markdownlint-restore -->
<h1 id="rclone-serve-sftp">rclone serve sftp</h1>
<p>Serve the remote over SFTP.</p>
<h2 id="synopsis-80">Synopsis</h2>
<p>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 <a href="/sftp">sftp</a>
to use with it.</p>
<p>You can use the <a href="/filtering">filter</a> flags (e.g.
<code>--include</code>, <code>--exclude</code>) to control what is
served.</p>
<p>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.</p>
<p>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 <a
href="https://rclone.org/sftp/#sftp-chunk-size">chunk_size</a> option on
an sftp remote.</p>
<p>The server will log errors. Use <code>-v</code> to see access
logs.</p>
<p><code>--bwlimit</code> will be respected for file transfers. Use
<code>--stats</code> to control the stats printing.</p>
<p>You must provide some means of authentication, either with
<code>--user</code>/<code>--pass</code>, an authorized keys file
(specify location with <code>--authorized-keys</code> - the default is
the same as ssh), an <code>--auth-proxy</code>, or set the
<code>--no-auth</code> flag for no authentication when logging in.</p>
<p>If you don't supply a host <code>--key</code> then rclone will
generate rsa, ecdsa and ed25519 variants, and cache them for later use
in rclone's cache directory (see
<code>rclone help flags cache-dir</code>) in the "serve-sftp"
directory.</p>
<p>By default the server binds to localhost:2022 - if you want it to be
reachable externally then supply <code>--addr :2022</code> for
example.</p>
<p>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 <a
href="https://www.freedesktop.org/software/systemd/man/latest/systemd.socket.html"
class="uri">https://www.freedesktop.org/software/systemd/man/latest/systemd.socket.html</a>.</p>
<p>Socket activation can be tested ad-hoc with the
<code>systemd-socket-activate</code>command:</p>
<pre class="console"><code>systemd-socket-activate -l 2222 -- rclone serve sftp :local:vfs/</code></pre>
<p>This will socket-activate rclone on the first connection to port 2222
over TCP.</p>
<p>Note that the default of <code>--vfs-cache-mode off</code> is fine
for the rclone sftp backend, but it may not be with other SFTP
clients.</p>
<p>If <code>--stdio</code> is specified, rclone will serve SFTP over
stdio, which can be used with sshd via ~/.ssh/authorized_keys, for
example:</p>
<pre class="text"><code>restrict,command=&quot;rclone serve sftp --stdio ./photos&quot; ssh-rsa ...</code></pre>
<p>On the client you need to set <code>--transfers 1</code> when using
<code>--stdio</code>. 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.</p>
<p>The "restrict" in authorized_keys prevents SHA1SUMs and MD5SUMs from
being used. Omitting "restrict" and using
<code>--sftp-path-override</code> to enable checksumming is possible but
less secure and you could use the SFTP server provided by OpenSSH in
this case.</p>
<h2 id="vfs---virtual-file-system-8">VFS - Virtual File System</h2>
<p>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.</p>
<p>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.</p>
<p>The VFS layer also implements a directory cache - this caches info
about files and directories (but not the data) in memory.</p>
<h2 id="vfs-directory-cache-8">VFS Directory Cache</h2>
<p>Using the <code>--dir-cache-time</code> 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.</p>
<pre class="text"><code>    --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)</code></pre>
<p>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.</p>
<p>You can send a <code>SIGHUP</code> 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:</p>
<pre class="console"><code>kill -SIGHUP $(pidof rclone)</code></pre>
<p>If you configure rclone with a <a href="/rc">remote control</a> then
you can use rclone rc to flush the whole directory cache:</p>
<pre class="console"><code>rclone rc vfs/forget</code></pre>
<p>Or individual files or directories:</p>
<pre class="console"><code>rclone rc vfs/forget file=path/to/file dir=path/to/dir</code></pre>
<h2 id="vfs-file-buffering-8">VFS File Buffering</h2>
<p>The <code>--buffer-size</code> flag determines the amount of memory,
that will be used to buffer data in advance.</p>
<p>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.</p>
<p>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 yet
read. If the buffer is empty, only a small amount of memory will be
used.</p>
<p>The maximum memory used by rclone for buffering can be up to
<code>--buffer-size * open files</code>.</p>
<h2 id="vfs-file-caching-8">VFS File Caching</h2>
<p>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 cost of some compatibility.</p>
<p>For example you'll need to enable VFS caching if you want to read and
write simultaneously to a file. See below for more details.</p>
<p>Note that the VFS cache is separate from the cache backend and you
may find that you need one or the other or both.</p>
<pre class="text"><code>    --cache-dir string                     Directory rclone will use for caching.
    --vfs-cache-mode CacheMode             Cache mode off|minimal|writes|full (default off)
    --vfs-cache-max-age duration           Max time since last access of objects in the cache (default 1h0m0s)
    --vfs-cache-max-size SizeSuffix        Max total size of objects in the cache (default off)
    --vfs-cache-min-free-space SizeSuffix  Target minimum free space on the disk containing the cache (default off)
    --vfs-cache-poll-interval duration     Interval to poll the cache for stale objects (default 1m0s)
    --vfs-write-back duration              Time to writeback files after last use when using cache (default 5s)</code></pre>
<p>If run with <code>-vv</code> rclone will print the location of the
file cache. The files are stored in the user cache file area which is OS
dependent but can be controlled with <code>--cache-dir</code> or setting
the appropriate environment variable.</p>
<p>The cache has 4 different modes selected by
<code>--vfs-cache-mode</code>. The higher the cache mode the more
compatible rclone becomes at the cost of using disk space.</p>
<p>Note that files are written back to the remote only when they are
closed and if they haven't been accessed for
<code>--vfs-write-back</code> seconds. If rclone is quit or dies with
files that haven't been uploaded, these will be uploaded next time
rclone is run with the same flags.</p>
<p>If using <code>--vfs-cache-max-size</code> or
<code>--vfs-cache-min-free-space</code> note that the cache may exceed
these quotas for two reasons. Firstly because it is only checked every
<code>--vfs-cache-poll-interval</code>. Secondly because open files
cannot be evicted from the cache. When <code>--vfs-cache-max-size</code>
or <code>--vfs-cache-min-free-space</code> is exceeded, rclone will
attempt to evict the least accessed files from the cache first. rclone
will start with files that haven't been accessed for the longest. This
cache flushing strategy is efficient and more relevant files are likely
to remain cached.</p>
<p>The <code>--vfs-cache-max-age</code> will evict files from the cache
after the set time since last access has passed; it is based on access
time, not on when the file was first added to the cache. The default
value of 1 hour will start evicting files from cache that haven't been
accessed for 1 hour. When a cached file is accessed the 1 hour timer is
reset to 0 and will wait for 1 more hour before evicting. Specify the
time with standard notation, s, m, h, d, w .</p>
<p>You <strong>should not</strong> run two copies of rclone using the
same VFS cache with the same or overlapping remotes if using
<code>--vfs-cache-mode &gt; off</code>. This can potentially cause data
corruption if you do. You can work around this by giving each rclone its
own cache hierarchy with <code>--cache-dir</code>. You don't need to
worry about this if the remotes in use don't overlap.</p>
<h3 id="vfs-cache-mode-off-8">--vfs-cache-mode off</h3>
<p>In this mode (the default) the cache will read directly from the
remote and write directly to the remote without caching anything on
disk.</p>
<p>This will mean some operations are not possible</p>
<ul>
<li>Files can't be opened for both read AND write</li>
<li>Files opened for write can't be seeked</li>
<li>Existing files opened for write must have O_TRUNC set</li>
<li>Files open for read with O_TRUNC will be opened write only</li>
<li>Files open for write only will behave as if O_TRUNC was
supplied</li>
<li>Open modes O_APPEND, O_TRUNC are ignored</li>
<li>If an upload fails it can't be retried</li>
</ul>
<h3 id="vfs-cache-mode-minimal-8">--vfs-cache-mode minimal</h3>
<p>This is very similar to "off" except that files opened for read AND
write will be buffered to disk. This means that files opened for write
will be a lot more compatible, but uses the minimal disk space.</p>
<p>These operations are not possible</p>
<ul>
<li>Files opened for write only can't be seeked</li>
<li>Existing files opened for write must have O_TRUNC set</li>
<li>Files opened for write only will ignore O_APPEND, O_TRUNC</li>
<li>If an upload fails it can't be retried</li>
</ul>
<h3 id="vfs-cache-mode-writes-8">--vfs-cache-mode writes</h3>
<p>In this mode files opened for read only are still read directly from
the remote, write only and read/write files are buffered to disk
first.</p>
<p>This mode should support all normal file system operations.</p>
<p>If an upload fails it will be retried at exponentially increasing
intervals up to 1 minute.</p>
<h3 id="vfs-cache-mode-full-8">--vfs-cache-mode full</h3>
<p>In this mode all reads and writes are buffered to and from disk. When
data is read from the remote this is buffered to disk as well.</p>
<p>In this mode the files in the cache will be sparse files and rclone
will keep track of which bits of the files it has downloaded.</p>
<p>So if an application only reads the starts of each file, then rclone
will only buffer the start of the file. These files will appear to be
their full size in the cache, but they will be sparse files with only
the data that has been downloaded present in them.</p>
<p>This mode should support all normal file system operations and is
otherwise identical to <code>--vfs-cache-mode</code> writes.</p>
<p>When reading a file rclone will read <code>--buffer-size</code> plus
<code>--vfs-read-ahead</code> bytes ahead. The
<code>--buffer-size</code> is buffered in memory whereas the
<code>--vfs-read-ahead</code> is buffered on disk.</p>
<p>When using this mode it is recommended that
<code>--buffer-size</code> is not set too large and
<code>--vfs-read-ahead</code> is set large if required.</p>
<p><strong>IMPORTANT</strong> not all file systems support sparse files.
In particular FAT/exFAT do not. Rclone will perform very badly if the
cache directory is on a filesystem which doesn't support sparse files
and it will log an ERROR message if one is detected.</p>
<h3 id="fingerprinting-8">Fingerprinting</h3>
<p>Various parts of the VFS use fingerprinting to see if a local file
copy has changed relative to a remote file. Fingerprints are made
from:</p>
<ul>
<li>size</li>
<li>modification time</li>
<li>hash</li>
</ul>
<p>where available on an object.</p>
<p>On some backends some of these attributes are slow to read (they take
an extra API call per object, or extra work per object).</p>
<p>For example <code>hash</code> is slow with the <code>local</code> and
<code>sftp</code> backends as they have to read the entire file and hash
it, and <code>modtime</code> is slow with the <code>s3</code>,
<code>swift</code>, <code>ftp</code> and <code>qinqstor</code> backends
because they need to do an extra API call to fetch it.</p>
<p>If you use the <code>--vfs-fast-fingerprint</code> flag then rclone
will not include the slow operations in the fingerprint. This makes the
fingerprinting less accurate but much faster and will improve the
opening time of cached files.</p>
<p>If you are running a vfs cache over <code>local</code>,
<code>s3</code> or <code>swift</code> backends then using this flag is
recommended.</p>
<p>Note that if you change the value of this flag, the fingerprints of
the files in the cache may be invalidated and the files will need to be
downloaded again.</p>
<h2 id="vfs-chunked-reading-8">VFS Chunked Reading</h2>
<p>When rclone reads files from a remote it reads them in chunks. This
means that rather than requesting the whole file rclone reads the chunk
specified. This can reduce the used download quota for some remotes by
requesting only chunks from the remote that are actually read, at the
cost of an increased number of requests.</p>
<p>These flags control the chunking:</p>
<pre class="text"><code>    --vfs-read-chunk-size SizeSuffix        Read the source objects in chunks (default 128M)
    --vfs-read-chunk-size-limit SizeSuffix  Max chunk doubling size (default off)
    --vfs-read-chunk-streams int            The number of parallel streams to read at once</code></pre>
<p>The chunking behaves differently depending on the
<code>--vfs-read-chunk-streams</code> parameter.</p>
<h3
id="vfs-read-chunk-streams-0-16"><code>--vfs-read-chunk-streams</code>
== 0</h3>
<p>Rclone will start reading a chunk of size
<code>--vfs-read-chunk-size</code>, and then double the size for each
read. When <code>--vfs-read-chunk-size-limit</code> is specified, and
greater than <code>--vfs-read-chunk-size</code>, the chunk size for each
open file will get doubled only until the specified value is reached. If
the value is "off", which is the default, the limit is disabled and the
chunk size will grow indefinitely.</p>
<p>With <code>--vfs-read-chunk-size 100M</code> and
<code>--vfs-read-chunk-size-limit 0</code> the following parts will be
downloaded: 0-100M, 100M-200M, 200M-300M, 300M-400M and so on. When
<code>--vfs-read-chunk-size-limit 500M</code> is specified, the result
would be 0-100M, 100M-300M, 300M-700M, 700M-1200M, 1200M-1700M and so
on.</p>
<p>Setting <code>--vfs-read-chunk-size</code> to <code>0</code> or "off"
disables chunked reading.</p>
<p>The chunks will not be buffered in memory.</p>
<h3
id="vfs-read-chunk-streams-0-17"><code>--vfs-read-chunk-streams</code>
&gt; 0</h3>
<p>Rclone reads <code>--vfs-read-chunk-streams</code> chunks of size
<code>--vfs-read-chunk-size</code> concurrently. The size for each read
will stay constant.</p>
<p>This improves performance massively on high latency links or very
high bandwidth links to high performance object stores.</p>
<p>Some experimentation will be needed to find the optimum values of
<code>--vfs-read-chunk-size</code> and
<code>--vfs-read-chunk-streams</code> as these will depend on the
backend in use and the latency to the backend.</p>
<p>For high performance object stores (eg AWS S3) a reasonable place to
start might be <code>--vfs-read-chunk-streams 16</code> and
<code>--vfs-read-chunk-size 4M</code>. In testing with AWS S3 the
performance scaled roughly as the <code>--vfs-read-chunk-streams</code>
setting.</p>
<p>Similar settings should work for high latency links, but depending on
the latency they may need more <code>--vfs-read-chunk-streams</code> in
order to get the throughput.</p>
<h2 id="vfs-performance-8">VFS Performance</h2>
<p>These flags may be used to enable/disable features of the VFS for
performance or other reasons. See also the <a
href="#vfs-chunked-reading">chunked reading</a> feature.</p>
<p>In particular S3 and Swift benefit hugely from the
<code>--no-modtime</code> flag (or use <code>--use-server-modtime</code>
for a slightly different effect) as each read of the modification time
takes a transaction.</p>
<pre class="text"><code>    --no-checksum     Don&#39;t compare checksums on up/download.
    --no-modtime      Don&#39;t read/write the modification time (can speed things up).
    --no-seek         Don&#39;t allow seeking in files.
    --read-only       Only allow read-only access.</code></pre>
<p>Sometimes rclone is delivered reads or writes out of order. Rather
than seeking rclone will wait a short time for the in sequence read or
write to come in. These flags only come into effect when not using an on
disk cache file.</p>
<pre class="text"><code>    --vfs-read-wait duration   Time to wait for in-sequence read before seeking (default 20ms)
    --vfs-write-wait duration  Time to wait for in-sequence write before giving error (default 1s)</code></pre>
<p>When using VFS write caching (<code>--vfs-cache-mode</code> with
value writes or full), the global flag <code>--transfers</code> can be
set to adjust the number of parallel uploads of modified files from the
cache (the related global flag <code>--checkers</code> has no effect on
the VFS).</p>
<pre class="text"><code>    --transfers int  Number of file transfers to run in parallel (default 4)</code></pre>
<h2 id="symlinks-8">Symlinks</h2>
<p>By default the VFS does not support symlinks. However this may be
enabled with either of the following flags:</p>
<pre class="text"><code>    --links      Translate symlinks to/from regular files with a &#39;.rclonelink&#39; extension.
    --vfs-links  Translate symlinks to/from regular files with a &#39;.rclonelink&#39; extension for the VFS</code></pre>
<p>As most cloud storage systems do not support symlinks directly,
rclone stores the symlink as a normal file with a special extension. So
a file which appears as a symlink <code>link-to-file.txt</code> would be
stored on cloud storage as <code>link-to-file.txt.rclonelink</code> and
the contents would be the path to the symlink destination.</p>
<p>Note that <code>--links</code> enables symlink translation globally
in rclone - this includes any backend which supports the concept (for
example the local backend). <code>--vfs-links</code> just enables it for
the VFS layer.</p>
<p>This scheme is compatible with that used by the <a
href="https://rclone.org/local/#symlinks-junction-points">local backend
with the --local-links flag</a>.</p>
<p>The <code>--vfs-links</code> flag has been designed for
<code>rclone mount</code>, <code>rclone nfsmount</code> and
<code>rclone serve nfs</code>.</p>
<p>It hasn't been tested with the other <code>rclone serve</code>
commands yet.</p>
<p>A limitation of the current implementation is that it expects the
caller to resolve sub-symlinks. For example given this directory
tree</p>
<pre class="text"><code>.
├── dir
│   └── file.txt
└── linked-dir -&gt; dir</code></pre>
<p>The VFS will correctly resolve <code>linked-dir</code> but not
<code>linked-dir/file.txt</code>. This is not a problem for the tested
commands but may be for other commands.</p>
<p><strong>Note</strong> that there is an outstanding issue with symlink
support <a href="https://github.com/rclone/rclone/issues/8245">issue
#8245</a> with duplicate files being created when symlinks are moved
into directories where there is a file of the same name (or vice
versa).</p>
<h2 id="vfs-case-sensitivity-8">VFS Case Sensitivity</h2>
<p>Linux file systems are case-sensitive: two files can differ only by
case, and the exact case must be used when opening a file.</p>
<p>File systems in modern Windows are case-insensitive but
case-preserving: although existing files can be opened using any case,
the exact case used to create the file is preserved and available for
programs to query. It is not allowed for two files in the same directory
to differ only by case.</p>
<p>Usually file systems on macOS are case-insensitive. It is possible to
make macOS file systems case-sensitive but that is not the default.</p>
<p>The <code>--vfs-case-insensitive</code> VFS flag controls how rclone
handles these two cases. If its value is "false", rclone passes file
names to the remote as-is. If the flag is "true" (or appears without a
value on the command line), rclone may perform a "fixup" as explained
below.</p>
<p>The user may specify a file name to open/delete/rename/etc with a
case different than what is stored on the remote. If an argument refers
to an existing file with exactly the same name, then the case of the
existing file on the disk will be used. However, if a file name with
exactly the same name is not found but a name differing only by case
exists, rclone will transparently fixup the name. This fixup happens
only when an existing file is requested. Case sensitivity of file names
created anew by rclone is controlled by the underlying remote.</p>
<p>Note that case sensitivity of the operating system running rclone
(the target) may differ from case sensitivity of a file system presented
by rclone (the source). The flag controls whether "fixup" is performed
to satisfy the target.</p>
<p>If the flag is not provided on the command line, then its default
value depends on the operating system where rclone runs: "true" on
Windows and macOS, "false" otherwise. If the flag is provided without a
value, then it is "true".</p>
<p>The <code>--no-unicode-normalization</code> flag controls whether a
similar "fixup" is performed for filenames that differ but are <a
href="https://en.wikipedia.org/wiki/Unicode_equivalence">canonically
equivalent</a> with respect to unicode. Unicode normalization can be
particularly helpful for users of macOS, which prefers form NFD instead
of the NFC used by most other platforms. It is therefore highly
recommended to keep the default of <code>false</code> on macOS, to avoid
encoding compatibility issues.</p>
<p>In the (probably unlikely) event that a directory has multiple
duplicate filenames after applying case and unicode normalization, the
<code>--vfs-block-norm-dupes</code> flag allows hiding these duplicates.
This comes with a performance tradeoff, as rclone will have to scan the
entire directory for duplicates when listing a directory. For this
reason, it is recommended to leave this disabled if not needed. However,
macOS users may wish to consider using it, as otherwise, if a remote
directory contains both NFC and NFD versions of the same filename, an
odd situation will occur: both versions of the file will be visible in
the mount, and both will appear to be editable, however, editing either
version will actually result in only the NFD version getting edited
under the hood. <code>--vfs-block- norm-dupes</code> prevents this
confusion by detecting this scenario, hiding the duplicates, and logging
an error, similar to how this is handled in
<code>rclone sync</code>.</p>
<h2 id="vfs-disk-options-8">VFS Disk Options</h2>
<p>This flag allows you to manually set the statistics about the filing
system. It can be useful when those statistics cannot be read correctly
automatically.</p>
<pre class="text"><code>    --vfs-disk-space-total-size    Manually set the total disk space size (example: 256G, default: -1)</code></pre>
<h2 id="alternate-report-of-used-bytes-8">Alternate report of used
bytes</h2>
<p>Some backends, most notably S3, do not report the amount of bytes
used. If you need this information to be available when running
<code>df</code> on the filesystem, then pass the flag
<code>--vfs-used-is-size</code> to rclone. With this flag set, instead
of relying on the backend to report this information, rclone will scan
the whole remote similar to <code>rclone size</code> and compute the
total used space itself.</p>
<p><strong>WARNING</strong>: Contrary to <code>rclone size</code>, this
flag ignores filters so that the result is accurate. However, this is
very inefficient and may cost lots of API calls resulting in extra
charges. Use it as a last resort and only with caching.</p>
<h2 id="vfs-metadata-8">VFS Metadata</h2>
<p>If you use the <code>--vfs-metadata-extension</code> flag you can get
the VFS to expose files which contain the <a
href="https://rclone.org/docs/#metadata">metadata</a> as a JSON blob.
These files will not appear in the directory listing, but can be
<code>stat</code>-ed and opened and once they have been they
<strong>will</strong> appear in directory listings until the directory
cache expires.</p>
<p>Note that some backends won't create metadata unless you pass in the
<code>--metadata</code> flag.</p>
<p>For example, using <code>rclone mount</code> with
<code>--metadata --vfs-metadata-extension .metadata</code> we get</p>
<pre class="console"><code>$ ls -l /mnt/
total 1048577
-rw-rw-r-- 1 user user 1073741824 Mar  3 16:03 1G

$ cat /mnt/1G.metadata
{
        &quot;atime&quot;: &quot;2025-03-04T17:34:22.317069787Z&quot;,
        &quot;btime&quot;: &quot;2025-03-03T16:03:37.708253808Z&quot;,
        &quot;gid&quot;: &quot;1000&quot;,
        &quot;mode&quot;: &quot;100664&quot;,
        &quot;mtime&quot;: &quot;2025-03-03T16:03:39.640238323Z&quot;,
        &quot;uid&quot;: &quot;1000&quot;
}

$ ls -l /mnt/
total 1048578
-rw-rw-r-- 1 user user 1073741824 Mar  3 16:03 1G
-rw-rw-r-- 1 user user        185 Mar  3 16:03 1G.metadata</code></pre>
<p>If the file has no metadata it will be returned as <code>{}</code>
and if there is an error reading the metadata the error will be returned
as <code>{"error":"error string"}</code>.</p>
<h2 id="auth-proxy-3">Auth Proxy</h2>
<p>If you supply the parameter
<code>--auth-proxy /path/to/program</code> then rclone will use that
program to generate backends on the fly which then are used to
authenticate incoming requests. This uses a simple JSON based protocol
with input on STDIN and output on STDOUT.</p>
<p><strong>PLEASE NOTE:</strong> <code>--auth-proxy</code> and
<code>--authorized-keys</code> cannot be used together, if
<code>--auth-proxy</code> is set the authorized keys option will be
ignored.</p>
<p>There is an example program <a
href="https://github.com/rclone/rclone/blob/master/bin/test_proxy.py">bin/test_proxy.py</a>
in the rclone source code.</p>
<p>The program's job is to take a <code>user</code> and
<code>pass</code> on the input and turn those into the config for a
backend on STDOUT in JSON format. This config will have any default
parameters for the backend added, but it won't use configuration from
environment variables or command line options - it is the job of the
proxy program to make a complete config.</p>
<p>This config generated must have this extra parameter</p>
<ul>
<li><code>_root</code> - root to use for the backend</li>
</ul>
<p>And it may have these parameters</p>
<ul>
<li><code>_obscure</code> - comma separated strings for parameters to
obscure</li>
<li><code>_secret_access_key</code> - the secret for S3 access key auth
(see below)</li>
</ul>
<p>If password authentication was used by the client, input to the proxy
process (on STDIN) would look similar to this:</p>
<div class="sourceCode" id="cb619"><pre
class="sourceCode json"><code class="sourceCode json"><span id="cb619-1"><a href="#cb619-1" aria-hidden="true" tabindex="-1"></a><span class="fu">{</span></span>
<span id="cb619-2"><a href="#cb619-2" aria-hidden="true" tabindex="-1"></a>  <span class="dt">&quot;user&quot;</span><span class="fu">:</span> <span class="st">&quot;me&quot;</span><span class="fu">,</span></span>
<span id="cb619-3"><a href="#cb619-3" aria-hidden="true" tabindex="-1"></a>  <span class="dt">&quot;pass&quot;</span><span class="fu">:</span> <span class="st">&quot;mypassword&quot;</span><span class="fu">,</span></span>
<span id="cb619-4"><a href="#cb619-4" aria-hidden="true" tabindex="-1"></a>  <span class="dt">&quot;client_ip&quot;</span><span class="fu">:</span> <span class="st">&quot;192.168.1.1&quot;</span></span>
<span id="cb619-5"><a href="#cb619-5" aria-hidden="true" tabindex="-1"></a><span class="fu">}</span></span></code></pre></div>
<p>If public-key authentication was used by the client, input to the
proxy process (on STDIN) would look similar to this:</p>
<div class="sourceCode" id="cb620"><pre
class="sourceCode json"><code class="sourceCode json"><span id="cb620-1"><a href="#cb620-1" aria-hidden="true" tabindex="-1"></a><span class="fu">{</span></span>
<span id="cb620-2"><a href="#cb620-2" aria-hidden="true" tabindex="-1"></a>  <span class="dt">&quot;user&quot;</span><span class="fu">:</span> <span class="st">&quot;me&quot;</span><span class="fu">,</span></span>
<span id="cb620-3"><a href="#cb620-3" aria-hidden="true" tabindex="-1"></a>  <span class="dt">&quot;public_key&quot;</span><span class="fu">:</span> <span class="st">&quot;AAAAB3NzaC1yc2EAAAADAQABAAABAQDuwESFdAe14hVS6omeyX7edc...JQdf&quot;</span><span class="fu">,</span></span>
<span id="cb620-4"><a href="#cb620-4" aria-hidden="true" tabindex="-1"></a>  <span class="dt">&quot;client_ip&quot;</span><span class="fu">:</span> <span class="st">&quot;192.168.1.1&quot;</span></span>
<span id="cb620-5"><a href="#cb620-5" aria-hidden="true" tabindex="-1"></a><span class="fu">}</span></span></code></pre></div>
<p>If the client authenticated with an S3 access key
(<code>rclone serve s3</code>), the client never sends its secret, only
a signature made with it, so the input contains just the access key ID
as the <code>user</code> with no <code>pass</code> or
<code>public_key</code>:</p>
<div class="sourceCode" id="cb621"><pre
class="sourceCode json"><code class="sourceCode json"><span id="cb621-1"><a href="#cb621-1" aria-hidden="true" tabindex="-1"></a><span class="fu">{</span></span>
<span id="cb621-2"><a href="#cb621-2" aria-hidden="true" tabindex="-1"></a>  <span class="dt">&quot;user&quot;</span><span class="fu">:</span> <span class="st">&quot;AKIAIOSFODNN7EXAMPLE&quot;</span><span class="fu">,</span></span>
<span id="cb621-3"><a href="#cb621-3" aria-hidden="true" tabindex="-1"></a>  <span class="dt">&quot;client_ip&quot;</span><span class="fu">:</span> <span class="st">&quot;192.168.1.1&quot;</span></span>
<span id="cb621-4"><a href="#cb621-4" aria-hidden="true" tabindex="-1"></a><span class="fu">}</span></span></code></pre></div>
<p>In this case the program must look up the secret access key for that
access key ID and return it in the <code>_secret_access_key</code> field
of the output. Rclone then uses that secret to verify the signature on
the request, refusing the request if it does not match. This means the
proxy program is the source of truth for both the credentials and the
backend they map to. If the program does not return
<code>_secret_access_key</code> or returns it empty the request is
refused.</p>
<p>The program's answer for an access key ID is cached (see below) but
is checked with the program again after 5 minutes even if the access key
ID is in constant use, so revoking an access key ID in the program takes
effect within 5 minutes. A rotated secret takes effect on the first
request signed with it.</p>
<p>The <code>client_ip</code> key holds the IP address the client
connected from, without a port number. It can be used to restrict logins
to certain networks, or to log authentication attempts centrally. It is
omitted if the client has no IP address, for example when connecting
over a unix socket. Note that if rclone is behind a reverse proxy this
will be the address of the reverse proxy and not the original
client.</p>
<p>And as an example return this on STDOUT</p>
<div class="sourceCode" id="cb622"><pre
class="sourceCode json"><code class="sourceCode json"><span id="cb622-1"><a href="#cb622-1" aria-hidden="true" tabindex="-1"></a><span class="fu">{</span></span>
<span id="cb622-2"><a href="#cb622-2" aria-hidden="true" tabindex="-1"></a>  <span class="dt">&quot;type&quot;</span><span class="fu">:</span> <span class="st">&quot;sftp&quot;</span><span class="fu">,</span></span>
<span id="cb622-3"><a href="#cb622-3" aria-hidden="true" tabindex="-1"></a>  <span class="dt">&quot;_root&quot;</span><span class="fu">:</span> <span class="st">&quot;&quot;</span><span class="fu">,</span></span>
<span id="cb622-4"><a href="#cb622-4" aria-hidden="true" tabindex="-1"></a>  <span class="dt">&quot;_obscure&quot;</span><span class="fu">:</span> <span class="st">&quot;pass&quot;</span><span class="fu">,</span></span>
<span id="cb622-5"><a href="#cb622-5" aria-hidden="true" tabindex="-1"></a>  <span class="dt">&quot;user&quot;</span><span class="fu">:</span> <span class="st">&quot;me&quot;</span><span class="fu">,</span></span>
<span id="cb622-6"><a href="#cb622-6" aria-hidden="true" tabindex="-1"></a>  <span class="dt">&quot;pass&quot;</span><span class="fu">:</span> <span class="st">&quot;mypassword&quot;</span><span class="fu">,</span></span>
<span id="cb622-7"><a href="#cb622-7" aria-hidden="true" tabindex="-1"></a>  <span class="dt">&quot;host&quot;</span><span class="fu">:</span> <span class="st">&quot;sftp.example.com&quot;</span></span>
<span id="cb622-8"><a href="#cb622-8" aria-hidden="true" tabindex="-1"></a><span class="fu">}</span></span></code></pre></div>
<p>This would mean that an SFTP backend would be created on the fly for
the <code>user</code> and <code>pass</code>/<code>public_key</code>
returned in the output to the host given. Note that since
<code>_obscure</code> is set to <code>pass</code>, rclone will obscure
the <code>pass</code> parameter before creating the backend (which is
required for sftp backends).</p>
<p>The program can manipulate the supplied <code>user</code> in any way,
for example to make proxy to many different sftp backends, you could
make the <code>user</code> be <code>[email protected]</code> and then set
the <code>host</code> to <code>example.com</code> in the output and the
user to <code>user</code>. For security you'd probably want to restrict
the <code>host</code> to a limited list.</p>
<p>An internal cache of backends is keyed on the <code>user</code>, the
kind of credential presented, a hash of the <code>pass</code> or
<code>public_key</code>, and the <code>client_ip</code>. This means that
if a user's password or public-key changes, the client connects from a
new IP address, or the proxy returns different config parameters (eg a
rotated <code>api_key</code>), a fresh backend will be created on the
next request rather than the cached one being reused. A backend created
for a public key login is never reused for a password login, so a public
key cannot be sent as a password to skip the program.</p>
<p>A cached answer is checked with the program again after 5 minutes
even if the user is in constant use, so revoking a user in the program
takes effect within 5 minutes. For <code>serve sftp</code> this applies
to new logins - an existing connection is not closed.</p>
<p>This can be used to build general purpose proxies to any kind of
backend that rclone supports.</p>
<pre><code>rclone serve sftp remote:path [flags]</code></pre>
<h2 id="options-87">Options</h2>
<pre><code>      --addr string                            IPaddress:Port or :Port to bind server to (default &quot;localhost:2022&quot;)
      --auth-proxy string                      A program to use to create the backend from the auth
      --authorized-keys string                 Authorized keys file (default &quot;~/.ssh/authorized_keys&quot;)
      --dir-cache-time Duration                Time to cache directory entries for (default 5m0s)
      --dir-perms FileMode                     Directory permissions (default 777)
      --file-perms FileMode                    File permissions (default 666)
      --gid uint32                             Override the gid field set by the filesystem (not supported on Windows) (default 1000)
  -h, --help                                   help for sftp
      --key stringArray                        SSH private host key file (Can be multi-valued, leave blank to auto generate)
      --link-perms FileMode                    Link permissions (default 666)
      --no-auth                                Allow connections with no authentication if set
      --no-checksum                            Don&#39;t compare checksums on up/download
      --no-modtime                             Don&#39;t read/write the modification time (can speed things up)
      --no-seek                                Don&#39;t allow seeking in files
      --pass string                            Password for authentication
      --poll-interval Duration                 Time to wait between polling for changes, must be smaller than dir-cache-time and only on supported remotes (set 0 to disable) (default 1m0s)
      --read-only                              Only allow read-only access
      --stdio                                  Run an sftp server on stdin/stdout
      --uid uint32                             Override the uid field set by the filesystem (not supported on Windows) (default 1000)
      --umask FileMode                         Override the permission bits set by the filesystem (not supported on Windows) (default 002)
      --user string                            User name for authentication
      --vfs-block-norm-dupes                   If duplicate filenames exist in the same directory (after normalization), log an error and hide the duplicates (may have a performance cost)
      --vfs-cache-max-age Duration             Max time since last access of objects in the cache (default 1h0m0s)
      --vfs-cache-max-size SizeSuffix          Max total size of objects in the cache (default off)
      --vfs-cache-min-free-space SizeSuffix    Target minimum free space on the disk containing the cache (default off)
      --vfs-cache-mode CacheMode               Cache mode off|minimal|writes|full (default off)
      --vfs-cache-poll-interval Duration       Interval to poll the cache for stale objects (default 1m0s)
      --vfs-case-insensitive                   If a file name not found, find a case insensitive match
      --vfs-disk-space-total-size SizeSuffix   Specify the total space of disk (default off)
      --vfs-fast-fingerprint                   Use fast (less accurate) fingerprints for change detection
      --vfs-handle-caching Duration            Time to keep file handle and downloaders alive after last close (default 5s)
      --vfs-links                              Translate symlinks to/from regular files with a &#39;.rclonelink&#39; extension for the VFS
      --vfs-metadata-extension string          Set the extension to read metadata from
      --vfs-read-ahead SizeSuffix              Extra read ahead over --buffer-size when using cache-mode full
      --vfs-read-chunk-size SizeSuffix         Read the source objects in chunks (default 128Mi)
      --vfs-read-chunk-size-limit SizeSuffix   If greater than --vfs-read-chunk-size, double the chunk size after each chunk read, until the limit is reached (&#39;off&#39; is unlimited) (default off)
      --vfs-read-chunk-streams int             The number of parallel streams to read at once
      --vfs-read-wait Duration                 Time to wait for in-sequence read before seeking (default 20ms)
      --vfs-refresh                            Refreshes the directory cache recursively in the background on start
      --vfs-used-is-size rclone size           Use the rclone size algorithm for Used size
      --vfs-write-back Duration                Time to writeback files after last use when using cache (default 5s)
      --vfs-write-wait Duration                Time to wait for in-sequence write before giving error (default 1s)</code></pre>
<p>Options shared with other commands are described next. See the <a
href="https://rclone.org/flags/">global flags page</a> for global
options not listed here.</p>
<h3 id="filter-options-31">Filter Options</h3>
<p>Flags for filtering directory listings</p>
<pre class="text"><code>      --delete-excluded                     Delete files on dest excluded from sync
      --exclude stringArray                 Exclude files matching pattern
      --exclude-from stringArray            Read file exclude patterns from file (use - to read from stdin)
      --exclude-if-present stringArray      Exclude directories if filename is present
      --files-from stringArray              Read list of source-file names from file (use - to read from stdin)
      --files-from-raw stringArray          Read list of source-file names from file without any processing of lines (use - to read from stdin)
      --files-from0 stringArray             Read list of source-file names from file using NUL as separator (use - to read from stdin)
  -f, --filter stringArray                  Add a file filtering rule
      --filter-from stringArray             Read file filtering patterns from a file (use - to read from stdin)
      --hash-filter string                  Partition filenames by hash k/n or randomly @/n
      --ignore-case                         Ignore case in filters (case insensitive)
      --include stringArray                 Include files matching pattern
      --include-from stringArray            Read file include patterns from file (use - to read from stdin)
      --max-age Duration                    Only transfer files younger than this in s or suffix ms|s|m|h|d|w|M|y (default off)
      --max-depth int                       If set limits the recursion depth to this (default -1)
      --max-size SizeSuffix                 Only transfer files smaller than this in KiB or suffix B|K|M|G|T|P (default off)
      --metadata-exclude stringArray        Exclude metadatas matching pattern
      --metadata-exclude-from stringArray   Read metadata exclude patterns from file (use - to read from stdin)
      --metadata-filter stringArray         Add a metadata filtering rule
      --metadata-filter-from stringArray    Read metadata filtering patterns from a file (use - to read from stdin)
      --metadata-include stringArray        Include metadatas matching pattern
      --metadata-include-from stringArray   Read metadata include patterns from file (use - to read from stdin)
      --min-age Duration                    Only transfer files older than this in s or suffix ms|s|m|h|d|w|M|y (default off)
      --min-size SizeSuffix                 Only transfer files bigger than this in KiB or suffix B|K|M|G|T|P (default off)</code></pre>
<h2 id="see-also-87">See Also</h2>
<!-- markdownlint-capture -->
<!-- markdownlint-disable ul-style line-length -->
<ul>
<li><a href="https://rclone.org/commands/rclone_serve/">rclone serve</a>
- Serve a remote over a protocol.</li>
</ul>
<!-- markdownlint-restore -->
<h1 id="rclone-serve-webdav">rclone serve webdav</h1>
<p>Serve remote:path over WebDAV.</p>
<h2 id="synopsis-81">Synopsis</h2>
<p>Run a basic WebDAV server to serve a remote over HTTP via the WebDAV
protocol. This can be viewed with a WebDAV client, through a web
browser, or you can make a remote of type WebDAV to read and write
it.</p>
<h2 id="webdav-options">WebDAV options</h2>
<h3 id="etag-hash">--etag-hash</h3>
<p>This controls the ETag header. Without this flag the ETag will be
based on the ModTime and Size of the object.</p>
<p>If this flag is set to "auto" then rclone will choose the first
supported hash on the backend or you can use a named hash such as "MD5"
or "SHA-1". Use the <a
href="https://rclone.org/commands/rclone_hashsum/">hashsum</a> command
to see the full list.</p>
<h2 id="gzip-compression">Gzip compression</h2>
<p>The server will compress certain response bodies (text and XML,
including WebDAV PROPFIND responses) using gzip when the client
advertises gzip support via the <code>Accept-Encoding: gzip</code>
request header. This reduces bandwidth usage.</p>
<h2 id="access-webdav-on-windows">Access WebDAV on Windows</h2>
<p>WebDAV shared folder can be mapped as a drive on Windows, however the
default settings prevent it. Windows will fail to connect to the server
using insecure Basic authentication. It will not even display any login
dialog. Windows requires SSL / HTTPS connection to be used with Basic.
If you try to connect via Add Network Location Wizard you will get the
following error: "The folder you entered does not appear to be valid.
Please choose another". However, you still can connect if you set the
following registry key on a client machine:
<code>HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WebClient\Parameters\BasicAuthLevel</code>
to 2. The BasicAuthLevel can be set to the following values:</p>
<pre class="text"><code>0 - Basic authentication disabled
1 - Basic authentication enabled for SSL connections only
2 - Basic authentication enabled for SSL connections and for non-SSL connections</code></pre>
<p>If required, increase the FileSizeLimitInBytes to a higher value.
Navigate to the Services interface, then restart the WebClient
service.</p>
<h2 id="access-office-applications-on-webdav">Access Office applications
on WebDAV</h2>
<p>Navigate to following registry
<code>HKEY_CURRENT_USER\Software\Microsoft\Office\[14.0/15.0/16.0]\Common\Internet</code>
Create a new DWORD BasicAuthLevel with value 2.</p>
<pre class="text"><code>0 - Basic authentication disabled
1 - Basic authentication enabled for SSL connections only
2 - Basic authentication enabled for SSL and for non-SSL connections</code></pre>
<p><a
href="https://learn.microsoft.com/en-us/office/troubleshoot/powerpoint/office-opens-blank-from-sharepoint"
class="uri">https://learn.microsoft.com/en-us/office/troubleshoot/powerpoint/office-opens-blank-from-sharepoint</a></p>
<h2 id="serving-over-a-unix-socket">Serving over a unix socket</h2>
<p>You can serve the webdav on a unix socket like this:</p>
<pre class="console"><code>rclone serve webdav --addr unix:///tmp/my.socket remote:path</code></pre>
<p>and connect to it like this using rclone and the webdav backend:</p>
<pre class="console"><code>rclone --webdav-unix-socket /tmp/my.socket --webdav-url http://localhost lsf :webdav:</code></pre>
<p>Note that there is no authentication on http protocol - this is
expected to be done by the permissions on the socket.</p>
<h2 id="symlinks-junction-points">Symlinks / Junction points</h2>
<p>The webdav protocol does not support symlinks or junction points and
by default rclone will skip them completely.</p>
<p>You can use <code>-L</code> to get rclone to follow symlinks or you
can use <code>--local-links</code> to make rclone show
<code>.rclonelink</code> files in place of the symlinks.</p>
<p><strong>NB</strong> Do not use <code>--links</code> as since v1.69
this applies to the VFS layer too, use <code>--local-links</code> which
only applies to the local backend only.</p>
<h2 id="server-options-6">Server options</h2>
<p>Use <code>--addr</code> to specify which IP address and port the
server should listen on, eg <code>--addr 1.2.3.4:8000</code> or
<code>--addr :8080</code> to listen to all IPs. By default it only
listens on localhost. You can use port :0 to let the OS choose an
available port.</p>
<p>If you set <code>--addr</code> to listen on a public or LAN
accessible IP address then using Authentication is advised - see the
next section for info.</p>
<p>You can use a unix socket by setting the url to
<code>unix:///path/to/socket</code> or just by using an absolute path
name.</p>
<p><code>--addr</code> may be repeated to listen on multiple
IPs/ports/sockets. Socket activation, described further below, can also
be used to accomplish the same.</p>
<p><code>--server-read-timeout</code> and
<code>--server-write-timeout</code> can be used to control the timeouts
on the server. Note that this is the total time for a transfer.</p>
<p><code>--max-header-bytes</code> controls the maximum number of bytes
the server will accept in the HTTP header.</p>
<p><code>--response-header</code> can be used to set an HTTP header for
all responses, will overriding existing values. The flag may be repeated
to add multiple headers. Use the format
<code>Header-Name: value</code>.</p>
<p><code>--allow-origin</code> enables cross-origin (CORS) requests from
browsers by setting the <code>Access-Control-Allow-Origin</code> header
on every response to the origin given, e.g.
<code>--allow-origin https://app.example.com</code>. Browser CORS
preflight OPTIONS requests are answered by rclone without needing
authentication as browsers never send credentials with them. Setting
this to <code>*</code> allows any origin which is a security risk on an
authenticated server.</p>
<p><code>--baseurl</code> controls the URL prefix that rclone serves
from. By default rclone will serve from the root. If you used
<code>--baseurl "/rclone"</code> then rclone would serve from a URL
starting with "/rclone/". This is useful if you wish to proxy rclone
serve. Rclone automatically inserts leading and trailing "/" on
<code>--baseurl</code>, so <code>--baseurl "rclone"</code>,
<code>--baseurl "/rclone"</code> and <code>--baseurl "/rclone/"</code>
are all treated identically.</p>
<p><code>--disable-zip</code> may be set to disable the zipping download
option.</p>
<h3 id="protocol-4">Protocol</h3>
<p>The server supports HTTP/1.1 and HTTP/2. HTTP/2 is used automatically
for TLS connections. For non-TLS connections, HTTP/2 cleartext (h2c) is
supported, allowing HTTP/2 without encryption.</p>
<h3 id="tls-ssl-4">TLS (SSL)</h3>
<p>By default this will serve over http. If you want you can serve over
https. You will need to supply the <code>--cert</code> and
<code>--key</code> flags. If you wish to do client side certificate
validation then you will need to supply <code>--client-ca</code>
also.</p>
<p>When TLS is configured every listener given with <code>--addr</code>
serves TLS. An individual listener can be prefixed with
<code>http://</code> to serve unencrypted HTTP on that address, or with
<code>tls://</code> to state explicitly that it must serve TLS. Using a
<code>tls://</code> address without <code>--cert</code> and
<code>--key</code> is an error.</p>
<p><code>--cert</code> must be set to the path of a file containing
either a PEM encoded certificate, or a concatenation of that with the CA
certificate. <code>--key</code> must be set to the path of a file with
the PEM encoded private key. If setting <code>--client-ca</code>, it
should be set to the path of a file with PEM encoded client certificate
authority certificates.</p>
<p><code>--min-tls-version</code> is minimum TLS version that is
acceptable. Valid values are "tls1.0", "tls1.1", "tls1.2" and "tls1.3"
(default "tls1.0").</p>
<h2 id="socket-activation-4">Socket activation</h2>
<p>Instead of the listening addresses specified above, rclone will
listen to all FDs passed by the service manager, if any (and ignore any
arguments passed by <code>--addr</code>).</p>
<p>This allows rclone to be a socket-activated service. It can be
configured with .socket and .service unit files as described in <a
href="https://www.freedesktop.org/software/systemd/man/latest/systemd.socket.html"
class="uri">https://www.freedesktop.org/software/systemd/man/latest/systemd.socket.html</a>.</p>
<p>Socket activation can be tested ad-hoc with the
<code>systemd-socket-activate</code>command</p>
<pre class="console"><code>systemd-socket-activate -l 8000 -- rclone serve</code></pre>
<p>This will socket-activate rclone on the first connection to port 8000
over TCP.</p>
<h3 id="template-2">Template</h3>
<p><code>--template</code> allows a user to specify a custom markup
template for HTTP and WebDAV serve functions. The server exports the
following markup to be used within the template to server pages:</p>
<table>
<colgroup>
<col style="width: 32%" />
<col style="width: 35%" />
<col style="width: 32%" />
</colgroup>
<thead>
<tr class="header">
<th style="text-align: left;">Parameter</th>
<th style="text-align: left;">Subparameter</th>
<th style="text-align: left;">Description</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;">.Name</td>
<td style="text-align: left;"></td>
<td style="text-align: left;">The full path of a file/directory.</td>
</tr>
<tr class="even">
<td style="text-align: left;">.Title</td>
<td style="text-align: left;"></td>
<td style="text-align: left;">Directory listing of '.Name'.</td>
</tr>
<tr class="odd">
<td style="text-align: left;">.Sort</td>
<td style="text-align: left;"></td>
<td style="text-align: left;">The current sort used. This is changeable
via '?sort=' parameter. Possible values: namedirfirst, name, size, time
(default namedirfirst).</td>
</tr>
<tr class="even">
<td style="text-align: left;">.Order</td>
<td style="text-align: left;"></td>
<td style="text-align: left;">The current ordering used. This is
changeable via '?order=' parameter. Possible values: asc, desc (default
asc).</td>
</tr>
<tr class="odd">
<td style="text-align: left;">.Query</td>
<td style="text-align: left;"></td>
<td style="text-align: left;">Currently unused.</td>
</tr>
<tr class="even">
<td style="text-align: left;">.Path</td>
<td style="text-align: left;"></td>
<td style="text-align: left;">The path of the directory from the root
with leading and trailing slashes, e.g. '/dir/'.</td>
</tr>
<tr class="odd">
<td style="text-align: left;">.IsRoot</td>
<td style="text-align: left;"></td>
<td style="text-align: left;">Boolean for if this is the root
directory.</td>
</tr>
<tr class="even">
<td style="text-align: left;">.UpLink</td>
<td style="text-align: left;"></td>
<td style="text-align: left;">The link to the parent directory.</td>
</tr>
<tr class="odd">
<td style="text-align: left;">.Static</td>
<td style="text-align: left;"></td>
<td style="text-align: left;">Boolean for if the listing is being
written as a static page by rclone index.</td>
</tr>
<tr class="even">
<td style="text-align: left;">.NumDirs</td>
<td style="text-align: left;"></td>
<td style="text-align: left;">The number of directories in the
listing.</td>
</tr>
<tr class="odd">
<td style="text-align: left;">.NumFiles</td>
<td style="text-align: left;"></td>
<td style="text-align: left;">The number of files in the listing.</td>
</tr>
<tr class="even">
<td style="text-align: left;">.TotalSize</td>
<td style="text-align: left;"></td>
<td style="text-align: left;">The total size in bytes of the files in
the listing.</td>
</tr>
<tr class="odd">
<td style="text-align: left;">.Breadcrumb</td>
<td style="text-align: left;"></td>
<td style="text-align: left;">Allows for creating a relative
navigation.</td>
</tr>
<tr class="even">
<td style="text-align: left;"></td>
<td style="text-align: left;">.Link</td>
<td style="text-align: left;">The link of the Text relative to the
root.</td>
</tr>
<tr class="odd">
<td style="text-align: left;"></td>
<td style="text-align: left;">.Text</td>
<td style="text-align: left;">The Name of the directory.</td>
</tr>
<tr class="even">
<td style="text-align: left;">.Entries</td>
<td style="text-align: left;"></td>
<td style="text-align: left;">Information about a specific
file/directory.</td>
</tr>
<tr class="odd">
<td style="text-align: left;"></td>
<td style="text-align: left;">.URL</td>
<td style="text-align: left;">The url of an entry.</td>
</tr>
<tr class="even">
<td style="text-align: left;"></td>
<td style="text-align: left;">.Leaf</td>
<td style="text-align: left;">Currently same as '.URL' but intended to
be just the name.</td>
</tr>
<tr class="odd">
<td style="text-align: left;"></td>
<td style="text-align: left;">.IsDir</td>
<td style="text-align: left;">Boolean for if an entry is a directory or
not.</td>
</tr>
<tr class="even">
<td style="text-align: left;"></td>
<td style="text-align: left;">.Size</td>
<td style="text-align: left;">Size in bytes of the entry.</td>
</tr>
<tr class="odd">
<td style="text-align: left;"></td>
<td style="text-align: left;">.ModTime</td>
<td style="text-align: left;">The UTC timestamp of an entry.</td>
</tr>
<tr class="even">
<td style="text-align: left;"></td>
<td style="text-align: left;">.MimeType</td>
<td style="text-align: left;">The MIME type of an entry guessed from its
name, or 'inode/directory'.</td>
</tr>
</tbody>
</table>
<p>The server also makes the following functions available so that they
can be used within the template. These functions help extend the options
for dynamic rendering of HTML. They can be used to render HTML based on
specific conditions.</p>
<table>
<colgroup>
<col style="width: 50%" />
<col style="width: 50%" />
</colgroup>
<thead>
<tr class="header">
<th style="text-align: left;">Function</th>
<th style="text-align: left;">Description</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;">afterEpoch</td>
<td style="text-align: left;">Returns the time since the epoch for the
given time.</td>
</tr>
<tr class="even">
<td style="text-align: left;">contains</td>
<td style="text-align: left;">Checks whether a given substring is
present or not in a given string.</td>
</tr>
<tr class="odd">
<td style="text-align: left;">hasPrefix</td>
<td style="text-align: left;">Checks whether the given string begins
with the specified prefix.</td>
</tr>
<tr class="even">
<td style="text-align: left;">hasSuffix</td>
<td style="text-align: left;">Checks whether the given string end with
the specified suffix.</td>
</tr>
</tbody>
</table>
<h3 id="authentication-5">Authentication</h3>
<p>By default this will serve files without needing a login.</p>
<p>You can either use an htpasswd file which can take lots of users, or
set a single username and password with the <code>--user</code> and
<code>--pass</code> flags.</p>
<p>Alternatively, you can have the reverse proxy manage authentication
and use the username provided in the configured header with
<code>--user-from-header</code> (e.g.,
<code>--user-from-header=x-remote-user</code>). Ensure the proxy is
trusted and headers cannot be spoofed, as misconfiguration may lead to
unauthorized access.</p>
<p>If either of the above authentication methods is not configured and
client certificates are required by the <code>--client-ca</code> flag
passed to the server, the client certificate common name will be
considered as the username.</p>
<p>Use <code>--htpasswd /path/to/htpasswd</code> to provide an htpasswd
file. This is in standard apache format and supports MD5, SHA1 and
BCrypt for basic authentication. Bcrypt is recommended.</p>
<p>To create an htpasswd file:</p>
<pre class="console"><code>touch htpasswd
htpasswd -B htpasswd user
htpasswd -B htpasswd anotherUser</code></pre>
<p>Use the same hash format and cost for every entry in the file. If the
entries differ, the time taken to reject a wrong password can reveal
which usernames exist.</p>
<p>The password file can be updated while rclone is running.</p>
<p>When authentication is enabled every request must be authenticated,
including HTTP OPTIONS requests, as the answer to an OPTIONS request can
reveal whether a path exists. Health checks or monitoring which use
unauthenticated OPTIONS requests will need to send credentials. The
exception is browser CORS preflight requests when
<code>--allow-origin</code> is set, which are answered without
authentication as browsers never send credentials with them.</p>
<p>Use <code>--realm</code> to set the authentication realm.</p>
<p>Use <code>--salt</code> to change the password hashing salt from the
default.</p>
<h2 id="vfs---virtual-file-system-9">VFS - Virtual File System</h2>
<p>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.</p>
<p>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.</p>
<p>The VFS layer also implements a directory cache - this caches info
about files and directories (but not the data) in memory.</p>
<h2 id="vfs-directory-cache-9">VFS Directory Cache</h2>
<p>Using the <code>--dir-cache-time</code> 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.</p>
<pre class="text"><code>    --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)</code></pre>
<p>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.</p>
<p>You can send a <code>SIGHUP</code> 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:</p>
<pre class="console"><code>kill -SIGHUP $(pidof rclone)</code></pre>
<p>If you configure rclone with a <a href="/rc">remote control</a> then
you can use rclone rc to flush the whole directory cache:</p>
<pre class="console"><code>rclone rc vfs/forget</code></pre>
<p>Or individual files or directories:</p>
<pre class="console"><code>rclone rc vfs/forget file=path/to/file dir=path/to/dir</code></pre>
<h2 id="vfs-file-buffering-9">VFS File Buffering</h2>
<p>The <code>--buffer-size</code> flag determines the amount of memory,
that will be used to buffer data in advance.</p>
<p>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.</p>
<p>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 yet
read. If the buffer is empty, only a small amount of memory will be
used.</p>
<p>The maximum memory used by rclone for buffering can be up to
<code>--buffer-size * open files</code>.</p>
<h2 id="vfs-file-caching-9">VFS File Caching</h2>
<p>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 cost of some compatibility.</p>
<p>For example you'll need to enable VFS caching if you want to read and
write simultaneously to a file. See below for more details.</p>
<p>Note that the VFS cache is separate from the cache backend and you
may find that you need one or the other or both.</p>
<pre class="text"><code>    --cache-dir string                     Directory rclone will use for caching.
    --vfs-cache-mode CacheMode             Cache mode off|minimal|writes|full (default off)
    --vfs-cache-max-age duration           Max time since last access of objects in the cache (default 1h0m0s)
    --vfs-cache-max-size SizeSuffix        Max total size of objects in the cache (default off)
    --vfs-cache-min-free-space SizeSuffix  Target minimum free space on the disk containing the cache (default off)
    --vfs-cache-poll-interval duration     Interval to poll the cache for stale objects (default 1m0s)
    --vfs-write-back duration              Time to writeback files after last use when using cache (default 5s)</code></pre>
<p>If run with <code>-vv</code> rclone will print the location of the
file cache. The files are stored in the user cache file area which is OS
dependent but can be controlled with <code>--cache-dir</code> or setting
the appropriate environment variable.</p>
<p>The cache has 4 different modes selected by
<code>--vfs-cache-mode</code>. The higher the cache mode the more
compatible rclone becomes at the cost of using disk space.</p>
<p>Note that files are written back to the remote only when they are
closed and if they haven't been accessed for
<code>--vfs-write-back</code> seconds. If rclone is quit or dies with
files that haven't been uploaded, these will be uploaded next time
rclone is run with the same flags.</p>
<p>If using <code>--vfs-cache-max-size</code> or
<code>--vfs-cache-min-free-space</code> note that the cache may exceed
these quotas for two reasons. Firstly because it is only checked every
<code>--vfs-cache-poll-interval</code>. Secondly because open files
cannot be evicted from the cache. When <code>--vfs-cache-max-size</code>
or <code>--vfs-cache-min-free-space</code> is exceeded, rclone will
attempt to evict the least accessed files from the cache first. rclone
will start with files that haven't been accessed for the longest. This
cache flushing strategy is efficient and more relevant files are likely
to remain cached.</p>
<p>The <code>--vfs-cache-max-age</code> will evict files from the cache
after the set time since last access has passed; it is based on access
time, not on when the file was first added to the cache. The default
value of 1 hour will start evicting files from cache that haven't been
accessed for 1 hour. When a cached file is accessed the 1 hour timer is
reset to 0 and will wait for 1 more hour before evicting. Specify the
time with standard notation, s, m, h, d, w .</p>
<p>You <strong>should not</strong> run two copies of rclone using the
same VFS cache with the same or overlapping remotes if using
<code>--vfs-cache-mode &gt; off</code>. This can potentially cause data
corruption if you do. You can work around this by giving each rclone its
own cache hierarchy with <code>--cache-dir</code>. You don't need to
worry about this if the remotes in use don't overlap.</p>
<h3 id="vfs-cache-mode-off-9">--vfs-cache-mode off</h3>
<p>In this mode (the default) the cache will read directly from the
remote and write directly to the remote without caching anything on
disk.</p>
<p>This will mean some operations are not possible</p>
<ul>
<li>Files can't be opened for both read AND write</li>
<li>Files opened for write can't be seeked</li>
<li>Existing files opened for write must have O_TRUNC set</li>
<li>Files open for read with O_TRUNC will be opened write only</li>
<li>Files open for write only will behave as if O_TRUNC was
supplied</li>
<li>Open modes O_APPEND, O_TRUNC are ignored</li>
<li>If an upload fails it can't be retried</li>
</ul>
<h3 id="vfs-cache-mode-minimal-9">--vfs-cache-mode minimal</h3>
<p>This is very similar to "off" except that files opened for read AND
write will be buffered to disk. This means that files opened for write
will be a lot more compatible, but uses the minimal disk space.</p>
<p>These operations are not possible</p>
<ul>
<li>Files opened for write only can't be seeked</li>
<li>Existing files opened for write must have O_TRUNC set</li>
<li>Files opened for write only will ignore O_APPEND, O_TRUNC</li>
<li>If an upload fails it can't be retried</li>
</ul>
<h3 id="vfs-cache-mode-writes-9">--vfs-cache-mode writes</h3>
<p>In this mode files opened for read only are still read directly from
the remote, write only and read/write files are buffered to disk
first.</p>
<p>This mode should support all normal file system operations.</p>
<p>If an upload fails it will be retried at exponentially increasing
intervals up to 1 minute.</p>
<h3 id="vfs-cache-mode-full-9">--vfs-cache-mode full</h3>
<p>In this mode all reads and writes are buffered to and from disk. When
data is read from the remote this is buffered to disk as well.</p>
<p>In this mode the files in the cache will be sparse files and rclone
will keep track of which bits of the files it has downloaded.</p>
<p>So if an application only reads the starts of each file, then rclone
will only buffer the start of the file. These files will appear to be
their full size in the cache, but they will be sparse files with only
the data that has been downloaded present in them.</p>
<p>This mode should support all normal file system operations and is
otherwise identical to <code>--vfs-cache-mode</code> writes.</p>
<p>When reading a file rclone will read <code>--buffer-size</code> plus
<code>--vfs-read-ahead</code> bytes ahead. The
<code>--buffer-size</code> is buffered in memory whereas the
<code>--vfs-read-ahead</code> is buffered on disk.</p>
<p>When using this mode it is recommended that
<code>--buffer-size</code> is not set too large and
<code>--vfs-read-ahead</code> is set large if required.</p>
<p><strong>IMPORTANT</strong> not all file systems support sparse files.
In particular FAT/exFAT do not. Rclone will perform very badly if the
cache directory is on a filesystem which doesn't support sparse files
and it will log an ERROR message if one is detected.</p>
<h3 id="fingerprinting-9">Fingerprinting</h3>
<p>Various parts of the VFS use fingerprinting to see if a local file
copy has changed relative to a remote file. Fingerprints are made
from:</p>
<ul>
<li>size</li>
<li>modification time</li>
<li>hash</li>
</ul>
<p>where available on an object.</p>
<p>On some backends some of these attributes are slow to read (they take
an extra API call per object, or extra work per object).</p>
<p>For example <code>hash</code> is slow with the <code>local</code> and
<code>sftp</code> backends as they have to read the entire file and hash
it, and <code>modtime</code> is slow with the <code>s3</code>,
<code>swift</code>, <code>ftp</code> and <code>qinqstor</code> backends
because they need to do an extra API call to fetch it.</p>
<p>If you use the <code>--vfs-fast-fingerprint</code> flag then rclone
will not include the slow operations in the fingerprint. This makes the
fingerprinting less accurate but much faster and will improve the
opening time of cached files.</p>
<p>If you are running a vfs cache over <code>local</code>,
<code>s3</code> or <code>swift</code> backends then using this flag is
recommended.</p>
<p>Note that if you change the value of this flag, the fingerprints of
the files in the cache may be invalidated and the files will need to be
downloaded again.</p>
<h2 id="vfs-chunked-reading-9">VFS Chunked Reading</h2>
<p>When rclone reads files from a remote it reads them in chunks. This
means that rather than requesting the whole file rclone reads the chunk
specified. This can reduce the used download quota for some remotes by
requesting only chunks from the remote that are actually read, at the
cost of an increased number of requests.</p>
<p>These flags control the chunking:</p>
<pre class="text"><code>    --vfs-read-chunk-size SizeSuffix        Read the source objects in chunks (default 128M)
    --vfs-read-chunk-size-limit SizeSuffix  Max chunk doubling size (default off)
    --vfs-read-chunk-streams int            The number of parallel streams to read at once</code></pre>
<p>The chunking behaves differently depending on the
<code>--vfs-read-chunk-streams</code> parameter.</p>
<h3
id="vfs-read-chunk-streams-0-18"><code>--vfs-read-chunk-streams</code>
== 0</h3>
<p>Rclone will start reading a chunk of size
<code>--vfs-read-chunk-size</code>, and then double the size for each
read. When <code>--vfs-read-chunk-size-limit</code> is specified, and
greater than <code>--vfs-read-chunk-size</code>, the chunk size for each
open file will get doubled only until the specified value is reached. If
the value is "off", which is the default, the limit is disabled and the
chunk size will grow indefinitely.</p>
<p>With <code>--vfs-read-chunk-size 100M</code> and
<code>--vfs-read-chunk-size-limit 0</code> the following parts will be
downloaded: 0-100M, 100M-200M, 200M-300M, 300M-400M and so on. When
<code>--vfs-read-chunk-size-limit 500M</code> is specified, the result
would be 0-100M, 100M-300M, 300M-700M, 700M-1200M, 1200M-1700M and so
on.</p>
<p>Setting <code>--vfs-read-chunk-size</code> to <code>0</code> or "off"
disables chunked reading.</p>
<p>The chunks will not be buffered in memory.</p>
<h3
id="vfs-read-chunk-streams-0-19"><code>--vfs-read-chunk-streams</code>
&gt; 0</h3>
<p>Rclone reads <code>--vfs-read-chunk-streams</code> chunks of size
<code>--vfs-read-chunk-size</code> concurrently. The size for each read
will stay constant.</p>
<p>This improves performance massively on high latency links or very
high bandwidth links to high performance object stores.</p>
<p>Some experimentation will be needed to find the optimum values of
<code>--vfs-read-chunk-size</code> and
<code>--vfs-read-chunk-streams</code> as these will depend on the
backend in use and the latency to the backend.</p>
<p>For high performance object stores (eg AWS S3) a reasonable place to
start might be <code>--vfs-read-chunk-streams 16</code> and
<code>--vfs-read-chunk-size 4M</code>. In testing with AWS S3 the
performance scaled roughly as the <code>--vfs-read-chunk-streams</code>
setting.</p>
<p>Similar settings should work for high latency links, but depending on
the latency they may need more <code>--vfs-read-chunk-streams</code> in
order to get the throughput.</p>
<h2 id="vfs-performance-9">VFS Performance</h2>
<p>These flags may be used to enable/disable features of the VFS for
performance or other reasons. See also the <a
href="#vfs-chunked-reading">chunked reading</a> feature.</p>
<p>In particular S3 and Swift benefit hugely from the
<code>--no-modtime</code> flag (or use <code>--use-server-modtime</code>
for a slightly different effect) as each read of the modification time
takes a transaction.</p>
<pre class="text"><code>    --no-checksum     Don&#39;t compare checksums on up/download.
    --no-modtime      Don&#39;t read/write the modification time (can speed things up).
    --no-seek         Don&#39;t allow seeking in files.
    --read-only       Only allow read-only access.</code></pre>
<p>Sometimes rclone is delivered reads or writes out of order. Rather
than seeking rclone will wait a short time for the in sequence read or
write to come in. These flags only come into effect when not using an on
disk cache file.</p>
<pre class="text"><code>    --vfs-read-wait duration   Time to wait for in-sequence read before seeking (default 20ms)
    --vfs-write-wait duration  Time to wait for in-sequence write before giving error (default 1s)</code></pre>
<p>When using VFS write caching (<code>--vfs-cache-mode</code> with
value writes or full), the global flag <code>--transfers</code> can be
set to adjust the number of parallel uploads of modified files from the
cache (the related global flag <code>--checkers</code> has no effect on
the VFS).</p>
<pre class="text"><code>    --transfers int  Number of file transfers to run in parallel (default 4)</code></pre>
<h2 id="symlinks-9">Symlinks</h2>
<p>By default the VFS does not support symlinks. However this may be
enabled with either of the following flags:</p>
<pre class="text"><code>    --links      Translate symlinks to/from regular files with a &#39;.rclonelink&#39; extension.
    --vfs-links  Translate symlinks to/from regular files with a &#39;.rclonelink&#39; extension for the VFS</code></pre>
<p>As most cloud storage systems do not support symlinks directly,
rclone stores the symlink as a normal file with a special extension. So
a file which appears as a symlink <code>link-to-file.txt</code> would be
stored on cloud storage as <code>link-to-file.txt.rclonelink</code> and
the contents would be the path to the symlink destination.</p>
<p>Note that <code>--links</code> enables symlink translation globally
in rclone - this includes any backend which supports the concept (for
example the local backend). <code>--vfs-links</code> just enables it for
the VFS layer.</p>
<p>This scheme is compatible with that used by the <a
href="https://rclone.org/local/#symlinks-junction-points">local backend
with the --local-links flag</a>.</p>
<p>The <code>--vfs-links</code> flag has been designed for
<code>rclone mount</code>, <code>rclone nfsmount</code> and
<code>rclone serve nfs</code>.</p>
<p>It hasn't been tested with the other <code>rclone serve</code>
commands yet.</p>
<p>A limitation of the current implementation is that it expects the
caller to resolve sub-symlinks. For example given this directory
tree</p>
<pre class="text"><code>.
├── dir
│   └── file.txt
└── linked-dir -&gt; dir</code></pre>
<p>The VFS will correctly resolve <code>linked-dir</code> but not
<code>linked-dir/file.txt</code>. This is not a problem for the tested
commands but may be for other commands.</p>
<p><strong>Note</strong> that there is an outstanding issue with symlink
support <a href="https://github.com/rclone/rclone/issues/8245">issue
#8245</a> with duplicate files being created when symlinks are moved
into directories where there is a file of the same name (or vice
versa).</p>
<h2 id="vfs-case-sensitivity-9">VFS Case Sensitivity</h2>
<p>Linux file systems are case-sensitive: two files can differ only by
case, and the exact case must be used when opening a file.</p>
<p>File systems in modern Windows are case-insensitive but
case-preserving: although existing files can be opened using any case,
the exact case used to create the file is preserved and available for
programs to query. It is not allowed for two files in the same directory
to differ only by case.</p>
<p>Usually file systems on macOS are case-insensitive. It is possible to
make macOS file systems case-sensitive but that is not the default.</p>
<p>The <code>--vfs-case-insensitive</code> VFS flag controls how rclone
handles these two cases. If its value is "false", rclone passes file
names to the remote as-is. If the flag is "true" (or appears without a
value on the command line), rclone may perform a "fixup" as explained
below.</p>
<p>The user may specify a file name to open/delete/rename/etc with a
case different than what is stored on the remote. If an argument refers
to an existing file with exactly the same name, then the case of the
existing file on the disk will be used. However, if a file name with
exactly the same name is not found but a name differing only by case
exists, rclone will transparently fixup the name. This fixup happens
only when an existing file is requested. Case sensitivity of file names
created anew by rclone is controlled by the underlying remote.</p>
<p>Note that case sensitivity of the operating system running rclone
(the target) may differ from case sensitivity of a file system presented
by rclone (the source). The flag controls whether "fixup" is performed
to satisfy the target.</p>
<p>If the flag is not provided on the command line, then its default
value depends on the operating system where rclone runs: "true" on
Windows and macOS, "false" otherwise. If the flag is provided without a
value, then it is "true".</p>
<p>The <code>--no-unicode-normalization</code> flag controls whether a
similar "fixup" is performed for filenames that differ but are <a
href="https://en.wikipedia.org/wiki/Unicode_equivalence">canonically
equivalent</a> with respect to unicode. Unicode normalization can be
particularly helpful for users of macOS, which prefers form NFD instead
of the NFC used by most other platforms. It is therefore highly
recommended to keep the default of <code>false</code> on macOS, to avoid
encoding compatibility issues.</p>
<p>In the (probably unlikely) event that a directory has multiple
duplicate filenames after applying case and unicode normalization, the
<code>--vfs-block-norm-dupes</code> flag allows hiding these duplicates.
This comes with a performance tradeoff, as rclone will have to scan the
entire directory for duplicates when listing a directory. For this
reason, it is recommended to leave this disabled if not needed. However,
macOS users may wish to consider using it, as otherwise, if a remote
directory contains both NFC and NFD versions of the same filename, an
odd situation will occur: both versions of the file will be visible in
the mount, and both will appear to be editable, however, editing either
version will actually result in only the NFD version getting edited
under the hood. <code>--vfs-block- norm-dupes</code> prevents this
confusion by detecting this scenario, hiding the duplicates, and logging
an error, similar to how this is handled in
<code>rclone sync</code>.</p>
<h2 id="vfs-disk-options-9">VFS Disk Options</h2>
<p>This flag allows you to manually set the statistics about the filing
system. It can be useful when those statistics cannot be read correctly
automatically.</p>
<pre class="text"><code>    --vfs-disk-space-total-size    Manually set the total disk space size (example: 256G, default: -1)</code></pre>
<h2 id="alternate-report-of-used-bytes-9">Alternate report of used
bytes</h2>
<p>Some backends, most notably S3, do not report the amount of bytes
used. If you need this information to be available when running
<code>df</code> on the filesystem, then pass the flag
<code>--vfs-used-is-size</code> to rclone. With this flag set, instead
of relying on the backend to report this information, rclone will scan
the whole remote similar to <code>rclone size</code> and compute the
total used space itself.</p>
<p><strong>WARNING</strong>: Contrary to <code>rclone size</code>, this
flag ignores filters so that the result is accurate. However, this is
very inefficient and may cost lots of API calls resulting in extra
charges. Use it as a last resort and only with caching.</p>
<h2 id="vfs-metadata-9">VFS Metadata</h2>
<p>If you use the <code>--vfs-metadata-extension</code> flag you can get
the VFS to expose files which contain the <a
href="https://rclone.org/docs/#metadata">metadata</a> as a JSON blob.
These files will not appear in the directory listing, but can be
<code>stat</code>-ed and opened and once they have been they
<strong>will</strong> appear in directory listings until the directory
cache expires.</p>
<p>Note that some backends won't create metadata unless you pass in the
<code>--metadata</code> flag.</p>
<p>For example, using <code>rclone mount</code> with
<code>--metadata --vfs-metadata-extension .metadata</code> we get</p>
<pre class="console"><code>$ ls -l /mnt/
total 1048577
-rw-rw-r-- 1 user user 1073741824 Mar  3 16:03 1G

$ cat /mnt/1G.metadata
{
        &quot;atime&quot;: &quot;2025-03-04T17:34:22.317069787Z&quot;,
        &quot;btime&quot;: &quot;2025-03-03T16:03:37.708253808Z&quot;,
        &quot;gid&quot;: &quot;1000&quot;,
        &quot;mode&quot;: &quot;100664&quot;,
        &quot;mtime&quot;: &quot;2025-03-03T16:03:39.640238323Z&quot;,
        &quot;uid&quot;: &quot;1000&quot;
}

$ ls -l /mnt/
total 1048578
-rw-rw-r-- 1 user user 1073741824 Mar  3 16:03 1G
-rw-rw-r-- 1 user user        185 Mar  3 16:03 1G.metadata</code></pre>
<p>If the file has no metadata it will be returned as <code>{}</code>
and if there is an error reading the metadata the error will be returned
as <code>{"error":"error string"}</code>.</p>
<h2 id="auth-proxy-4">Auth Proxy</h2>
<p>If you supply the parameter
<code>--auth-proxy /path/to/program</code> then rclone will use that
program to generate backends on the fly which then are used to
authenticate incoming requests. This uses a simple JSON based protocol
with input on STDIN and output on STDOUT.</p>
<p><strong>PLEASE NOTE:</strong> <code>--auth-proxy</code> and
<code>--authorized-keys</code> cannot be used together, if
<code>--auth-proxy</code> is set the authorized keys option will be
ignored.</p>
<p>There is an example program <a
href="https://github.com/rclone/rclone/blob/master/bin/test_proxy.py">bin/test_proxy.py</a>
in the rclone source code.</p>
<p>The program's job is to take a <code>user</code> and
<code>pass</code> on the input and turn those into the config for a
backend on STDOUT in JSON format. This config will have any default
parameters for the backend added, but it won't use configuration from
environment variables or command line options - it is the job of the
proxy program to make a complete config.</p>
<p>This config generated must have this extra parameter</p>
<ul>
<li><code>_root</code> - root to use for the backend</li>
</ul>
<p>And it may have these parameters</p>
<ul>
<li><code>_obscure</code> - comma separated strings for parameters to
obscure</li>
<li><code>_secret_access_key</code> - the secret for S3 access key auth
(see below)</li>
</ul>
<p>If password authentication was used by the client, input to the proxy
process (on STDIN) would look similar to this:</p>
<div class="sourceCode" id="cb645"><pre
class="sourceCode json"><code class="sourceCode json"><span id="cb645-1"><a href="#cb645-1" aria-hidden="true" tabindex="-1"></a><span class="fu">{</span></span>
<span id="cb645-2"><a href="#cb645-2" aria-hidden="true" tabindex="-1"></a>  <span class="dt">&quot;user&quot;</span><span class="fu">:</span> <span class="st">&quot;me&quot;</span><span class="fu">,</span></span>
<span id="cb645-3"><a href="#cb645-3" aria-hidden="true" tabindex="-1"></a>  <span class="dt">&quot;pass&quot;</span><span class="fu">:</span> <span class="st">&quot;mypassword&quot;</span><span class="fu">,</span></span>
<span id="cb645-4"><a href="#cb645-4" aria-hidden="true" tabindex="-1"></a>  <span class="dt">&quot;client_ip&quot;</span><span class="fu">:</span> <span class="st">&quot;192.168.1.1&quot;</span></span>
<span id="cb645-5"><a href="#cb645-5" aria-hidden="true" tabindex="-1"></a><span class="fu">}</span></span></code></pre></div>
<p>If public-key authentication was used by the client, input to the
proxy process (on STDIN) would look similar to this:</p>
<div class="sourceCode" id="cb646"><pre
class="sourceCode json"><code class="sourceCode json"><span id="cb646-1"><a href="#cb646-1" aria-hidden="true" tabindex="-1"></a><span class="fu">{</span></span>
<span id="cb646-2"><a href="#cb646-2" aria-hidden="true" tabindex="-1"></a>  <span class="dt">&quot;user&quot;</span><span class="fu">:</span> <span class="st">&quot;me&quot;</span><span class="fu">,</span></span>
<span id="cb646-3"><a href="#cb646-3" aria-hidden="true" tabindex="-1"></a>  <span class="dt">&quot;public_key&quot;</span><span class="fu">:</span> <span class="st">&quot;AAAAB3NzaC1yc2EAAAADAQABAAABAQDuwESFdAe14hVS6omeyX7edc...JQdf&quot;</span><span class="fu">,</span></span>
<span id="cb646-4"><a href="#cb646-4" aria-hidden="true" tabindex="-1"></a>  <span class="dt">&quot;client_ip&quot;</span><span class="fu">:</span> <span class="st">&quot;192.168.1.1&quot;</span></span>
<span id="cb646-5"><a href="#cb646-5" aria-hidden="true" tabindex="-1"></a><span class="fu">}</span></span></code></pre></div>
<p>If the client authenticated with an S3 access key
(<code>rclone serve s3</code>), the client never sends its secret, only
a signature made with it, so the input contains just the access key ID
as the <code>user</code> with no <code>pass</code> or
<code>public_key</code>:</p>
<div class="sourceCode" id="cb647"><pre
class="sourceCode json"><code class="sourceCode json"><span id="cb647-1"><a href="#cb647-1" aria-hidden="true" tabindex="-1"></a><span class="fu">{</span></span>
<span id="cb647-2"><a href="#cb647-2" aria-hidden="true" tabindex="-1"></a>  <span class="dt">&quot;user&quot;</span><span class="fu">:</span> <span class="st">&quot;AKIAIOSFODNN7EXAMPLE&quot;</span><span class="fu">,</span></span>
<span id="cb647-3"><a href="#cb647-3" aria-hidden="true" tabindex="-1"></a>  <span class="dt">&quot;client_ip&quot;</span><span class="fu">:</span> <span class="st">&quot;192.168.1.1&quot;</span></span>
<span id="cb647-4"><a href="#cb647-4" aria-hidden="true" tabindex="-1"></a><span class="fu">}</span></span></code></pre></div>
<p>In this case the program must look up the secret access key for that
access key ID and return it in the <code>_secret_access_key</code> field
of the output. Rclone then uses that secret to verify the signature on
the request, refusing the request if it does not match. This means the
proxy program is the source of truth for both the credentials and the
backend they map to. If the program does not return
<code>_secret_access_key</code> or returns it empty the request is
refused.</p>
<p>The program's answer for an access key ID is cached (see below) but
is checked with the program again after 5 minutes even if the access key
ID is in constant use, so revoking an access key ID in the program takes
effect within 5 minutes. A rotated secret takes effect on the first
request signed with it.</p>
<p>The <code>client_ip</code> key holds the IP address the client
connected from, without a port number. It can be used to restrict logins
to certain networks, or to log authentication attempts centrally. It is
omitted if the client has no IP address, for example when connecting
over a unix socket. Note that if rclone is behind a reverse proxy this
will be the address of the reverse proxy and not the original
client.</p>
<p>And as an example return this on STDOUT</p>
<div class="sourceCode" id="cb648"><pre
class="sourceCode json"><code class="sourceCode json"><span id="cb648-1"><a href="#cb648-1" aria-hidden="true" tabindex="-1"></a><span class="fu">{</span></span>
<span id="cb648-2"><a href="#cb648-2" aria-hidden="true" tabindex="-1"></a>  <span class="dt">&quot;type&quot;</span><span class="fu">:</span> <span class="st">&quot;sftp&quot;</span><span class="fu">,</span></span>
<span id="cb648-3"><a href="#cb648-3" aria-hidden="true" tabindex="-1"></a>  <span class="dt">&quot;_root&quot;</span><span class="fu">:</span> <span class="st">&quot;&quot;</span><span class="fu">,</span></span>
<span id="cb648-4"><a href="#cb648-4" aria-hidden="true" tabindex="-1"></a>  <span class="dt">&quot;_obscure&quot;</span><span class="fu">:</span> <span class="st">&quot;pass&quot;</span><span class="fu">,</span></span>
<span id="cb648-5"><a href="#cb648-5" aria-hidden="true" tabindex="-1"></a>  <span class="dt">&quot;user&quot;</span><span class="fu">:</span> <span class="st">&quot;me&quot;</span><span class="fu">,</span></span>
<span id="cb648-6"><a href="#cb648-6" aria-hidden="true" tabindex="-1"></a>  <span class="dt">&quot;pass&quot;</span><span class="fu">:</span> <span class="st">&quot;mypassword&quot;</span><span class="fu">,</span></span>
<span id="cb648-7"><a href="#cb648-7" aria-hidden="true" tabindex="-1"></a>  <span class="dt">&quot;host&quot;</span><span class="fu">:</span> <span class="st">&quot;sftp.example.com&quot;</span></span>
<span id="cb648-8"><a href="#cb648-8" aria-hidden="true" tabindex="-1"></a><span class="fu">}</span></span></code></pre></div>
<p>This would mean that an SFTP backend would be created on the fly for
the <code>user</code> and <code>pass</code>/<code>public_key</code>
returned in the output to the host given. Note that since
<code>_obscure</code> is set to <code>pass</code>, rclone will obscure
the <code>pass</code> parameter before creating the backend (which is
required for sftp backends).</p>
<p>The program can manipulate the supplied <code>user</code> in any way,
for example to make proxy to many different sftp backends, you could
make the <code>user</code> be <code>[email protected]</code> and then set
the <code>host</code> to <code>example.com</code> in the output and the
user to <code>user</code>. For security you'd probably want to restrict
the <code>host</code> to a limited list.</p>
<p>An internal cache of backends is keyed on the <code>user</code>, the
kind of credential presented, a hash of the <code>pass</code> or
<code>public_key</code>, and the <code>client_ip</code>. This means that
if a user's password or public-key changes, the client connects from a
new IP address, or the proxy returns different config parameters (eg a
rotated <code>api_key</code>), a fresh backend will be created on the
next request rather than the cached one being reused. A backend created
for a public key login is never reused for a password login, so a public
key cannot be sent as a password to skip the program.</p>
<p>A cached answer is checked with the program again after 5 minutes
even if the user is in constant use, so revoking a user in the program
takes effect within 5 minutes. For <code>serve sftp</code> this applies
to new logins - an existing connection is not closed.</p>
<p>This can be used to build general purpose proxies to any kind of
backend that rclone supports.</p>
<pre><code>rclone serve webdav remote:path [flags]</code></pre>
<h2 id="options-88">Options</h2>
<pre><code>      --addr stringArray                       IPaddress:Port or :Port to bind server to (default 127.0.0.1:8080)
      --allow-origin string                    Origin which cross-domain request (CORS) can be executed from
      --auth-proxy string                      A program to use to create the backend from the auth
      --baseurl string                         Prefix for URLs - leave blank for root
      --cert string                            TLS PEM key (concatenation of certificate and CA certificate)
      --client-ca string                       Client certificate authority to verify clients with
      --dir-cache-time Duration                Time to cache directory entries for (default 5m0s)
      --dir-perms FileMode                     Directory permissions (default 777)
      --disable-dir-list                       Disable HTML directory list on GET request for a directory
      --disable-zip                            Disable zip download of directories
      --etag-hash string                       Which hash to use for the ETag, or auto or blank for off
      --file-perms FileMode                    File permissions (default 666)
      --gid uint32                             Override the gid field set by the filesystem (not supported on Windows) (default 1000)
  -h, --help                                   help for webdav
      --htpasswd string                        A htpasswd file - if not provided no authentication is done
      --key string                             TLS PEM Private key
      --link-perms FileMode                    Link permissions (default 666)
      --max-header-bytes int                   Maximum size of request header (default 4096)
      --min-tls-version string                 Minimum TLS version that is acceptable (default &quot;tls1.0&quot;)
      --no-checksum                            Don&#39;t compare checksums on up/download
      --no-modtime                             Don&#39;t read/write the modification time (can speed things up)
      --no-seek                                Don&#39;t allow seeking in files
      --pass string                            Password for authentication
      --poll-interval Duration                 Time to wait between polling for changes, must be smaller than dir-cache-time and only on supported remotes (set 0 to disable) (default 1m0s)
      --read-only                              Only allow read-only access
      --realm string                           Realm for authentication
      --response-header stringArray            Set HTTP header for all responses, overriding existing values
      --salt string                            Password hashing salt (default &quot;dlPL2MqE&quot;)
      --server-read-timeout Duration           Timeout for server reading data (default 1h0m0s)
      --server-write-timeout Duration          Timeout for server writing data (default 1h0m0s)
      --template string                        User-specified template
      --uid uint32                             Override the uid field set by the filesystem (not supported on Windows) (default 1000)
      --umask FileMode                         Override the permission bits set by the filesystem (not supported on Windows) (default 002)
      --user string                            User name for authentication
      --user-from-header string                User name from a defined HTTP header
      --vfs-block-norm-dupes                   If duplicate filenames exist in the same directory (after normalization), log an error and hide the duplicates (may have a performance cost)
      --vfs-cache-max-age Duration             Max time since last access of objects in the cache (default 1h0m0s)
      --vfs-cache-max-size SizeSuffix          Max total size of objects in the cache (default off)
      --vfs-cache-min-free-space SizeSuffix    Target minimum free space on the disk containing the cache (default off)
      --vfs-cache-mode CacheMode               Cache mode off|minimal|writes|full (default off)
      --vfs-cache-poll-interval Duration       Interval to poll the cache for stale objects (default 1m0s)
      --vfs-case-insensitive                   If a file name not found, find a case insensitive match
      --vfs-disk-space-total-size SizeSuffix   Specify the total space of disk (default off)
      --vfs-fast-fingerprint                   Use fast (less accurate) fingerprints for change detection
      --vfs-handle-caching Duration            Time to keep file handle and downloaders alive after last close (default 5s)
      --vfs-links                              Translate symlinks to/from regular files with a &#39;.rclonelink&#39; extension for the VFS
      --vfs-metadata-extension string          Set the extension to read metadata from
      --vfs-read-ahead SizeSuffix              Extra read ahead over --buffer-size when using cache-mode full
      --vfs-read-chunk-size SizeSuffix         Read the source objects in chunks (default 128Mi)
      --vfs-read-chunk-size-limit SizeSuffix   If greater than --vfs-read-chunk-size, double the chunk size after each chunk read, until the limit is reached (&#39;off&#39; is unlimited) (default off)
      --vfs-read-chunk-streams int             The number of parallel streams to read at once
      --vfs-read-wait Duration                 Time to wait for in-sequence read before seeking (default 20ms)
      --vfs-refresh                            Refreshes the directory cache recursively in the background on start
      --vfs-used-is-size rclone size           Use the rclone size algorithm for Used size
      --vfs-write-back Duration                Time to writeback files after last use when using cache (default 5s)
      --vfs-write-wait Duration                Time to wait for in-sequence write before giving error (default 1s)</code></pre>
<p>Options shared with other commands are described next. See the <a
href="https://rclone.org/flags/">global flags page</a> for global
options not listed here.</p>
<h3 id="filter-options-32">Filter Options</h3>
<p>Flags for filtering directory listings</p>
<pre class="text"><code>      --delete-excluded                     Delete files on dest excluded from sync
      --exclude stringArray                 Exclude files matching pattern
      --exclude-from stringArray            Read file exclude patterns from file (use - to read from stdin)
      --exclude-if-present stringArray      Exclude directories if filename is present
      --files-from stringArray              Read list of source-file names from file (use - to read from stdin)
      --files-from-raw stringArray          Read list of source-file names from file without any processing of lines (use - to read from stdin)
      --files-from0 stringArray             Read list of source-file names from file using NUL as separator (use - to read from stdin)
  -f, --filter stringArray                  Add a file filtering rule
      --filter-from stringArray             Read file filtering patterns from a file (use - to read from stdin)
      --hash-filter string                  Partition filenames by hash k/n or randomly @/n
      --ignore-case                         Ignore case in filters (case insensitive)
      --include stringArray                 Include files matching pattern
      --include-from stringArray            Read file include patterns from file (use - to read from stdin)
      --max-age Duration                    Only transfer files younger than this in s or suffix ms|s|m|h|d|w|M|y (default off)
      --max-depth int                       If set limits the recursion depth to this (default -1)
      --max-size SizeSuffix                 Only transfer files smaller than this in KiB or suffix B|K|M|G|T|P (default off)
      --metadata-exclude stringArray        Exclude metadatas matching pattern
      --metadata-exclude-from stringArray   Read metadata exclude patterns from file (use - to read from stdin)
      --metadata-filter stringArray         Add a metadata filtering rule
      --metadata-filter-from stringArray    Read metadata filtering patterns from a file (use - to read from stdin)
      --metadata-include stringArray        Include metadatas matching pattern
      --metadata-include-from stringArray   Read metadata include patterns from file (use - to read from stdin)
      --min-age Duration                    Only transfer files older than this in s or suffix ms|s|m|h|d|w|M|y (default off)
      --min-size SizeSuffix                 Only transfer files bigger than this in KiB or suffix B|K|M|G|T|P (default off)</code></pre>
<h2 id="see-also-88">See Also</h2>
<!-- markdownlint-capture -->
<!-- markdownlint-disable ul-style line-length -->
<ul>
<li><a href="https://rclone.org/commands/rclone_serve/">rclone serve</a>
- Serve a remote over a protocol.</li>
</ul>
<!-- markdownlint-restore -->
<h1 id="rclone-settier">rclone settier</h1>
<p>Changes storage class/tier of objects in remote.</p>
<h2 id="synopsis-82">Synopsis</h2>
<p>Changes storage tier or class at remote if supported. Few cloud
storage services provides different storage classes on objects, for
example AWS S3 and Glacier, Azure Blob storage - Hot, Cool and Archive,
Google Cloud Storage, Regional Storage, Nearline, Coldline etc.</p>
<p>Note that, certain tier changes make objects not available to access
immediately. For example tiering to archive in azure blob storage makes
objects in frozen state, user can restore by setting tier to Hot/Cool,
similarly S3 to Glacier makes object inaccessible.true</p>
<p>You can use it to tier single object</p>
<pre class="console"><code>rclone settier Cool remote:path/file</code></pre>
<p>Or use rclone filters to set tier on only specific files</p>
<pre class="console"><code>rclone --include &quot;*.txt&quot; settier Hot remote:path/dir</code></pre>
<p>Or just provide remote directory and all files in directory will be
tiered</p>
<pre class="console"><code>rclone settier tier remote:path/dir</code></pre>
<pre><code>rclone settier tier remote:path [flags]</code></pre>
<h2 id="options-89">Options</h2>
<pre><code>  -h, --help   help for settier</code></pre>
<p>See the <a href="https://rclone.org/flags/">global flags page</a> for
global options not listed here.</p>
<h2 id="see-also-89">See Also</h2>
<!-- markdownlint-capture -->
<!-- markdownlint-disable ul-style line-length -->
<ul>
<li><a href="https://rclone.org/commands/rclone/">rclone</a> - Show help
for rclone commands, flags and backends.</li>
</ul>
<!-- markdownlint-restore -->
<h1 id="rclone-test">rclone test</h1>
<p>Run a test command</p>
<h2 id="synopsis-83">Synopsis</h2>
<p>Rclone test is used to run test commands.</p>
<p>Select which test command you want with the subcommand, eg</p>
<pre class="console"><code>rclone test memory remote:</code></pre>
<p>Each subcommand has its own options which you can see in their
help.</p>
<p><strong>NB</strong> Be careful running these commands, they may do
strange things so reading their documentation first is recommended.</p>
<h2 id="options-90">Options</h2>
<pre><code>  -h, --help   help for test</code></pre>
<p>See the <a href="https://rclone.org/flags/">global flags page</a> for
global options not listed here.</p>
<h2 id="see-also-90">See Also</h2>
<!-- markdownlint-capture -->
<!-- markdownlint-disable ul-style line-length -->
<ul>
<li><a href="https://rclone.org/commands/rclone/">rclone</a> - Show help
for rclone commands, flags and backends.</li>
<li><a
href="https://rclone.org/commands/rclone_test_changenotify/">rclone test
changenotify</a> - Log any change notify requests for the remote passed
in.</li>
<li><a href="https://rclone.org/commands/rclone_test_histogram/">rclone
test histogram</a> - Makes a histogram of file name characters.</li>
<li><a href="https://rclone.org/commands/rclone_test_info/">rclone test
info</a> - Discovers file name or other limitations for paths.</li>
<li><a href="https://rclone.org/commands/rclone_test_makefile/">rclone
test makefile</a> - Make files with random contents of the size
given</li>
<li><a href="https://rclone.org/commands/rclone_test_makefiles/">rclone
test makefiles</a> - Make a random file hierarchy in a directory</li>
<li><a href="https://rclone.org/commands/rclone_test_memory/">rclone
test memory</a> - Load all the objects at remote:path into memory and
report memory stats.</li>
<li><a href="https://rclone.org/commands/rclone_test_speed/">rclone test
speed</a> - Run a speed test to the remote</li>
</ul>
<!-- markdownlint-restore -->
<h1 id="rclone-test-changenotify">rclone test changenotify</h1>
<p>Log any change notify requests for the remote passed in.</p>
<pre><code>rclone test changenotify remote: [flags]</code></pre>
<h2 id="options-91">Options</h2>
<pre><code>  -h, --help                     help for changenotify
      --poll-interval Duration   Time to wait between polling for changes (default 10s)</code></pre>
<p>See the <a href="https://rclone.org/flags/">global flags page</a> for
global options not listed here.</p>
<h2 id="see-also-91">See Also</h2>
<!-- markdownlint-capture -->
<!-- markdownlint-disable ul-style line-length -->
<ul>
<li><a href="https://rclone.org/commands/rclone_test/">rclone test</a> -
Run a test command</li>
</ul>
<!-- markdownlint-restore -->
<h1 id="rclone-test-histogram">rclone test histogram</h1>
<p>Makes a histogram of file name characters.</p>
<h2 id="synopsis-84">Synopsis</h2>
<p>This command outputs JSON which shows the histogram of characters
used in filenames in the remote:path specified.</p>
<p>The data doesn't contain any identifying information but is useful
for the rclone developers when developing filename compression.</p>
<pre><code>rclone test histogram [remote:path] [flags]</code></pre>
<h2 id="options-92">Options</h2>
<pre><code>  -h, --help   help for histogram</code></pre>
<p>See the <a href="https://rclone.org/flags/">global flags page</a> for
global options not listed here.</p>
<h2 id="see-also-92">See Also</h2>
<!-- markdownlint-capture -->
<!-- markdownlint-disable ul-style line-length -->
<ul>
<li><a href="https://rclone.org/commands/rclone_test/">rclone test</a> -
Run a test command</li>
</ul>
<!-- markdownlint-restore -->
<h1 id="rclone-test-info">rclone test info</h1>
<p>Discovers file name or other limitations for paths.</p>
<h2 id="synopsis-85">Synopsis</h2>
<p>Discovers what filenames and upload methods are possible to write to
the paths passed in and how long they can be. It can take some time. It
will write test files into the remote:path passed in. It outputs a bit
of go code for each one.</p>
<p><strong>NB</strong> this can create undeletable files and other
hazards - use with care!</p>
<pre><code>rclone test info [remote:path]+ [flags]</code></pre>
<h2 id="options-93">Options</h2>
<pre><code>      --all                    Run all tests
      --check-base32768        Check can store all possible base32768 characters
      --check-control          Check control characters
      --check-length           Check max filename length
      --check-normalization    Check UTF-8 Normalization
      --check-streaming        Check uploads with indeterminate file size
  -h, --help                   help for info
      --keep-test-files        Keep test files after execution
      --upload-wait Duration   Wait after writing a file (default 0s)
      --write-json string      Write results to file</code></pre>
<p>See the <a href="https://rclone.org/flags/">global flags page</a> for
global options not listed here.</p>
<h2 id="see-also-93">See Also</h2>
<!-- markdownlint-capture -->
<!-- markdownlint-disable ul-style line-length -->
<ul>
<li><a href="https://rclone.org/commands/rclone_test/">rclone test</a> -
Run a test command</li>
</ul>
<!-- markdownlint-restore -->
<h1 id="rclone-test-makefile">rclone test makefile</h1>
<p>Make files with random contents of the size given</p>
<pre><code>rclone test makefile &lt;size&gt; [&lt;file&gt;]+ [flags]</code></pre>
<h2 id="options-94">Options</h2>
<pre><code>      --ascii      Fill files with random ASCII printable bytes only
      --chargen    Fill files with a ASCII chargen pattern
  -h, --help       help for makefile
      --pattern    Fill files with a periodic pattern
      --seed int   Seed for the random number generator (0 for random) (default 1)
      --sparse     Make the files sparse (appear to be filled with ASCII 0x00)
      --zero       Fill files with ASCII 0x00</code></pre>
<p>See the <a href="https://rclone.org/flags/">global flags page</a> for
global options not listed here.</p>
<h2 id="see-also-94">See Also</h2>
<!-- markdownlint-capture -->
<!-- markdownlint-disable ul-style line-length -->
<ul>
<li><a href="https://rclone.org/commands/rclone_test/">rclone test</a> -
Run a test command</li>
</ul>
<!-- markdownlint-restore -->
<h1 id="rclone-test-makefiles">rclone test makefiles</h1>
<p>Make a random file hierarchy in a directory</p>
<pre><code>rclone test makefiles &lt;dir&gt; [flags]</code></pre>
<h2 id="options-95">Options</h2>
<pre><code>      --ascii                      Fill files with random ASCII printable bytes only
      --chargen                    Fill files with a ASCII chargen pattern
      --files int                  Number of files to create (default 1000)
      --files-per-directory int    Average number of files per directory (default 10)
      --flat                       If set create all files in the root directory
  -h, --help                       help for makefiles
      --max-depth int              Maximum depth of directory hierarchy (default 10)
      --max-file-size SizeSuffix   Maximum size of files to create (default 100)
      --max-name-length int        Maximum size of file names (default 12)
      --min-file-size SizeSuffix   Minimum size of file to create
      --min-name-length int        Minimum size of file names (default 4)
      --pattern                    Fill files with a periodic pattern
      --seed int                   Seed for the random number generator (0 for random) (default 1)
      --sparse                     Make the files sparse (appear to be filled with ASCII 0x00)
      --zero                       Fill files with ASCII 0x00</code></pre>
<p>See the <a href="https://rclone.org/flags/">global flags page</a> for
global options not listed here.</p>
<h2 id="see-also-95">See Also</h2>
<!-- markdownlint-capture -->
<!-- markdownlint-disable ul-style line-length -->
<ul>
<li><a href="https://rclone.org/commands/rclone_test/">rclone test</a> -
Run a test command</li>
</ul>
<!-- markdownlint-restore -->
<h1 id="rclone-test-memory">rclone test memory</h1>
<p>Load all the objects at remote:path into memory and report memory
stats.</p>
<pre><code>rclone test memory remote:path [flags]</code></pre>
<h2 id="options-96">Options</h2>
<pre><code>  -h, --help   help for memory</code></pre>
<p>See the <a href="https://rclone.org/flags/">global flags page</a> for
global options not listed here.</p>
<h2 id="see-also-96">See Also</h2>
<!-- markdownlint-capture -->
<!-- markdownlint-disable ul-style line-length -->
<ul>
<li><a href="https://rclone.org/commands/rclone_test/">rclone test</a> -
Run a test command</li>
</ul>
<!-- markdownlint-restore -->
<h1 id="rclone-test-speed">rclone test speed</h1>
<p>Run a speed test to the remote</p>
<h2 id="synopsis-86">Synopsis</h2>
<p>Run a speed test to the remote.</p>
<p>This command runs a series of uploads and downloads to the remote,
measuring and printing the speed of each test using varying file sizes
and numbers of files.</p>
<p>Test time can be inaccurate with small file caps and large files. As
it uses the results of an initial test to determine how many files to
use in each subsequent test.</p>
<p>It is recommended to use -q flag for a simpler output. e.g.:</p>
<pre><code>rclone test speed remote: -q</code></pre>
<p><strong>NB</strong> This command will create and delete files on the
remote in a randomly named directory which will be automatically removed
on a clean exit.</p>
<p>You can use the --json flag to only print the results in JSON
format.</p>
<pre><code>rclone test speed &lt;remote&gt; [flags]</code></pre>
<h2 id="options-97">Options</h2>
<pre><code>      --ascii                Fill files with random ASCII printable bytes only
      --chargen              Fill files with a ASCII chargen pattern
      --file-cap int         Maximum number of files to use in each test (default 100)
  -h, --help                 help for speed
      --json                 Output only results in JSON format
      --large SizeSuffix     Size of large files (default 1Gi)
      --medium SizeSuffix    Size of medium files (default 10Mi)
      --pattern              Fill files with a periodic pattern
      --seed int             Seed for the random number generator (0 for random) (default 1)
      --small SizeSuffix     Size of small files (default 1Ki)
      --sparse               Make the files sparse (appear to be filled with ASCII 0x00)
      --test-time Duration   Length for each test to run (default 15s)
      --zero                 Fill files with ASCII 0x00</code></pre>
<p>See the <a href="https://rclone.org/flags/">global flags page</a> for
global options not listed here.</p>
<h2 id="see-also-97">See Also</h2>
<!-- markdownlint-capture -->
<!-- markdownlint-disable ul-style line-length -->
<ul>
<li><a href="https://rclone.org/commands/rclone_test/">rclone test</a> -
Run a test command</li>
</ul>
<!-- markdownlint-restore -->
<h1 id="rclone-touch">rclone touch</h1>
<p>Create new file or change file modification time.</p>
<h2 id="synopsis-87">Synopsis</h2>
<p>Set the modification time on file(s) as specified by remote:path to
have the current time.</p>
<p>If remote:path does not exist then a zero sized file will be created,
unless <code>--no-create</code> or <code>--recursive</code> is
provided.</p>
<p>If <code>--recursive</code> is used then recursively sets the
modification time on all existing files that is found under the path.
Filters are supported, and you can test with the <code>--dry-run</code>
or the <code>--interactive</code>/<code>-i</code> flag. This will touch
<code>--transfers</code> files concurrently.</p>
<p>If <code>--timestamp</code> is used then sets the modification time
to that time instead of the current time. Times may be specified as one
of:</p>
<ul>
<li>'YYMMDD' - e.g. 171030</li>
<li>'YYYY-MM-DD' - e.g. 2006-01-02</li>
<li>'YYYY-MM-DDTHH:MM:SS' - e.g. 2006-01-02T15:04:05</li>
<li>'YYYY-MM-DDTHH:MM:SS.SSS' - e.g. 2006-01-02T15:04:05.123456789</li>
<li>'YYYY-MM-DDTHH:MM:SSZ' - e.g. 2006-01-02T15:04:05Z</li>
</ul>
<p>Note that value of <code>--timestamp</code> is in UTC. If you want
local time then add the <code>--localtime</code> flag.</p>
<p>Metadata can be added when creating a new file with
<code>--metadata-set</code>. For example: rclone touch remote:path -M
--metadata-set key=value</p>
<pre><code>rclone touch remote:path [flags]</code></pre>
<h2 id="options-98">Options</h2>
<pre><code>  -h, --help               help for touch
      --localtime          Use localtime for timestamp, not UTC
  -C, --no-create          Do not create the file if it does not exist (implied with --recursive)
  -R, --recursive          Recursively touch all files
  -t, --timestamp string   Use specified time instead of the current time of day</code></pre>
<p>Options shared with other commands are described next. See the <a
href="https://rclone.org/flags/">global flags page</a> for global
options not listed here.</p>
<h3 id="important-options-19">Important Options</h3>
<p>Important flags useful for most commands</p>
<pre class="text"><code>  -n, --dry-run         Do a trial run with no permanent changes
  -i, --interactive     Enable interactive mode
  -v, --verbose count   Print lots more stuff (repeat for more)</code></pre>
<h3 id="filter-options-33">Filter Options</h3>
<p>Flags for filtering directory listings</p>
<pre class="text"><code>      --delete-excluded                     Delete files on dest excluded from sync
      --exclude stringArray                 Exclude files matching pattern
      --exclude-from stringArray            Read file exclude patterns from file (use - to read from stdin)
      --exclude-if-present stringArray      Exclude directories if filename is present
      --files-from stringArray              Read list of source-file names from file (use - to read from stdin)
      --files-from-raw stringArray          Read list of source-file names from file without any processing of lines (use - to read from stdin)
      --files-from0 stringArray             Read list of source-file names from file using NUL as separator (use - to read from stdin)
  -f, --filter stringArray                  Add a file filtering rule
      --filter-from stringArray             Read file filtering patterns from a file (use - to read from stdin)
      --hash-filter string                  Partition filenames by hash k/n or randomly @/n
      --ignore-case                         Ignore case in filters (case insensitive)
      --include stringArray                 Include files matching pattern
      --include-from stringArray            Read file include patterns from file (use - to read from stdin)
      --max-age Duration                    Only transfer files younger than this in s or suffix ms|s|m|h|d|w|M|y (default off)
      --max-depth int                       If set limits the recursion depth to this (default -1)
      --max-size SizeSuffix                 Only transfer files smaller than this in KiB or suffix B|K|M|G|T|P (default off)
      --metadata-exclude stringArray        Exclude metadatas matching pattern
      --metadata-exclude-from stringArray   Read metadata exclude patterns from file (use - to read from stdin)
      --metadata-filter stringArray         Add a metadata filtering rule
      --metadata-filter-from stringArray    Read metadata filtering patterns from a file (use - to read from stdin)
      --metadata-include stringArray        Include metadatas matching pattern
      --metadata-include-from stringArray   Read metadata include patterns from file (use - to read from stdin)
      --min-age Duration                    Only transfer files older than this in s or suffix ms|s|m|h|d|w|M|y (default off)
      --min-size SizeSuffix                 Only transfer files bigger than this in KiB or suffix B|K|M|G|T|P (default off)</code></pre>
<h3 id="listing-options-22">Listing Options</h3>
<p>Flags for listing directories</p>
<pre class="text"><code>      --default-time Time   Time to show if modtime is unknown for files and directories (default 2000-01-01T00:00:00Z)
      --fast-list           Use recursive list if available; uses more memory but fewer transactions</code></pre>
<h2 id="see-also-98">See Also</h2>
<!-- markdownlint-capture -->
<!-- markdownlint-disable ul-style line-length -->
<ul>
<li><a href="https://rclone.org/commands/rclone/">rclone</a> - Show help
for rclone commands, flags and backends.</li>
</ul>
<!-- markdownlint-restore -->
<h1 id="rclone-tree">rclone tree</h1>
<p>List the contents of the remote in a tree like fashion.</p>
<h2 id="synopsis-88">Synopsis</h2>
<p>Lists the contents of a remote in a similar way to the unix tree
command.</p>
<p>For example</p>
<pre class="text"><code>$ rclone tree remote:path
/
├── file1
├── file2
├── file3
└── subdir
    ├── file4
    └── file5

1 directories, 5 files</code></pre>
<p>You can use any of the filtering options with the tree command (e.g.
<code>--include</code> and <code>--exclude</code>. You can also use
<code>--fast-list</code>.</p>
<p>The tree command has many options for controlling the listing which
are compatible with the tree command, for example you can include file
sizes with <code>--size</code>. Note that not all of them have short
options as they conflict with rclone's short options.</p>
<p>For a more interactive navigation of the remote see the <a
href="https://rclone.org/commands/rclone_ncdu/">ncdu</a> command.</p>
<pre><code>rclone tree remote:path [flags]</code></pre>
<h2 id="options-99">Options</h2>
<pre><code>  -a, --all             All files are listed (list . files too)
  -d, --dirs-only       List directories only
      --dirsfirst       List directories before files (-U disables)
      --full-path       Print the full path prefix for each file
  -h, --help            help for tree
      --level int       Descend only level directories deep
  -D, --modtime         Print the date of last modification.
      --noindent        Don&#39;t print indentation lines
      --noreport        Turn off file/directory count at end of tree listing
  -o, --output string   Output to file instead of stdout
  -p, --protections     Print the protections for each file.
  -Q, --quote           Quote filenames with double quotes.
  -s, --size            Print the size in bytes of each file.
      --sort string     Select sort: name,version,size,mtime,ctime
      --sort-ctime      Sort files by last status change time
  -t, --sort-modtime    Sort files by last modification time
  -r, --sort-reverse    Reverse the order of the sort
  -U, --unsorted        Leave files unsorted
      --version         Sort files alphanumerically by version</code></pre>
<p>Options shared with other commands are described next. See the <a
href="https://rclone.org/flags/">global flags page</a> for global
options not listed here.</p>
<h3 id="filter-options-34">Filter Options</h3>
<p>Flags for filtering directory listings</p>
<pre class="text"><code>      --delete-excluded                     Delete files on dest excluded from sync
      --exclude stringArray                 Exclude files matching pattern
      --exclude-from stringArray            Read file exclude patterns from file (use - to read from stdin)
      --exclude-if-present stringArray      Exclude directories if filename is present
      --files-from stringArray              Read list of source-file names from file (use - to read from stdin)
      --files-from-raw stringArray          Read list of source-file names from file without any processing of lines (use - to read from stdin)
      --files-from0 stringArray             Read list of source-file names from file using NUL as separator (use - to read from stdin)
  -f, --filter stringArray                  Add a file filtering rule
      --filter-from stringArray             Read file filtering patterns from a file (use - to read from stdin)
      --hash-filter string                  Partition filenames by hash k/n or randomly @/n
      --ignore-case                         Ignore case in filters (case insensitive)
      --include stringArray                 Include files matching pattern
      --include-from stringArray            Read file include patterns from file (use - to read from stdin)
      --max-age Duration                    Only transfer files younger than this in s or suffix ms|s|m|h|d|w|M|y (default off)
      --max-depth int                       If set limits the recursion depth to this (default -1)
      --max-size SizeSuffix                 Only transfer files smaller than this in KiB or suffix B|K|M|G|T|P (default off)
      --metadata-exclude stringArray        Exclude metadatas matching pattern
      --metadata-exclude-from stringArray   Read metadata exclude patterns from file (use - to read from stdin)
      --metadata-filter stringArray         Add a metadata filtering rule
      --metadata-filter-from stringArray    Read metadata filtering patterns from a file (use - to read from stdin)
      --metadata-include stringArray        Include metadatas matching pattern
      --metadata-include-from stringArray   Read metadata include patterns from file (use - to read from stdin)
      --min-age Duration                    Only transfer files older than this in s or suffix ms|s|m|h|d|w|M|y (default off)
      --min-size SizeSuffix                 Only transfer files bigger than this in KiB or suffix B|K|M|G|T|P (default off)</code></pre>
<h3 id="listing-options-23">Listing Options</h3>
<p>Flags for listing directories</p>
<pre class="text"><code>      --default-time Time   Time to show if modtime is unknown for files and directories (default 2000-01-01T00:00:00Z)
      --fast-list           Use recursive list if available; uses more memory but fewer transactions</code></pre>
<h2 id="see-also-99">See Also</h2>
<!-- markdownlint-capture -->
<!-- markdownlint-disable ul-style line-length -->
<ul>
<li><a href="https://rclone.org/commands/rclone/">rclone</a> - Show help
for rclone commands, flags and backends.</li>
</ul>
<!-- markdownlint-restore -->
<h2 id="copying-single-files">Copying single files</h2>
<p>rclone normally syncs or copies directories. However, if the source
remote points to a file, rclone will just copy that file. The
destination remote must point to a directory - rclone will give the
error
<code>Failed to create file system for "remote:file": is a file not a directory</code>
if it isn't.</p>
<p>For example, suppose you have a remote with a file in called
<code>test.jpg</code>, then you could copy just that file like this</p>
<pre class="console"><code>rclone copy remote:test.jpg /tmp/download</code></pre>
<p>The file <code>test.jpg</code> will be placed inside
<code>/tmp/download</code>.</p>
<p>This is equivalent to specifying</p>
<pre class="console"><code>rclone copy --files-from /tmp/files remote: /tmp/download</code></pre>
<p>Where <code>/tmp/files</code> contains the single line</p>
<pre class="console"><code>test.jpg</code></pre>
<p>It is recommended to use <code>copy</code> when copying individual
files, not <code>sync</code>. They have pretty much the same effect but
<code>copy</code> will use a lot less memory.</p>
<h2 id="syntax-of-remote-paths">Syntax of remote paths</h2>
<p>The syntax of the paths passed to the rclone command are as
follows.</p>
<h3 id="pathtodir">/path/to/dir</h3>
<p>This refers to the local file system.</p>
<p>On Windows <code>\</code> may be used instead of <code>/</code> in
local paths <strong>only</strong>, non local paths must use
<code>/</code>. See <a
href="https://rclone.org/local/#paths-on-windows">local filesystem</a>
documentation for more about Windows-specific paths.</p>
<p>These paths needn't start with a leading <code>/</code> - if they
don't then they will be relative to the current directory.</p>
<h3 id="remotepathtodir">remote:path/to/dir</h3>
<p>This refers to a directory <code>path/to/dir</code> on
<code>remote:</code> as defined in the config file (configured with
<code>rclone config</code>).</p>
<h3 id="remotepathtodir-1">remote:/path/to/dir</h3>
<p>On most backends this is refers to the same directory as
<code>remote:path/to/dir</code> and that format should be preferred. On
a very small number of remotes (FTP, SFTP, Dropbox for business) this
will refer to a different directory. On these, paths without a leading
<code>/</code> will refer to your "home" directory and paths with a
leading <code>/</code> will refer to the root.</p>
<h3 id="backendpathtodir">:backend:path/to/dir</h3>
<p>This is an advanced form for creating remotes on the fly.
<code>backend</code> should be the name or prefix of a backend (the
<code>type</code> in the config file) and all the configuration for the
backend should be provided on the command line (or in environment
variables).</p>
<p>Here are some examples:</p>
<pre class="console"><code>rclone lsd --http-url https://pub.rclone.org :http:</code></pre>
<p>To list all the directories in the root of
<code>https://pub.rclone.org/</code>.</p>
<pre class="console"><code>rclone lsf --http-url https://example.com :http:path/to/dir</code></pre>
<p>To list files and directories in
<code>https://example.com/path/to/dir/</code></p>
<pre class="console"><code>rclone copy --http-url https://example.com :http:path/to/dir /tmp/dir</code></pre>
<p>To copy files and directories in
<code>https://example.com/path/to/dir</code> to
<code>/tmp/dir</code>.</p>
<pre class="console"><code>rclone copy --sftp-host example.com :sftp:path/to/dir /tmp/dir</code></pre>
<p>To copy files and directories from <code>example.com</code> in the
relative directory <code>path/to/dir</code> to <code>/tmp/dir</code>
using sftp.</p>
<h3 id="connection-strings">Connection strings</h3>
<p>The above examples can also be written using a connection string
syntax, so instead of providing the arguments as command line parameters
<code>--http-url https://pub.rclone.org</code> they are provided as part
of the remote specification as a kind of connection string.</p>
<pre class="console"><code>rclone lsd &quot;:http,url=&#39;https://pub.rclone.org&#39;:&quot;
rclone lsf &quot;:http,url=&#39;https://example.com&#39;:path/to/dir&quot;
rclone copy &quot;:http,url=&#39;https://example.com&#39;:path/to/dir&quot; /tmp/dir
rclone copy :sftp,host=example.com:path/to/dir /tmp/dir</code></pre>
<p>These can apply to modify existing remotes as well as create new
remotes with the on the fly syntax. This example is equivalent to adding
the <code>--drive-shared-with-me</code> parameter to the remote
<code>gdrive:</code>.</p>
<pre class="console"><code>rclone lsf &quot;gdrive,shared_with_me:path/to/dir&quot;</code></pre>
<p>The major advantage to using the connection string style syntax is
that it only applies to the remote, not to all the remotes of that type
of the command line. A common confusion is this attempt to copy a file
shared on google drive to the normal drive which <strong>does not
work</strong> because the <code>--drive-shared-with-me</code> flag
applies to both the source and the destination.</p>
<pre class="console"><code>rclone copy --drive-shared-with-me gdrive:shared-file.txt gdrive:</code></pre>
<p>However using the connection string syntax, this does work.</p>
<pre class="console"><code>rclone copy &quot;gdrive,shared_with_me:shared-file.txt&quot; gdrive:</code></pre>
<p>Note that the connection string only affects the options of the
immediate backend. If for example gdriveCrypt is a crypt based on
gdrive, then the following command <strong>will not work</strong> as
intended, because <code>shared_with_me</code> is ignored by the crypt
backend:</p>
<pre class="console"><code>rclone copy &quot;gdriveCrypt,shared_with_me:shared-file.txt&quot; gdriveCrypt:</code></pre>
<p>The connection strings have the following syntax</p>
<pre class="text"><code>remote,parameter=value,parameter2=value2:path/to/dir
:backend,parameter=value,parameter2=value2:path/to/dir</code></pre>
<p>If the <code>parameter</code> has a <code>:</code> or <code>,</code>
then it must be placed in quotes <code>"</code> or <code>'</code>,
so</p>
<pre class="text"><code>remote,parameter=&quot;colon:value&quot;,parameter2=&quot;comma,value&quot;:path/to/dir
:backend,parameter=&#39;colon:value&#39;,parameter2=&#39;comma,value&#39;:path/to/dir</code></pre>
<p>If a quoted value needs to include that quote, then it should be
doubled, so</p>
<pre class="text"><code>remote,parameter=&quot;with&quot;&quot;quote&quot;,parameter2=&#39;with&#39;&#39;quote&#39;:path/to/dir</code></pre>
<p>This will make <code>parameter</code> be <code>with"quote</code> and
<code>parameter2</code> be <code>with'quote</code>.</p>
<p>If you leave off the <code>=parameter</code> then rclone will
substitute <code>=true</code> which works very well with flags. For
example, to use s3 configured in the environment you could use:</p>
<pre class="console"><code>rclone lsd :s3,env_auth:</code></pre>
<p>Which is equivalent to</p>
<pre class="console"><code>rclone lsd :s3,env_auth=true:</code></pre>
<p>Note that on the command line you might need to surround these
connection strings with <code>"</code> or <code>'</code> to stop the
shell interpreting any special characters within them.</p>
<p>If you are a shell master then you'll know which strings are OK and
which aren't, but if you aren't sure then enclose them in <code>"</code>
and use <code>'</code> as the inside quote. This syntax works on all
OSes.</p>
<pre class="console"><code>rclone copy &quot;:http,url=&#39;https://example.com&#39;:path/to/dir&quot; /tmp/dir</code></pre>
<p>On Linux/macOS some characters are still interpreted inside
<code>"</code> strings in the shell (notably <code>\</code> and
<code>$</code> and <code>"</code>) so if your strings contain those you
can swap the roles of <code>"</code> and <code>'</code> thus. (This
syntax does not work on Windows.)</p>
<pre class="console"><code>rclone copy &#39;:http,url=&quot;https://example.com&quot;:path/to/dir&#39; /tmp/dir</code></pre>
<p>You can use <a
href="https://rclone.org/commands/rclone_config_string/">rclone config
string</a> to convert a remote into a connection string.</p>
<h4 id="connection-strings-config-and-logging">Connection strings,
config and logging</h4>
<p>If you supply extra configuration to a backend by command line flag,
environment variable or connection string then rclone will add a suffix
based on the hash of the config to the name of the remote, eg</p>
<pre class="console"><code>rclone -vv lsf --s3-chunk-size 20M s3:</code></pre>
<p>Has the log message</p>
<pre class="text"><code>DEBUG : s3: detected overridden config - adding &quot;{Srj1p}&quot; suffix to name</code></pre>
<p>This is so rclone can tell the modified remote apart from the
unmodified remote when caching the backends.</p>
<p>This should only be noticeable in the logs.</p>
<p>This means that on the fly backends such as</p>
<pre class="console"><code>rclone -vv lsf :s3,env_auth:</code></pre>
<p>Will get their own names</p>
<pre class="text"><code>DEBUG : :s3: detected overridden config - adding &quot;{YTu53}&quot; suffix to name</code></pre>
<h3 id="valid-remote-names">Valid remote names</h3>
<p>Remote names are case sensitive, and must adhere to the following
rules:</p>
<ul>
<li>May contain number, letter, <code>_</code>, <code>-</code>,
<code>.</code>, <code>+</code>, <code>@</code> and space.</li>
<li>May not start with <code>-</code> or space.</li>
<li>May not end with space.</li>
</ul>
<p>Starting with rclone version 1.61, any Unicode numbers and letters
are allowed, while in older versions it was limited to plain ASCII (0-9,
A-Z, a-z). If you use the same rclone configuration from different
shells, which may be configured with different character encoding, you
must be cautious to use characters that are possible to write in all of
them. This is mostly a problem on Windows, where the console
traditionally uses a non-Unicode character set - defined by the
so-called "code page".</p>
<p>If you want to configure a remote using environment variables then
its name becomes part of the environment variable name, which in
practice restricts the characters you can use in it. See the <a
href="#config-file">Config file</a> section under Environment variables
for details.</p>
<p>Do not use single character names on Windows as it creates ambiguity
with Windows drives' names, e.g.: remote called <code>C</code> is
indistinguishable from <code>C</code> drive. Rclone will always assume
that single letter name refers to a drive.</p>
<h2 id="globalconfig">Adding global configuration to a remote</h2>
<p>It is possible to add global configuration to the remote
configuration which will be applied just before the remote is
created.</p>
<p>This can be done in two ways. The first is to use
<code>override.var = value</code> in the config file or the connection
string for a temporary change, and the second is to use
<code>global.var = value</code> in the config file or connection string
for a permanent change.</p>
<p>This is explained fully below.</p>
<h3 id="override.var">override.var</h3>
<p>This is used to override a global variable <strong>just</strong> for
the duration of the remote creation. It won't affect other remotes even
if they are created at the same time.</p>
<p>This is very useful for overriding networking config needed for just
for that remote. For example, say you have a remote which needs
<code>--no-check-certificate</code> as it is running on test
infrastructure without a proper certificate. You could supply the
<code>--no-check-certificate</code> flag to rclone, but this will affect
<strong>all</strong> the remotes. To make it just affect this remote you
use an override. You could put this in the config file:</p>
<div class="sourceCode" id="cb707"><pre
class="sourceCode ini"><code class="sourceCode ini"><span id="cb707-1"><a href="#cb707-1" aria-hidden="true" tabindex="-1"></a><span class="kw">[remote]</span></span>
<span id="cb707-2"><a href="#cb707-2" aria-hidden="true" tabindex="-1"></a><span class="dt">type </span><span class="ot">=</span><span class="st"> XXX</span></span>
<span id="cb707-3"><a href="#cb707-3" aria-hidden="true" tabindex="-1"></a><span class="dt">...</span></span>
<span id="cb707-4"><a href="#cb707-4" aria-hidden="true" tabindex="-1"></a><span class="dt">override.no_check_certificate </span><span class="ot">=</span><span class="st"> </span><span class="kw">true</span></span></code></pre></div>
<p>or use it in the connection string
<code>remote,override.no_check_certificate=true:</code> (or just
<code>remote,override.no_check_certificate:</code>).</p>
<p>Note how the global flag name loses its initial <code>--</code> and
gets <code>-</code> replaced with <code>_</code> and gets an
<code>override.</code> prefix.</p>
<p>Not all global variables make sense to be overridden like this as the
config is only applied during the remote creation. Here is a non
exhaustive list of ones which might be useful:</p>
<ul>
<li><code>allow_https_downgrade</code></li>
<li><code>bind_addr</code></li>
<li><code>ca_cert</code></li>
<li><code>client_cert</code></li>
<li><code>client_key</code></li>
<li><code>connect_timeout</code></li>
<li><code>disable_http2</code></li>
<li><code>disable_http_keep_alives</code></li>
<li><code>dump</code></li>
<li><code>expect_continue_timeout</code></li>
<li><code>headers</code></li>
<li><code>http_proxy</code></li>
<li><code>low_level_retries</code></li>
<li><code>max_connections</code></li>
<li><code>no_check_certificate</code></li>
<li><code>no_gzip</code></li>
<li><code>timeout</code></li>
<li><code>traffic_class</code></li>
<li><code>use_cookies</code></li>
<li><code>use_server_modtime</code></li>
<li><code>user_agent</code></li>
</ul>
<p>An <code>override.var</code> will override all other config methods,
but <strong>just</strong> for the duration of the creation of the
remote.</p>
<h3 id="global.var">global.var</h3>
<p>This is used to set a global variable <strong>for
everything</strong>. The global variable is set just before the remote
is created.</p>
<p>This is useful for parameters (eg sync parameters) which can't be set
as an <code>override</code>. For example, say you have a remote where
you would always like to use the <code>--checksum</code> flag. You could
supply the <code>--checksum</code> flag to rclone on every command line,
but instead you could put this in the config file:</p>
<div class="sourceCode" id="cb708"><pre
class="sourceCode ini"><code class="sourceCode ini"><span id="cb708-1"><a href="#cb708-1" aria-hidden="true" tabindex="-1"></a><span class="kw">[remote]</span></span>
<span id="cb708-2"><a href="#cb708-2" aria-hidden="true" tabindex="-1"></a><span class="dt">type </span><span class="ot">=</span><span class="st"> XXX</span></span>
<span id="cb708-3"><a href="#cb708-3" aria-hidden="true" tabindex="-1"></a><span class="dt">...</span></span>
<span id="cb708-4"><a href="#cb708-4" aria-hidden="true" tabindex="-1"></a><span class="dt">global.checksum </span><span class="ot">=</span><span class="st"> </span><span class="kw">true</span></span></code></pre></div>
<p>or use it in the connection string
<code>remote,global.checksum=true:</code> (or just
<code>remote,global.checksum:</code>). This is equivalent to using the
<code>--checksum</code> flag.</p>
<p>Note how the global flag name loses its initial <code>--</code> and
gets <code>-</code> replaced with <code>_</code> and gets a
<code>global.</code> prefix.</p>
<p>Any global variable can be set like this and it is exactly equivalent
to using the equivalent flag on the command line. This means it will
affect all uses of rclone.</p>
<p>If two remotes set the same global variable then the first one
instantiated will be overridden by the second one. A
<code>global.var</code> will override all other config methods when the
remote is created.</p>
<h2 id="quoting-and-the-shell">Quoting and the shell</h2>
<p>When you are typing commands to your computer you are using something
called the command line shell. This interprets various characters in an
OS specific way.</p>
<p>Here are some gotchas which may help users unfamiliar with the shell
rules</p>
<h3 id="linux-macos">Linux / macOS</h3>
<p>If your names have spaces or shell metacharacters (e.g.
<code>*</code>, <code>?</code>, <code>$</code>, <code>'</code>,
<code>"</code>, etc.) then you must quote them. Use single quotes
<code>'</code> by default.</p>
<pre class="console"><code>rclone copy &#39;Important files?&#39; remote:backup</code></pre>
<p>If you want to send a <code>'</code> you will need to use
<code>"</code>, e.g.</p>
<pre class="console"><code>rclone copy &quot;O&#39;Reilly Reviews&quot; remote:backup</code></pre>
<p>The rules for quoting metacharacters are complicated and if you want
the full details you'll have to consult the manual page for your
shell.</p>
<h3 id="windows-1">Windows</h3>
<p>If your names have spaces in you need to put them in <code>"</code>,
e.g.</p>
<div class="sourceCode" id="cb711"><pre
class="sourceCode bat"><code class="sourceCode dosbat"><span id="cb711-1"><a href="#cb711-1" aria-hidden="true" tabindex="-1"></a>rclone copy <span class="st">&quot;E:\folder name\folder name\folder name&quot;</span> remote:backup</span></code></pre></div>
<p>If you are using the root directory on its own then don't quote it
(see <a href="https://github.com/rclone/rclone/issues/464">#464</a> for
why), e.g.</p>
<div class="sourceCode" id="cb712"><pre
class="sourceCode bat"><code class="sourceCode dosbat"><span id="cb712-1"><a href="#cb712-1" aria-hidden="true" tabindex="-1"></a>rclone copy E:\ remote:backup</span></code></pre></div>
<h2 id="copying-files-or-directories-with-in-the-names">Copying files or
directories with <code>:</code> in the names</h2>
<p>rclone uses <code>:</code> to mark a remote name. This is, however, a
valid filename component in non-Windows OSes. The remote name parser
will only search for a <code>:</code> up to the first <code>/</code> so
if you need to act on a file or directory like this then use the full
path starting with a <code>/</code>, or use <code>./</code> as a current
directory prefix.</p>
<p>So to sync a directory called <code>sync:me</code> to a remote called
<code>remote:</code> use</p>
<pre class="console"><code>rclone sync --interactive ./sync:me remote:path</code></pre>
<p>or</p>
<pre class="console"><code>rclone sync --interactive /full/path/to/sync:me remote:path</code></pre>
<h2 id="server-side-copy">Server-side copy</h2>
<p>Most remotes (but not all - see <a
href="https://rclone.org/overview/#optional-features">the overview</a>)
support server-side copy.</p>
<p>This means if you want to copy one folder to another then rclone
won't download all the files and re-upload them; it will instruct the
server to copy them in place.</p>
<p>Eg</p>
<pre class="console"><code>rclone copy s3:oldbucket s3:newbucket</code></pre>
<p>Will copy the contents of <code>oldbucket</code> to
<code>newbucket</code> without downloading and re-uploading.</p>
<p>Remotes which don't support server-side copy <strong>will</strong>
download and re-upload in this case.</p>
<p>Server-side copies are used with <code>sync</code> and
<code>copy</code> and will be identified in the log when using the
<code>-v</code> flag. The <code>move</code> command may also use them if
remote doesn't support server-side move directly. This is done by
issuing a server-side copy then a delete which is much quicker than a
download and re-upload.</p>
<p>Server-side copies will only be attempted if the remote names are the
same.</p>
<p>This can be used when scripting to make aged backups efficiently,
e.g.</p>
<pre class="console"><code>rclone sync --interactive remote:current-backup remote:previous-backup
rclone sync --interactive /path/to/files remote:current-backup</code></pre>
<h2 id="metadata">Metadata support</h2>
<p>Metadata is data about a file (or directory) which isn't the contents
of the file (or directory). Normally rclone only preserves the
modification time and the content (MIME) type where possible.</p>
<p>Rclone supports preserving all the available metadata on files and
directories when using the <code>--metadata</code> or <code>-M</code>
flag.</p>
<p>Exactly what metadata is supported and what that support means
depends on the backend. Backends that support metadata have a metadata
section in their docs and are listed in the <a
href="https://rclone.org/overview/#features">features table</a> (Eg <a
href="https://rclone.org/local/#metadata">local</a>, <a
href="/s3/#metadata">s3</a>)</p>
<p>Some backends don't support metadata, some only support metadata on
files and some support metadata on both files and directories.</p>
<p>Rclone only supports a one-time sync of metadata. This means that
metadata will be synced from the source object to the destination object
only when the source object has changed and needs to be re-uploaded. If
the metadata subsequently changes on the source object without changing
the object itself then it won't be synced to the destination object.
This is in line with the way rclone syncs <code>Content-Type</code>
without the <code>--metadata</code> flag.</p>
<p>Using <code>--metadata</code> when syncing from local to local will
preserve file attributes such as file mode, owner, extended attributes
(not Windows).</p>
<p>Note that arbitrary metadata may be added to objects using the
<code>--metadata-set key=value</code> flag when the object is first
uploaded. This flag can be repeated as many times as necessary.</p>
<p>The <a href="#metadata-mapper">--metadata-mapper</a> flag can be used
to pass the name of a program in which can transform metadata when it is
being copied from source to destination.</p>
<p>Rclone supports <code>--metadata-set</code> and
<code>--metadata-mapper</code> when doing server-side <code>Move</code>
and server-side <code>Copy</code>, but not when doing server side
<code>DirMove</code> (renaming a directory) as this would involve
recursing into the directory. Note that you can disable
<code>DirMove</code> with <code>--disable DirMove</code> and rclone will
revert back to using <code>Move</code> for each individual object where
<code>--metadata-set</code> and <code>--metadata-mapper</code> are
supported.</p>
<h3 id="types-of-metadata">Types of metadata</h3>
<p>Metadata is divided into two type. System metadata and User
metadata.</p>
<p>Metadata which the backend uses itself is called system metadata. For
example on the local backend the system metadata <code>uid</code> will
store the user ID of the file when used on a unix based platform.</p>
<p>Arbitrary metadata is called user metadata and this can be set
however is desired.</p>
<p>When objects are copied from backend to backend, they will attempt to
interpret system metadata if it is supplied. Metadata may change from
being user metadata to system metadata as objects are copied between
different backends. For example copying an object from s3 sets the
<code>content-type</code> metadata. In a backend which understands this
(like <code>azureblob</code>) this will become the Content-Type of the
object. In a backend which doesn't understand this (like the
<code>local</code> backend) this will become user metadata. However
should the local object be copied back to s3, the Content-Type will be
set correctly.</p>
<h3 id="metadata-framework">Metadata framework</h3>
<p>Rclone implements a metadata framework which can read metadata from
an object and write it to the object when (and only when) it is being
uploaded.</p>
<p>This metadata is stored as a dictionary with string keys and string
values.</p>
<p>There are some limits on the names of the keys (these may be
clarified further in the future).</p>
<ul>
<li>must be lower case</li>
<li>may be <code>a-z</code> <code>0-9</code> containing <code>.</code>
<code>-</code> or <code>_</code></li>
<li>length is backend dependent</li>
</ul>
<p>Each backend can provide system metadata that it understands. Some
backends can also store arbitrary user metadata.</p>
<p>Where possible the key names are standardized, so, for example, it is
possible to copy object metadata from s3 to azureblob for example and
metadata will be translated appropriately.</p>
<p>Some backends have limits on the size of the metadata and rclone will
give errors on upload if they are exceeded.</p>
<h3 id="metadata-preservation">Metadata preservation</h3>
<p>The goal of the implementation is to</p>
<ol type="1">
<li>Preserve metadata if at all possible</li>
<li>Interpret metadata if at all possible</li>
</ol>
<p>The consequences of 1 is that you can copy an S3 object to a local
disk then back to S3 losslessly. Likewise you can copy a local file with
file attributes and xattrs from local disk to s3 and back again
losslessly.</p>
<p>The consequence of 2 is that you can copy an S3 object with metadata
to Azureblob (say) and have the metadata appear on the Azureblob object
also.</p>
<h3 id="standard-system-metadata">Standard system metadata</h3>
<p>Here is a table of standard system metadata which, if appropriate, a
backend may implement.</p>
<table>
<colgroup>
<col style="width: 48%" />
<col style="width: 30%" />
<col style="width: 20%" />
</colgroup>
<thead>
<tr class="header">
<th>key</th>
<th>description</th>
<th>example</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td>mode</td>
<td>File type and mode: octal, unix style</td>
<td>0100664</td>
</tr>
<tr class="even">
<td>uid</td>
<td>User ID of owner: decimal number</td>
<td>500</td>
</tr>
<tr class="odd">
<td>gid</td>
<td>Group ID of owner: decimal number</td>
<td>500</td>
</tr>
<tr class="even">
<td>rdev</td>
<td>Device ID (if special file) =&gt; hexadecimal</td>
<td>0</td>
</tr>
<tr class="odd">
<td>atime</td>
<td>Time of last access: RFC 3339</td>
<td>2006-01-02T15:04:05.999999999Z07:00</td>
</tr>
<tr class="even">
<td>mtime</td>
<td>Time of last modification: RFC 3339</td>
<td>2006-01-02T15:04:05.999999999Z07:00</td>
</tr>
<tr class="odd">
<td>btime</td>
<td>Time of file creation (birth): RFC 3339</td>
<td>2006-01-02T15:04:05.999999999Z07:00</td>
</tr>
<tr class="even">
<td>utime</td>
<td>Time of file upload: RFC 3339</td>
<td>2006-01-02T15:04:05.999999999Z07:00</td>
</tr>
<tr class="odd">
<td>cache-control</td>
<td>Cache-Control header</td>
<td>no-cache</td>
</tr>
<tr class="even">
<td>content-disposition</td>
<td>Content-Disposition header</td>
<td>inline</td>
</tr>
<tr class="odd">
<td>content-encoding</td>
<td>Content-Encoding header</td>
<td>gzip</td>
</tr>
<tr class="even">
<td>content-language</td>
<td>Content-Language header</td>
<td>en-US</td>
</tr>
<tr class="odd">
<td>content-type</td>
<td>Content-Type header</td>
<td>text/plain</td>
</tr>
</tbody>
</table>
<p>The metadata keys <code>mtime</code> and <code>content-type</code>
will take precedence if supplied in the metadata over reading the
<code>Content-Type</code> or modification time of the source object.</p>
<p>Hashes are not included in system metadata as there is a well defined
way of reading those already.</p>
<h2 id="performance">Performance</h2>
<p>Rclone's defaults are fairly conservative. They are chosen to work on
small machines, slow links and with cloud providers which rate limit
heavily. If you have plenty of bandwidth, memory and a fast storage
system then rclone can usually be made to run a great deal faster by
adjusting a few flags.</p>
<p>The right values depend on the size of your files, your network and
the storage systems at each end, so treat the numbers below as starting
points. Change one thing at a time and measure the result.</p>
<h3 id="measuring">Measuring</h3>
<p>Use <code>rclone copy</code> with <a
href="#p-progress">-P/--progress</a> to watch the transfer rate while
you are experimenting. For unattended runs log the stats instead, e.g.
<code>--stats 1m --stats-one-line --stats-log-level NOTICE</code>.</p>
<p>A transfer is always limited by something: the network bandwidth, the
rate at which the storage system will accept requests, disk IO, CPU or
memory. Tuning is working out which limit you are hitting and raising it
until you hit the next one. Watch the network, disk, CPU and memory use
of the machine rclone is running on as well as rclone's stats.</p>
<h3 id="lots-of-files">Lots of files</h3>
<p>The time taken to transfer small files is dominated by the round trip
time of the requests rather than by the bandwidth, so the way to make
them go faster is to do more of them at once.</p>
<p><a href="#transfers-int">--transfers</a> sets the number of files
transferred in parallel. The default is 4. Double this until the
transfer rate stops increasing or the storage system starts returning
errors. Values of 32 to 64 are common and values in the hundreds work
well with the large object storage systems (e.g. s3, azureblob,
googlecloudstorage, b2) when transferring lots of small files.</p>
<p><a href="#checkers-int">--checkers</a> sets the number of directory
listings and file comparisons done in parallel. The default is 8.
Raising this speeds up syncs where most of the files are already present
on the destination and stops the checking being the bottleneck when
<code>--transfers</code> is large. 16 to 64 is a reasonable range.</p>
<p>Not all storage systems like lots of parallel requests. If you see
rate limiting errors (e.g. HTTP 429 or 503 errors) or lots of low level
retries in the log then you have gone too far, so reduce
<code>--transfers</code> and <code>--checkers</code> or use <a
href="#tpslimit-float">--tpslimit</a> to cap the request rate. Local
disks, especially spinning ones, and network file systems may get slower
rather than faster with too much parallelism.</p>
<h3 id="large-files">Large files</h3>
<p>A single stream often won't fill a fast link, so rclone can transfer
a large file as several chunks in parallel. These are called
multi-thread transfers and are used for files bigger than <a
href="#multi-thread-cutoff">--multi-thread-cutoff</a> on backends which
support them.</p>
<p>The number of chunks transferred in parallel is set by <a
href="#multi-thread-streams-int">--multi-thread-streams</a> (default 4)
and this works for all backends so increase this first to make large
files transfer faster.</p>
<p>The size of the chunks is set by the backend, usually with a
<code>--backend-chunk-size</code> flag, e.g.
<code>--s3-chunk-size</code>. Backends without a natural chunk size
(e.g. local, smb) use <a
href="#multi-thread-chunk-size-sizesuffix">--multi-thread-chunk-size</a>.
Larger chunks mean fewer requests which increases throughput on big
files. See the docs for the backend you are using for details.</p>
<p>Chunked uploads are usually buffered in memory, so in the worst case
rclone will use</p>
<pre class="text"><code>--transfers * upload concurrency * chunk size</code></pre>
<p>of memory for buffers. For example <code>--transfers 256</code> with
an upload concurrency of 8 and a chunk size of 16 MiB could use up to 32
GiB. When you raise <code>--transfers</code> to speed up small files you
may therefore need to lower the upload concurrency, or set <a
href="#max-buffer-memory">--max-buffer-memory</a> which limits the total
memory used for buffers and makes transfers wait when the limit is
reached.</p>
<p><a href="#use-mmap">--use-mmap</a> makes rclone return buffer memory
to the OS as soon as it has finished with it which is helpful when using
lots of transfers or large chunks.</p>
<h3 id="a-mixture-of-large-and-small-files">A mixture of large and small
files</h3>
<p>By default rclone transfers files in roughly the order it finds them.
With a mixture of file sizes this means that at times all the transfers
are large files, which fill the bandwidth but make few requests, and at
other times all the transfers are small files, which make lots of
requests but use little of the bandwidth.</p>
<p>Using <a href="#order-by-string">--order-by</a>
<code>size,mixed,50</code> makes half of the transfers take the smallest
files in the backlog and half of them take the largest. This keeps both
large and small files moving at once so the bandwidth and the request
rate are both kept full for the whole of the run.</p>
<p>This works best if rclone has lots of files to choose from so use it
with a big <a href="#max-backlog-int">--max-backlog</a>, e.g.
<code>--max-backlog 2000000</code>. Each item in the backlog uses in the
order of 1 KiB of memory.</p>
<h3 id="doing-less-work">Doing less work</h3>
<p>Fewer requests to the storage system means a faster transfer.</p>
<ul>
<li>If the source and destination are on the same remote then rclone
will use <a href="#server-side-copy">server-side copy</a> where it is
supported so the data doesn't need to be downloaded and uploaded
again.</li>
<li><a href="#fast-list">--fast-list</a> lists bucket-based remotes with
fewer transactions at the cost of using more memory. This may be faster
or slower than the default so it is worth testing.</li>
<li><a href="#no-traverse">--no-traverse</a> stops rclone listing the
destination which helps when copying a small number of files into a
large destination.</li>
<li><a href="#size-only">--size-only</a> or <a
href="#c-checksum">--checksum</a> avoid reading the modification time.
On some object storage systems (e.g. s3, swift) this needs an extra
request for each file. Alternatively use <a
href="#use-server-modtime">--use-server-modtime</a> with
<code>--update</code>.</li>
<li><a href="#no-check-dest">--no-check-dest</a> skips checking the
destination entirely. Only use this if you know that none of the files
are there already.</li>
</ul>
<h2 id="options-100">Options</h2>
<p>Rclone has a number of options to control its behaviour. These are
documented below, and in the <a href="/flags">flags</a> page.</p>
<p>Options that take parameters can have the values passed in two ways,
<code>--option=value</code> or <code>--option value</code>. However
boolean (true/false) options behave slightly differently to the other
options in that <code>--boolean</code> sets the option to
<code>true</code> and the absence of the flag sets it to
<code>false</code>. It is also possible to specify
<code>--boolean=false</code> or <code>--boolean=true</code>. Note that
<code>--boolean false</code> is not valid - this is parsed as
<code>--boolean</code> and the <code>false</code> is parsed as an extra
command line argument for rclone.</p>
<p>String values that are recognized as special identifiers, e.g. the
name of the log level to set with option <code>--log-level</code>, are
case insensitive, e.g. <code>--log-level ERROR</code> and
<code>--log-level error</code> are identical.</p>
<p>Options documented to take a <code>stringArray</code> parameter
accept multiple values. To pass more than one value, repeat the option;
for example: <code>--include value1 --include value2</code>. Other
options may only accept a single value, and should only be specified
once, but where the specified parameter may indicate a list of values
separated by space or comma. Such options are documented to take a
<code>CommaSepList</code> parameter, if comma separated, and
<code>SpaceSepList</code> if space separated, although some may also
have different parameters such as <code>DumpFlags</code> or just
<code>string</code> and the help text explains that this will be
interpreted as a list.</p>
<p>Floating-point values with fractional part must use period
(<code>.</code>) as decimal separator, common in English-speaking
countries, regardless of your configured system locale. Parameter type
<code>float</code> accepts decimal and hexadecimal floating-point
numbers as defined by the Go syntax for <a
href="https://go.dev/ref/spec#Floating-point_literals">floating-point
literals</a>.</p>
<h3 id="time-options">Time and duration options</h3>
<p>Options that take a <code>Time</code> or <code>Duration</code>
parameter must be specified as a formatted string describing an absolute
or relative time. Note that both <code>Time</code> and
<code>Duration</code> parameter types can be expressed as either
absolute or relative time, just with different interpretations, e.g. a
relative time will be treated as an offset from the current time when
passed as a <code>Time</code> value.</p>
<p>An absolute time can be specified as a string in one of the following
formats:</p>
<ul>
<li>RFC3339 - e.g. <code>2006-01-02T15:04:05Z</code> or
<code>2006-01-02T15:04:05+07:00</code></li>
<li>ISO8601 Date and time, local timezone -
<code>2006-01-02T15:04:05</code></li>
<li>ISO8601 Date and time, local timezone -
<code>2006-01-02 15:04:05</code></li>
<li>ISO8601 Date - <code>2006-01-02</code> (YYYY-MM-DD)</li>
</ul>
<p>A relative time is a string with a, possibly signed, sequence of
decimal numbers, each with optional fraction, and each with a unit
suffix. If the string only contains a single number, then the unit
suffix is optional and will default to seconds, i.e. a plain decimal
value will be treated as a number of seconds. The following suffixes are
valid:</p>
<ul>
<li><code>ms</code> - Milliseconds</li>
<li><code>s</code> - Seconds</li>
<li><code>m</code> - Minutes</li>
<li><code>h</code> - Hours</li>
<li><code>d</code> - Days</li>
<li><code>w</code> - Weeks</li>
<li><code>M</code> - Months</li>
<li><code>y</code> - Years</li>
</ul>
<p>Examples: "10", "300ms", "-1.5h", "2h45m" or "1d12h".</p>
<h3 id="size-options">Size options</h3>
<p>Options that take a SizeSuffix parameter can be specified as an
integer value, which will then be assumed to represent a KiB value
(multiples of 1024 bytes) by default. The interpretation can be changed
by appending a suffix: <code>B</code> for Byte, <code>K</code> for KiB,
<code>M</code> for MiB, <code>G</code> for GiB, <code>T</code> for TiB
and <code>P</code> for PiB. These are the binary units, e.g. 1, 2**10,
2**20, 2**30 respectively.</p>
<p>See also <a href="#human-readable">--human-readable</a>.</p>
<h2 id="main-options">Main options</h2>
<h3 id="allow-https-downgrade">--allow-https-downgrade</h3>
<p>By default rclone refuses to follow a redirect from an
<code>https://</code> URL to a plain <code>http://</code> URL, as any
credentials or other headers in the request would then be sent
unencrypted, and the response could be altered by anyone on the network
path. The request fails with an error which mentions this flag.</p>
<p>Set <code>--allow-https-downgrade</code> to follow such redirects,
for example when downloading from a mirror which redirects to plain
HTTP. Some backends still refuse to follow them, as doing so would send
their credentials in cleartext.</p>
<p>This option defaults to <code>false</code>.</p>
<h3 id="backup-dir-string">--backup-dir string</h3>
<p>When using <a
href="https://rclone.org/commands/rclone_sync/">sync</a>, <a
href="https://rclone.org/commands/rclone_copy/">copy</a> or <a
href="https://rclone.org/commands/rclone_move/">move</a>, any files
which would have been overwritten or deleted are moved in their original
hierarchy into this directory.</p>
<p>If <code>--suffix</code> is set, then the moved files will have the
suffix added to them. If there is a file with the same path (after the
suffix has been added) in the directory, then it will be
overwritten.</p>
<p>The remote in use must support server-side move or copy and you must
use the same remote as the destination of the sync. The backup directory
must not overlap the destination directory without it being excluded by
a filter rule.</p>
<p>For example</p>
<pre class="console"><code>rclone sync --interactive /path/to/local remote:current --backup-dir remote:old</code></pre>
<p>will sync <code>/path/to/local</code> to <code>remote:current</code>,
but for any files which would have been updated or deleted will be
stored in <code>remote:old</code>.</p>
<p>If running rclone from a script you might want to use today's date as
the directory name passed to <code>--backup-dir</code> to store the old
files, or you might want to pass <code>--suffix</code> with today's
date. This can be done with <code>--suffix $(date +%F)</code> in bash,
and <code>--suffix $(Get-Date -Format 'yyyy-MM-dd')</code> in
PowerShell.</p>
<p>See <code>--compare-dest</code> and <code>--copy-dest</code>.</p>
<h3 id="bind-string">--bind string</h3>
<p>Local address to bind to for outgoing connections. This can be an
IPv4 address (1.2.3.4), an IPv6 address (1234::789A) or host name. If
the host name doesn't resolve or resolves to more than one IP address it
will give an error.</p>
<p>You can use <code>--bind 0.0.0.0</code> to force rclone to use IPv4
addresses and <code>--bind ::0</code> to force rclone to use IPv6
addresses.</p>
<h3 id="bwlimit-bwtimetable">--bwlimit BwTimetable</h3>
<p>This option controls the bandwidth limit. For example</p>
<pre class="text"><code>--bwlimit 10M</code></pre>
<p>would mean limit the upload and download bandwidth to 10 MiB/s.
<strong>NB</strong> this is <strong>bytes</strong> per second not
<strong>bits</strong> per second. To use a single limit, specify the
desired bandwidth in KiB/s, or use a suffix B|K|M|G|T|P. The default is
<code>0</code> which means to not limit bandwidth.</p>
<p>The upload and download bandwidth can be specified separately, as
<code>--bwlimit UP:DOWN</code>, so</p>
<pre class="text"><code>--bwlimit 10M:100k</code></pre>
<p>would mean limit the upload bandwidth to 10 MiB/s and the download
bandwidth to 100 KiB/s. Either limit can be "off" meaning no limit, so
to just limit the upload bandwidth you would use</p>
<pre class="text"><code>--bwlimit 10M:off</code></pre>
<p>this would limit the upload bandwidth to 10 MiB/s but the download
bandwidth would be unlimited.</p>
<p>When specified as above the bandwidth limits last for the duration of
run of the rclone binary.</p>
<p>It is also possible to specify a "timetable" of limits, which will
cause certain limits to be applied at certain times. To specify a
timetable, format your entries as
<code>WEEKDAY-HH:MM,BANDWIDTH WEEKDAY-HH:MM,BANDWIDTH...</code> where:
<code>WEEKDAY</code> is optional element.</p>
<ul>
<li><code>BANDWIDTH</code> can be a single number, e.g.<code>100k</code>
or a pair of numbers for upload:download, e.g.<code>10M:1M</code>.</li>
<li><code>WEEKDAY</code> can be written as the whole word or only using
the first 3 characters. It is optional.</li>
<li><code>HH:MM</code> is an hour from 00:00 to 23:59.</li>
</ul>
<p>Entries can be separated by spaces or semicolons.</p>
<p><strong>Note:</strong> Semicolons can be used as separators instead
of spaces to avoid parsing issues in environments like Docker.</p>
<p>An example of a typical timetable to avoid link saturation during
daytime working hours could be:</p>
<p>Using spaces as separators:
<code>--bwlimit "08:00,512k 12:00,10M 13:00,512k 18:00,30M 23:00,off"</code></p>
<p>Using semicolons as separators:
<code>--bwlimit "08:00,512k;12:00,10M;13:00,512k;18:00,30M;23:00,off"</code></p>
<p>In these examples, the transfer bandwidth will be set to 512 KiB/s at
8am every day. At noon, it will rise to 10 MiB/s, and drop back to 512
KiB/sec at 1pm. At 6pm, the bandwidth limit will be set to 30 MiB/s, and
at 11pm it will be completely disabled (full speed). Anything between
11pm and 8am will remain unlimited.</p>
<p>An example of timetable with <code>WEEKDAY</code> could be:</p>
<p>Using spaces as separators:
<code>--bwlimit "Mon-00:00,512 Fri-23:59,10M Sat-10:00,1M Sun-20:00,off"</code></p>
<p>Using semicolons as separators:
<code>--bwlimit "Mon-00:00,512;Fri-23:59,10M;Sat-10:00,1M;Sun-20:00,off"</code></p>
<p>It means that, the transfer bandwidth will be set to 512 KiB/s on
Monday. It will rise to 10 MiB/s before the end of Friday. At 10:00 on
Saturday it will be set to 1 MiB/s. From 20:00 on Sunday it will be
unlimited.</p>
<p>Timeslots without <code>WEEKDAY</code> are extended to the whole
week. So this example:</p>
<pre class="text"><code>--bwlimit &quot;Mon-00:00,512 12:00,1M Sun-20:00,off&quot;</code></pre>
<p>Is equivalent to this:</p>
<pre class="text"><code>--bwlimit &quot;Mon-00:00,512 Mon-12:00,1M Tue-12:00,1M Wed-12:00,1M Thu-12:00,1M Fri-12:00,1M Sat-12:00,1M Sun-12:00,1M Sun-20:00,off&quot;</code></pre>
<p>Bandwidth limit apply to the data transfer for all backends. For most
backends the directory listing bandwidth is also included (exceptions
being the non HTTP backends, <code>ftp</code>, <code>sftp</code> and
<code>storj</code>).</p>
<p>Note that the units are <strong>Byte/s</strong>, not
<strong>bit/s</strong>. Typically connections are measured in bit/s - to
convert divide by 8. For example, let's say you have a 10 Mbit/s
connection and you wish rclone to use half of it - 5 Mbit/s. This is 5/8
= 0.625 MiB/s so you would use a <code>--bwlimit 0.625M</code> parameter
for rclone.</p>
<p>On Unix systems (Linux, macOS, …) the bandwidth limiter can be
toggled by sending a <code>SIGUSR2</code> signal to rclone. This allows
to remove the limitations of a long running rclone transfer and to
restore it back to the value specified with <code>--bwlimit</code>
quickly when needed. Assuming there is only one rclone instance running,
you can toggle the limiter like this:</p>
<pre class="console"><code>kill -SIGUSR2 $(pidof rclone)</code></pre>
<p>If you configure rclone with a <a href="/rc">remote control</a> then
you can use change the bwlimit dynamically:</p>
<pre class="console"><code>rclone rc core/bwlimit rate=1M</code></pre>
<h3 id="bwlimit-file-bwtimetable">--bwlimit-file BwTimetable</h3>
<p>This option controls per file bandwidth limit. For the options see
the <code>--bwlimit</code> flag.</p>
<p>For example use this to allow no transfers to be faster than 1
MiB/s</p>
<pre class="text"><code>--bwlimit-file 1M</code></pre>
<p>This can be used in conjunction with <code>--bwlimit</code>.</p>
<p>Note that if a schedule is provided the file will use the schedule in
effect at the start of the transfer.</p>
<h3 id="buffer-size-sizesuffix">--buffer-size SizeSuffix</h3>
<p>Use this sized buffer to speed up file transfers. Each
<code>--transfer</code> will use this much memory for buffering.</p>
<p>When using <code>mount</code> or <code>cmount</code> each open file
descriptor will use this much memory for buffering. See the <a
href="https://rclone.org/commands/rclone_mount/#vfs-file-buffering">mount</a>
documentation for more details.</p>
<p>Set to <code>0</code> to disable the buffering for the minimum memory
usage.</p>
<p>Note that the memory allocation of the buffers is influenced by the
<a href="#use-mmap">--use-mmap</a> flag.</p>
<h3 id="cache-dir-string">--cache-dir string</h3>
<p>Specify the directory rclone will use for caching, to override the
default.</p>
<p>Default value is depending on operating system:</p>
<ul>
<li>Windows <code>%LocalAppData%\rclone</code>, if
<code>LocalAppData</code> is defined.</li>
<li>macOS <code>$HOME/Library/Caches/rclone</code> if <code>HOME</code>
is defined.</li>
<li>Unix <code>$XDG_CACHE_HOME/rclone</code> if
<code>XDG_CACHE_HOME</code> is defined, else
<code>$HOME/.cache/rclone</code> if <code>HOME</code> is defined.</li>
<li>Fallback (on all OS) to <code>$TMPDIR/rclone</code>, where
<code>TMPDIR</code> is the value from <a
href="#temp-dir-string">--temp-dir</a>.</li>
</ul>
<p>You can use the <a
href="https://rclone.org/commands/rclone_config_paths/">config paths</a>
command to see the current value.</p>
<p>Cache directory is heavily used by the <a
href="https://rclone.org/commands/rclone_mount/#vfs-file-caching">VFS
File Caching</a> mount feature, but also by <a
href="https://rclone.org/commands/rclone_serve/">serve</a>, <a
href="/gui">GUI</a> and other parts of rclone.</p>
<h3 id="check-first">--check-first</h3>
<p>If this flag is set then in a <a
href="https://rclone.org/commands/rclone_sync/">sync</a>, <a
href="https://rclone.org/commands/rclone_copy/">copy</a> or <a
href="https://rclone.org/commands/rclone_move/">move</a>, rclone will do
all the checks to see whether files need to be transferred before doing
any of the transfers. Normally rclone would start running transfers as
soon as possible.</p>
<p>This flag can be useful on IO limited systems where transfers
interfere with checking.</p>
<p>It can also be useful to ensure perfect ordering when using
<code>--order-by</code>.</p>
<p>If both <code>--check-first</code> and <code>--order-by</code> are
set when doing <code>rclone move</code> then rclone will use the
transfer thread to delete source files which don't need transferring.
This will enable perfect ordering of the transfers and deletes but will
cause the transfer stats to have more items in than expected.</p>
<p>Using this flag can use more memory as it effectively sets
<code>--max-backlog</code> to infinite. This means that all the info on
the objects to transfer is held in memory before the transfers
start.</p>
<h3 id="checkers-int">--checkers int</h3>
<p>Originally controlling just the number of file checkers to run in
parallel, e.g. by <code>rclone copy</code>. Now a fairly universal
parallelism control used by <code>rclone</code> in several places.</p>
<p>Note: checkers do the equality checking of files during a sync. For
some storage systems (e.g. S3, Swift, Dropbox) this can take a
significant amount of time so they are run in parallel.</p>
<p>The default is to run 8 checkers in parallel. However, in case of
slow-reacting backends you may need to lower (rather than increase) this
default by setting <code>--checkers</code> to 4 or less threads. This is
especially advised if you are experiencing backend server crashes during
file checking phase (e.g. on subsequent or top-up backups where little
or no file copying is done and checking takes up most of the time).
Increase this setting only with utmost care, while monitoring your
server health and file checking throughput.</p>
<h3 id="c---checksum">-c, --checksum</h3>
<p>Normally rclone will look at modification time and size of files to
see if they are equal. If you set this flag then rclone will check the
file hash and size to determine if files are equal.</p>
<p>This is useful when the remote doesn't support setting modified time
and a more accurate sync is desired than just checking the file
size.</p>
<p>This is very useful when transferring between remotes which store the
same hash type on the object, e.g. Drive and Swift. For details of which
remotes support which hash type see the table in the <a
href="https://rclone.org/overview/">overview section</a>.</p>
<p>Eg <code>rclone --checksum sync s3:/bucket swift:/bucket</code> would
run much quicker than without the <code>--checksum</code> flag.</p>
<p>When using this flag, rclone won't update mtimes of remote files if
they are incorrect as it would normally.</p>
<h3 id="color-autoneveralways">--color AUTO|NEVER|ALWAYS</h3>
<p>Specify when colors (and other ANSI codes) should be added to the
output.</p>
<p><code>AUTO</code> only allows ANSI codes when the output is a
terminal. This is the default.</p>
<p><code>NEVER</code> never allow ANSI codes.</p>
<p><code>ALWAYS</code> always add ANSI codes, regardless of the output
format (terminal or file).</p>
<h3 id="compare-dest-stringarray">--compare-dest stringArray</h3>
<p>When using <a
href="https://rclone.org/commands/rclone_sync/">sync</a>, <a
href="https://rclone.org/commands/rclone_copy/">copy</a> or <a
href="https://rclone.org/commands/rclone_move/">move</a>, the specified
paths are checked in addition to the destination for files. If a file
identical to the source is found, that file is <strong>not</strong>
copied from source. This is useful to copy just files that have changed
since the last backup.</p>
<p>You must use the same remote as the destination of the sync. The
compare directory must not overlap the destination directory.</p>
<p>See <code>--copy-dest</code> and <code>--backup-dir</code>.</p>
<h3 id="config-string">--config string</h3>
<p>Specify the location of the rclone configuration file, to override
the default. E.g. <code>rclone config --config="rclone.conf"</code>.</p>
<p>The exact default is a bit complex to describe, due to changes
introduced through different versions of rclone while preserving
backwards compatibility, but in most cases it is as simple as:</p>
<ul>
<li><code>%APPDATA%/rclone/rclone.conf</code> on Windows</li>
<li><code>~/.config/rclone/rclone.conf</code> on other</li>
</ul>
<p>The complete logic is as follows: Rclone will look for an existing
configuration file in any of the following locations, in priority
order:</p>
<ol type="1">
<li><code>rclone.conf</code> (in program directory, where rclone
executable is)</li>
<li><code>%APPDATA%/rclone/rclone.conf</code> (only on Windows)</li>
<li><code>$XDG_CONFIG_HOME/rclone/rclone.conf</code> (on all systems,
including Windows)</li>
<li><code>~/.config/rclone/rclone.conf</code> (see below for explanation
of ~ symbol)</li>
<li><code>~/.rclone.conf</code></li>
</ol>
<p>If no existing configuration file is found, then a new one will be
created in the following location:</p>
<ul>
<li>On Windows: Location 2 listed above, except in the unlikely event
that <code>APPDATA</code> is not defined, then location 4 is used
instead.</li>
<li>On Unix: Location 3 if <code>XDG_CONFIG_HOME</code> is defined, else
location 4.</li>
<li>Fallback to location 5 (on all OS), when the rclone directory cannot
be created, but if also a home directory was not found then path
<code>.rclone.conf</code> relative to current working directory will be
used as a final resort.</li>
</ul>
<p>The <code>~</code> symbol in paths above represent the home directory
of the current user on any OS, and the value is defined as
following:</p>
<ul>
<li>On Windows: <code>%HOME%</code> if defined, else
<code>%USERPROFILE%</code>, or else
<

File truncated at 1 MB.