A unified Docker solution for running Rclone with Web GUI access, automated mounting, cron-based synchronization, and health monitoring. This project combines the best features of multiple Rclone Docker implementations into a single, easy-to-use container solution.
- 🌐 Web GUI for easy management
- 🔄 Automated remote mounting
- ⏰ Scheduled sync operations
- 🏥 Health check monitoring
- 📁 VFS caching support
- 🔒 Secure configuration
- 🕒 Timezone support
-
FUSE support on the host system:
sudo apt update && sudo apt install fuse3 -y # For Debian/Ubuntu
-
Create required directories:
mkdir -p config logs
-
Create your rclone.conf file in the config directory. You can either:
- Copy an existing configuration
- Create a new one using
rclone config
- Use the Web GUI (note: OAuth2 configuration might require CLI setup)
-
Configure mounts (optional): Edit
config/mounts.json
to define your remote mounts:
[
{
"fs": "OneDrive:",
"mountPoint": "/hostfs/onedrive/onedrive_0",
"mountOpt": {
"AllowOther": true
},
"vfsOpt": {
"CacheMode": "full"
}
}
]
- Create a
.env
file with your settings:
TZ=UTC
RCLONE_USER=admin
RCLONE_PASSWORD=your_secure_password
SYNC_SCHEDULE=0 * * * *
SYNC_ABORT_SCHEDULE=30 * * * *
SYNC_SRC=remote1:path
SYNC_DEST=remote2:path
HEALTH_CHECK_URL=https://hc-ping.com/your-uuid
INITIAL_SYNC=true
VFS_CACHE_MODE=full
VFS_CACHE_MAX_SIZE=100G
- Start the container:
docker compose up -d
TZ
: Timezone (default: UTC)RCLONE_USER
: WebUI username (default: admin)RCLONE_PASSWORD
: WebUI password (default: password)RCLONE_OPTS
: Additional rclone options
SYNC_SRC
: Source location for syncSYNC_DEST
: Destination location for syncSYNC_OPTS
: Additional sync options (default: -v)SYNC_SCHEDULE
: Cron schedule for sync (default: 0 ** **)SYNC_ABORT_SCHEDULE
: Cron schedule for aborting long-running syncsINITIAL_SYNC
: Perform sync on startup (default: false)HEALTH_CHECK_URL
: URL for health check pings
VFS_CACHE_MODE
: Cache mode (default: full)VFS_CACHE_MAX_SIZE
: Maximum cache size (default: 100G)
Access the Web GUI at http://localhost:5572
with your configured credentials.
Remote mounts are configured through config/mounts.json
. The mount points will be accessible under the specified paths in the container and on the host system through the shared volume mount.
The container supports integration with services like healthchecks.io. Set the HEALTH_CHECK_URL
to receive notifications after successful sync operations.
- OAuth2 configuration through the Web GUI may not work for some providers. Use the CLI for initial setup in these cases.
- Mounts added through the Web GUI won't persist after container restart - use mounts.json for permanent mount configurations.
/config
: Rclone configuration/logs
: Log files/var/cache/rclone
: VFS cache/hostfs
: Mount point for remote filesystems
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
This project combines and builds upon the work of:
rclone needs a configuration file where credentials to access different storage provider are kept.
By default, this image uses a file /config/rclone.conf
and a mounted volume may be used to keep that information persisted.
A first run of the container can help in the creation of the file, but feel free to manually create one.
mkdir config
docker run --rm -it -v $(pwd)/config:/config ghcr.io/robinostlund/docker-rclone-sync:latest
A few environment variables allow you to customize the behavior of the sync:
SYNC_SRC
source location forrclone sync
commandSYNC_DEST
destination location forrclone sync
commandCRON
crontab schedule0 0 * * *
to perform sync every midnightCRON_ABORT
crontab schedule0 6 * * *
to abort sync at 6amFORCE_SYNC
set variable to perform a sync upon bootCHECK_URL
healthchecks.io url or similar cron monitoring to perform aGET
after a successful syncSYNC_OPTS
additional options forrclone sync
command. Defaults to-v
TZ
set the timezone to use for the cron and logAmerica/Argentina/Buenos_Aires
docker run --rm -it -v $(pwd)/config:/config -v /path/to/source:/source -e SYNC_SRC="/source" -e SYNC_DEST="dest:path" -e TZ="America/Argentina/Buenos_Aires" -e CRON="0 0 * * *" -e CRON_ABORT="0 6 * * *" -e FORCE_SYNC=1 -e CHECK_URL=https://hchk.io/hchk_uuid ghcr.io/robinostlund/docker-rclone-sync:latest
See rclone sync docs for source/dest syntax and additional options.