Skip to content

TigreGotico/sshfs-keeper

Repository files navigation

Python 3.10+ License: Apache-2.0 Status: Beta

sshfs-keeper

A daemon that monitors SSHFS (and rclone) mounts, automatically remounts them when they drop, and exposes a live web dashboard, REST API, Prometheus metrics, and webhook notifications. It also schedules directory-sync jobs via rsync, lsyncd, or rclone.

Features

  • Auto-remount on disconnect with exponential backoff
  • Stale-mount detection (FUSE device present but inaccessible): force-unmounts before remounting
  • autofs-aware: skips mounts managed by autofs
  • Passphrase-protected SSH keys: pre-loads via ssh-add
  • Mount backends: sshfs or rclone (per-mount, hot-switchable via API)
  • Sync jobs: rsync / lsyncd / rclone on configurable intervals (with multi-target support)
  • One-shot file transfers: copy/move files between hosts using rsync, rclone, or SCP
  • Live web dashboard (HTMX + SSE, no page reload required)
  • REST API with optional X-API-Key authentication and optional TLS
  • Prometheus metrics at GET /metrics
  • Webhook notifications (Slack, Discord, ntfy.sh, any HTTP POST endpoint)
  • Atomic config saves: os.replace() + .bak — survives SIGKILL mid-write
  • SIGHUP config reload: adds/removes mounts without restarting
  • install-service: generates systemd user unit, launchd plist, or NSSM batch script

Install

uv tool install .

Requires sshfs and/or rclone to be installed separately.

Minimal config

~/.config/sshfs-keeper/config.toml:

[[mount]]
name   = "nas"
remote = "user@host:/path"
local  = "/mnt/nas"

Start

sshfs-keeper start            # daemon + web UI on http://0.0.0.0:8765
sshfs-keeper install-service  # write systemd/launchd/NSSM service file

Web UI

Web UI screenshot — open http://localhost:8765 after starting the daemon.

Docs

About

A daemon that monitors SSHFS (and rclone) mounts, automatically remounts them when they drop, and exposes a live web dashboard, REST API, Prometheus metrics, and webhook notifications. It also schedules directory-sync jobs via rsync, lsyncd, or rclone.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors