Giter Site home page Giter Site logo

encircle360-oss / rclone-nfs-server Goto Github PK

View Code? Open in Web Editor NEW
17.0 2.0 2.0 5 KB

A small nfs server that can provide access to Rclone mounts. Since Rclone supports mostly all cloud providers and remotes you can expose these files and remotes via nfs.

License: Other

Dockerfile 100.00%
nfs rclone serve server cloud dropbox mount gdrive s3

rclone-nfs-server's Introduction

Rclone-NFS-Server

This docker image provides you with a small nfs-server that exposes your rclone remote. You can then access all your rclones remote files via NFS.

Quickstart

Be aware that nfs-server needs some special privileges to be able to start and also rclone needs privileges to be able to mount within a container. So you must run the container in privileged mode or provide the correct system capabilites. So be aware to run this container in a secure environment since it has more privileges than normal.

The host needs to have nfs and nfsd kernel modules loaded. You can do this by installing nfs-common package and optionally modprobing nfs and nfsd if not done automatically.

On debian based linux distributions this would work like this:

sudo apt-get install nfs-common

If you just want to use NFSv4 which only needs tcp port 2049 you can run the following. Your rclone.conf file in the directory you mount into the docker container needs to contain a remote with the name remote. Only this remote will be mounted and exposed via NFS.

[remote] # the name here is important
type = crypt
remote = gdrive:storage/rclone-path
filename_encryption = standard
directory_name_encryption = true
... further settings
docker run -v /path/to/rclone/confdir:/rclone/config -p 0.0.0.0:2049:2049 --privileged registry.gitlab.com/encircle360-oss/rclone-nfs-server:latest

Afterwards just use the NFS client or tool you want to connect to the host you binded. In case of the example it's the host which runs docker (10.10.10.10).

mkdir -p /mnt/test
sudo mount -t nfs 10.10.10.10:/ /mnt/test

Customization

You can customize many settings in the underlying nfs-server. For example it's also possible to restrict the IP addresses that are allowed to connect via NFS exports or to disable or enable specific NFS versions. In the default the container will spawn both simultaniously, NFSv4 and NFSv3.

You can find all customization options here.

Contribute

Feel free to contribute to this open source project. Just fork, change and create a pull or merge request to this repository.

Ideas & Improvements

  • Make rclone mount configurable
  • Multiple rcloune mounts and nfs exports

Credits

This is open source software by encircle360. Use on your own risk and for personal use. If you need support or consultancy just contact us.

rclone-nfs-server's People

Contributors

patrickhuetter avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

ameeno derkodex

rclone-nfs-server's Issues

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.