Nominatim is a tool for searching and reverse geocoding the OpenStreetMap data. This guide will take you through the steps required to install Nominatim on macOS.
Before installing Nominatim, ensure that you meet the following requirements:
Open a Terminal window on your macOS machine.
Clone the Nominatim repository using the command below:
git clone https://github.com/openstreetmap/Nominatim.git
Change the directory to the cloned repository:
cd Nominatim
Create a .env file by copying the contents of the .env.sample file using the command below:
cp .env.sample .env
Open the .env file and set the following environment variables:
PBF_URL=http://download.geofabrik.de/your-country-latest.osm.pbf
POSTGRES_PASSWORD=<your_password>
Replace your-country-latest.osm.pbf
with the name of the OpenStreetMap PBF file for your desired location. You can find the latest files at https://download.geofabrik.de. Also, replace <your_password>
with your desired password for your PostgreSQL database.
Run the following command to download the OpenStreetMap PBF file:
./utils/setup.php --osm-file <your-country-latest.osm.pbf> --all
Replace <your-country-latest.osm.pbf>
with the name of your PBF file.
Run the following command to start the Nominatim Docker container:
docker-compose up -d
You can now access Nominatim by visiting http://localhost:8080 on your web browser.
Congratulations, you have successfully installed Nominatim on your macOS machine.
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!
Alternatively, for the best virtual desktop, try Shells!