Can't figure out how to use rc

I’m using this command to start rc:

rclone --rc

It outputs this interesting line:

2019/01/24 18:58:04 NOTICE: Serving remote control on http://127.0.0.1:5572/

When I visit that URL, I’m told that the website doesn’t exist. I don’t think the server is actually running. The full output I get is:

Andys-MacBook-Pro-Mid-2015-Mojave:~ andyibanez$ rclone --rc
2019/01/24 18:58:04 NOTICE: Serving remote control on http://127.0.0.1:5572/
Usage:
  rclone [flags]
  rclone [command]

Available Commands:
  about           Get quota information from the remote.
  authorize       Remote authorization.
  cachestats      Print cache stats for a remote
  cat             Concatenates any files and sends them to stdout.
  check           Checks the files in the source and destination match.
  cleanup         Clean up the remote if possible
  config          Enter an interactive configuration session.
  copy            Copy files from source to dest, skipping already copied
  copyto          Copy files from source to dest, skipping already copied
  copyurl         Copy url content to dest.
  cryptcheck      Cryptcheck checks the integrity of a crypted remote.
  cryptdecode     Cryptdecode returns unencrypted file names.
  dbhashsum       Produces a Dropbox hash file for all the objects in the path.
  dedupe          Interactively find duplicate files and delete/rename them.
  delete          Remove the contents of path.
  deletefile      Remove a single file from remote.
  genautocomplete Output completion script for a given shell.
  gendocs         Output markdown docs for rclone to the directory supplied.
  hashsum         Produces an hashsum file for all the objects in the path.
  help            Show help for rclone commands, flags and backends.
  link            Generate public link to file/folder.
  listremotes     List all the remotes in the config file.
  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'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.
  obscure         Obscure password for use in the rclone.conf
  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 path if empty.
  rmdirs          Remove empty directories under the path.
  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.
  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 "rclone [command] --help" for more information about a command.
Use "rclone help flags" for to see the global flags.
Use "rclone help backends" for a list of supported services.

Checking for rclone running using ps aux | grep rclone doesn’t show any relevant process.

I’m using rclone 1.45 on macOS Mojave (10.14)

You’d need to run it with something as you aren’t giving it anything else to do.

Are you trying to add that to a mount command ?

Like my mount command has it in it:

felix      587     1  1 Jan21 ?        01:27:06 /usr/bin/rclone mount gcrypt: /GD --allow-other --bind 192.168.1.30 --buffer-size 256M --dir-cache-time 72h --drive-chunk-size 32M --log-level INFO --log-file /home/felix/logs/rclone.log --timeout 1h --umask 002 --vfs-read-chunk-size 128M --vfs-read-chunk-size-limit off --rc
1 Like

Ahhh I see, I was under the impression that it would just serve my remotes via HTTP and I’d be able to interact with them from that point onward. Didn’t occur to me I actually had to manually mount it and stuff.

You can serve them via http if that meets your needs and just add the rc to the command.

WIth a recent rclone you can use the rcd command which just serves the remote.

If you want to see your remotes via the rc, then add --rc-serve. You’ll need to add some authentication or --rc-no-auth.

Alright, thanks for the answers so far.

I’m not sure if I’m getting this correctly, but this is what I have done so far:

  1. Started rclone with rclone rcd
  2. Used the command rclone rc [some command] to interact with it.

The remote seems to be running now, but I can’t get it to actually do anything.

On my browser, I accessed the URL http://127.0.0.1:5572/config/listremotes, but the page just outputs “Not Found”. According to the text I get when I run rclone rc with no other parameters, this should be the path I enter in my browser to see my remotes:

config/listremotes: Lists the remotes in the config file.

Returns

  • remotes - array of remote names

As an additional question, is there way to use rcd with the same authentication options as serving with rc? If I were to setup a DO instance just for rclone, i’d want to protect it somehow.

Thanks again for all the help so far.

EDIT: After re-reading the output of rclone rc, I tried the command rclone rc config/listremotes and managed to list my remotes. I had to run --rc-no-auth in the rcd command (not rc, like I had been trying) in order to get it t work with no auth. So with this, you guys can ignore my additional question because I understand how I can interact with a remote rclone on the Terminal now, and I should be able to setup whatever authentication method I want with it. Still having problems making it work with my browser though.

This won’t work directly in the browser as rclone is expecting a POST not a GET which is what your browser will do. You can use the curl examples to fetch things with a POST, or just use rclone rc - that is exactly what it does under the hood.

Great! Let us know if you have any other problems with it.

1 Like

Got it, thanks. I assumed it was GET because that’s the only HTTP verb I found mentioned in the docs. Used Postman to send POST requests instead.

1 Like