Skip to content

OAuth 2.0 Compatibility for Docker / Headless Runtimes #7634

Open

Description

@coanghel

The associated forum post URL from https://forum.rclone.org

https://forum.rclone.org/t/fully-automated-in-docker/44204

What is your current rclone version (output from rclone version)?

1.65.1

What problem are you are trying to solve?

rclone cannot complete an OAuth 2.0 authentication when running headless or in docker for two main reasons:

  1. In Docker, the default bind of the OAuth callback listener to localhost does not allow network connection to outside of the container. You must bind to 0.0.0.0 when inside a Docker container.
  2. Generic to headless mode, something (a reverse proxy) needs to pass the callback back to rclone and it's specific port. This is only possible if rclone uses a redirect URL which matches the reverse proxy.

How do you think rclone should be changed to solve that?

Add global config options for both the callback listener address and redirect URL.

How to use GitHub

  • Please use the 👍 reaction to show that you are affected by the same issue.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Activity

  1. coanghel commented on Jun 25, 2024

    @coanghel
    Author

    Hi @ncw any update here?

  2. werty1st commented on Sep 16, 2024

    @werty1st

    In the meantime you can use:

    FROM golang AS builder
    
    RUN git clone --depth=1 https://github.com/rclone/rclone.git
    RUN sed -i 's/server := newAuthServer(opt, bindAddress, state, authURL)/server := newAuthServer(opt, "0.0.0.0:53682", state, authURL)/' \
        ./rclone/lib/oauthutil/oauthutil.go
    
    RUN \
        cd rclone && \
        CGO_ENABLED=0 \
        make
    RUN /go/bin/rclone version
  3. added this to the v1.70 milestone on Jan 14, 2025
  4. modified the milestones: v1.70, v1.71 on Jun 19, 2025
  5. modified the milestones: v1.71, v1.72 on Sep 4, 2025
  6. modified the milestones: v1.72, v1.73 on Nov 24, 2025
  7. modified the milestones: v1.73, v1.74 on Feb 17, 2026
  8. removed this from the v1.74 milestone on May 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions