Does rclone currently support alternate hostname for googleapi (drive/gcs) systems?

I looked at the documentation for both the google drive and gcs options in rclone but didn't see what I was looking for there.

If we're using an alternate hostname when connecting to googleapis ( to facilitate connection over a private interconnect to google), is there a way to inform the rclone cli to use that instead of the default or

I inherited a project that is using a dns override approach for this and I was wondering if rclone supported the method of using the alternate hostname instead. But I can't find an option in the docs that would indicate that.

I was wondering also if since it seems to use the googleapi golang library, that maybe there was some sort of "env variable passthrough" kind of approach that might get it done too? But I'm not familiar with that library and not having luck looking through those docs either.

Thanks in advance for any information/help!

Hi John,

I am not an expert in the rclone code, but a quick search revealed these constant assignments for Google Drive:

which strongly indicates that the URL to the google API is currently hardcoded in rclone.

Your options therefore sems to be:

  • stick with the DNS override (relatively easy)

  • compile your own custom rclone with changed hardcoding (harder)

  • propose and make a Pull Request to make rclone configurable (hardest)

  • fund/sponsor @ncw to add the feature

Things may be different for Google Cloud Storage (using the golang api), I don't know. Which do you use?

Yeah I saw those snippets yesterday when I was looking for myself too.

Only possible thing that might change it is if the googleapi library that's being used has some way of overriding that URL, so figured it didn't hurt to ask just in case.

I'll play around with the code a bit and test out adding the feature and possibly submit a PR unless someone chimes in that that work is already in progress or something.