Code Monkey home page Code Monkey logo

rclone-samba-server's Introduction

Rclone-Samba-Server

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

Quickstart

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 SMB/CIFS.

git clone https://github.com/CevreMuhendisi/rclone-samba-server rsc/ && cd rsc
docker build . -t rclonesambaserver

docker run -dit --name=rclonesambaserver --privileged --cap-add SYS_ADMIN --device /dev/fuse --restart always -v /root:/rclone/config -e SHARE="remote;/mnt/remote" -p 0.0.0.0:139:139 -p 0.0.0.0:445:445 rclonesambaserver:latest
[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 -e SHARE="remote;/mnt/remote" -p 0.0.0.0:139:139 -p 0.0.0.0:445:445 registry.gitlab.com/encircle360-oss/rclone-samba-server:latest

Afterwards just use the Samba 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 cifs //10.10.10.10/<share> /mnt/test

Complete Mac OS example (public share without credentials)

docker run -e NMBD=true -e SHARE="public;/mnt/remote" -p 139:139 -p 445:445 -p 137:137/udp -p 138:138/udp --cap-add SYS_ADMIN --device /dev/fuse -d --name samba  --restart always -v /path/to/rclone/confdir:/rclone/config registry.gitlab.com/encircle360-oss/rclone-samba-server:latest
sudo mkdir -p /Volumes/smbshare
sudo mount_smbfs -N //guest@localhost/public /Volumes/smbshare

Customization

You can customize many settings in the underlying samba-server. For example it's also possible to restrict access to shares to some created users.

You can find all customization options and environment variables here. Please be aware that mostly only the environment variables work with this image.

Ideas & Improvements

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

rclone-samba-server's People

Contributors

cevremuhendisi avatar

Stargazers

 avatar

Watchers

 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.