this post was submitted on 25 Sep 2026
94 points (98.0% liked)

Selfhosted

62310 readers
696 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

Detailed Rules Post

  1. Be civil.

  2. No spam.

  3. Posts are to be related to self-hosting.

  4. Don't duplicate the full text of your blog or readme if you're providing a link.

  5. Submission headline should match the article title.

  6. No trolling.

  7. Promotion posts require active participation, with an account that is at least 30 days old. F/LOSS without a paywall has exceptions, with requirements. See the rules link for details. Tags [CBH] or [AIP] are required, see the links in Rule 8 for details.

  8. AI-related discussions and AI-involved promotional posts have additional requirements for tagging, as noted in Rule 7 and the AI & Promotional Post Expanded Rules post, and find example disclosures here.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 3 years ago
MODERATORS
 

TL;DR of the TL;DR: Private, self hosted, GPS enabled, local search and offline routing map engine in under a gigabyte, on a $55 SBC, accessible anywhere.

Ok...I've been working on this for a while and it is SO satisfying to see it to completion.

I'm calling it "Pi maps" (because the Pi hosts it) but it's really MapLibre GL JS, served locally by nginx. The Western Australia basemap is a single PMTiles archive, clipped from the Protomaps daily build to the WA boundary, zoom levels 0-15. The finished stack is about 770 MB.

770MB!

PMTiles is one of the bits I particularly like. Instead of running a tile server and maintaining millions of little tile files or a tile database, nginx just serves one archive with HTTP Range requests. Then MapLibre asks for the byte ranges it needs.

The map-serving path is:

Browser
  ↓
MapLibre GL JS
  ↓
PMTiles JS
  ↓
nginx HTTP Range requests
  ↓
WA.pmtiles

And the best part is that I needed no PostgreSQL, PostGIS or live calls to Google etc.

But wait...there's more! Search and routing!

Rather than install something heavy, I put together a small search service using Python, from the OSM extract.

The source data is converted into a SQLite FTS5 database and the current index contains about 300,000 source records, for a whopping...78 MB. The runtime search service uses about 11 MB RAM at idle.

Driving routes are calculated locally using BRouter, which runs as its own container and nginx proxies the route API internally to it.

The routing dataset for turned out to be remarkably small - roughly 20 MB, with a single worker and a 128 MB Java heap.

The browser gets route geometry, distance, ETA and turn instructions without calling an external routing service.

TL;DR: The current stack is basically three containers:

  • pi-maps - nginx + the MapLibre frontend + PMTiles
  • pi-maps-search - Python + SQLite FTS5 local search
  • pi-maps-brouter - local driving-route engine

After testing, the individual Maps components were around:

nginx/frontend       ~7.3 MiB
search service       ~11.2 MiB
BRouter              ~168 MiB
--------------------------------
total                ~187 MiB RAM

The complete thing - map, search database, routing data, local web assets, metadata etc ends up at roughly 770 MB.

So - a Raspberry Pi 4 is locally serving a zoomable map, POI/address search and actual driving routes for comfortably under a gigabyte of application data.

What's more, I can use it remotely via Tailscale if I want and/or download the tiles directly to my phone and use it with something like GeoLibre or Atlas.

OSM / Protomaps data
        ↓
   Raspberry Pi
        ↓
 ┌───────────────┐
 │ WA.pmtiles    │ → map
 │ SQLite FTS5   │ → search
 │ BRouter       │ → directions
 └───────────────┘
        ↓
 Browser / phone / apps

It's not yet a Google Maps replacement. Yet. Right now the routing profile is driving-focused; there is no live turn-by-turn rerouting, spoken navigation, traffic data, or giant commercial address database. But...I have ideas and too much free time (actually, I think I can solve the 4 of those 5 pretty simply).

Case in point: there was a cool technical problem in that the the POI polygon centroid can be a valid map location but NOT a valid driving destination. That was fun to solve.

The next thing I'm going to try is adding a wikipedia layer - or rather, a self hosted ZIM wikipedia layer - so that POIs actually resolve to clickable entries.

There. For once, I win.

PS: This was much easier to do that the whole "family chat" bullshit. Never work with children or animals.

PPS: Also, I may have broken the family chat IRC server, or at least, misunderstood how IRC uses connection resets. So..XMPP might win after all, much to my chagrin.

top 30 comments
sorted by: hot top controversial new old
[–] meldrik@lemmy.wtf 2 points 2 hours ago

Fucking legend

[–] dihutenosa@piefed.social 3 points 5 hours ago (1 children)
[–] ProperlyProperTea@lemmy.ml 8 points 7 hours ago (1 children)

Your commitment to low memory usage is quite apt in the current memory crisis.

[–] SuspiciousCarrot78@aussie.zone 5 points 6 hours ago* (last edited 6 hours ago)

