Remote Control & API

Control Rclone using a standard HTTP API.

Besides the command-line interface, Rclone also provides a standard HTTP API.

This API can be used to control Rclone from other applications.

Daemon

Enabling the HTTP server is done by starting rclone rcd in daemon mode.

To enable it, start rclone with the --rc flag.

rclone rcd --rc-addr="localhost:5572"

This will start the server on port 5572.

You can then access the API at http://localhost:5572/.

Authentication

The API is not authenticated by default.

You can authenticate with the API using the --rc-user and --rc-pass flags.

rclone --rc --rc-user=admin --rc-pass=password

CORS

If you call the API from a browser, make sure to setup CORS properly.

You can do that with the --cors-origins flag.

rclone --rc --cors-origins=*

Examples

A request to the API is an ordinary HTTP POST request. Any HTTP client works; the pages in this section show the same request in a number of languages and libraries.

cURL

curl -X POST http://localhost:5572/

How is this guide?