How to Install Nominatim on macOS

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.

Prerequisites

Before installing Nominatim, ensure that you meet the following requirements:

Installation Steps

  1. Open a Terminal window on your macOS machine.

  2. Clone the Nominatim repository using the command below:

    git clone https://github.com/openstreetmap/Nominatim.git
    
  3. Change the directory to the cloned repository:

    cd Nominatim
    
  4. Create a .env file by copying the contents of the .env.sample file using the command below:

    cp .env.sample .env
    
  5. 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.

  6. 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.

  7. Run the following command to start the Nominatim Docker container:

    docker-compose up -d
    
  8. 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!