Self-hosting map tiles: cheap with Protomaps
Original: Protomaps: Self-hosting map tiles has gotten cheap and easy
Why This Matters
Cheap, self-hostable maps lower the barrier for indie developers building location apps.
Protomaps' PMTiles format lets developers self-host interactive maps via a single file on a CDN. With Bunny.net, storing the full 139GB world map costs ~$5/month—potentially 100x cheaper than Mapbox.
Developer Bruce Röttgers built his project Mapboard and ran into a familiar problem: commercial map APIs like Mapbox charge $5 per 1,000 map loads once the free tier runs out. For anything that goes viral, that scales painfully fast. His solution: Protomaps and its PMTiles format.
PMTiles ships an entire map as a single file, served over standard HTTP Range requests. No special server needed—just upload to any CDN that supports Range request caching. The whole world map, updated daily, is available as a free download from the Protomaps build page. A CLI tool lets you slice it down to a bounding box or specific zoom levels for a smaller file.
For hosting, Röttgers recommends Bunny.net: EU-headquartered, no default personal data collection, and priced at $0.01/GB for bandwidth to Europe and North America. Storing the 139GB world file with 5x continental replication runs about $5/month. A single map load of a European city transmits roughly 5MB—about $0.00005—compared to Mapbox's flat $0.005 per load. That's the "100x cheaper" claim, though real costs vary with user behavior. For CDNs that don't natively support Range requests (like Cloudflare), an edge function bridges the gap. Configuration tips include enabling "Optimize for large object delivery" and locking down CORS origins to prevent tile hotlinking.