Git Product home page Git Product logo

docker-rclone-serve's Introduction

docker-rclone-serve

GitHub last commit Docker Image Version (latest semver)

This image proxies any rclone-supported backend and serves this as an SFTP server (using rclone serve). By proxying a back-end, you can share it with multiple devices or users without having to share the backend credentials.

rclone configuration

The rclone configuration file defines the available backends and is read from $RCLONE_AUTH_PROXY_BACKENDS (by default /config/rclone.conf). You can create this file using rclone: rclone config --config rclone.conf

User configuration

The user configuration file defines users' names and credentials, which backend the user has access to, and which backend path the user can access. It is read from $RCLONE_AUTH_PROXY_USERS (by default /config/users.conf).

Check rclone's docs to understand better how rclone serve handles these details.

Example:

[user1]
public_key = AAAAC3NzaC1lZDI1NTE5AAAAIGIn18t0VonWAGDpsiIuZApik8erVceVNjPX0mT4Z4Sy
             AAAAC3NzaC1lZDI1NTE5AAAAILTfzZi3i3DqJQjW9H6XhseA0B5cg7F0+zUtgxBia87g
backend = my_gdrive_backend
root = /

[user2]
password = topsecret
backend = my_onedrive_backend
root = /user2

Passwords are stored as plaintext so try to use public keys instead (these are SSH public keys). A user may have more than one public key as shown above. The backend should match what you configured in rclone.conf.

Details

Environment Variables

Name Default Purpose
RCLONE_AUTH_PROXY_BACKENDS /config/rclone.conf Path to rclone configuration file.
RCLONE_AUTH_PROXY_USERS /config/users.conf Path to user configuration file.
RCLONE_OPTIONS Additional rclone cli options like --transfers 32

Volumes

Volume Purpose
/config Contains config file and cache.

Ports

Port Purpose
2022 SFTP (SSH, without console)

Example

Running directly

docker run -v /host-path/config:/config -p 2022:2022 rclone-serve

You may pass any additional arguments to rclone via Docker commands. For example, you might like to generate and use a static server key file (though rclone will generate one at start-up and cache this if you don't).

docker run -v /host-path/config:/config -p 2022:2022 rclone-serve --key /config/id_rsa

Tags

Tags mirror the rclone version. The image is rebuilt when a new rclone image becomes available.

docker-rclone-serve's People

Contributors

renovate-bot avatar jonohill avatar patrickhuetter avatar renovate[bot] avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.