That intentional, for exactly the reason you imply: I refuse to pay exorbitant prices for RAM, GPUs, SSD...I will code my way around.

"Force has no place where there is need of skill"

[–] SuspiciousCarrot78@aussie.zone 9 points 11 hours ago* (last edited 11 hours ago)

Boom motherfukka! I stayed up all night but POI population is DONE! I now have 1,809, dynamically generated, ZIM Wikipedia-linked POIs for Western Australia running entirely locally on my Raspberry Pi map server.

The POIs themselves come from the WA OSM dataset. This works because a lot of OSM features already carry wikipedia=* and wikidata=* tags...which gives me a link from a mapped place to its corresponding Wikipedia article.

I can then resolve those article titles against my locally hosted Kiwix Wikipedia ZIM and only publish POIs that actually exist in that local copy. I used wikipedia_en_all_mini_2026-06/Wikipedia ZIM (~13GB) as the test.

Meaning, clicking a marker now opens the article lead inside the map, fetched from Kiwix, with a “Read full article” link to the full locally hosted article (see pic)

And just to confirm - this is all local. No calls out to Wikipedia or Wikidata.

Seeing folks want this in their hot little hands, I'll delay fucking around adding / solving those 4 outstanding ticket items and yeet this onto Github (after I get a few hours of sleep).

[–] eleijeep@piefed.social 15 points 18 hours ago (1 children)

Are you planning on sharing the source?

[–] SuspiciousCarrot78@aussie.zone 22 points 18 hours ago* (last edited 18 hours ago) (4 children)

I mean...if there's interest? Just let me figure out those last four nagging pains in the ass and I will put it up. The thing itself is pretty simple lego: frontend, nginx config, SQLite/FTS search service, index-builder scripts, BRouter integration, route-anchor logic.

Right now, I have a few irons in the fire, including a fork called SmartTube Local that is turning into a passion project.

That one is basically: “what if YouTube was local-first, self-hosted and yt-dlp-backed, with the local archive integrated directly into the app and automatically kept up to date...so if the internet died, your kids might not even notice?”

...I just did google maps...why not take on Youtube next, amirite?

[–] Cyber@feddit.uk 1 points 2 hours ago (1 children)

If you release your code, others might be able to help you get those last parts done, perhaps even optimise it.

For me, that's the hardest part... letting others contribute to my projects 🙂

Oh, I will release...but no PRs / maintenance debt is better for me.

Feel free to fork and tinker with it - and I hope you do - but this is a personal project you all convinced me to share :)

Seeing people are keen on this, I will get LLM to write up documentation real quick (GASP!) and then push it to github. Gimme an hour

[–] hendrik@palaver.p3x.de 13 points 16 hours ago* (last edited 16 hours ago)

There's always interest in sources. Otherwise you'd be the only one able to self-host the software. 😉

[–] eleijeep@piefed.social 11 points 18 hours ago

Yeah I mean to you it might be pretty simple lego :) but I'm sure lots of people would benefit from it. Even if not to use the same exact setup then to provide an example or starting point for DIY.

[–] hirihit640@sh.itjust.works 2 points 16 hours ago* (last edited 16 hours ago) (1 children)

Have you heard of Tube Archivist?

Edit: ok i see you mentioned it in your Local Smarttube announcement post. Why doesn't Tube Archivist fit your needs?

[–] SuspiciousCarrot78@aussie.zone 5 points 16 hours ago* (last edited 15 hours ago)

TubeArchivist is:

  1. heavy (Redis, Elasticsearch).
  2. doesn't have a native TV app.
  3. will not play nicely with the Raspberry Pi (table stakes are 2 GB RAM, which is more than half my RAM budget).

I like TA a lot, but not for what I have in mind. What I have in mind should use about 100 MB of RAM, run as a systemd service, with videos served directly to the front-end via Samba, in such a manner that they are indistinguishable from the cloud sources when displayed in-app (well, apart from a core badge saying LOCAL).

I'm not coding a simple Jellyfin plug in.

[–] hirihit640@sh.itjust.works 6 points 16 hours ago (1 children)

I believe you need AI disclosure to post in this sub. Check the sidebar rules.

[–] SuspiciousCarrot78@aussie.zone 5 points 16 hours ago* (last edited 16 hours ago) (1 children)

You check them.

AI disclosure is required when posting a promotion. This is neither a promotion, nor AI coded. I am simply sharing something fun I made for myself by myself. If you have an objection to my post, click report and lets have the mods weigh in. In fact, here, let me help you. Tag - @curbstickle@anarchist.nexus

[–] hirihit640@sh.itjust.works 4 points 16 hours ago* (last edited 15 hours ago) (2 children)

If it's not made with AI you can use the CBH tag

[–] curbstickle@anarchist.nexus 8 points 15 hours ago

