KOReader sync fails behind reverse proxy (works locally, fails via external URL) #874
Replies: 3 comments
|
You're sure that the If you set |
0 replies
|
no issues with either Progress sync or OPDS sync here, am using caddy rather than nginx though |
0 replies
|
With limited information to go off of, here I'm going to be closing this out. If the issue can be reproduced and more info provided we can re-open this or open another report. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
What are you trying to do?
KOReader sync works correctly when connecting directly to Grimmory on the local network, but fails when accessing through a reverse proxy (Nginx Proxy Manager) using a public domain.
What's happening instead?
Uknown server error in Koreader
Your setup
Environment
Grimmory (Docker)
MariaDB (Docker)
Reverse proxy: Nginx Proxy Manager
Access via domain: https://your-domain.example
Internal access: http://192.168.x.x:6060
Anything else that might help?
What works
Grimmory UI loads correctly via domain
KOReader sync works when configured with:
http://192.168.x.x:6060/api/koreader
Direct API access locally:
curl -u : http://192.168.x.x:6060/api/koreader
→ 401 Unauthorized (expected behavior for base endpoint)
What fails
KOReader sync using:
https://your-domain.example/api/koreader
→ KOReader reports: "Unknown server error"
External curl:
curl -v -u : https://your-domain.example/api/koreader
→ 401 Unauthorized
Observations
Reverse proxy is working (UI loads fine over HTTPS)
API endpoint is reachable externally (returns 401, not 502)
Authorization headers are being passed through Nginx
KOReader works internally but not externally
Suspected issue
Grimmory appears to advertise or internally use the local API path:
http://192.168.x.x:6060/api/koreader
This may not be reachable by external clients (e.g., KOReader on a different network), causing sync failures.
Additionally, there may be an issue with how the /api/koreader endpoint behaves behind a reverse proxy (possibly related to base URL handling or forwarded headers).
Question
Is there a way to:
Override the KOReader API path to use the public domain?
Ensure Grimmory respects BASE_URL for KOReader endpoints?
Properly support reverse proxy setups for KOReader sync?
Additional Info
BASE_URL is set to:
https://your-domain.example
Running behind reverse proxy with standard forwarded headers:
X-Forwarded-Proto, X-Forwarded-For, Host, etc.
Expected behavior
KOReader sync should work via the public domain when Grimmory is behind a reverse proxy.
Before submitting
All reactions