Skip to content

HTTP

  • Read-only. An HTTP drive browses a web server’s directory listings; nothing can be saved to it.
Capability Support
rclone support tier Tier 3: Supported
Checksums None
Modification times Kept, to 1 s
Case-insensitive names No
Duplicate names allowed No
Server-side copy No
Server-side move and rename No
Folder move and rename No: each file is moved in turn
Free space reporting No
Empty folders Yes
Change notifications No
Uploads of unknown size Yes
Public links No

The HTTP remote is a read only remote for reading files of a webserver. The webserver should provide file listings which rclone will read and turn into a remote. This has been tested with common webservers such as Apache/Nginx/Caddy and will likely work with file listings from most web servers. (If it doesn’t then please file an issue, or send a pull request!)

The remote: represents the configured url, and any path following it will be resolved relative to this url, according to the URL standard. This means with remote url https://beta.rclone.org/branch and path fix, the resolved URL will be https://beta.rclone.org/branch/fix, while with path /fix the resolved URL will be https://beta.rclone.org/fix as the absolute path is resolved from the root of the domain. The path can’t change the scheme, host or user of the configured url, so a path such as //other.example.com/fix is rejected.

If the path following the remote: ends with / it will be assumed to point to a directory. If the path does not end with /, then a HEAD request is sent and the response used to decide if it is treated as a file or a directory (run with -vv to see details). When --http-no-head is specified, a path without ending / is always assumed to be a file. If rclone incorrectly assumes the path is a file, the solution is to specify the path with ending /. When you know the path is a directory, ending it with / is always better as it avoids the initial HEAD request.

To just download a single file it is easier to use copyurl.

In CloudMount you add this drive from the Add drive screen, and the wizard asks for the options listed under Options. The notes below come from rclone’s setup guide.

This remote is read only - you can’t upload files to an HTTP server.

Rclone normally needs the HTTP server to return a parseable directory listing in order to discover files. However if the path points directly at a single file (i.e. it does not end with / and the initial HEAD request reports it as a file), rclone will skip the parent directory listing entirely and access the file directly.

This means rclone can be used to download individual files on HTTP servers that have directory listings disabled, as long as you know the exact URL of each file. For example, given a server that serves https://example.com/path/file.txt but returns an error or an unparseable response for https://example.com/path/:

Terminal window
rclone copy --http-url https://example.com :http:path/file.txt /tmp/

You can use this as a remote in other rclone commands too:

Terminal window
rclone hashsum crc32 --http-url "https://getsamplefiles.com" :archive::http:download/zip/sample-1.zip

If you just want to download a file or multiple files by URL then using copyurl is more efficient.

Most HTTP servers store time accurate to 1 second.

No checksums are stored.

Since the http remote only has one config parameter it is easy to use without a config file:

Terminal window
rclone lsd --http-url https://beta.rclone.org :http:

or:

Terminal window
rclone lsd :http,url='https://beta.rclone.org':

The wizard asks for these when you add the drive.

URL of HTTP host to connect to.

E.g. “https://example.com”, or “https://user:pass@example.com” to use a username and password.

Type: string · Required

Do not escape URL metacharacters in path names.

Type: bool · Default: false

The wizard shows these under Advanced options. Most drives work without changing any of them.

Set HTTP headers for all transactions.

Use this to set additional HTTP headers for all transactions.

The input format is comma separated list of key,value pairs. Standard CSV encoding may be used.

For example, to set a Cookie use ‘Cookie,name=value’, or ‘“Cookie”,“name=value”’.

You can set multiple headers, e.g. ‘“Cookie”,“name=value”,“Authorization”,“xxx”’.

The headers are only sent to the host in the configured URL. If the server redirects to another host (including a subdomain or a different port) the headers are not sent to it, or to any further hop in that redirect chain. When headers are set, a redirect from https to http is refused as it would send them in cleartext.

Type: CommaSepList

Set this if the site doesn’t end directories with /.

Use this if your target website does not use / on the end of directories.

A / on the end of a path is how rclone normally tells the difference between files and directories. If this flag is set, then rclone will treat all files with Content-Type: text/html as directories and read URLs from them rather than downloading them.

Note that this may cause rclone to confuse genuine HTML files with directories.

Type: bool · Default: false

Don’t use HEAD requests.

HEAD requests are mainly used to find file sizes in dir listing. If your site is being very slow to load then you can try this option. Normally rclone does a HEAD request for each potential file in a directory listing to:

  • find its size
  • check it really exists
  • check to see if it is a directory

If you set this option, rclone will not do the HEAD request. This will mean that directory listings are much quicker, but rclone won’t have the times or sizes of any files, and some files that don’t exist may be in the listing.

Type: bool · Default: false

Description of the remote.

Type: string

rclone about is not supported by the HTTP backend. Backends without this capability cannot determine free space for an rclone mount or use policy mfs (most free space) as a member of an rclone union remote.

See List of backends that do not support rclone about and rclone about.