You can think of Open Street Map as an open-source, self-hosted alternative to Google Maps.
I’ll show you how to build your own OpenStreetMap tile server on Ubuntu 20.04.
The required RAM and disk space depend on which country’s map you are going to use. For example,
If you want to pre-render tiles you’ll need a bunch more disk space, but it will significantly speed up loading in the browser. Check the Open Street Map Wiki for exactly how much (the map data just keeps getting bigger and bigger).