Hardened, rootless container for fclones that dedupes your folders on a schedule
10K+
docker-fclones-scheduler runs the fclones duplicate finder on a schedule, in a rootless container, and replaces the copies it finds with hardlinks or removes them. It has no web page and writes its results to its log.
docker-fclones-scheduler gets back the disk space that duplicate files take, with no cron job to write:
docker-fclones-scheduler is built for a media library or a file share on an always-on Linux machine with Docker, where the same file can land in several folders. It checks every setting before the first scan and, by default, refuses fclones options that run commands. You need a folder the container's user can write to, and hardlinks need the copies on one filesystem.
Two other projects suit a different setup:
docker-fclones-scheduler is free software under the Apache-2.0 license.
docker pull cplieger/docker-fclones-scheduler:latest
Also published to ghcr.io/cplieger/docker-fclones-scheduler with identical images and tags. Release versions are tagged vX.Y.Z alongside latest.
# Example compose for docker-fclones-scheduler. See docs/configuration.md and docs/hardening.md for all configuration options and hardening.
services:
fclones:
image: ghcr.io/cplieger/docker-fclones-scheduler:latest
container_name: fclones
restart: unless-stopped
# Run "sudo mkdir -p /opt/appdata/fclones && sudo chown 1000:1000 /opt/appdata/fclones"
# before the first start, or the container exits. If .env sets PUID and PGID, use those numbers.
user: "${PUID:-1000}:${PGID:-1000}"
environment:
SCAN_INTERVAL: "1h" # or 30m, 12h. "off" waits for an outside trigger and "0" scans once
FCLONES_SCAN_PATHS: "/scandir" # must match a volume target below
FCLONES_ARGS: "--rf-over 1" # report files that have more than one copy
FCLONES_ACTION: "link" # group only reports, link replaces copies with hardlinks, remove deletes them, dedupe uses reflinks
FCLONES_ACTION_ARGS: "--priority bottom" # keep the first copy fclones lists, replace the others
volumes:
- "/path/to/media:/scandir" # link, remove and dedupe change files here, so this user must be able to write to it
- "/opt/appdata/fclones:/cache" # the container exits at start if this user cannot write here
Apache-2.0. See LICENSE. The image carries the license text of every bundled component under /usr/share/licenses/.
The image packages fclones (MIT) at the version pinned by FCLONES_REF in the Dockerfile: amd64 downloads and unpacks the upstream release tarball https://github.com/pkolaczk/fclones/releases/download/<tag>/fclones-<version>-linux-musl-x86_64.tar.gz, arm64 builds that same tag from source at a pinned commit. The build applies no patches, so this repository's Dockerfile plus the upstream sources it names is the complete recipe for the fclones binary the image ships. The license texts of the Rust crates compiled into the amd64 binary are kept under licenses/crates/ in this repository, regenerated by scripts/vendor-crate-licenses.sh.
Content type
Image
Digest
sha256:89bea5408…
Size
5.1 MB
Last updated
about 24 hours ago
docker pull cplieger/docker-fclones-scheduler