{"id":15177088,"url":"https://github.com/legobas/mqtt4rclone","last_synced_at":"2026-02-26T23:33:13.021Z","repository":{"id":236511747,"uuid":"792754633","full_name":"Legobas/mqtt4rclone","owner":"Legobas","description":"Control Rclone with MQTT commands","archived":false,"fork":false,"pushed_at":"2025-07-12T18:15:19.000Z","size":30,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-12T20:32:34.298Z","etag":null,"topics":["backup","home-automation","iot","mqtt","mqtt-smarthome","rclone","smarthome","synchronization"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/r/legobas/mqtt4rclone","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Legobas.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-04-27T13:38:18.000Z","updated_at":"2025-07-12T18:15:15.000Z","dependencies_parsed_at":"2024-05-20T12:47:54.252Z","dependency_job_id":"54327c18-c220-4066-93b4-0a7308ea11c0","html_url":"https://github.com/Legobas/mqtt4rclone","commit_stats":{"total_commits":28,"total_committers":1,"mean_commits":28.0,"dds":0.0,"last_synced_commit":"120fe09220cdcd5fd7f810afe1bbc9844071ef1b"},"previous_names":["legobas/mqtt4rclone"],"tags_count":29,"template":false,"template_full_name":null,"purl":"pkg:github/Legobas/mqtt4rclone","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Legobas%2Fmqtt4rclone","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Legobas%2Fmqtt4rclone/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Legobas%2Fmqtt4rclone/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Legobas%2Fmqtt4rclone/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Legobas","download_url":"https://codeload.github.com/Legobas/mqtt4rclone/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Legobas%2Fmqtt4rclone/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29876981,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-26T22:37:10.609Z","status":"ssl_error","status_checked_at":"2026-02-26T22:37:09.019Z","response_time":89,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["backup","home-automation","iot","mqtt","mqtt-smarthome","rclone","smarthome","synchronization"],"created_at":"2024-09-27T14:01:50.340Z","updated_at":"2026-02-26T23:33:12.975Z","avatar_url":"https://github.com/Legobas.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MQTT4Rclone\n\nControl Rclone with MQTT messages\n\n[![mqtt-smarthome](https://img.shields.io/badge/mqtt-smarthome-blue.svg?style=flat-square)](https://github.com/mqtt-smarthome/mqtt-smarthome)\n[![Build/Test](https://github.com/Legobas/mqtt4rclone/actions/workflows/release.yml/badge.svg)](https://github.com/Legobas/mqtt4rclone/actions/workflows/release.yml)\n[![CodeQL](https://github.com/Legobas/mqtt4rclone/actions/workflows/codeql.yml/badge.svg)](https://github.com/Legobas/mqtt4rclone/actions/workflows/codeql.yml)\n[![Go Report Card](https://goreportcard.com/badge/github.com/Legobas/mqtt4rclone)](https://goreportcard.com/report/github.com/legobas/mqtt4rclone)\n[![Docker Pulls](https://badgen.net/docker/pulls/legobas/mqtt4rclone?icon=docker\u0026label=pulls)](https://hub.docker.com/r/legobas/mqtt4rclone)\n[![Docker Image Size](https://badgen.net/docker/size/legobas/mqtt4rclone?icon=docker\u0026label=image%20size)](https://hub.docker.com/r/legobas/mqtt4rclone)\n\nMQTT4Rclone is a service that enables [Rclone](https://rclone.org) to be controlled and monitored using MQTT commands.\nIt makes it possible to use Rclone with MQTT-enabled devices or services to create automated workflows, such as triggering backups based on specific events or schedules.\nBecause it is based on the MQTT protocol can it be easily be integrated with home automation systems, like Home Assistant, Domoticz or Node-RED.\nAn use case is to upload the images or videos captured by a security camera to cloud-based storage services.\n\n### How it workes\n\nRClone is started in 'Remote Control' mode, so it can be controlled by its HTTP API.\nThe mqtt4rclone service will send the MQTT JSON message it receives to the Rclone API, using the MQTT topic to create the Rclone url.\nRclone will then perform the action like synchronizing with a cloud storage.\nActions which take a long time like sync or copy are handled as a job and return a HTTP response immediately.\nAfter the HTTP call is completed the response message is sent back to an MQTT topic.\nThis is safely done using only the local network environment of the container.\n\n## Installation\n\nMQTT4Rclone is available as a Docker [Docker container](#docker) on [DockerHub](https://hub.docker.com/r/legobas/mqtt4rclone)\n\nThe Docker image contains the Rclone excutable, so there is no need to run a seperate Rclone container.\n\n## Configuration\n\nMQTT4Rclone can be configured with the `mqtt4rclone.yml` yaml configuration file.\n\n### MQTT4Rclone Configuration options\n\n| Config item               | Description                              | Mandatory |\n| ------------------------- | ---------------------------------------- | --------- |\n| **mqtt**                  |                                          |           |\n| url                       | MQTT Server URL                          | Yes       |\n| username/password         | MQTT Server Credentials                  | No        |\n| qos                       | MQTT Server Quality Of Service           | No        |\n| **rclone**                |                                          |           |\n| response_topic            | MQTT Topic for Rclone response message   | No        |\n\nExample mqtt4rclone.yml:\n\n```yml\nmqtt:\n  url: \"tcp://\u003cMQTT SERVER\u003e:1883\"\n  username: \u003cMQTT USERNAME\u003e\n  password: \u003cMQTT PASSWORD\u003e\n  qos: 0\n\nrclone:\n  response_topic: \u003cMQTT Topic\u003e\n\n```      \n\n### Rclone configuration\n\nThe Rclone configuration file must be present in de same config directory.\nAlthough Rclone can be configured by MQTT, the preferred option is to create the config file with Rclone on a work computer and then copy it to the config directory.\n\n## Commands\n\nMQTT4Rclone send commands to Rclone based on the MQTT topic and message.\nThe topic is the same as the Rclone rc url path and the message is the JSON as described by: \n[Rclone Commands](https://rclone.org/rc/#supported-commands)\n\nAll the `sync/*` commands **will be started as jobs**, MQTT4Rclone will add `\"_async\":true` to the json message.\n\nThe local path in the docker container is `/data`.\nThis path has to be used in the commands sent to rclone (see examples).\n\n### Examples\n\n```\nOrder:\nMQTT topic\nMQTT message\n\nmqtt4rclone/core/stats\n\u003cempty message\u003e or {}\n\nmqtt4rclone/options/get\n\u003cempty message\u003e or {}\n\nmqtt4rclone/options/set\n{\"main\":{\"LogLevel\":\"DEBUG\"}}\n\nmqtt4rclone/config/listremotes\n{}\n\nmqtt4rclone/operations/fsinfo\n{\"fs\":\"dropbox:\"}\n\nmqtt4rclone/sync/sync\n{\"srcFs\":\"/data/mydropbox\",\"dstFs\":\"dropbox:\"}\n\nmqtt4rclone/sync/copy\n{\"srcFs\":\"/data/mydropbox\",\"dstFs\":\"dropbox:\",\"_filter\":{\"MaxAge\":\"1d\"}}\n\n```\n\n## Rclone Response\n\nThe default MQTT topic where the Rclone response is sent to is: `mqtt4rclone/response`.\nThis topic can be changed by the setting configuration option `response_topic`,\nso any MQTT client can receive the Rclone response and process it.\n\n## Autosync\n\nTo automatically sync every day/hour/minute you can use [MQTT-Timer](https://github.com/Legobas/mqtt-timer) with a configuration like this:\n\n```yml\n    timers:\n    - id: rclone_dropbox\n      time: 01:00:00\n      description: RClone Sync Local to Dropbox every day at 1.00\n      topic: mqtt4rclone/sync/sync\n      message: '{\"srcFs\":\"/data/mydropbox\",\"dstFs\":\"dropbox:\"}'\n    - id: rclone_mega\n      cron: 00 * * * *\n      description: RClone Mega to Local every hour\n      topic: mqtt4rclone/sync/copy\n      message: '{\"srcFs\":\"mega:\",\"dstFs\":\"/data/mymega\"}'\n```\n\n## Docker\n\nDocker run example:\n\n```bash\n$ docker run -d -v /home/legobas/mqtt4rclone:/config -v /home/legobas/rclone_data:/data legobas/mqtt4rclone\n```\n\nDocker compose example:\n\n```yml\nservices:\n  MQTT4Rclone:\n    image: legobas/mqtt4rclone:latest\n    container_name: mqtt4rclone\n    environment:\n      - PUID=1000              # User id for access to config or data directories with user rights\n      - PGID=1000              # User group id\n      - LOGLEVEL=debug         # MQTT4Rclone log level: ERROR/INFO (default)/DEBUG/TRACE\n      - RCLONE_LOGLEVEL=INFO   # Rclone log level: ERROR/NOTICE (default)/INFO/DEBUG\n      - TZ=America/New_York    # Timezone\n    volumes:\n      - /home/legobas/mqtt4rclone:/config\n      - /cloud_data:/data\n    restart: unless-stopped\n```\n\nThe environment variables are not necessary, if omitted the default values will be used.\n\n## Logging\n\nRclone log levels: [DEBUG|INFO|NOTICE|ERROR (default NOTICE)](https://rclone.org/flags/#logging).\nTo temporarily set the rclone logging to debug, send the command:\n\n```\nmqtt4rclone/options/set\n{\"main\":{\"LogLevel\":\"DEBUG\"}}\n```\n\nafter debugging set it back by restarting the service or by sending:\n\n```\nmqtt4rclone/options/set\n{\"main\":{\"LogLevel\":\"NOTICE\"}}\n```\n\nThe logs of mqtt4rclone and rclone are written to stdout, this is the standard docker log.\n\nTo view the logging:\n`docker compose logs` or `docker logs mqtt4rclone`\n\n\n## Credits\n\n* [Rclone](https://rclone.org)\n* [Paho Mqtt Client](https://github.com/eclipse/paho.mqtt.golang)\n* [ZeroLog](https://github.com/rs/zerolog)\n* [MultiRun](https://nicolas-van.github.io/multirun)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flegobas%2Fmqtt4rclone","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flegobas%2Fmqtt4rclone","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flegobas%2Fmqtt4rclone/lists"}