If you find this add-on useful, please star it on GitHub — stars show appreciation and help maintainers know their work matters.
This add-on integrates Nominatim (OpenStreetMap search and reverse geocoding engine) into your DDEV project using the mediagis/nominatim Docker image, along with Nominatim UI for interactive map searching, reverse geocoding, and database inspection.
By default, the add-on downloads and imports the Monaco extract from Geofabrik for quick testing and development. You can easily configure it to import any regional extract or custom OSM data.
ddev add-on get bradley-tran/ddev-nominatim
ddev restart
Note
Nominatim import can take a really long time, so on the first start, Nominatim downloads and imports the OpenStreetMap extract in the background without blocking ddev start or other services. You can follow the import progress using ddev logs -s nominatim -f. Once import completes, the API endpoints will automatically become responsive.
After installation, make sure to commit the .ddev directory to version control.
http://<projectname>.ddev.site:8765https://<projectname>.ddev.site:8744ddev nominatim-uihttp://<projectname>.ddev.site:8980https://<projectname>.ddev.site:8943web container or other services):
http://nominatim:8080| Endpoint | Description | Example |
|---|---|---|
/status |
Service and database health | http://<projectname>.ddev.site:8980/status |
/search |
Search by address / query | http://<projectname>.ddev.site:8980/search?q=avenue+pasteur&format=json |
/reverse |
Reverse geocoding (lat/lon) | http://<projectname>.ddev.site:8980/reverse?lat=43.7384&lon=7.4246&format=json |
| Command | Description |
|---|---|
ddev nominatim-ui |
Open the Nominatim Web UI in your browser |
ddev nominatim <cmd> |
Run Nominatim CLI commands inside the container |
ddev describe |
View service status and exposed ports |
ddev logs -s nominatim |
View Nominatim container logs |
ddev logs -s nominatim -f |
Follow live import and request logs |
ddev logs -s nominatim-ui |
View Nominatim UI web server logs |
This add-on exposes the nominatim command to run CLI commands directly inside the Nominatim container:
# Check service and database status
ddev nominatim status
# Check database health and consistency
ddev nominatim admin --check-database
# Warm database cache
ddev nominatim admin --warm
# Show Nominatim version
ddev nominatim --version
# View all available CLI commands and help
ddev nominatim --help
Configuration is managed via .ddev/.env.nominatim. You can configure settings using ddev dotenv set:
# Example 1: Import Germany from URL instead of Monaco
ddev dotenv set .ddev/.env.nominatim --nominatim-pbf-url="https://download.geofabrik.de/europe/germany-latest.osm.pbf"
ddev restart
# Example 2: Import from a local .osm.pbf file (placed in project root or .ddev/)
ddev dotenv set .ddev/.env.nominatim --nominatim-pbf-path="data.osm.pbf"
ddev restart
| Variable | Flag | Default | Description |
|---|---|---|---|
NOMINATIM_DOCKER_IMAGE |
--nominatim-docker-image |
mediagis/nominatim:5.3 |
Nominatim Docker image and tag |
NOMINATIM_PBF_URL |
--nominatim-pbf-url |
Monaco extract URL | URL of the .osm.pbf file to download and import |
NOMINATIM_PBF_PATH |
--nominatim-pbf-path |
(empty) | Path to a local .osm.pbf file (e.g. data.osm.pbf, /mnt/ddev_config/data.osm.pbf, or /var/www/html/data.osm.pbf) |
NOMINATIM_IMPORT_STYLE |
--nominatim-import-style |
full |
Import detail level: admin, street, address, or full |
NOMINATIM_PASSWORD |
--nominatim-password |
nominatim |
PostgreSQL password for nominatim user |
NOMINATIM_THREADS |
--nominatim-threads |
2 |
Number of threads used during import |
NOMINATIM_REPLICATION_URL |
--nominatim-replication-url |
(empty) | Base URL for live updates from Geofabrik |
NOMINATIM_IMPORT_WIKIPEDIA |
--nominatim-import-wikipedia |
false |
Import Wikipedia importance dumps for improved ranking |
NOMINATIM_HTTP_PORT |
--nominatim-http-port |
8980 |
Host HTTP port exposed via DDEV router |
NOMINATIM_HTTPS_PORT |
--nominatim-https-port |
8943 |
Host HTTPS port exposed via DDEV router |
NOMINATIM_UI_HTTP_PORT |
--nominatim-ui-http-port |
8765 |
Host HTTP port for Web UI exposed via DDEV router |
NOMINATIM_UI_HTTPS_PORT |
--nominatim-ui-https-port |
8744 |
Host HTTPS port for Web UI exposed via DDEV router |
NOMINATIM_UI_VERSION |
--nominatim-ui-version |
3.12.0 |
Release version of osm-search/nominatim-ui |
NOMINATIM_UI_PAGE_TITLE |
--nominatim-ui-page-title |
Nominatim |
Page title displayed in the Web UI |
NOMINATIM_UI_DOCKER_IMAGE |
--nominatim-ui-docker-image |
nginx:alpine |
Docker image used to serve Nominatim UI |
You can customize the UI by creating files in .ddev/nominatim-ui/:
.ddev/nominatim-ui/config.theme.js to override frontend settings (e.g., default zoom, map center, tiles)..ddev/nominatim-ui/nginx.conf to provide a custom Nginx configuration.
After creating or editing these files, restart DDEV with ddev restart.The PostgreSQL database is persisted in a named Docker volume (ddev-<projectname>-nominatim-data).
If you change NOMINATIM_PBF_URL / NOMINATIM_PBF_PATH or want to re-import data from scratch:
ddev stop
docker volume rm ddev-${DDEV_SITENAME}-nominatim-data
.ddev/.env.nominatim configuration:
# Using a URL:
ddev dotenv set .ddev/.env.nominatim --nominatim-pbf-url="https://download.geofabrik.de/europe/liechtenstein-latest.osm.pbf"
# Or using a local file:
ddev dotenv set .ddev/.env.nominatim --nominatim-pbf-path="data.osm.pbf"
ddev start
Contributed and maintained by @bradley-tran
If you find this add-on useful, please star it on GitHub — stars show appreciation and help maintainers know their work matters.