Replies: 6 comments 2 replies
-
|
I second this. Many people are hosting their home labs behind tunnels/proxies and won't expose their services directly without some authentication. And mobile client apps cannot authenticate with browser auth flows. Adding support for Custom Headers when connecting to the server from the mobile app would be great. The only way to access the mobile app, when not exposing Dawarich directly, is by using a VPN like Tailscale or Cloudflare One. In my experience, these drain a lot of battery and are troublesome having running all the time. Do you think this is a valid idea @Freika ? |
Beta Was this translation helpful? Give feedback.
-
|
Can't promise you this right now but we may introduce this in the future |
Beta Was this translation helpful? Give feedback.
-
|
I would love to run dawarich in my homelab but this is a killer limitation at this point in development. If this is introduced im going to have another look at this project! |
Beta Was this translation helpful? Give feedback.
-
|
+1 extremely valuable for self hosters and being introduced more and more as standard for companion apps |
Beta Was this translation helpful? Give feedback.
-
|
This is the one thing that is holding me back from using this software. My use case is similar to the original poster, but the Cloudflare version. I would like to add custom headers to the IOS app for Cloudflare service tokens (CF-Access-Client-Id, CF-Access-Client-Secret) in order to bypass API calls from the ios application, but still enforce identity on the main app through their zero trust tunnels. TY for your consideration. |
Beta Was this translation helpful? Give feedback.
-
|
Would also really like to see this implemented 👍 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Problem
When running Dawarich behind an authenticating reverse proxy like [Pangolin](https://github.com/fosrl/pangolin), API endpoints (
/api/v1/overland/batches,/api/v1/owntracks/points, etc.) are blocked by the proxy's authentication wall. Tracking apps (Overland, OwnTracks, Dawarich iOS/Android app, GPSLogger, Home Assistant) cannot complete browser-based SSO, so these requests get rejected.The common workaround is adding a path-based bypass rule (
/api/*→ Bypass Auth) on the reverse proxy. This works, but it completely disables the proxy's authentication layer for the entire API surface, which undermines the layered security model.Pangolin already supports Access Token authentication via HTTP headers:
When these headers are present on a request, Pangolin authenticates the request without requiring browser-based SSO — no bypass rule needed.
The problem is that Dawarich currently has no way to instruct tracking apps to include these headers, nor does it pass them through in any configurable way.
Proposed Solution
Add a configuration option in Dawarich (via settings UI and/or environment variables) to define custom HTTP headers that should be included in API documentation and/or required on incoming API requests.
Option A: Document custom headers for tracking apps (minimal change)
Provide a settings field where users can define custom headers (key-value pairs). These headers would then be displayed in the account settings / API configuration section alongside the existing API key, so users can configure their tracking apps accordingly.
Most tracking apps already support custom headers:
headers:configThis way, the user would:
P-Access-Token-IdandP-Access-Tokenvalues as custom headers in their tracking app/api/*bypass rule from PangolinOption B: Server-side custom header validation (additional security layer)
In addition to Option A, Dawarich could optionally validate a custom header on incoming API requests as an extra authentication factor:
This would add defense-in-depth: Pangolin validates the access token, and Dawarich validates an additional shared secret.
Example flow (with Option A)
Why this matters
/api/*bypass rule exposes Dawarich's entire API to the public internet without any reverse proxy protection. With Access Token headers, Pangolin validates every API request before it reaches Dawarich.What would need to change
Minimum viable change (Dawarich App)
The Dawarich iOS and Android apps are the most important piece — they should support configuring custom HTTP headers in their connection settings, so users can add the Pangolin Access Token headers. This is purely a client-side change and requires no server-side modifications.
Nice to have (Server-side)
Context
This is a common pain point for self-hosters running apps behind Pangolin. The same pattern applies to other apps like Immich, where users already configure
P-Access-Token-IdandP-Access-Tokenheaders in the mobile app to avoid bypass rules (see [fosrl/discussions#455](https://github.com/orgs/fosrl/discussions/455)).Dawarich's privacy-first philosophy aligns perfectly with eliminating unnecessary auth bypass rules. This change would make Dawarich one of the best-integrated self-hosted apps for authenticated reverse proxy setups.
Beta Was this translation helpful? Give feedback.
All reactions