Archive :
-
Increase privacy by using nginx as a caching proxy in front of a map tile server
If you are self-hosting any service, chances are that you care about increasing your privacy by minimizing your reliance on third-party services. If this is the case, you may be bothered when an application you are hosting relies on such third-parties. This can be the case when some features are too resource intensive for personal servers.
One example of this is map tile servers, which are relied upon for map features in a variety of software, such as Immich (awesome Google Photos replacement !). Such tile servers host a whole world map at several zoom levels, and provide clients with map fragments (tiles) for the requested coordinates and zoom level. Unfortunately, it is not easy to host such a tile server : the easiest solution I could find still requires more than 100GB of disk space to serve a full world map. On the other hand, using a third party for this makes clients send a bunch of requests to them. These requests will give the third-party details about any location viewed on the map. It will also generally include other informations, such as the URL you’re viewing the map from and clients IP addresses.
This article will show how to build a caching reverse proxy in order to mitigate these privacy concerns while avoiding the need to host more than 100GB of map data. As a concrete application, the caching proxy will then be used as a tile provider for an Immich instance.
Read more...