HomeBranch API v1.8.1
Cloud storage usage reporting
What’s new
On HomeBranch Cloud, the API now reports per-account storage and book usage to the portal so admins can see quota usage.
Upgrade notes
No action is needed for self-hosted installs.
Release notes
Release notes for HomeBranch, HomeBranch Web, and the Authentication service.
Cloud storage usage reporting
On HomeBranch Cloud, the API now reports per-account storage and book usage to the portal so admins can see quota usage.
No action is needed for self-hosted installs.
Sign-up now signs the user in
Audiobooks, Send to Kindle, cover search and cloud plan limits
STORAGE_QUOTA_BYTES setting has been removed.SETTINGS_ENCRYPTION_KEY, falling back to JWT_ACCESS_SECRET. Keep the key stable, or re-enter the password if it changes. Existing plaintext passwords keep working until they are re-saved.STORAGE_QUOTA_BYTES. Limits now come from the portal’s plans.Audiobook player, Send to Kindle and cover picker
Requires HomeBranch API v1.8.0 or later. No other action is needed.
Native app OIDC sign-in with PKCE
CORS_ORIGIN accepts a comma-separated list
CORS_ORIGIN can now be a comma-separated list of origins. Previously a list was sent verbatim and browsers rejected it, which broke sign-in from multiple origins.
Cloud mode for the hosted HomeBranch Cloud service
This release adds an opt-in cloud mode that powers HomeBranch Cloud. Self-hosted installs are unaffected and stay free and open source. Cloud mode is off unless you enable it.
No action is needed for self-hosted installs.
Formatting and release preparation for cloud mode
A small maintenance release that tidies the R2 host configuration code and prepares the cloud mode build. There are no behavior changes for self-hosted installs.
OPDS now respects subscription status on HomeBranch Cloud
In cloud mode, OPDS logins now enforce the same subscription rules as the web app. Suspended, banned or unsubscribed accounts receive a 403 response, past-due accounts can still browse and download, and administrators are exempt.
Self-hosted installs are unaffected.
Dark mode toggle, drag-and-drop upload, reader improvements and cloud support
Deploy together with HomeBranch API v1.7.x.
Sign out suspended or unsubscribed HomeBranch Cloud accounts
On HomeBranch Cloud, accounts that are suspended, banned or unsubscribed are now signed out and returned to the login page with an explanatory message. Self-hosted installs are unaffected.
Cloudflare R2 storage support, a repaired OPDS catalog behind reverse proxies, and removal of scan queue polling
Books, cover images, and other files can now be stored in Cloudflare R2 in addition to local disk. The new settings are documented in .env.example and the Debian packaging environment file.
The OPDS catalog works correctly behind reverse proxies again:
X-Forwarded-Proto, X-Forwarded-Host, and X-Forwarded-Prefix.Scan queue polling was redundant with directory watching and upload events, and it could add unnecessary costs when using R2 storage. It has been removed.
.env.example to your environment. Local storage keeps working without changes.X-Forwarded-Proto, X-Forwarded-Host, and X-Forwarded-Prefix (when using a subpath).Full changelog: v1.5.0…v1.6.0
LDAP sign-in, provider-aware users, and Debian migration startup fixes
Authentication now supports LDAP sign-in alongside local email/password login and OIDC. Admins can configure LDAP from Settings → Single Sign-On by providing the server URL, bind DN, bind password, and base DN, plus optional user/admin group mapping and custom attribute fields.
User records now track which authentication provider created them. This lets the HomeBranch admin UI show whether an account is local, OIDC-backed, or LDAP-backed, and keeps future account-management flows provider-aware.
Direct JSON API responses, repaired EPUB TOC parsing, and backend alignment for the next web release
Successful REST endpoints now return their resource or pagination payloads directly instead of wrapping them in { success, value }. This aligns the API with the current web client contract and removes the extra response-unwrapping layer in homebranch-web.
The publication manifest generator now parses nested EPUB3 navigation documents and EPUB2 NCX tables of contents correctly. TOC children are preserved again, and older EPUBs that still rely on NCX navigation can populate the reader drawer instead of showing an incomplete or empty hierarchy.
The backend has been reorganized around the current NestJS module boundaries, and the library sync test suite now uses portable paths so the release behaves consistently across local and packaged environments. This release also adds focused TOC regression coverage so nested EPUB3 and EPUB2 navigation parsing stay protected.
Custom clients that deserialize the old { success, value } envelope must be updated to read the response body directly. Error handling still follows normal HTTP status codes.
Library display preferences, LDAP settings, and reader/PWA fixes
The library, favorites, currently reading, and shelf views now share the newer display-mode controls. Readers can switch between the available layouts more consistently, and those preferences carry across the library-related routes.
The admin settings UI now exposes LDAP configuration fields, and user management surfaces provider information so LDAP-backed accounts are easier to identify after sign-in.
This release also rolls up the recent reader and shell fixes, including:
/etc/nginx/conf.d/homebranch.conf, so review that file during upgrades if you maintain custom proxy settings.Multi-format books, PDF support, and legacy format backfill
Books can now carry more than one file format at a time. Matching uploads can be linked under a single logical book, with each format retaining its own filename, hash, and extracted metadata.
The API now accepts both EPUB and PDF uploads. Format-aware download and reading endpoints can resolve the correct file for a given book, while the uploads and book records stay grouped under the same title.
This release backfills missing primary format rows for books uploaded before the multi-format model was introduced. Older libraries upgrade cleanly and previously uploaded books continue opening after the release.
No manual migration steps are required. Database migrations still run automatically on startup, and this release includes the legacy book backfill needed for older libraries. Deploy HomeBranch Web v1.5.0 alongside this API release for the matching format-aware UI.
EPUB table-of-contents navigation repair
This patch fixes EPUB table-of-contents navigation by normalizing relative TOC paths and preserving fragment identifiers when the API generates publication manifests. TOC entries now resolve to the same reading-order resources the reader expects, so chapter links open correctly again.
The release also adds focused manifest coverage for relative TOC entries to prevent the same EPUB navigation regression from slipping back in.
No manual migration steps are required. Deploy HomeBranch Web v1.5.1 alongside this API patch so the EPUB reader click handling and manifest generation stay aligned.
Multi-format reading, PDF support, and format management
Books can now expose more than one readable format in the UI. The book details page lets readers switch between available formats, and the read flow supports EPUB and PDF from the same logical book.
Book detail actions now include linked-format management so admins can review attached files, unlink a format, or split a format back into its own book when cleanup is needed.
The web app now includes the format-aware flows required for the current API release, including PDF upload support, richer book actions, and updated book detail behavior around attached files.
No breaking changes. Pull the latest Docker image or rebuild from source. Multi-format support requires HomeBranch API v1.4.0 — deploy both services together so the reader, upload flow, and book detail page stay in sync with the API’s format model.
Debian package upgrades preserve /etc/nginx/conf.d/homebranch.conf, so review that file when you upgrade the web frontend. The /api/ proxy should forward X-Forwarded-Proto and X-Forwarded-Prefix /api, and the SSE endpoints should keep buffering disabled. For larger PDF uploads, set client_max_body_size 200m. The Getting Started guide includes an example homebranch.conf you can copy or download.
EPUB table-of-contents navigation repair
This patch repairs the EPUB reader’s table-of-contents drawer so TOC button clicks navigate with the original publication links instead of synthetic placeholder identifiers. Reader chapter navigation now reaches the intended section again.
No breaking changes. Pull the latest Docker image or rebuild from source. Deploy HomeBranch API v1.4.1 alongside this web patch so EPUB TOC navigation uses the matching frontend click handling and manifest URLs.
Book deduplication, EPUB file naming convention, and file drop detection
Admins can now scan the library for duplicate EPUB files and resolve each pair directly from the API. A background scan job inspects the library and records duplicate candidates. Each duplicate can then be resolved with one of three actions:
New endpoints (admin only):
| Method | Path | Description |
|---|---|---|
GET | /api/books/duplicates | List unresolved duplicates (paginated) |
POST | /api/books/duplicates/scan | Enqueue a duplicate scan job (returns 202) |
POST | /api/books/duplicates/:id/resolve | Resolve a duplicate pair |
EPUB files previously stored under auto-generated UUID filenames are now renamed to Author - Title.epub when the library scanner runs. Newly uploaded files are also stored under this convention going forward.
The library scanner now detects EPUB files dropped directly into the uploads directory without going through the upload API. Dropped files are processed through the same metadata extraction and enrichment pipeline as uploaded books, and are subject to the same three-way bidirectional metadata sync.
Redis is required for background job processing (BullMQ). Add a Redis service to your deployment and set the following environment variables on the HomeBranch API:
| Variable | Default | Description |
|---|---|---|
REDIS_HOST | localhost | Redis hostname |
REDIS_PORT | 6379 | Redis port |
REDIS_PASSWORD | (none) | Redis password (optional) |
See the Configuration reference and Getting Started guide for an updated Docker Compose example.
No breaking changes to the REST API. Database migrations run automatically on startup. Update your deployment to include a Redis service before upgrading — the API will fail to start if Redis is unreachable.
Book deduplication UI and live job streaming
The Library Management page now includes a deduplication section. Admins can trigger a duplicate scan and review the results — each duplicate pair is listed with both book titles and their metadata. Selecting a resolution action (merge, replace, or keep both) submits the decision immediately.
Requires HomeBranch API v1.3.0 or later.
The job history panel now streams progress in real time via Server-Sent Events. Running jobs update their status and progress without requiring a manual refresh. The nginx configuration has been updated to correctly proxy the SSE endpoints (/api/jobs/stream and /api/library/events) without buffering.
No breaking changes. Pull the latest Docker image or rebuild from source. Book deduplication requires HomeBranch API v1.3.0 — deploy both services together.
PostgreSQL session store, OpenID Connect SSO, and Passport strategy refactor
Sessions are now persisted in PostgreSQL using connect-pg-simple. A background job automatically purges stale sessions, preventing unbounded table growth over time.
Breaking change:
SESSION_SECRETis now a required environment variable. The service will refuse to start without it. Generate a value withopenssl rand -base64 48and add it to your deployment before upgrading.
Single sign-on via OpenID Connect is now fully supported. Once configured, a provider sign-in button appears on the login screen alongside the existing email/password form. OIDC configuration is managed through the admin config API — no service restart is required after changing settings.
New endpoints:
| Method | Path | Auth | Description |
|---|---|---|---|
GET | /oidc/enabled | Public | Returns whether OIDC is configured |
GET | /login/oidc | Public | Initiates the OIDC authorization flow (redirects to provider) |
GET | /login/oidc/callback | Public | Handles the provider redirect callback and issues tokens |
GET | /config | Admin | Retrieve the full authentication configuration including OIDC settings |
GET | /config/public | Public | Retrieve sanitized config (oidcEnabled, oidcProviderName, signupEnabled) |
PATCH | /config | Admin | Update authentication configuration including OIDC credentials |
SESSION_SECRET is now required. The service will not start without it.
openssl rand -base64 48SESSION_SECRET to your environment (add APP_URL for OIDC redirect URL generation)session table is created automatically on first startupdocker-compose.ymlFavorites attribution fix
Fixed a bug where a user favoriting a book uploaded by another user would incorrectly associate the favorite with the uploader’s account rather than the user who performed the action.
No breaking changes. Database migrations run automatically on startup — no manual steps required.
OIDC single sign-on, OIDC admin configuration UI, and mobile fixes
Users can now sign in via an OpenID Connect provider when OIDC is configured in the Authentication service. The login page automatically displays a provider sign-in button when OIDC is enabled — no page changes are required after configuration.
Admins can configure the OIDC provider — issuer URL, client ID, client secret, callback URL, and provider display name — directly from the admin settings page without restarting any services.
Requires Authentication v1.2.0 or later.
No breaking changes. Pull the latest Docker image or rebuild from source. OIDC login requires Authentication v1.2.0 — deploy both services together.