Skip to content

Dawarich (beta)

Dawarich is a self-hosted location-history server — the place your phone’s recorded positions go if you would rather they did not go to a large company. TravStats can read from it. It never writes to it.

Two things, for two consumers:

  1. Recorded tracks for tour sections. A tour section can adopt the track you actually drove or walked: TravStats asks Dawarich for the points in the section’s time window, reduces them to a line one leg can hold (a track that runs past that is truncated and says so), and stores the adopted line with the leg.
  2. Country-days for the passport. A nightly sweep reduces the history to “on this day, in this country” and folds it into the country count as the transited rung — the one nothing in a flight, a cruise or a hotel can produce, because none of them records a border crossed by car. A country is a connection when every point ever recorded there lay within the grounds of an airport you are known to have flown through; a point beyond that lifts it onto a stronger rung. A track day on which no other country was recorded is a visit; two consecutive days are a night slept.

Coordinates exist only for the length of one sweep loop and are never stored, returned or logged. What a country-day row keeps is the day, the country and a count of fixes — so a day held up by four hundred points and one held up by a single point can be told apart, without keeping a single point. An adopted track is the one exception, and it is stored because you chose to adopt it onto a section you own.

The road rung and its filter appear only once an account has location history at all, because a filter that always returns nothing reads as a bug.

Dawarich issues an API key per user. There are two places to put one:

  • Your own connection — Settings → External services → Dawarich: base URL and API key, with a Test button that reads one page and reports what it found. Your history is yours; this is the intended path.
  • An instance-wide connection — Admin → External APIs → Dawarich: used for users who have none of their own. Sensible on a single-person instance; on a shared one it means every account reads the same history, which is rarely what you want.

Both are offered only with the beta switch on. The base URL may be a plain-http address on your LAN — a self-hosted Dawarich lives next to TravStats, which is why the page’s Content-Security-Policy keeps its connect-src broad rather than pinning it to the instance’s own origin.

The nightly sweep keeps a per-user cursor, so each night reads only what is new; a very long history is subdivided down to single days until a page fits, and the cap is per page rather than per account.

  • No writing. TravStats does not send points, places, visits or anything else to Dawarich.
  • No live position. The sweep is nightly; the tour editor pulls on request. Nothing tracks you in real time.
  • No coordinates in TravStats beyond a track you adopted. If you want the map to show where you were on a given day, that is Dawarich’s job.
  • No cruise legs yet. The connection is built so that they can use it; the pull for cruise legs is not in 2.6.0.
  • Beta. The connection, the pull and the settings card work; the feature that consumes them may change.