Add the server-only READEST_TRUSTED_PRIVATE_HOSTS exact hostname allowlist
for self-hosted OPDS catalogs. Read it at request time, recheck redirects,
and preserve private-address and DNS checks for unlisted destinations.
Let self-hosted catalog forms submit LAN URLs and document Docker setup.
Verified: 113 focused and neighboring proxy tests passed; pnpm lint,
Biome formatting, pnpm build-web and Docker Compose configuration passed.
The same production build denied private hosts by default, then allowed
GET/HEAD with a runtime-only allowlist after restart. A fresh browser
added the LAN catalog and opened its publication feed.
Without the fix, the new OPDS proxy tests returned 400 instead of 200,
and the self-hosted catalog form never called validateOPDSURL.
Full-suite verification is unresolved: the default run had 4 timeouts
and a TTS timer teardown error; the 4-worker rerun had 6 timeouts and
4 worker startup failures. An unchanged-main comparison reproduced a
ControlPanelUpdateReset timeout. Related reliability tracking: #7217.
No Docker image build or reporter deployment verification was performed.
Reported by YorrickBao on GitHub.
Fixes#7105
Co-authored-by: Claude Code <noreply@anthropic.com>
minio/minio and minio/mc 404 on Docker Hub now (MinIO discontinued free
Docker Hub distribution, pushing toward their paid AIStor product) -
docker pull fails with "repository does not exist or may require 'docker
login'", which reads like an auth problem but isn't (confirmed: neither a
fresh Docker Hub login nor a specific pinned version tag helps, since the
repo itself is gone). quay.io/minio/minio and quay.io/minio/mc still work,
no login needed.
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
* fix(web): stop truncating request bodies over 10MB (#6091)
`middleware.ts` matches /api/*, so Next buffers a clone of every non-GET
request body. Past `experimental.proxyClientMaxBodySize` (10MB by default)
`getCloneableBody` pushes null into both the middleware's stream and the one
`finalize()` splices back over the IncomingMessage, so the route handler sees a
short body ending cleanly: no error, no 413, just a stored file of exactly
10,485,760 bytes. `/api/send/inbox/file` accepts 40MB, so an inbox EPUB over
10MB was already being stored corrupt.
The clone is buffered in memory before any handler can reject it, which makes
the ceiling an unauthenticated memory budget on every /api/* route. Only the
self-hosted image, which may proxy whole book files through the Node server,
gets real headroom; `standaloneOutput` is the gate because BUILD_STANDALONE is
set by the Dockerfile alone and web.readest.com runs on Cloudflare/Vercel.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* fix(settings): stop gating cloud sync as Premium when self-hosted (#6093)
Two causes of the same symptom on a self-hosted Docker deployment.
The badge keyed off sign-in, not entitlement:
!user || (userProfilePlan !== undefined && !isCloudSyncPremium)
`!user` short-circuits, so a signed-out self-hoster — the normal state right
after `docker compose up` — got a Premium chip on WebDAV, Google Drive, S3 and
OneDrive. The rows opened fine and sync was never paused, but the chip reads as
"not available in this deployment". `shouldShowCloudProviderBadge` decides on
entitlement instead: self-hosting unlocks with or without a signed-in user.
`SELF_HOSTED` also only reached the container through `compose.yaml`
(`${SELF_HOSTED:-true}`), which landed in #5996. A compose file copied before
that survives every `docker compose pull`, so those deployments came up gated
with nothing on screen to explain why. The image now defaults it on: it is the
self-hosted artifact, web.readest.com never runs it, and an operator selling
plans still overrides with SELF_HOSTED=false.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* docs(settings): clarify that the tier chip still gates signed-out visitors
The doc comment described what changed rather than what the predicate does, so
"entitlement is the deciding input, not sign-in state" read as if signed-out
users stopped being gated. They are not: a signed-out visitor to a hosted
deployment is not entitled, so the row is badged and stays behind
canToggleCloudProvider and the upgrade route, exactly as before. Only
entitlement — which self-hosting confers — removes the chip.
Assert the pairing in one test so a future refactor cannot decouple the badge
from the gate.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
* fix(docker): apply db migrations on first boot and let the font CDN be overridden (#5550)
A fresh self-hosted stack only ran volumes/db/init/schema.sql, so the
incremental files under volumes/db/migrations never reached the database.
Deployments came up without files.replica_id, the replicas table and the
claim_inbox_item RPC, which broke uploads, replica sync and Send to Readest.
Mount the migrations directory into the db container together with an
apply-migrations.sh hook named so it sorts after the supabase image's own
migrate.sh. It globs the mounted directory, so a new migration file needs no
compose change, and it records what it applied in readest_meta.migrations so
it can be re-run by hand after an upgrade.
The reader also loaded its CJK webfont bundles from storage.readest.com, which
only sends CORS headers for readest.com origins, so they were blocked on a
custom domain. Read the base URL from runtime config via FONT_BASE_URL and keep
the CDN as the default.
Let SUPABASE_PUBLIC_URL and S3_PUBLIC_ENDPOINT be set directly instead of only
being derived from HOST_IP, so the stack can be served from one HTTPS origin.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* docs(docker): add an example nginx config for a single HTTPS origin
Keeps the template out of the README as a copyable file next to .env.example.
Routes / to the client, /auth/v1 and /rest/v1 to kong, and the bucket prefix to
minio with the Host header preserved so presigned signatures still verify.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
* initial files
* added testing files
* removed unused files
* cleaned additional mounts
* fixed sql init
* removed more unused files
* moved to docker folder
* revert package.json
* gitignore update
* env example comments and compose necessary healthcheck
* ghcr package impl
* updated dockerfile steps for layer caching
* added development-stage to dockerfile to dev environment
* added documentation on how to use dockerfile and compose.yml
* fixed prettier issues
* fixed image tag
* removed workflow for later