Self-hosted travel planners: point TREK at your geocoder
A self-hosted trip planner still sends every address you look up to a public geocoder. TREK has a setting to send those calls to a server of your own instead.
What you have
TREK's settings, read November 10, 2026 in its server/.env.example: NOMINATIM_URL replaces the public Nominatim for place search, reverse lookup, place details and the region fill, with no fallback; TREK_PLACES_ENABLED=false keeps searches off TREK's own places service. The two lines for the server's environment:
NOMINATIM_URL=http://127.0.0.1:8080 TREK_PLACES_ENABLED=false
Steps
1. Start the server for the country of your trips:
$ gridpin serve usa.bin --port 8080
2. Address search, as TREK asks it:
$ curl -s "http://127.0.0.1:8080/search?q=1060+W+Addison+St,+Chicago&format=json&limit=1" | jq -c '.[0] | {display_name, lat, lon}'
{"display_name":"1060 West ADDISON Street, Chicago, 60613","lat":"41.9476301","lon":"-87.6563756"}
3. A reverse lookup of a point on the map:
$ curl -s "http://127.0.0.1:8080/reverse?lat=41.9476&lon=-87.6564&format=json" | jq -c '{display_name, lat, lon}'
{"display_name":"3555 North CLARK Street, Chicago, 60657","lat":"41.9470566","lon":"-87.6561228"}
4. Place details (/lookup) are not answered:
$ curl -s -o /dev/null -w "%{http_code}\n" "http://127.0.0.1:8080/lookup?osm_ids=W123&format=json"
404
5. A landmark is not an address: the answer is the town, marked place:
$ curl -s "http://127.0.0.1:8080/search?q=Wrigley+Field,+Chicago&format=json" | jq -c '.[0] | {display_name, class, lat, lon}'
{"display_name":"Chicago","class":"place","lat":"41.8495161","lon":"-87.6871276"}
What you get
Addresses you type and points you drop on the map are resolved by your server. Restart TREK after setting the variables. The requests above were checked against the server; TREK itself was not run for this page.
Why it works
TREK speaks the Nominatim API, and the server answers the same /search and /reverse, so nothing in TREK changes but the base URL. TREK keeps about one request a second whatever answers, as its own settings file says.
Limits
- Addresses only: museums, parks and restaurants by name are not found, and place details (
/lookup) answer 404. - One country per server: a trip across borders needs one server per country, and TREK takes one URL.
- Other planners with a Nominatim setting work the same way; Dawarich is another self-hosted app with one.
All its keys: command reference. The function: local server.