github.com/artpar/rclone@v1.67.3/docs/content/commands/rclone_rcd.md (about)

     1  ---
     2  title: "rclone rcd"
     3  description: "Run rclone listening to remote control commands only."
     4  slug: rclone_rcd
     5  url: /commands/rclone_rcd/
     6  groups: RC
     7  versionIntroduced: v1.45
     8  # autogenerated - DO NOT EDIT, instead edit the source code in cmd/rcd/ and as part of making a release run "make commanddocs"
     9  ---
    10  # rclone rcd
    11  
    12  Run rclone listening to remote control commands only.
    13  
    14  ## Synopsis
    15  
    16  
    17  This runs rclone so that it only listens to remote control commands.
    18  
    19  This is useful if you are controlling rclone via the rc API.
    20  
    21  If you pass in a path to a directory, rclone will serve that directory
    22  for GET requests on the URL passed in.  It will also open the URL in
    23  the browser when rclone is run.
    24  
    25  See the [rc documentation](/rc/) for more info on the rc flags.
    26  
    27  ## Server options
    28  
    29  Use `--rc-addr` to specify which IP address and port the server should
    30  listen on, eg `--rc-addr 1.2.3.4:8000` or `--rc-addr :8080` to listen to all
    31  IPs.  By default it only listens on localhost.  You can use port
    32  :0 to let the OS choose an available port.
    33  
    34  If you set `--rc-addr` to listen on a public or LAN accessible IP address
    35  then using Authentication is advised - see the next section for info.
    36  
    37  You can use a unix socket by setting the url to `unix:///path/to/socket`
    38  or just by using an absolute path name. Note that unix sockets bypass the
    39  authentication - this is expected to be done with file system permissions.
    40  
    41  `--rc-addr` may be repeated to listen on multiple IPs/ports/sockets.
    42  
    43  `--rc-server-read-timeout` and `--rc-server-write-timeout` can be used to
    44  control the timeouts on the server.  Note that this is the total time
    45  for a transfer.
    46  
    47  `--rc-max-header-bytes` controls the maximum number of bytes the server will
    48  accept in the HTTP header.
    49  
    50  `--rc-baseurl` controls the URL prefix that rclone serves from.  By default
    51  rclone will serve from the root.  If you used `--rc-baseurl "/rclone"` then
    52  rclone would serve from a URL starting with "/rclone/".  This is
    53  useful if you wish to proxy rclone serve.  Rclone automatically
    54  inserts leading and trailing "/" on `--rc-baseurl`, so `--rc-baseurl "rclone"`,
    55  `--rc-baseurl "/rclone"` and `--rc-baseurl "/rclone/"` are all treated
    56  identically.
    57  
    58  ### TLS (SSL)
    59  
    60  By default this will serve over http.  If you want you can serve over
    61  https.  You will need to supply the `--rc-cert` and `--rc-key` flags.
    62  If you wish to do client side certificate validation then you will need to
    63  supply `--rc-client-ca` also.
    64  
    65  `--rc-cert` should be a either a PEM encoded certificate or a concatenation
    66  of that with the CA certificate.  `--krc-ey` should be the PEM encoded
    67  private key and `--rc-client-ca` should be the PEM encoded client
    68  certificate authority certificate.
    69  
    70  --rc-min-tls-version is minimum TLS version that is acceptable. Valid
    71    values are "tls1.0", "tls1.1", "tls1.2" and "tls1.3" (default
    72    "tls1.0").
    73  
    74  ### Template
    75  
    76  `--rc-template` allows a user to specify a custom markup template for HTTP
    77  and WebDAV serve functions.  The server exports the following markup
    78  to be used within the template to server pages:
    79  
    80  | Parameter   | Description |
    81  | :---------- | :---------- |
    82  | .Name       | The full path of a file/directory. |
    83  | .Title      | Directory listing of .Name |
    84  | .Sort       | The current sort used.  This is changeable via ?sort= parameter |
    85  |             | Sort Options: namedirfirst,name,size,time (default namedirfirst) |
    86  | .Order      | The current ordering used.  This is changeable via ?order= parameter |
    87  |             | Order Options: asc,desc (default asc) |
    88  | .Query      | Currently unused. |
    89  | .Breadcrumb | Allows for creating a relative navigation |
    90  |-- .Link     | The relative to the root link of the Text. |
    91  |-- .Text     | The Name of the directory. |
    92  | .Entries    | Information about a specific file/directory. |
    93  |-- .URL      | The 'url' of an entry.  |
    94  |-- .Leaf     | Currently same as 'URL' but intended to be 'just' the name. |
    95  |-- .IsDir    | Boolean for if an entry is a directory or not. |
    96  |-- .Size     | Size in Bytes of the entry. |
    97  |-- .ModTime  | The UTC timestamp of an entry. |
    98  
    99  The server also makes the following functions available so that they can be used within the
   100  template. These functions help extend the options for dynamic rendering of HTML. They can
   101  be used to render HTML based on specific conditions.
   102  
   103  | Function   | Description |
   104  | :---------- | :---------- |
   105  | afterEpoch  | Returns the time since the epoch for the given time. |
   106  | contains    | Checks whether a given substring is present or not in a given string. |
   107  | hasPrefix   | Checks whether the given string begins with the specified prefix. |
   108  | hasSuffix   | Checks whether the given string end with the specified suffix. |
   109  
   110  ### Authentication
   111  
   112  By default this will serve files without needing a login.
   113  
   114  You can either use an htpasswd file which can take lots of users, or
   115  set a single username and password with the `--rc-user` and `--rc-pass` flags.
   116  
   117  If no static users are configured by either of the above methods, and client
   118  certificates are required by the `--client-ca` flag passed to the server, the
   119  client certificate common name will be considered as the username.
   120  
   121  Use `--rc-htpasswd /path/to/htpasswd` to provide an htpasswd file.  This is
   122  in standard apache format and supports MD5, SHA1 and BCrypt for basic
   123  authentication.  Bcrypt is recommended.
   124  
   125  To create an htpasswd file:
   126  
   127      touch htpasswd
   128      htpasswd -B htpasswd user
   129      htpasswd -B htpasswd anotherUser
   130  
   131  The password file can be updated while rclone is running.
   132  
   133  Use `--rc-realm` to set the authentication realm.
   134  
   135  Use `--rc-salt` to change the password hashing salt from the default.
   136  
   137  
   138  ```
   139  rclone rcd <path to files to serve>* [flags]
   140  ```
   141  
   142  ## Options
   143  
   144  ```
   145    -h, --help   help for rcd
   146  ```
   147  
   148  
   149  ## RC Options
   150  
   151  Flags to control the Remote Control API.
   152  
   153  ```
   154        --rc                                 Enable the remote control server
   155        --rc-addr stringArray                IPaddress:Port or :Port to bind server to (default [localhost:5572])
   156        --rc-allow-origin string             Origin which cross-domain request (CORS) can be executed from
   157        --rc-baseurl string                  Prefix for URLs - leave blank for root
   158        --rc-cert string                     TLS PEM key (concatenation of certificate and CA certificate)
   159        --rc-client-ca string                Client certificate authority to verify clients with
   160        --rc-enable-metrics                  Enable prometheus metrics on /metrics
   161        --rc-files string                    Path to local files to serve on the HTTP server
   162        --rc-htpasswd string                 A htpasswd file - if not provided no authentication is done
   163        --rc-job-expire-duration Duration    Expire finished async jobs older than this value (default 1m0s)
   164        --rc-job-expire-interval Duration    Interval to check for expired async jobs (default 10s)
   165        --rc-key string                      TLS PEM Private key
   166        --rc-max-header-bytes int            Maximum size of request header (default 4096)
   167        --rc-min-tls-version string          Minimum TLS version that is acceptable (default "tls1.0")
   168        --rc-no-auth                         Don't require auth for certain methods
   169        --rc-pass string                     Password for authentication
   170        --rc-realm string                    Realm for authentication
   171        --rc-salt string                     Password hashing salt (default "dlPL2MqE")
   172        --rc-serve                           Enable the serving of remote objects
   173        --rc-server-read-timeout Duration    Timeout for server reading data (default 1h0m0s)
   174        --rc-server-write-timeout Duration   Timeout for server writing data (default 1h0m0s)
   175        --rc-template string                 User-specified template
   176        --rc-user string                     User name for authentication
   177        --rc-web-fetch-url string            URL to fetch the releases for webgui (default "https://api.github.com/repos/artpar/artpar-webui-react/releases/latest")
   178        --rc-web-gui                         Launch WebGUI on localhost
   179        --rc-web-gui-force-update            Force update to latest version of web gui
   180        --rc-web-gui-no-open-browser         Don't open the browser automatically
   181        --rc-web-gui-update                  Check and update to latest version of web gui
   182  ```
   183  
   184  See the [global flags page](/flags/) for global options not listed here.
   185  
   186  # SEE ALSO
   187  
   188  * [rclone](/commands/rclone/)	 - Show help for rclone commands, flags and backends.
   189