book-translator-hub

book-translator-hub

Docker app from felixapel's Repository

Overview

Bilingual paragraph-level LLM translation overlay for stock Calibre-Web Automated (CWA). Read CWA through this container's proxy port and translate EPUB chapters in place with a local OpenAI-compatible LLM (vLLM, Ollama, LM Studio). Uses your existing CWA login (native session validation); the translation API is never published.

Certified profile: Unraid 7.3.2 x86_64, CWA 4.x, local LLM. Before the first start, create the appdata folder for the non-root container user: [code]mkdir -p /mnt/user/appdata/book-translator-hub/data && chown 101:102 /mnt/user/appdata/book-translator-hub/data && chmod 0700 /mnt/user/appdata/book-translator-hub/data[/code] Put this container on the same custom Docker network as CWA to use the CWA container name, or use CWA's host IP and port. Keep CWA's "Allow Reverse Proxy Authentication" off.

Community Applications on Unraid

Community Applications is the simplest supported profile when a searchable CWA or Kavita listing exists. It runs one combined non-root container (BT_ROLE=all) that proxies stock Calibre-Web Automated, Kavita, or both, while publishing the direct translation and SSE streaming API port (8390) alongside the reader proxy (8385).

If the listing is absent, its template does not pin an immutable digest, or the host is outside the certified scope, use the source-built btctl profile. Do not install from an unreviewed XML URL or a mutable latest image.

Certified boundary

  • Stock Unraid 7.3.2 on x86_64 (linux/amd64).
  • Stock CWA 4.0.6 or 4.0.8 reachable on an explicitly selected Docker network (4.0.8 browser-accepted in October 2026).
  • Native CWA sessions with default TRUSTED_PROXY_COUNT=1.
  • Local OpenAI-compatible /v1/chat/completions provider.
  • One combined BT_ROLE=all container running as 101:102 with private mode 0700 appdata.
  • Host port 8385 maps to proxy port 8080; API port 8390 is not published.
  • An image reference pinned by immutable sha256 digest.

Other versions or topologies may work but are not release-certified. Authentik forwarded identity, v2.1.4 migration and independent API/proxy roles use btctl.

Before installation

Record the exact CWA container name, Docker network, public reader origin and LLM endpoint. Create a private appdata directory and do not reuse a live legacy database directory. A local LLM normally requires no API key.

Verify the listing's image field includes @sha256:<digest> and its support and project links point to this repository. A tag alone is not sufficient.

Install and configure

Open the searchable listing, review every field and set:

  • the CWA container/upstream and shared network;
  • the public reader origin and host proxy port;
  • the local model and absolute provider URL;
  • the private appdata path;
  • native CWA-session authentication.

Leave the API port unpublished, keep disabled authentication off and never put a CWA session, provider key or book text in the template fields or support screenshots.

The profile derives BT_AUTH_MODE=cwa_session and validates the native session through CWA's /ajax/emailstat contract. Keep CWA's Allow Reverse Proxy Authentication setting off for this profile; header-based identity belongs to the separate Authentik topology.

After Apply, read CWA through the translator proxy port or route the existing reader domain to it. Keep OPDS and Kobo routes pointed directly at CWA.

Acceptance

On the exact installed digest:

  1. Confirm the container is healthy and runs as uid 101, gid 102 with no extra capabilities.
  2. Confirm only proxy port 8080 is mapped and host port 8390 is absent.
  3. Sign in through the public reader origin, open a DRM-free EPUB and translate a paragraph with different source and target languages.
  4. Change page, reload and verify the toolbar and translation still work.
  5. Confirm browser storage and network requests expose no provider key or translator token.
  6. Confirm direct CWA, OPDS and Kobo behavior remains unchanged.

The release runbook requires this physical acceptance before a new template is announced or submitted. See the compatibility matrix and troubleshooting guide.

Requirements

Stock Calibre-Web Automated 4.x and a local OpenAI-compatible LLM endpoint. Create the appdata folder owned by 101:102 with mode 0700 before the first start (see Overview).

Related apps

Details

Repository
ghcr.io/felixapel/cwa-ebook-translate-plugin:2.4.2@sha256:03bccc8524af49529281d61688f801423695622968b785090a022ab5d4b0b46c
Last Updated2026-10-20
First Seen2026-10-06

Runtime arguments

Web UI
http://[IP]:[PORT:8080]/
Network
bridge
Shell
sh
Privileged
false
Extra Params
--user 101:102 --read-only --tmpfs /tmp:rw,noexec,nosuid,size=64m,uid=101,gid=102,mode=700 --cap-drop ALL --security-opt no-new-privileges:true --restart unless-stopped

Template configuration

AppdataPathrw

Private translation cache. Must exist before the first start, owned by 101:102 with mode 0700 (see Overview). Never point it at an old v2.1.x data folder.

Target
/app/data
Default
/mnt/user/appdata/book-translator-hub/data
Value
/mnt/user/appdata/book-translator-hub/data
Reader Proxy PortPorttcp

Open CWA through this port (or route your reader domain to it) to get the translation overlay. The API port 8390 stays internal.

Target
8080
Default
8385
Value
8385
CWA URLVariable

Base URL of your CWA container, e.g. http://calibre-web-automated:8083 (same custom network) or http://192.168.1.10:8083 (host IP).

Target
CWA_UPSTREAM
CWA Session Check URLVariable

The same CWA base URL followed by /ajax/emailstat, e.g. http://calibre-web-automated:8083/ajax/emailstat. Used to validate the reader's existing CWA login.

Target
BT_CWA_AUTH_URL
Public Reader OriginVariable

Exact origin readers use in the browser, without a path, e.g. http://192.168.1.10:8385 or https://books.example.com.

Target
BT_PUBLIC_ORIGIN
LLM ModelVariable

Model name served by your local endpoint, exactly as listed by its /v1/models.

Target
LLM_MODEL
Local LLM URLVariable

Absolute OpenAI-compatible chat completions URL, e.g. http://192.168.1.10:8000/v1/chat/completions. Use the host IP or a container name, not localhost.

Target
BT_LOCAL_URL
LLM ProviderVariable

Certified profile: local.

Target
LLM_PROVIDER
Default
local
Value
local
Runtime RoleVariable

Combined API and reader proxy. Do not change.

Target
BT_ROLE
Default
all
Value
all
Auth ModeVariable

Validates the reader's native CWA session. Do not change.

Target
BT_AUTH_MODE
Default
cwa_session
Value
cwa_session
Browser Auth ModeVariable

Do not change.

Target
BT_BROWSER_AUTH_MODE
Default
cwa_session
Value
cwa_session
Browser CredentialsVariable

Do not change.

Target
BT_BROWSER_CREDENTIALS
Default
same-origin
Value
same-origin
TimezoneVariable

Container timezone.

Target
TZ
Default
Etc/UTC
Value
Etc/UTC