2016-01-07 23:20:32 +08:00
|
|
|
---
|
|
|
|
title: "Remote Setup"
|
|
|
|
description: "Configuring rclone up on a remote / headless machine"
|
|
|
|
---
|
|
|
|
|
|
|
|
# Configuring rclone on a remote / headless machine #
|
|
|
|
|
|
|
|
Some of the configurations (those involving oauth2) require an
|
|
|
|
Internet connected web browser.
|
|
|
|
|
|
|
|
If you are trying to set rclone up on a remote or headless box with no
|
2020-10-14 05:49:58 +08:00
|
|
|
browser available on it (e.g. a NAS or a server in a datacenter) then
|
2016-01-07 23:20:32 +08:00
|
|
|
you will need to use an alternative means of configuration. There are
|
|
|
|
two ways of doing it, described below.
|
|
|
|
|
|
|
|
## Configuring using rclone authorize ##
|
|
|
|
|
2020-05-04 17:40:26 +08:00
|
|
|
On the headless box run `rclone` config but answer `N` to the `Use
|
|
|
|
auto config?` question.
|
2016-01-07 23:20:32 +08:00
|
|
|
|
|
|
|
```
|
|
|
|
...
|
|
|
|
Remote config
|
|
|
|
Use auto config?
|
|
|
|
* Say Y if not sure
|
|
|
|
* Say N if you are working on a remote or headless machine
|
2020-05-04 17:40:26 +08:00
|
|
|
y) Yes (default)
|
2016-01-07 23:20:32 +08:00
|
|
|
n) No
|
|
|
|
y/n> n
|
2020-05-04 17:40:26 +08:00
|
|
|
For this to work, you will need rclone available on a machine that has
|
|
|
|
a web browser available.
|
|
|
|
|
|
|
|
For more help and alternate methods see: https://rclone.org/remote_setup/
|
|
|
|
|
|
|
|
Execute the following on the machine with the web browser (same rclone
|
|
|
|
version recommended):
|
|
|
|
|
2016-01-07 23:20:32 +08:00
|
|
|
rclone authorize "amazon cloud drive"
|
2020-05-04 17:40:26 +08:00
|
|
|
|
2016-01-07 23:20:32 +08:00
|
|
|
Then paste the result below:
|
|
|
|
result>
|
|
|
|
```
|
|
|
|
|
|
|
|
Then on your main desktop machine
|
|
|
|
|
|
|
|
```
|
|
|
|
rclone authorize "amazon cloud drive"
|
|
|
|
If your browser doesn't open automatically go to the following link: http://127.0.0.1:53682/auth
|
|
|
|
Log in and authorize rclone for access
|
|
|
|
Waiting for code...
|
|
|
|
Got code
|
|
|
|
Paste the following into your remote machine --->
|
|
|
|
SECRET_TOKEN
|
|
|
|
<---End paste
|
|
|
|
```
|
|
|
|
|
|
|
|
Then back to the headless box, paste in the code
|
|
|
|
|
|
|
|
```
|
|
|
|
result> SECRET_TOKEN
|
|
|
|
--------------------
|
|
|
|
[acd12]
|
|
|
|
client_id =
|
|
|
|
client_secret =
|
|
|
|
token = SECRET_TOKEN
|
|
|
|
--------------------
|
|
|
|
y) Yes this is OK
|
|
|
|
e) Edit this remote
|
|
|
|
d) Delete this remote
|
|
|
|
y/e/d>
|
|
|
|
```
|
|
|
|
|
|
|
|
## Configuring by copying the config file ##
|
|
|
|
|
|
|
|
Rclone stores all of its config in a single configuration file. This
|
|
|
|
can easily be copied to configure a remote rclone.
|
|
|
|
|
2020-05-04 17:40:26 +08:00
|
|
|
So first configure rclone on your desktop machine with
|
2016-01-07 23:20:32 +08:00
|
|
|
|
|
|
|
rclone config
|
|
|
|
|
|
|
|
to set up the config file.
|
|
|
|
|
2019-01-14 01:56:57 +08:00
|
|
|
Find the config file by running `rclone config file`, for example
|
2016-01-07 23:20:32 +08:00
|
|
|
|
|
|
|
```
|
2019-01-14 01:56:57 +08:00
|
|
|
$ rclone config file
|
|
|
|
Configuration file is stored at:
|
|
|
|
/home/user/.rclone.conf
|
2016-01-07 23:20:32 +08:00
|
|
|
```
|
|
|
|
|
|
|
|
Now transfer it to the remote box (scp, cut paste, ftp, sftp etc) and
|
2019-01-14 01:56:57 +08:00
|
|
|
place it in the correct place (use `rclone config file` on the remote
|
|
|
|
box to find out where).
|