Rclone Config - headless machine - No Link

What is the problem you are having with rclone?

I tried to setup rclone with google drive on the version v1.58.0 on a headleass ubuntu server (only command line available) but when i go for "rclone config > New Remote > 17 (Google Drive) > Full Access ... > Advanced Config (no) > Auto Config (no) > HERE IS MY PROBLEM [in older version on my other server i have v1.52.2 i get a link at this point, i copy paste this to my windows machine, open the link in browser, accept the request and copy back the confirmation code and connection works.]] > on the latest rclone version, i do not get any link for it, so i cant confirm the connection.

I hope my problem is good explained. Thank you.

Run the command 'rclone version' and share the full output of the command.

rclone v1.58.0

  • os/version: ubuntu 20.04 (64 bit)
  • os/kernel: 5.4.0-105-generic (x86_64)
  • os/type: linux
  • os/arch: amd64
  • go/version: go1.17.8
  • go/linking: static
  • go/tags: none

Which cloud storage system are you using? (eg Google Drive)

Google Drive

Unfortunately google disabled this method of configuration :frowning:

Use one of the methods outlined here: Remote Setup

Hello Nick,
thank you for your response.
I am wondering a bit about the information "google disabled it", when i use the old rclone version on my other server, it is still working without any problems and i get a direct link and connect my drive.
But when i rent a headless machine, i have no chance to open a web browser, so it is really complicated.

There isn't much to add as it's a Google change and nothing rclone can do.

The process for the headless/remote setup is straight forward and requires a machine with a browser as that's how oAuth works.

If you have a headless machine, you authorize on another as described.

Use auto config?
 * Say Y if not sure
 * Say N if you are working on a remote or headless machine

y) Yes (default)
n) No
y/n> n
Option config_token.
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):
	rclone authorize "drive"
Then paste the result.
Enter a value.
config_token>

On a machine with a browser, you run that and you get a code, paste it into the headless machine and done.

Process is really the same for headless as the steps have slightly changed.

Here is the Google announcement

It stopped working for new clients on 28th Feb 2022. I guess you have an old client where it will keep working until September or October 2022. Best to be prepared!

hi,
i help another rcloner with a similar issue.

i suggested, as a workaround, to enable the old behaviour

  1. run v1.57.0 on the headless.
  2. after the remote is created, then rclone selfupdate to v1.58.0
    sort of the best of both worlds, at least until later in 2022

There's no reason to run the old.

The 1.58 works just fine.

The command just changed from giving you a link to this:

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):
	rclone authorize "drive"

The whole process is the same minus the authorize before was a web URL instead.

Got to the part where it gives me the auth token but now I'm not sure exactly which party to copy paste. Get error message

Invalid_Grant
Malformed auth code

Token looks like the following - changed for privacy

On rclone version 1.53.2-DEV on both machines. Remote and local with browser. I do get a link on headless but with that I get the 400/401 errors. When I do the rclone authorize on local it works but then I get the above error.

Paste the following into your remote machine --->
{"access_token":"ya29.A0ARrdaM9adfadfsdfdwPgITP-KeEDqpJymeWrt37B5RSWlFxDOz5BtFyFzq-oN2EFR4upEKgPO9adfadfadfGA1auVEmWzebsh2hiR3Zh0BqJITIU7-4Pd16itUYzIaYowBIF9dCAtZGCV4MMi1PSU6fEUuO","token_type":"Bearer","refresh_token":"1//04CO7n261PaWOCgYIARAAGAQSNwF-L9IraNg1Pi7adfdsfITjFQPqrjhO25hw57onqoN5Ip-AFn05dwBJhfXEc4Vovz1W8seIVCxI","expiry":"2022-03-29T22:17:01.376291636-04:00"}
<---End paste

IF I understood I should then paste:

{"access_token":"ya29.A0ARrdaM9adfadfsdfdwPgITP-KeEDqpJymeWrt37B5RSWlFxDOz5BtFyFzq-oN2EFR4upEKgPO9adfadfadfGA1auVEmWzebsh2hiR3Zh0BqJITIU7-4Pd16itUYzIaYowBIF9dCAtZGCV4MMi1PSU6fEUuO","token_type":"Bearer","refresh_token":"1//04CO7n261PaWOCgYIARAAGAQSNwF-L9IraNg1Pi7adfdsfITjFQPqrjhO25hw57onqoN5Ip-AFn05dwBJhfXEc4Vovz1W8seIVCxI","expiry":"2022-03-29T22:17:01.376291636-04:00"}

But I get that error.

Use the latest 1.58 and not some old dev version.

1 Like

Worked! Thank you very much animosity you are a jedi.

Hello,
i dont get this point.
When i rent a headless machine for example from hetzner. I get a fresh ubuntu server on command line.
Now i run rclone config with "no" on auto config then i cant follow the instructions from "Remote Setup" cause it want me to use "http://127.0.0.1:53682/auth" on my desktop machine. This is localhost so for sure i get an error for non existing server cause the "server" at this point is on the example headleass machine and not on my desktop machine. Do i missunderstand something ?

Thank you in advance.

Yes, the point of the remote setup is you don't have a browser on the remote server / headless machine.

For oAuth to work, you need a browser to use oAuth.

On the remote server, you pick headless machine and on the machine you are typing this post on that has a browser, you download rclone, run rclone authorize like the OP did and paste in the code on the headless machine.

You can't run an oAuth authentication process on a headless machine as it requires a browser to authenticate.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.