github.com/rclone/rclone@v1.66.1-0.20240517100346-7b89735ae726/docs/content/remote_setup.md (about) 1 --- 2 title: "Remote Setup" 3 description: "Configuring rclone up on a remote / headless machine" 4 --- 5 6 # Configuring rclone on a remote / headless machine # 7 8 Some of the configurations (those involving oauth2) require an 9 Internet connected web browser. 10 11 If you are trying to set rclone up on a remote or headless box with no 12 browser available on it (e.g. a NAS or a server in a datacenter) then 13 you will need to use an alternative means of configuration. There are 14 two ways of doing it, described below. 15 16 ## Configuring using rclone authorize ## 17 18 On the headless box run `rclone` config but answer `N` to the `Use web browser 19 to automatically authenticate?` question. 20 21 ``` 22 ... 23 Remote config 24 Use web browser to automatically authenticate rclone with remote? 25 * Say Y if the machine running rclone has a web browser you can use 26 * Say N if running rclone on a (remote) machine without web browser access 27 If not sure try Y. If Y failed, try N. 28 y) Yes (default) 29 n) No 30 y/n> n 31 For this to work, you will need rclone available on a machine that has 32 a web browser available. 33 34 For more help and alternate methods see: https://rclone.org/remote_setup/ 35 36 Execute the following on the machine with the web browser (same rclone 37 version recommended): 38 39 rclone authorize "dropbox" 40 41 Then paste the result below: 42 result> 43 ``` 44 45 Then on your main desktop machine 46 47 ``` 48 rclone authorize "dropbox" 49 If your browser doesn't open automatically go to the following link: http://127.0.0.1:53682/auth 50 Log in and authorize rclone for access 51 Waiting for code... 52 Got code 53 Paste the following into your remote machine ---> 54 SECRET_TOKEN 55 <---End paste 56 ``` 57 58 Then back to the headless box, paste in the code 59 60 ``` 61 result> SECRET_TOKEN 62 -------------------- 63 [acd12] 64 client_id = 65 client_secret = 66 token = SECRET_TOKEN 67 -------------------- 68 y) Yes this is OK 69 e) Edit this remote 70 d) Delete this remote 71 y/e/d> 72 ``` 73 74 ## Configuring by copying the config file ## 75 76 Rclone stores all of its config in a single configuration file. This 77 can easily be copied to configure a remote rclone. 78 79 So first configure rclone on your desktop machine with 80 81 rclone config 82 83 to set up the config file. 84 85 Find the config file by running `rclone config file`, for example 86 87 ``` 88 $ rclone config file 89 Configuration file is stored at: 90 /home/user/.rclone.conf 91 ``` 92 93 Now transfer it to the remote box (scp, cut paste, ftp, sftp, etc.) and 94 place it in the correct place (use `rclone config file` on the remote 95 box to find out where). 96 97 ## Configuring using SSH Tunnel ## 98 99 Linux and MacOS users can utilize SSH Tunnel to redirect the headless box port 53682 to local machine by using the following command: 100 ``` 101 ssh -L localhost:53682:localhost:53682 username@remote_server 102 ``` 103 Then on the headless box run `rclone` config and answer `Y` to the `Use web 104 browser to automatically authenticate?` question. 105 106 ``` 107 ... 108 Remote config 109 Use web browser to automatically authenticate rclone with remote? 110 * Say Y if the machine running rclone has a web browser you can use 111 * Say N if running rclone on a (remote) machine without web browser access 112 If not sure try Y. If Y failed, try N. 113 y) Yes (default) 114 n) No 115 y/n> y 116 ``` 117 Then copy and paste the auth url `http://127.0.0.1:53682/auth?state=xxxxxxxxxxxx` to the browser on your local machine, complete the auth and it is done.