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