mirror of
https://github.com/karakeep-app/karakeep.git
synced 2026-04-25 07:56:05 +03:00
[GH-ISSUE #1557] Extremely slow app behavior when accessing from internal LAN through reverse proxy #974
Closed
opened 2026-03-02 11:54:05 +03:00 by kerem
·
8 comments
No Branch/Tag specified
main
refactor/use-npm-singlefile
onetab
claude/issue-2596-20260321-1401
claude/fix-docs-button-responsive-V3aBQ
claude/review-import-backpressure-D4ArJ
claude/fix-archived-bookmarks-mobile-P9OJW
claude/issue-1189-20260211-1601
claude/fix-nested-smart-lists-3uFkt
claude/issue-2298-20251223-1704
feat/import-v3
claude/add-cli-search-subcommand-6kIe0
claude/add-bookmark-indexing-timestamps-96bPj
claude/auto-disable-failing-feeds-fkDhP
claude/add-tag-search-aliases-HzESD
feat/docker-compose-dev
claude/add-attachedby-tags-endpoint-01WYfemMGHJJjXsPYLvUJAno
claude/fix-crawler-memory-leaks-NE7Ct
bookmark-debugger
claude/issue-2352-20260106-1120
claude/issue-1977-20260102-2348
claude/add-banner-rendering-JeLUk
claude/add-descendant-qualifier-cUm26
claude/skip-metadata-refresh-archives-CAo4Y
claude/fix-archive-pending-banner-pAyGM
claude/add-embeddings-support-h2swV
claude/nested-manage-lists-QVV85
claude/privacy-type-system-MG1bT
claude/add-action-menu-icons-6hNKw
claude/issue-2299-20251223-1711
claude/bookmark-indexing-progress-QwZSI
claude/migrate-bookmark-attachments-3O2te
claude/add-2025-wrapped-feature-tIUIh
claude/improve-ai-settings-design-639tq
claude/add-youtube-metascraper-plugin-0lWC7
claude/add-problem-reporting-gSSEV
claude/add-mobile-list-menus-spcS7
claude/shadcn-bookmark-cards-WWHzP
claude/add-extensions-link-HTeXc
claude/add-onboarding-screens-hsYMO
claude/fix-settings-switch-overflow-nlzM4
claude/clamp-bookmark-titles-diAEz
claude/port-stats-mobile-expo-MuXAn
claude/whats-new-base-version-vrv8C
claude/fix-settings-auth-checks-jgyD8
claude/add-server-version-display-3sGa2
claude/fix-tag-editor-scrolling-rzdbG
claude/add-company-pricing-card-y5mHY
claude/audit-optimize-transactions-xpDVc
codex/ensure-consistent-ui-experience-across-app-pages
claude/plan-opentelemetry-integration-01Jx183mz1Ev8h8JoYj97Auw
libsql
db-indicies
claude/export-import-lists-01UuCWwdaqduAd35NppvjnMD
claude/configurable-worker-timeout-0198GQh6YrrRzqG62xnogyrz
claude/check-import-quota-01CPdxTpHp18Ba62bYcBTVbA
claude/scraper-worker-thread-01FEHen6MGrQHmdBstJSuiyA
claude/customize-dialog-styling-01CVjEv2KgyZJSpCg3mqkvR7
claude/add-asset-cache-headers-0175WhNcqwiwurrmjj52jnLT
claude/add-db-search-plugin-017Xxd4Jq3MfjWT788vgfbaq
benchmarks-2
claude/add-filtered-deletion-01DTxWNcg3hhqdNpeNLa3s6L
claude/actionbutton-loading-spinner-015DY5ZTvgPgFAXTZz3UGaYv
claude/add-broken-links-qualifier-01S31X1LsKiYb9gE1dXTKvi3
claude/docker-release-tag-trigger-01UmzFXEumhK2jdmRGtMcueo
claude/spread-feed-fetch-scheduling-01EihUtmZSyqeE1HfRMessxW
restate-idempotency
claude/align-android-ios-colors-01GJfkhEyZVBReohVioPa8ok
claude/improve-mobile-app-colors-0155LzHfkd5HyJr6YyZMsus5
codex/add-autocomplete-for-search-query-language
claude/add-bookmark-backups-016L2A8Z94n7tDgDdMPdFuAd
claude/restrict-binary-user-permissions-01FSGyy2RXGZvE26YbAejzGi
effect-ts
claude/prepare-trpc-npm-publish-0193EjfwpxSNVNcLXqXjs6Ln
shared-list-sidebar
claude/lazy-load-tiktoken-017UTNpJPTcMMQvNEBa1aFwo
codex/fix-asset-pre-processing-worker-abort-signals
add-groupid
claude/add-bookmark-list-button-01VF7uXYNLsVDzqdozWMXP5M
claude/extract-shared-ui-components-01DSVfaCr6WRqAyx1vJTZk9r
claude/migrate-shadcn-sidebar-01DKjpg9MD5PJ2potemSnbvW
claude/add-collaborators-rate-limits-01VjXyRWWPUkGQKa8d8D8qKj
claude/modernize-dark-mode-01FRfE81PAY5C44pFu1cYocf
claude/add-signed-url-bookmark-01PjYT1ZhvLK2FPJNTAhJsWf
restate-group-id
claude/add-highlights-page-012vhHpn8fVNp3gf7gBeW14s
claude/disable-shared-bookmark-features-01B9fiGUdu6NyWaxSQFsQBxP
claude/mobile-bookmark-grid-layouts-018cGBBMhPJVq6PJVRBpqT2r
claude/add-mobile-bookmark-summary-01494LYoh4sJW5Fj4GPm62Vj
claude/add-mobile-tags-screen-01WRADt4ZzvXVew1Y9vqF8SV
claude/add-highlight-notes-01LpanRLS4a2YMnT1qB5GTqX
claude/add-search-bar-014k2ngaqjwYRVSvqmbuECqr
claude/hide-collaborator-emails-01TQrkkMupC7CR9BTuDkireg
claude/list-invitation-approval-0129V89M1riXW6JqmoF74VfM
claude/add-bookmark-archive-sort-018VbGPGvtmsGgXFEERoAX7B
claude/add-mobile-smart-lists-01251tYo9u1SywE6XFezAv9e
claude/bookmark-drag-drop-01DmWq286ogHpDGHKcXjKr3z
claude/add-rss-import-01DH1Q2axcDeq8nQJR5MWjPJ
claude/mobile-inapp-browser-auth-01KiT6bwyntRPQ1X4oTtAveC
claude/offline-mode-react-query-01D1rE2bdBEPw2teGqunr5Gd
claude/add-singlefile-extension-support-01BEB9QQZABzwfZDvR9Bz5b2
claude/custom-list-slugs-01VxcfkNUXZ97FNpNVURopMq
claude/issue-2148-20251118-1133
claude/add-groupid-queue-fairness-011CV1r8Wb46HuGAg5o95i3m
claude/hide-viewer-shared-lists-01Fst6NBvdxrXXnDhUmjsNDP
claude/collaborative-lists-013AvDvMqkoszDVcSoCYgBcM
claude/implement-feature-01LT5XzGsbEhZkYXNEjEwdui
claude/fix-bookmark-loading-state-01AgF4H2drxwuTCJDB2Xgiu4
claude/admin-user-edit-013tbiRmb1KX2fhSYqmGKCu8
claude/expose-all-api-01YTruEW72WQYMtq4iZoaPkA
claude/add-doc-link-main-016NYLxShpKuH6R8XCBgeZtc
claude/fix-issue-2133-019JLvdSRAUbU4FtjQztcM6S
claude/explore-effect-ts-integration-01F7xb1dWwP1ma4LnLbFGfDD
claude/optimize-dockerfile-build-011CV5gDnPZbdbbVSPDofC4e
claude/add-custom-headers-guide-011CV249t16aWDRb1mCrzQdC
claude/mobile-app-signup-011CUxPtCXgU6U3T8GShTR2Q
claude/crawler-worker-fetch-browser-011CUvcRc24XEr9DTWDW6MX8
claude/fix-issue-784-011CUvubQrcZHG9S3KjpCKbK
codex/add-user-settings-for-inference-language-and-screenshots
claude/fix-mobile-signin-server-address-011CUnaUWwY2Fhq5Xbwhgr8H
better-auth-2
claude/issue-2028-20251012-1429
claude/issue-1010-20251012-1154
codex/update-feed-refresh-job-idempotency-key
restate
import-v2
fix-public-lists
recurse-delete-list
abort-dangling-processing
tag-pagination
ratelimit-plugin
claude/issue-1937-20250914-0912
codex/implement-title-search-query-qualifier
copilot/add-edit-button-for-notes
cookie-path
ai-tag-cleanup
codex/add-allowlist-and-blocklist-env-variables
mobile-retheme
expo-next-upgrade
opencode/issue1788-20250727215611
fix-trailing-slash-deduplication
edit-bookmark-dialog
bookmark-embeddings
rag
nextjs-15
bookmark-hover-bar
sapling-pr-archive-MohamedBassem
track-bookmark-assets
json-cli
admin-settings
mobile-dark-mode
android/v1.9.2-0
ios/v1.9.1-1
android/v1.9.1-0
ios/v1.9.1-0
ios/v1.9.0-2
ios/v1.9.0-1
android/v1.9.0-1
extension/v1.2.9
cli/v0.31.0
sdk/v0.31.0
mcp/v0.31.0
android/v1.9.0-0
ios/v1.9.0-0
v0.31.0
android/v1.8.5-0
cli/v0.30.0
sdk/v0.30.0
ios/v1.8.4-0
android/v1.8.4-0
v0.30.0
cli/v0.29.1
v0.29.3
v0.29.2
v0.29.1
sdk/v0.29.0
cli/v0.29.0
mcp/v0.29.0
ios/v1.8.3-0
android/v1.8.3-0
extension/v1.2.8
v0.29.0
android/v1.8.2-2
android/v1.8.2-1
ios/v1.8.2-0
android/v1.8.2-0
extension/v1.2.7
android/v1.8.1-0
ios/v1.8.1-0
v0.28.0
cli/v0.27.1
cli/v0.27.0
v0.27.1
sdk/v0.27.0
v0.27.0
android/v1.8.0-1
ios/v1.8.0-1
mcp/v0.26.0
sdk/v0.26.0
v0.26.0
cli/v0.25.0
ios/v1.7.0-1
mcp/v0.25.0
v0.25.0
extension/v1.2.6
ios/v1.7.0-0
android/v1.7.0-0
v0.24.1
v0.24.0
mcp/v0.23.10
mcp/v0.23.9
mcp/v0.23.8
extension/v1.2.5
mcp/v0.23.7
mcp/v0.23.6
mcp/v0.23.5
mcp/v0.23.4
sdk/v0.23.2
cli/v0.23.0
extension/v1.2.4
android/v1.6.9-1
ios/v1.6.9-1
v0.23.2
v0.23.1
sdk/v0.23.0
v0.23.0
ios/v1.6.9-0
sdk/v0.22.0
v0.22.0
android/v1.6.8-0
ios/v1.6.8-0
sdk/v0.21.2
sdk/v0.21.1
sdk/v0.21.0
v0.21.0
cli/v0.20.0
v0.20.0
ios/v1.6.7-4
android/v1.6.7-4
ios/v1.6.7-3
android/v1.6.7-3
android/v1.6.7-2
ios/v1.6.7-2
android/v1.6.7-1
ios/v1.6.7-1
ios/v1.6.7-0
android/v1.6.7-0
v0.19.0
android/v1.6.6-0
android/v1.6.5-0
ios/v1.6.5-0
ios/v1.6.4-0
android/v1.6.4-0
v0.18.0
v0.17.1
v0.17.0
ios/v1.6.3-0
android/v1.6.3-0
extension/v1.2.3
ios/v1.6.2-1
android/v1.6.2-1
ios/v1.6.2-0
android/v1.6.2-0
v0.16.0
ios/v1.6.1-3
android/v1.6.1-3
ios/v1.6.1-2
android/v1.6.1-2
android/v1.6.1-1
ios/v1.6.1-1
android/v1.6.1-0
ios/v1.6.1-0
extension/v1.2.2
android/v1.6.0-1
ios/v1.6.0-1
ios/v1.6.0
android/v1.6.0
cli/v0.13.7
cli/v0.13.6
v0.15.0
cli/v0.13.5
extension/v1.2.1
v0.14.0
cli/v0.13.3
cli/v0.13.2
cli/v0.13.1
cli/v0.13.0
v0.13.1
v0.13.0
mobile-v1.5.0
mobile-v1.4.0
v0.12.2
v0.12.1
v0.12.0
v0.11.1
v0.11.0
v0.10.1
v0.10.0
v0.9.0
v0.8.0
v0.7.0
v0.6.0
v0.5.0
v0.4.1
v.0.4.0
v.0.3.1
v0.3.0
v0.2.2
v0.2.1
v0.2.0
v0.1.0
Labels
Clear labels
Mirrored from GitHub Pull Request
UI/UX
android
bug
dependencies
documentation
documentation
extension
feature request
feature request
good first issue
ios
long-term
performance
pri/high
pri/low
pri/medium
pull-request
Mirrored from GitHub Pull Request
question
status/approved
status/icebox
status/pending_clarification
status/untriaged
No labels
UI/UX
android
bug
dependencies
documentation
documentation
extension
feature request
feature request
good first issue
ios
long-term
performance
pri/high
pri/low
pri/medium
pull-request
question
status/approved
status/icebox
status/pending_clarification
status/untriaged
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
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
starred/karakeep#974
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @atrugiel69 on GitHub (Jun 7, 2025).
Original GitHub issue: https://github.com/karakeep-app/karakeep/issues/1557
Describe the Bug
I am using Karakeep on a Linux Mint machine.
I reverse proxy using nginx and DuckDNS to access from outside my network on https://mysubdomain.duckdns.org
Configuration for nginx is this:
server {
listen 443 ssl;
listen [::]:443 ssl;
server_name mysubdomain.duckdns.org;
}
server {
listen 80;
listen [::]:80;
server_name mysubdomain.duckdns.org;
return 301 https://$host$request_uri;
}
I added the Duck DNS subdomain to my exceptions for DNS Rebind Protection on my Fritzbox router and everything works just fine when accessing from outside the LAN.
When inside the LAN, accessing from a browser (Firefox in my case) from my smartphone works perfectly. But if I use https://mysubdomain.duckdns.org as address in the Android app, everything is incredibly slow. Initial login seems to fail, so I press the debug button, it starts testing the connection and after a couple of minutes it says everything is ok. If I go back from debug I access my list of bookmarks but they are shown without the small pictures (something that never happens when accessing from a browser). If I use the share function to hoard a new link from Android, the app displays the "Hoarding" message for, again, a couple of minutes before giving confirmation that the link has been saved.
If there's any extra information I could provide, just ask. I have tried to explain to the best of my capabilities...
Steps to Reproduce
Above I tried to describe my workflow thoroughly. It's quite specific probably. So, I don't know if this could be easy to reproduce. I post this mainly hoping there's some extra steps to debug this and understand what's happening. Nginx logs don't show errors.
Expected Behaviour
Expected behavior would be for the app to be as responsive as it is from outside the LAN from inside the LAN.
Note that if I configure the local IP address in the app, it's normally responsive but, clearly, this way I can't access karakeep from outside my network.
Screenshots or Additional Context
No response
Device Details
Samsung Galaxy S23+, Android 15, Android Karakeep App 1.6.9
Exact Karakeep Version
Karakeep v 0.24.1
Have you checked the troubleshooting guide?
@atrugiel69 commented on GitHub (Jun 7, 2025):
As an extra datapoint, the app, just once, gave me an error trying to connect, stating
Network connection failed: Failed to connect to mysubdomain.duckdns.org/MyServerOutsideNumericIPaddress:443
Never saw that error again, even after repeated purging of data and cache for the app (I even uninstalled it and reinstalled it once).
@ebenoist commented on GitHub (Jun 7, 2025):
@atrugiel69 I use a similar setup, but use tailscale and digital ocean for DNS with traefik as a reverse proxy. My installation on a intel nuc is pretty snappy. Different OS platforms will have their own resolution stack which could be the issue here or something with duckdns, but I'm not familiar with that service.
@atrugiel69 commented on GitHub (Jun 8, 2025):
This is absolutely not a matter of performance. The same machine, the same network, if I connect on the app using the local IP address the app absolutely flies. I have a NUC i7 with 32GB of RAM.
If I use the mysubdomain.duckdns.org address from inside the LAN, the same karakeep instance absolutely flies when accessed from Firefox (I even tested with a chromium based browser, Kiwi Browser, same result).
It slows to a crawl, or worse, when I try to use the app with mysubdomain.duckdns.org. Same app, same network, if I use the internal IP to connect, it flies once more. Same app, outside the LAN, if I use mysubdomain.duckdns.org it flies too.
The app must be doing something different from a normal web browser when accessing the server. Point is... what?
@atrugiel69 commented on GitHub (Jun 8, 2025):
Extra data point. The iOS app, on an iPad Pro 12.9" 2nd Generation, works just fine when accessing Karakeep from inside my LAN, using mysubdomain.duckdns.org.
At this point I suspect there's a problem with however the Android app handles the connection...
@atrugiel69 commented on GitHub (Jun 8, 2025):
Ended up "solving" this by configuring dnsmasq for my local server and setting that machine as DNS server for my Android smartphone.
I think, unless there's a bug to be found somewhere to justify what I experienced, that a nice feature to add to the app would be a different server address to configure for local connection (tied to WiFi name, for instance). This is something that many Subsonic (and derivatives) apps offer. And it simplify lives for people that do not want to spend a whole afternoon devising a custom solution like I did.
@atrugiel69 commented on GitHub (Jun 9, 2025):
I have asked a LLM AI I have used to work around this to write a small report on what it found out.
DNS Resolution Behavior Report for Karakeep App (Android vs. iOS)
Background
Our local network uses dnsmasq for DNS resolution with upstream servers defined for both IPv4 and IPv6. The domain in question is
mysubdomain.duckdns.org, which is used by the Karakeep app. We initially defined only an IPv4 override for this domain. Over time, we observed that when the Karakeep app attempted to resolve AAAA (IPv6) records for this domain, the app behaved sluggishly or failed to fetch content (for example, graphical previews), ultimately failing to log in the user after a log out.Original Configuration
Initially, we had a dnsmasq configuration, using Quad9 DNS as main DNS, of the form:
Here, the global
filter-AAAAdirective was used to force dnsmasq to return only IPv4 (A) records even when AAAA records were available upstream. Although this ensured that clients would use IPv4, it applied to all domains and could potentially hinder environments where IPv6 connectivity is beneficial. The Karakeep app was always working correctly, but several other apps basically stopped working, depending evidently on fetching web content while accessing IPv6Issue Observed Without Filtering
When removing
filter-AAAAto allow IPv6 (i.e., enabling dual‑stack responses), our observations were:Android Behavior:
The Karakeep app on Android would log in when using mobile data (where IPv6 resolution might differ) but exhibit significant slowdown or failure to display content (e.g., graphical previews) when connected via WiFi. It appears that the Android networking stack was attempting to use IPv6 first, which led to delays when valid IPv6 connectivity for
mysubdomain.duckdns.orgwas not present.iOS Behavior:
The iOS version of the app did not exhibit the same slowness or failure despite similar DNS conditions, suggesting a difference in how the platform handles dual‑stack DNS resolution (or fallback from IPv6 to IPv4).
Experimented Workaround
To address this, we modified our dnsmasq configuration to explicitly “override” the AAAA response for
mysubdomain.duckdns.orgwhile still allowing IPv6 upstream servers for other queries. The resulting configuration is as follows:Explanation:
addressline ensures that any A query formysubdomain.duckdns.orgreturns the local IPv4 address.addressline (using::) acts as a hack to yield an empty or “null” AAAA record. This effectively tells clients that no IPv6 address should be used for the domain, avoiding delays due to failed IPv6 connections on Android.Observations After the Change
Android Performance:
With the above configuration in place, the Karakeep app on Android resumed fast performance—graphical previews and content updates responded immediately, even on LAN WiFi. Logging out and logging back in was instant.
Implication:
This indicates that the original issues were likely due to the Android networking stack’s handling of dual-stack DNS responses. Without a proper AAAA record (or with an invalid one), Android would time out or delay fallback to IPv4. By forcing a “null” AAAA result for
mysubdomain.duckdns.org, we ensure the Android device uses the IPv4 route immediately.Considerations and Recommendations
Per-Domain vs. Global Behavior:
Since dnsmasq does not natively support per‑domain filtering of AAAA responses, this workaround using dual
addressdirectives is currently the simplest way to force IPv4 formysubdomain.duckdns.orgwhile preserving dual‑stack functionality for all other domains.Platform-Specific Behavior:
The discrepancy between Android and iOS behavior suggests that modifications to how DNS resolution is handled in the app (or a configuration option allowing the app to prefer IPv4) could be beneficial. It may be worthwhile to investigate if the Android app can be improved to either ignore AAAA responses for this domain, or attempt a faster fallback mechanism to IPv4.
Conclusion
The necessity of filtering or overriding AAAA responses for
mysubdomain.duckdns.orgindicates that the Karakeep Android app is sensitive to IPv6 DNS resolution—even though the iOS app is not. Our current solution forces IPv4 usage for that domain, avoiding delays and performance issues on Android. This discrepancy might warrant further adjustments in either the app’s DNS handling logic or a more granular DNS server configuration in future updates.@MohamedBassem commented on GitHub (Jun 15, 2025):
I honestly can't see how this can be a karakeep issue, and I'm glad you worked around it, so I'll close the issue.
If you want to have support for different addresses on local networks, this can be a separate FR.
@atrugiel69 commented on GitHub (Jun 15, 2025):
Well, there is something strange happening with the Android version of your app that doesn't happen in the iOS version. Isn't that worth investigating? On iOS I did not need any extra workaround. Nor did I need workarounds when accessing the web version. Just from the Android app.
I have tried reporting as completely as possible but I am available for any extra info you might need.