github.com/artpar/rclone@v1.67.3/docs/content/commands/rclone_serve_http.md (about) 1 --- 2 title: "rclone serve http" 3 description: "Serve the remote over HTTP." 4 slug: rclone_serve_http 5 url: /commands/rclone_serve_http/ 6 groups: Filter 7 versionIntroduced: v1.39 8 # autogenerated - DO NOT EDIT, instead edit the source code in cmd/serve/http/ and as part of making a release run "make commanddocs" 9 --- 10 # rclone serve http 11 12 Serve the remote over HTTP. 13 14 ## Synopsis 15 16 Run a basic web server to serve a remote over HTTP. 17 This can be viewed in a web browser or you can make a remote of type 18 http read from it. 19 20 You can use the filter flags (e.g. `--include`, `--exclude`) to control what 21 is served. 22 23 The server will log errors. Use `-v` to see access logs. 24 25 `--bwlimit` will be respected for file transfers. Use `--stats` to 26 control the stats printing. 27 28 ## Server options 29 30 Use `--addr` to specify which IP address and port the server should 31 listen on, eg `--addr 1.2.3.4:8000` or `--addr :8080` to listen to all 32 IPs. By default it only listens on localhost. You can use port 33 :0 to let the OS choose an available port. 34 35 If you set `--addr` to listen on a public or LAN accessible IP address 36 then using Authentication is advised - see the next section for info. 37 38 You can use a unix socket by setting the url to `unix:///path/to/socket` 39 or just by using an absolute path name. Note that unix sockets bypass the 40 authentication - this is expected to be done with file system permissions. 41 42 `--addr` may be repeated to listen on multiple IPs/ports/sockets. 43 44 `--server-read-timeout` and `--server-write-timeout` can be used to 45 control the timeouts on the server. Note that this is the total time 46 for a transfer. 47 48 `--max-header-bytes` controls the maximum number of bytes the server will 49 accept in the HTTP header. 50 51 `--baseurl` controls the URL prefix that rclone serves from. By default 52 rclone will serve from the root. If you used `--baseurl "/rclone"` then 53 rclone would serve from a URL starting with "/rclone/". This is 54 useful if you wish to proxy rclone serve. Rclone automatically 55 inserts leading and trailing "/" on `--baseurl`, so `--baseurl "rclone"`, 56 `--baseurl "/rclone"` and `--baseurl "/rclone/"` are all treated 57 identically. 58 59 ### TLS (SSL) 60 61 By default this will serve over http. If you want you can serve over 62 https. You will need to supply the `--cert` and `--key` flags. 63 If you wish to do client side certificate validation then you will need to 64 supply `--client-ca` also. 65 66 `--cert` should be a either a PEM encoded certificate or a concatenation 67 of that with the CA certificate. `--key` should be the PEM encoded 68 private key and `--client-ca` should be the PEM encoded client 69 certificate authority certificate. 70 71 --min-tls-version is minimum TLS version that is acceptable. Valid 72 values are "tls1.0", "tls1.1", "tls1.2" and "tls1.3" (default 73 "tls1.0"). 74 75 ### Template 76 77 `--template` allows a user to specify a custom markup template for HTTP 78 and WebDAV serve functions. The server exports the following markup 79 to be used within the template to server pages: 80 81 | Parameter | Description | 82 | :---------- | :---------- | 83 | .Name | The full path of a file/directory. | 84 | .Title | Directory listing of .Name | 85 | .Sort | The current sort used. This is changeable via ?sort= parameter | 86 | | Sort Options: namedirfirst,name,size,time (default namedirfirst) | 87 | .Order | The current ordering used. This is changeable via ?order= parameter | 88 | | Order Options: asc,desc (default asc) | 89 | .Query | Currently unused. | 90 | .Breadcrumb | Allows for creating a relative navigation | 91 |-- .Link | The relative to the root link of the Text. | 92 |-- .Text | The Name of the directory. | 93 | .Entries | Information about a specific file/directory. | 94 |-- .URL | The 'url' of an entry. | 95 |-- .Leaf | Currently same as 'URL' but intended to be 'just' the name. | 96 |-- .IsDir | Boolean for if an entry is a directory or not. | 97 |-- .Size | Size in Bytes of the entry. | 98 |-- .ModTime | The UTC timestamp of an entry. | 99 100 The server also makes the following functions available so that they can be used within the 101 template. These functions help extend the options for dynamic rendering of HTML. They can 102 be used to render HTML based on specific conditions. 103 104 | Function | Description | 105 | :---------- | :---------- | 106 | afterEpoch | Returns the time since the epoch for the given time. | 107 | contains | Checks whether a given substring is present or not in a given string. | 108 | hasPrefix | Checks whether the given string begins with the specified prefix. | 109 | hasSuffix | Checks whether the given string end with the specified suffix. | 110 111 ### Authentication 112 113 By default this will serve files without needing a login. 114 115 You can either use an htpasswd file which can take lots of users, or 116 set a single username and password with the `--user` and `--pass` flags. 117 118 If no static users are configured by either of the above methods, and client 119 certificates are required by the `--client-ca` flag passed to the server, the 120 client certificate common name will be considered as the username. 121 122 Use `--htpasswd /path/to/htpasswd` to provide an htpasswd file. This is 123 in standard apache format and supports MD5, SHA1 and BCrypt for basic 124 authentication. Bcrypt is recommended. 125 126 To create an htpasswd file: 127 128 touch htpasswd 129 htpasswd -B htpasswd user 130 htpasswd -B htpasswd anotherUser 131 132 The password file can be updated while rclone is running. 133 134 Use `--realm` to set the authentication realm. 135 136 Use `--salt` to change the password hashing salt from the default. 137 138 ## VFS - Virtual File System 139 140 This command uses the VFS layer. This adapts the cloud storage objects 141 that rclone uses into something which looks much more like a disk 142 filing system. 143 144 Cloud storage objects have lots of properties which aren't like disk 145 files - you can't extend them or write to the middle of them, so the 146 VFS layer has to deal with that. Because there is no one right way of 147 doing this there are various options explained below. 148 149 The VFS layer also implements a directory cache - this caches info 150 about files and directories (but not the data) in memory. 151 152 ## VFS Directory Cache 153 154 Using the `--dir-cache-time` flag, you can control how long a 155 directory should be considered up to date and not refreshed from the 156 backend. Changes made through the VFS will appear immediately or 157 invalidate the cache. 158 159 --dir-cache-time duration Time to cache directory entries for (default 5m0s) 160 --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) 161 162 However, changes made directly on the cloud storage by the web 163 interface or a different copy of rclone will only be picked up once 164 the directory cache expires if the backend configured does not support 165 polling for changes. If the backend supports polling, changes will be 166 picked up within the polling interval. 167 168 You can send a `SIGHUP` signal to rclone for it to flush all 169 directory caches, regardless of how old they are. Assuming only one 170 rclone instance is running, you can reset the cache like this: 171 172 kill -SIGHUP $(pidof rclone) 173 174 If you configure rclone with a [remote control](/rc) then you can use 175 rclone rc to flush the whole directory cache: 176 177 rclone rc vfs/forget 178 179 Or individual files or directories: 180 181 rclone rc vfs/forget file=path/to/file dir=path/to/dir 182 183 ## VFS File Buffering 184 185 The `--buffer-size` flag determines the amount of memory, 186 that will be used to buffer data in advance. 187 188 Each open file will try to keep the specified amount of data in memory 189 at all times. The buffered data is bound to one open file and won't be 190 shared. 191 192 This flag is a upper limit for the used memory per open file. The 193 buffer will only use memory for data that is downloaded but not not 194 yet read. If the buffer is empty, only a small amount of memory will 195 be used. 196 197 The maximum memory used by rclone for buffering can be up to 198 `--buffer-size * open files`. 199 200 ## VFS File Caching 201 202 These flags control the VFS file caching options. File caching is 203 necessary to make the VFS layer appear compatible with a normal file 204 system. It can be disabled at the cost of some compatibility. 205 206 For example you'll need to enable VFS caching if you want to read and 207 write simultaneously to a file. See below for more details. 208 209 Note that the VFS cache is separate from the cache backend and you may 210 find that you need one or the other or both. 211 212 --cache-dir string Directory rclone will use for caching. 213 --vfs-cache-mode CacheMode Cache mode off|minimal|writes|full (default off) 214 --vfs-cache-max-age duration Max time since last access of objects in the cache (default 1h0m0s) 215 --vfs-cache-max-size SizeSuffix Max total size of objects in the cache (default off) 216 --vfs-cache-min-free-space SizeSuffix Target minimum free space on the disk containing the cache (default off) 217 --vfs-cache-poll-interval duration Interval to poll the cache for stale objects (default 1m0s) 218 --vfs-write-back duration Time to writeback files after last use when using cache (default 5s) 219 220 If run with `-vv` rclone will print the location of the file cache. The 221 files are stored in the user cache file area which is OS dependent but 222 can be controlled with `--cache-dir` or setting the appropriate 223 environment variable. 224 225 The cache has 4 different modes selected by `--vfs-cache-mode`. 226 The higher the cache mode the more compatible rclone becomes at the 227 cost of using disk space. 228 229 Note that files are written back to the remote only when they are 230 closed and if they haven't been accessed for `--vfs-write-back` 231 seconds. If rclone is quit or dies with files that haven't been 232 uploaded, these will be uploaded next time rclone is run with the same 233 flags. 234 235 If using `--vfs-cache-max-size` or `--vfs-cache-min-free-size` note 236 that the cache may exceed these quotas for two reasons. Firstly 237 because it is only checked every `--vfs-cache-poll-interval`. Secondly 238 because open files cannot be evicted from the cache. When 239 `--vfs-cache-max-size` or `--vfs-cache-min-free-size` is exceeded, 240 rclone will attempt to evict the least accessed files from the cache 241 first. rclone will start with files that haven't been accessed for the 242 longest. This cache flushing strategy is efficient and more relevant 243 files are likely to remain cached. 244 245 The `--vfs-cache-max-age` will evict files from the cache 246 after the set time since last access has passed. The default value of 247 1 hour will start evicting files from cache that haven't been accessed 248 for 1 hour. When a cached file is accessed the 1 hour timer is reset to 0 249 and will wait for 1 more hour before evicting. Specify the time with 250 standard notation, s, m, h, d, w . 251 252 You **should not** run two copies of rclone using the same VFS cache 253 with the same or overlapping remotes if using `--vfs-cache-mode > off`. 254 This can potentially cause data corruption if you do. You can work 255 around this by giving each rclone its own cache hierarchy with 256 `--cache-dir`. You don't need to worry about this if the remotes in 257 use don't overlap. 258 259 ### --vfs-cache-mode off 260 261 In this mode (the default) the cache will read directly from the remote and write 262 directly to the remote without caching anything on disk. 263 264 This will mean some operations are not possible 265 266 * Files can't be opened for both read AND write 267 * Files opened for write can't be seeked 268 * Existing files opened for write must have O_TRUNC set 269 * Files open for read with O_TRUNC will be opened write only 270 * Files open for write only will behave as if O_TRUNC was supplied 271 * Open modes O_APPEND, O_TRUNC are ignored 272 * If an upload fails it can't be retried 273 274 ### --vfs-cache-mode minimal 275 276 This is very similar to "off" except that files opened for read AND 277 write will be buffered to disk. This means that files opened for 278 write will be a lot more compatible, but uses the minimal disk space. 279 280 These operations are not possible 281 282 * Files opened for write only can't be seeked 283 * Existing files opened for write must have O_TRUNC set 284 * Files opened for write only will ignore O_APPEND, O_TRUNC 285 * If an upload fails it can't be retried 286 287 ### --vfs-cache-mode writes 288 289 In this mode files opened for read only are still read directly from 290 the remote, write only and read/write files are buffered to disk 291 first. 292 293 This mode should support all normal file system operations. 294 295 If an upload fails it will be retried at exponentially increasing 296 intervals up to 1 minute. 297 298 ### --vfs-cache-mode full 299 300 In this mode all reads and writes are buffered to and from disk. When 301 data is read from the remote this is buffered to disk as well. 302 303 In this mode the files in the cache will be sparse files and rclone 304 will keep track of which bits of the files it has downloaded. 305 306 So if an application only reads the starts of each file, then rclone 307 will only buffer the start of the file. These files will appear to be 308 their full size in the cache, but they will be sparse files with only 309 the data that has been downloaded present in them. 310 311 This mode should support all normal file system operations and is 312 otherwise identical to `--vfs-cache-mode` writes. 313 314 When reading a file rclone will read `--buffer-size` plus 315 `--vfs-read-ahead` bytes ahead. The `--buffer-size` is buffered in memory 316 whereas the `--vfs-read-ahead` is buffered on disk. 317 318 When using this mode it is recommended that `--buffer-size` is not set 319 too large and `--vfs-read-ahead` is set large if required. 320 321 **IMPORTANT** not all file systems support sparse files. In particular 322 FAT/exFAT do not. Rclone will perform very badly if the cache 323 directory is on a filesystem which doesn't support sparse files and it 324 will log an ERROR message if one is detected. 325 326 ### Fingerprinting 327 328 Various parts of the VFS use fingerprinting to see if a local file 329 copy has changed relative to a remote file. Fingerprints are made 330 from: 331 332 - size 333 - modification time 334 - hash 335 336 where available on an object. 337 338 On some backends some of these attributes are slow to read (they take 339 an extra API call per object, or extra work per object). 340 341 For example `hash` is slow with the `local` and `sftp` backends as 342 they have to read the entire file and hash it, and `modtime` is slow 343 with the `s3`, `swift`, `ftp` and `qinqstor` backends because they 344 need to do an extra API call to fetch it. 345 346 If you use the `--vfs-fast-fingerprint` flag then rclone will not 347 include the slow operations in the fingerprint. This makes the 348 fingerprinting less accurate but much faster and will improve the 349 opening time of cached files. 350 351 If you are running a vfs cache over `local`, `s3` or `swift` backends 352 then using this flag is recommended. 353 354 Note that if you change the value of this flag, the fingerprints of 355 the files in the cache may be invalidated and the files will need to 356 be downloaded again. 357 358 ## VFS Chunked Reading 359 360 When rclone reads files from a remote it reads them in chunks. This 361 means that rather than requesting the whole file rclone reads the 362 chunk specified. This can reduce the used download quota for some 363 remotes by requesting only chunks from the remote that are actually 364 read, at the cost of an increased number of requests. 365 366 These flags control the chunking: 367 368 --vfs-read-chunk-size SizeSuffix Read the source objects in chunks (default 128M) 369 --vfs-read-chunk-size-limit SizeSuffix Max chunk doubling size (default off) 370 371 Rclone will start reading a chunk of size `--vfs-read-chunk-size`, 372 and then double the size for each read. When `--vfs-read-chunk-size-limit` is 373 specified, and greater than `--vfs-read-chunk-size`, the chunk size for each 374 open file will get doubled only until the specified value is reached. If the 375 value is "off", which is the default, the limit is disabled and the chunk size 376 will grow indefinitely. 377 378 With `--vfs-read-chunk-size 100M` and `--vfs-read-chunk-size-limit 0` 379 the following parts will be downloaded: 0-100M, 100M-200M, 200M-300M, 300M-400M and so on. 380 When `--vfs-read-chunk-size-limit 500M` is specified, the result would be 381 0-100M, 100M-300M, 300M-700M, 700M-1200M, 1200M-1700M and so on. 382 383 Setting `--vfs-read-chunk-size` to `0` or "off" disables chunked reading. 384 385 ## VFS Performance 386 387 These flags may be used to enable/disable features of the VFS for 388 performance or other reasons. See also the [chunked reading](#vfs-chunked-reading) 389 feature. 390 391 In particular S3 and Swift benefit hugely from the `--no-modtime` flag 392 (or use `--use-server-modtime` for a slightly different effect) as each 393 read of the modification time takes a transaction. 394 395 --no-checksum Don't compare checksums on up/download. 396 --no-modtime Don't read/write the modification time (can speed things up). 397 --no-seek Don't allow seeking in files. 398 --read-only Only allow read-only access. 399 400 Sometimes rclone is delivered reads or writes out of order. Rather 401 than seeking rclone will wait a short time for the in sequence read or 402 write to come in. These flags only come into effect when not using an 403 on disk cache file. 404 405 --vfs-read-wait duration Time to wait for in-sequence read before seeking (default 20ms) 406 --vfs-write-wait duration Time to wait for in-sequence write before giving error (default 1s) 407 408 When using VFS write caching (`--vfs-cache-mode` with value writes or full), 409 the global flag `--transfers` can be set to adjust the number of parallel uploads of 410 modified files from the cache (the related global flag `--checkers` has no effect on the VFS). 411 412 --transfers int Number of file transfers to run in parallel (default 4) 413 414 ## VFS Case Sensitivity 415 416 Linux file systems are case-sensitive: two files can differ only 417 by case, and the exact case must be used when opening a file. 418 419 File systems in modern Windows are case-insensitive but case-preserving: 420 although existing files can be opened using any case, the exact case used 421 to create the file is preserved and available for programs to query. 422 It is not allowed for two files in the same directory to differ only by case. 423 424 Usually file systems on macOS are case-insensitive. It is possible to make macOS 425 file systems case-sensitive but that is not the default. 426 427 The `--vfs-case-insensitive` VFS flag controls how rclone handles these 428 two cases. If its value is "false", rclone passes file names to the remote 429 as-is. If the flag is "true" (or appears without a value on the 430 command line), rclone may perform a "fixup" as explained below. 431 432 The user may specify a file name to open/delete/rename/etc with a case 433 different than what is stored on the remote. If an argument refers 434 to an existing file with exactly the same name, then the case of the existing 435 file on the disk will be used. However, if a file name with exactly the same 436 name is not found but a name differing only by case exists, rclone will 437 transparently fixup the name. This fixup happens only when an existing file 438 is requested. Case sensitivity of file names created anew by rclone is 439 controlled by the underlying remote. 440 441 Note that case sensitivity of the operating system running rclone (the target) 442 may differ from case sensitivity of a file system presented by rclone (the source). 443 The flag controls whether "fixup" is performed to satisfy the target. 444 445 If the flag is not provided on the command line, then its default value depends 446 on the operating system where rclone runs: "true" on Windows and macOS, "false" 447 otherwise. If the flag is provided without a value, then it is "true". 448 449 The `--no-unicode-normalization` flag controls whether a similar "fixup" is 450 performed for filenames that differ but are [canonically 451 equivalent](https://en.wikipedia.org/wiki/Unicode_equivalence) with respect to 452 unicode. Unicode normalization can be particularly helpful for users of macOS, 453 which prefers form NFD instead of the NFC used by most other platforms. It is 454 therefore highly recommended to keep the default of `false` on macOS, to avoid 455 encoding compatibility issues. 456 457 In the (probably unlikely) event that a directory has multiple duplicate 458 filenames after applying case and unicode normalization, the `--vfs-block-norm-dupes` 459 flag allows hiding these duplicates. This comes with a performance tradeoff, as 460 rclone will have to scan the entire directory for duplicates when listing a 461 directory. For this reason, it is recommended to leave this disabled if not 462 needed. However, macOS users may wish to consider using it, as otherwise, if a 463 remote directory contains both NFC and NFD versions of the same filename, an odd 464 situation will occur: both versions of the file will be visible in the mount, 465 and both will appear to be editable, however, editing either version will 466 actually result in only the NFD version getting edited under the hood. `--vfs-block- 467 norm-dupes` prevents this confusion by detecting this scenario, hiding the 468 duplicates, and logging an error, similar to how this is handled in `rclone 469 sync`. 470 471 ## VFS Disk Options 472 473 This flag allows you to manually set the statistics about the filing system. 474 It can be useful when those statistics cannot be read correctly automatically. 475 476 --vfs-disk-space-total-size Manually set the total disk space size (example: 256G, default: -1) 477 478 ## Alternate report of used bytes 479 480 Some backends, most notably S3, do not report the amount of bytes used. 481 If you need this information to be available when running `df` on the 482 filesystem, then pass the flag `--vfs-used-is-size` to rclone. 483 With this flag set, instead of relying on the backend to report this 484 information, rclone will scan the whole remote similar to `rclone size` 485 and compute the total used space itself. 486 487 _WARNING._ Contrary to `rclone size`, this flag ignores filters so that the 488 result is accurate. However, this is very inefficient and may cost lots of API 489 calls resulting in extra charges. Use it as a last resort and only with caching. 490 491 ## Auth Proxy 492 493 If you supply the parameter `--auth-proxy /path/to/program` then 494 rclone will use that program to generate backends on the fly which 495 then are used to authenticate incoming requests. This uses a simple 496 JSON based protocol with input on STDIN and output on STDOUT. 497 498 **PLEASE NOTE:** `--auth-proxy` and `--authorized-keys` cannot be used 499 together, if `--auth-proxy` is set the authorized keys option will be 500 ignored. 501 502 There is an example program 503 [bin/test_proxy.py](https://github.com/artpar/artpar/blob/master/bin/test_proxy.py) 504 in the rclone source code. 505 506 The program's job is to take a `user` and `pass` on the input and turn 507 those into the config for a backend on STDOUT in JSON format. This 508 config will have any default parameters for the backend added, but it 509 won't use configuration from environment variables or command line 510 options - it is the job of the proxy program to make a complete 511 config. 512 513 This config generated must have this extra parameter 514 - `_root` - root to use for the backend 515 516 And it may have this parameter 517 - `_obscure` - comma separated strings for parameters to obscure 518 519 If password authentication was used by the client, input to the proxy 520 process (on STDIN) would look similar to this: 521 522 ``` 523 { 524 "user": "me", 525 "pass": "mypassword" 526 } 527 ``` 528 529 If public-key authentication was used by the client, input to the 530 proxy process (on STDIN) would look similar to this: 531 532 ``` 533 { 534 "user": "me", 535 "public_key": "AAAAB3NzaC1yc2EAAAADAQABAAABAQDuwESFdAe14hVS6omeyX7edc...JQdf" 536 } 537 ``` 538 539 And as an example return this on STDOUT 540 541 ``` 542 { 543 "type": "sftp", 544 "_root": "", 545 "_obscure": "pass", 546 "user": "me", 547 "pass": "mypassword", 548 "host": "sftp.example.com" 549 } 550 ``` 551 552 This would mean that an SFTP backend would be created on the fly for 553 the `user` and `pass`/`public_key` returned in the output to the host given. Note 554 that since `_obscure` is set to `pass`, rclone will obscure the `pass` 555 parameter before creating the backend (which is required for sftp 556 backends). 557 558 The program can manipulate the supplied `user` in any way, for example 559 to make proxy to many different sftp backends, you could make the 560 `user` be `user@example.com` and then set the `host` to `example.com` 561 in the output and the user to `user`. For security you'd probably want 562 to restrict the `host` to a limited list. 563 564 Note that an internal cache is keyed on `user` so only use that for 565 configuration, don't use `pass` or `public_key`. This also means that if a user's 566 password or public-key is changed the cache will need to expire (which takes 5 mins) 567 before it takes effect. 568 569 This can be used to build general purpose proxies to any kind of 570 backend that rclone supports. 571 572 573 ``` 574 rclone serve http remote:path [flags] 575 ``` 576 577 ## Options 578 579 ``` 580 --addr stringArray IPaddress:Port or :Port to bind server to (default [127.0.0.1:8080]) 581 --allow-origin string Origin which cross-domain request (CORS) can be executed from 582 --auth-proxy string A program to use to create the backend from the auth 583 --baseurl string Prefix for URLs - leave blank for root 584 --cert string TLS PEM key (concatenation of certificate and CA certificate) 585 --client-ca string Client certificate authority to verify clients with 586 --dir-cache-time Duration Time to cache directory entries for (default 5m0s) 587 --dir-perms FileMode Directory permissions (default 0777) 588 --file-perms FileMode File permissions (default 0666) 589 --gid uint32 Override the gid field set by the filesystem (not supported on Windows) (default 1000) 590 -h, --help help for http 591 --htpasswd string A htpasswd file - if not provided no authentication is done 592 --key string TLS PEM Private key 593 --max-header-bytes int Maximum size of request header (default 4096) 594 --min-tls-version string Minimum TLS version that is acceptable (default "tls1.0") 595 --no-checksum Don't compare checksums on up/download 596 --no-modtime Don't read/write the modification time (can speed things up) 597 --no-seek Don't allow seeking in files 598 --pass string Password for authentication 599 --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) 600 --read-only Only allow read-only access 601 --realm string Realm for authentication 602 --salt string Password hashing salt (default "dlPL2MqE") 603 --server-read-timeout Duration Timeout for server reading data (default 1h0m0s) 604 --server-write-timeout Duration Timeout for server writing data (default 1h0m0s) 605 --template string User-specified template 606 --uid uint32 Override the uid field set by the filesystem (not supported on Windows) (default 1000) 607 --umask int Override the permission bits set by the filesystem (not supported on Windows) (default 2) 608 --user string User name for authentication 609 --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) 610 --vfs-cache-max-age Duration Max time since last access of objects in the cache (default 1h0m0s) 611 --vfs-cache-max-size SizeSuffix Max total size of objects in the cache (default off) 612 --vfs-cache-min-free-space SizeSuffix Target minimum free space on the disk containing the cache (default off) 613 --vfs-cache-mode CacheMode Cache mode off|minimal|writes|full (default off) 614 --vfs-cache-poll-interval Duration Interval to poll the cache for stale objects (default 1m0s) 615 --vfs-case-insensitive If a file name not found, find a case insensitive match 616 --vfs-disk-space-total-size SizeSuffix Specify the total space of disk (default off) 617 --vfs-fast-fingerprint Use fast (less accurate) fingerprints for change detection 618 --vfs-read-ahead SizeSuffix Extra read ahead over --buffer-size when using cache-mode full 619 --vfs-read-chunk-size SizeSuffix Read the source objects in chunks (default 128Mi) 620 --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 ('off' is unlimited) (default off) 621 --vfs-read-wait Duration Time to wait for in-sequence read before seeking (default 20ms) 622 --vfs-refresh Refreshes the directory cache recursively in the background on start 623 --vfs-used-is-size rclone size Use the rclone size algorithm for Used size 624 --vfs-write-back Duration Time to writeback files after last use when using cache (default 5s) 625 --vfs-write-wait Duration Time to wait for in-sequence write before giving error (default 1s) 626 ``` 627 628 629 ## Filter Options 630 631 Flags for filtering directory listings. 632 633 ``` 634 --delete-excluded Delete files on dest excluded from sync 635 --exclude stringArray Exclude files matching pattern 636 --exclude-from stringArray Read file exclude patterns from file (use - to read from stdin) 637 --exclude-if-present stringArray Exclude directories if filename is present 638 --files-from stringArray Read list of source-file names from file (use - to read from stdin) 639 --files-from-raw stringArray Read list of source-file names from file without any processing of lines (use - to read from stdin) 640 -f, --filter stringArray Add a file filtering rule 641 --filter-from stringArray Read file filtering patterns from a file (use - to read from stdin) 642 --ignore-case Ignore case in filters (case insensitive) 643 --include stringArray Include files matching pattern 644 --include-from stringArray Read file include patterns from file (use - to read from stdin) 645 --max-age Duration Only transfer files younger than this in s or suffix ms|s|m|h|d|w|M|y (default off) 646 --max-depth int If set limits the recursion depth to this (default -1) 647 --max-size SizeSuffix Only transfer files smaller than this in KiB or suffix B|K|M|G|T|P (default off) 648 --metadata-exclude stringArray Exclude metadatas matching pattern 649 --metadata-exclude-from stringArray Read metadata exclude patterns from file (use - to read from stdin) 650 --metadata-filter stringArray Add a metadata filtering rule 651 --metadata-filter-from stringArray Read metadata filtering patterns from a file (use - to read from stdin) 652 --metadata-include stringArray Include metadatas matching pattern 653 --metadata-include-from stringArray Read metadata include patterns from file (use - to read from stdin) 654 --min-age Duration Only transfer files older than this in s or suffix ms|s|m|h|d|w|M|y (default off) 655 --min-size SizeSuffix Only transfer files bigger than this in KiB or suffix B|K|M|G|T|P (default off) 656 ``` 657 658 See the [global flags page](/flags/) for global options not listed here. 659 660 # SEE ALSO 661 662 * [rclone serve](/commands/rclone_serve/) - Serve a remote over a protocol. 663