mirror of
https://github.com/rclone/rclone.git
synced 2025-10-06 05:47:10 +02:00
docs: update remote setup page
This commit is contained in:
@@ -8,20 +8,21 @@ description: "Configuring rclone up on a remote / headless machine"
|
|||||||
Some of the configurations (those involving oauth2) require an
|
Some of the configurations (those involving oauth2) require an
|
||||||
internet-connected web browser.
|
internet-connected web browser.
|
||||||
|
|
||||||
If you are trying to set rclone up on a remote or headless box with no
|
If you are trying to set rclone up on a remote or headless machine with no
|
||||||
browser available on it (e.g. a NAS or a server in a datacenter) then
|
browser available on it (e.g. a NAS or a server in a datacenter), then
|
||||||
you will need to use an alternative means of configuration. There are
|
you will need to use an alternative means of configuration. There are
|
||||||
two ways of doing it, described below.
|
three ways of doing it, described below.
|
||||||
|
|
||||||
## Configuring using rclone authorize
|
## Configuring using rclone authorize
|
||||||
|
|
||||||
On the headless box run `rclone` config but answer `N` to the `Use auto config?`
|
On the headless machine run [rclone config](/commands/rclone_config), but
|
||||||
question.
|
answer `N` to the question `Use web browser to automatically authenticate rclone with remote?`.
|
||||||
|
|
||||||
```text
|
```text
|
||||||
Use auto config?
|
Use web browser to automatically authenticate rclone with remote?
|
||||||
* Say Y if not sure
|
* Say Y if the machine running rclone has a web browser you can use
|
||||||
* Say N if you are working on a remote or headless machine
|
* Say N if running rclone on a (remote) machine without web browser access
|
||||||
|
If not sure try Y. If Y failed, try N.
|
||||||
|
|
||||||
y) Yes (default)
|
y) Yes (default)
|
||||||
n) No
|
n) No
|
||||||
@@ -33,33 +34,35 @@ a web browser available.
|
|||||||
For more help and alternate methods see: https://rclone.org/remote_setup/
|
For more help and alternate methods see: https://rclone.org/remote_setup/
|
||||||
Execute the following on the machine with the web browser (same rclone
|
Execute the following on the machine with the web browser (same rclone
|
||||||
version recommended):
|
version recommended):
|
||||||
rclone authorize "onedrive"
|
rclone authorize "onedrive"
|
||||||
Then paste the result.
|
Then paste the result.
|
||||||
Enter a value.
|
Enter a value.
|
||||||
config_token>
|
config_token>
|
||||||
```
|
```
|
||||||
|
|
||||||
Then on your main desktop machine
|
Then on your main desktop machine, run [rclone authorize](/commands/rclone_authorize/).
|
||||||
|
|
||||||
```text
|
```text
|
||||||
rclone authorize "onedrive"
|
rclone authorize "onedrive"
|
||||||
If your browser doesn't open automatically go to the following link: http://127.0.0.1:53682/auth
|
NOTICE: Make sure your Redirect URL is set to "http://localhost:53682/" in your custom config.
|
||||||
Log in and authorize rclone for access
|
NOTICE: If your browser doesn't open automatically go to the following link: http://127.0.0.1:53682/auth?state=xxxxxxxxxxxxxxxxxxxxxx
|
||||||
Waiting for code...
|
NOTICE: Log in and authorize rclone for access
|
||||||
|
NOTICE: Waiting for code...
|
||||||
|
|
||||||
Got code
|
Got code
|
||||||
Paste the following into your remote machine --->
|
Paste the following into your remote machine --->
|
||||||
SECRET_TOKEN
|
SECRET_TOKEN
|
||||||
<---End paste
|
<---End paste
|
||||||
```
|
```
|
||||||
|
|
||||||
Then back to the headless box, paste in the code
|
Then back to the headless machine, paste in the code.
|
||||||
|
|
||||||
```text
|
```text
|
||||||
config_token> SECRET_TOKEN
|
config_token> SECRET_TOKEN
|
||||||
--------------------
|
--------------------
|
||||||
[acd12]
|
[acd12]
|
||||||
client_id =
|
client_id =
|
||||||
client_secret =
|
client_secret =
|
||||||
token = SECRET_TOKEN
|
token = SECRET_TOKEN
|
||||||
--------------------
|
--------------------
|
||||||
y) Yes this is OK
|
y) Yes this is OK
|
||||||
@@ -70,18 +73,19 @@ y/e/d>
|
|||||||
|
|
||||||
## Configuring by copying the config file
|
## Configuring by copying the config file
|
||||||
|
|
||||||
Rclone stores all of its config in a single configuration file. This
|
Rclone stores all of its configuration in a single file. This can easily be
|
||||||
can easily be copied to configure a remote rclone.
|
copied to configure a remote rclone (although some backends does not support
|
||||||
|
reusing the same configuration, consult your backend documentation to be
|
||||||
|
sure).
|
||||||
|
|
||||||
So first configure rclone on your desktop machine with
|
Start by running [rclone config](/commands/rclone_config) to create the
|
||||||
|
configuration file on your desktop machine.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
rclone config
|
rclone config
|
||||||
```
|
```
|
||||||
|
|
||||||
to set up the config file.
|
Then locate the file by running [rclone config file](/commands/rclone_config_file).
|
||||||
|
|
||||||
Find the config file by running `rclone config file`, for example
|
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
$ rclone config file
|
$ rclone config file
|
||||||
@@ -89,31 +93,37 @@ Configuration file is stored at:
|
|||||||
/home/user/.rclone.conf
|
/home/user/.rclone.conf
|
||||||
```
|
```
|
||||||
|
|
||||||
Now transfer it to the remote box (scp, cut paste, ftp, sftp, etc.) and
|
Finally, transfer the file to the remote machine (scp, cut paste, ftp, sftp, etc.)
|
||||||
place it in the correct place (use `rclone config file` on the remote
|
and place it in the correct location (use [rclone config file](/commands/rclone_config_file)
|
||||||
box to find out where).
|
on the remote machine to find out where).
|
||||||
|
|
||||||
## Configuring using SSH Tunnel
|
## Configuring using SSH Tunnel
|
||||||
|
|
||||||
Linux and MacOS users can utilize SSH Tunnel to redirect the headless box
|
If you have an SSH client installed on your local machine, you can set up an
|
||||||
port 53682 to local machine by using the following command:
|
SSH tunnel to redirect the port 53682 into the headless machine by using the
|
||||||
|
following command:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
ssh -L localhost:53682:localhost:53682 username@remote_server
|
ssh -L localhost:53682:localhost:53682 username@remote_server
|
||||||
```
|
```
|
||||||
|
|
||||||
Then on the headless box run `rclone config` and answer `Y` to the
|
Then on the headless machine run [rclone config](/commands/rclone_config) and
|
||||||
`Use auto config?` question.
|
answer `Y` to the question `Use web browser to automatically authenticate rclone with remote?`.
|
||||||
|
|
||||||
```text
|
```text
|
||||||
Use auto config?
|
Use web browser to automatically authenticate rclone with remote?
|
||||||
* Say Y if not sure
|
* Say Y if the machine running rclone has a web browser you can use
|
||||||
* Say N if you are working on a remote or headless machine
|
* Say N if running rclone on a (remote) machine without web browser access
|
||||||
|
If not sure try Y. If Y failed, try N.
|
||||||
|
|
||||||
y) Yes (default)
|
y) Yes (default)
|
||||||
n) No
|
n) No
|
||||||
y/n> y
|
y/n> y
|
||||||
|
NOTICE: Make sure your Redirect URL is set to "http://localhost:53682/" in your custom config.
|
||||||
|
NOTICE: If your browser doesn't open automatically go to the following link: http://127.0.0.1:53682/auth?state=xxxxxxxxxxxxxxxxxxxxxx
|
||||||
|
NOTICE: Log in and authorize rclone for access
|
||||||
|
NOTICE: Waiting for code...
|
||||||
```
|
```
|
||||||
|
|
||||||
Then copy and paste the auth url `http://127.0.0.1:53682/auth?state=xxxxxxxxxxxx`
|
Finally, copy and paste the presented URL `http://127.0.0.1:53682/auth?state=xxxxxxxxxxxxxxxxxxxxxx`
|
||||||
to the browser on your local machine, complete the auth and it is done.
|
to the browser on your local machine, complete the auth and you are done.
|
||||||
|
Reference in New Issue
Block a user