Start the rclone rc API in bootstrap and show its version in About #92

Merged
miro merged 5 commits from claude/rclone-rc-in-bootstrap into main 2026-10-12 19:58:22 +00:00
Owner

Summary

  • docker/bootstrap.mjs now starts rclone's remote control (rc) API on 127.0.0.1:5572 next to the WebDAV server. The password is 32 random bytes, new on every container start.
  • The password is handed over only through the environment of the two child processes (RCLONE_RC_* for rclone, RCLONE_RC_URL/USER/PASS for the app). It never appears in a command line, file or log, and the rc server is loopback only.
  • rclone's environment is now filtered to RCLONE_*, PATH, HOME, TMPDIR and TZ, so it no longer inherits the app's OIDC and session secrets.
  • Settings → About shows the embedded rclone's version, fetched with @filehub/rclone (core/version). The root loader starts the request without awaiting it and passes the promise down; About reads it with React.use() inside a Suspense boundary, so pages don't wait on rclone. It shows "Unavailable" if rclone can't be reached. The server function returns null for signed-out visitors.
  • @filehub/rclone is added as an app dependency, and to the Dockerfile's deps and build stages.

Notes

  • RCLONE_RC_* are optional in env.ts. Without --only they are set by bootstrap; in pnpm dev they are unset, so About shows "Unavailable" there (dev:webdav doesn't start rc).
  • The WebDAV login is unchanged (fixed admin:cat123, loopback only).
  • The password is readable by code running as the app user (process environment), which already holds the OIDC and session secrets.

Test plan

  • pnpm typecheck, biome, knip
  • rclone 1.69.0 started with the same environment: correct password 200, wrong or no password 401, password absent from the process arguments
  • Build the image, open Settings → About and confirm the rclone version shows
## Summary - `docker/bootstrap.mjs` now starts rclone's remote control (rc) API on `127.0.0.1:5572` next to the WebDAV server. The password is 32 random bytes, new on every container start. - The password is handed over only through the environment of the two child processes (`RCLONE_RC_*` for rclone, `RCLONE_RC_URL/USER/PASS` for the app). It never appears in a command line, file or log, and the rc server is loopback only. - rclone's environment is now filtered to `RCLONE_*`, `PATH`, `HOME`, `TMPDIR` and `TZ`, so it no longer inherits the app's OIDC and session secrets. - Settings → About shows the embedded rclone's version, fetched with `@filehub/rclone` (`core/version`). The root loader starts the request without awaiting it and passes the promise down; About reads it with `React.use()` inside a `Suspense` boundary, so pages don't wait on rclone. It shows "Unavailable" if rclone can't be reached. The server function returns `null` for signed-out visitors. - `@filehub/rclone` is added as an app dependency, and to the Dockerfile's deps and build stages. ## Notes - `RCLONE_RC_*` are optional in `env.ts`. Without `--only` they are set by bootstrap; in `pnpm dev` they are unset, so About shows "Unavailable" there (`dev:webdav` doesn't start rc). - The WebDAV login is unchanged (fixed `admin:cat123`, loopback only). - The password is readable by code running as the app user (process environment), which already holds the OIDC and session secrets. ## Test plan - [x] `pnpm typecheck`, `biome`, `knip` - [x] rclone 1.69.0 started with the same environment: correct password 200, wrong or no password 401, password absent from the process arguments - [ ] Build the image, open Settings → About and confirm the rclone version shows
Start the rclone rc API in bootstrap and show its version in About
All checks were successful
CI / lint (pull_request) Successful in 25s
CI / typecheck (pull_request) Successful in 43s
CI / test (pull_request) Successful in 44s
CI / knip (pull_request) Successful in 45s
CI / format (pull_request) Successful in 25s
CI / build (pull_request) Successful in 42s
CI / docker (arm64, docker-arm64) (pull_request) Successful in 42s
CI / docker (amd64, docker-amd64) (pull_request) Successful in 43s
CI / manifest (pull_request) Has been skipped
CI / deploy-test (pull_request) Has been skipped
E2E / playwright (pull_request) Successful in 2m16s
df76791478
Simplify the rclone version server function
All checks were successful
CI / typecheck (pull_request) Successful in 28s
CI / lint (pull_request) Successful in 30s
CI / format (pull_request) Successful in 45s
CI / test (pull_request) Successful in 46s
CI / knip (pull_request) Successful in 47s
CI / docker (amd64, docker-amd64) (pull_request) Successful in 20s
CI / docker (arm64, docker-arm64) (pull_request) Successful in 18s
CI / build (pull_request) Successful in 36s
CI / manifest (pull_request) Has been skipped
CI / deploy-test (pull_request) Has been skipped
E2E / playwright (pull_request) Successful in 1m42s
2320d61699
miro merged commit fa731a96ad into main 2026-10-12 19:58:22 +00:00
miro deleted branch claude/rclone-rc-in-bootstrap 2026-10-12 19:58:22 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
miro/files!92
No description provided.