For promotion.

@SuspiciousCarrot78@aussie.zone has the correct read of the rules.

If its an AI discussion of some sort, then its an AI Topic with an AIT tag, but "this isn't a discussion about AI" does not have a tag.

[–] SuspiciousCarrot78@aussie.zone 7 points 15 hours ago (1 children)

To my reading of the rules, tagging is required when promoting a project. For reference, see -

https://lemmy.world/post/49151085

Specifically

Post Tagging

There are three types of tags for project promotional / AI posts.

    [CBH] - Code By Human - A project promotional post with a project that did not use AI in any capacity. No disclosure necessary.
    [AIP] - AI Project - A project promotional post with a project that used AI in development in any capacity. Disclosure is required for how it was used.
    [AIT] - AI Topic - A discussion topic that includes AI. This may be for a discussion on hardware to self-host on, llama.cpp vs ollama, your experience using vulkan, etc.

I am not promoting anything - the code literally does not exist outside of my hard-drive. I am sharing some small measure of success I've had in my own work.

If this is objectionable to the PttB, I am happy to remove this post.

[–] hirihit640@sh.itjust.works 6 points 15 hours ago

Fair enough, I see what you mean now. This is more of a progress report than a project release. Sorry for the misunderstanding. FWIW I think your project is cool regardless of whether you used AI or not, so great work!

P.S. Out of curiosity I did read a bit of your comment history and I do agree with your comments w.r.t privacy and AI disclosure. It is a tricky problem indeed.

[–] speculate7383@lemmy.today 9 points 18 hours ago (2 children)

This is a great idea.

I've been using Comaps on Android, while looking for a desktop alternative to osm.org.

Let us know if you publish this!

[–] scallisto@retrofed.com 2 points 3 hours ago (1 children)

If you didn't know, CoMaps has a desktop Linux and macOS version! I believe GNOME Maps (also on Linux) recently got better offline maps support too

[–] Cyber@feddit.uk 2 points 2 hours ago

Ooh, I didn't know that. Thanks!

[–] SuspiciousCarrot78@aussie.zone 8 points 17 hours ago* (last edited 15 hours ago)

Here's what I'm thinking:

  • Driving-focused routing; easy. BRouter already supports separate car, bicycle and foot routing modes/profiles, and its server accepts a profile= per request. So that one is universal.

  • Live turn-by-turn navigation and rerouting - should be easy. GPS position, route geometry, turn hints, destination coordinates and a local routing API are all sorted. The browser would track position against the active route, advance through manoeuvres as you approach them, detect when you move sufficiently off-route, then call BRouter again from current GPS position to the existing destination.

The main work is a navigation state machine..which...I might need to ask GPT or Claude for help tbh.

  • Spoken navigation: probably the easiest next thing. Turn hints are already converted into human-readable text. If a browsers expose SpeechSynthesis (which can speak text through the device's speech system) then...yeah, done. The navigation state says “150 m from next manoeuvre”, Pi Maps can literally issue speechSynthesis.speak(...).

For guaranteed offline speech you would want an on-device voice installed on the phone, but almost every phone has that (unless you cut TTS out).

  • Address coverage - this one is a cheat...because we have Geocoded National Address Files here. G-NAF "...contains the details of every physical address in Australia, with more than 15 million addresses and coordinates, free to the public and updated quarterly".

I'd be stupid not to use that (though I need to figure out the slice and dice). Obviously, that won't translate to every place on Earth, but I am coding this for me, so ... :)

What I can't solve is the Traffic. Not really. I mean...sort of. Where I am, Main Roads WA exposes public ArcGIS services with incidents, roadworks, events, road closures, detours and traffic-signal outages, all queryable as JSON, all updated live. In theory, that means a live traffic layer with with road closures, traffic incidents, speed zones etc.

No live traffic congestion / data tho.

Let me sit on it for a bit. I never thought to release this...and these 4 are nagging me...but I really want to move onto the SmartTube project fully. Maybe I'll just patch the first two or three low hanging fruit. The big issue is field testing it for weeks/months before I can call it properly done.

Honestly, I just wanted my own Google maps. I never thought to apply spit and polish for general release.

[–] yaroto98@lemmy.world 6 points 17 hours ago (1 children)

Is it all combined into a nice easy to install docker container?

[–] SuspiciousCarrot78@aussie.zone 6 points 17 hours ago* (last edited 17 hours ago)

Yes in spirit, but it is a Docker Compose stack rather than one container. That works better for my set up. IOW nginx/MapLibre/PMTiles, the SQLite search service, and BRouter are separate containers, but they are managed as one project. Like this -

pi-maps          → nginx + MapLibre + PMTiles
pi-maps-search   → Python + SQLite FTS5
pi-maps-brouter  → BRouter