Skip to content

TableCheck-Labs/nominatim-docker

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Nominatim Docker

100% working container for Nominatim.

Nominatim Version GitHub Workflow Status Github All Contributors Docker Pulls Docker Image Size with architecture (latest by date/latest semver)

Quick Start

The easiest way to use Nominatim Docker is by pulling the pre-built images from Docker Hub.

To quickly get a Nominatim instance up and running with a small dataset (e.g., Monaco):

docker run -it \
  -e PBF_URL=https://download.geofabrik.de/europe/monaco-latest.osm.pbf \
  -p 8080:8080 \
  --name nominatim \
  mediagis/nominatim:5.2

After the import is complete, you can access the Nominatim API at http://localhost:8080/search?q=avenue%20pasteur.

Using External PostgreSQL Database (e.g., AWS RDS)

To use an external PostgreSQL database instead of the in-container database, provide the following environment variables:

docker run -it \
  -e PGHOST=your-rds-endpoint.rds.amazonaws.com \
  -e PGPORT=5432 \
  -e PGDATABASE=nominatim \
  -e PGUSER=nominatim \
  -e PGPASSWORD=your-password \
  -e PBF_URL=https://download.geofabrik.de/europe/monaco-latest.osm.pbf \
  -p 8080:8080 \
  --name nominatim \
  mediagis/nominatim:5.2

When PGHOST is set, the container will:

  • Test the database connection immediately before downloading any data (fail fast)
  • Not start the in-container PostgreSQL service
  • Use the external database for all operations
  • Automatically use SSL encryption for AWS RDS connections (password auth, not client certificates)
  • Verify PostGIS extension is installed and available
  • Assume the database and users already exist (you must create them beforehand)

SSL Configuration: The container uses password authentication with SSL encryption (PGSSLMODE=require), not client certificate authentication. This is the standard configuration for AWS RDS. The AWS CA bundle is automatically used to verify the server's identity.

Connection Testing: The container tests the PostgreSQL connection before downloading any OSM/PBF files. If the connection fails, it will exit immediately with an error message explaining what to check. This prevents wasting time and bandwidth on downloads when the database isn't accessible.

Prerequisites for external database:

  • PostgreSQL 16 with PostGIS extension installed
  • Database named according to PGDATABASE (default: nominatim)
  • User with superuser privileges during import
  • For AWS RDS: Database parameter group must have postgis extension enabled

Health Check Endpoint

The service includes a health check endpoint at /health that always returns HTTP 200 with service status:

curl http://localhost:8080/health

Response:

{"status":"online","service":"nominatim"}

Accessing Different Versions

You can pull specific versions of the Nominatim Docker image by specifying the tag. For example, to use Nominatim version 5.2:

docker pull mediagis/nominatim:5.2

For a list of available tags, please refer to the Docker Hub page.

Security Information

For information regarding the latest supported security version and security policies for Nominatim, please refer to the official Nominatim security documentation: Nominatim Security Policy.

Detailed Usage and Configuration

For comprehensive instructions on advanced configuration, importing custom PBF files, persistent data, updating the database, PostgreSQL tuning, and more, please refer to the detailed how-to guide.

Project goals and alternatives

It is the goal of this project to provide and easy to use container image that runs all services in a single container. The downside is that this makes the Dockerfile quite complex and harder to modify.

If you're looking for a project which separates the individual concepts into separate containers, check out https://github.com/smithmicro/n7m.

Contributors

Thanks goes to these wonderful people (emoji key):

Andrew
Andrew

πŸ’» πŸ“–
Donato Lucia
Donato Lucia

πŸ’»
Georgios Markakis
Georgios Markakis

πŸ“–
Philip Kozeny
Philip Kozeny

πŸš‡ πŸ’» ⚠️ πŸ‘€ πŸ“–
Cezary Morga
Cezary Morga

πŸ’»
Thomas Nordquist
Thomas Nordquist

πŸ’»
Andrey RuΓ­z
Andrey RuΓ­z

πŸ“–
UntitleDude
UntitleDude

πŸ’»
Jack McKernan
Jack McKernan

πŸ’»
mtmail
mtmail

πŸ“– πŸ’» πŸ’¬ πŸ‘€
Andrey Oblivantsev
Andrey Oblivantsev

πŸ’»
Simone
Simone

πŸ’»
DuncanMackintosh
DuncanMackintosh

πŸ’» πŸ“–
Iiro Alhonen
Iiro Alhonen

πŸ“–
Mikhail Snetkov
Mikhail Snetkov

πŸ’»
FritschAuctores
FritschAuctores

πŸ’»
rebos
rebos

πŸ’»
Leonard Ehrenfried
Leonard Ehrenfried

πŸš‡ πŸ’» ⚠️ πŸ‘€ πŸ“–
Nicolas Roelandt
Nicolas Roelandt

πŸ“– πŸ’» ⚠️
Sacerdoss
Sacerdoss

πŸ“–
Tobias Wich
Tobias Wich

πŸ“– πŸ’»
Alex Chaplianka
Alex Chaplianka

πŸ“–
Idris Hayward
Idris Hayward

πŸ“–
Karl von Randow
Karl von Randow

πŸ“–
Marco Lechner
Marco Lechner

πŸ“–
Mateusz GaweΕ‚
Mateusz GaweΕ‚

πŸ’»
Nicolas Ternisien
Nicolas Ternisien

πŸ“–
oschlueter
oschlueter

πŸ’»
Tim Nonner
Tim Nonner

πŸ’»
thlor
thlor

πŸ’» πŸ“–
Yun Wang
Yun Wang

πŸ“– πŸ’»
Stefanic
Stefanic

πŸ’» πŸ“–
xpoinsard
xpoinsard

πŸ“– πŸ’»
Bartizan
Bartizan

πŸ’» πŸ“– ⚠️
galewis2
galewis2

πŸ’»
Derick M.
Derick M.

πŸ’» πŸ“– ⚠️
norcis
norcis

πŸ’»
SClo
SClo

πŸ’» πŸ“–
Chris
Chris

πŸ’» πŸ“–
iAlex97
iAlex97

πŸ’» ⚠️
Mauricio Scheffer
Mauricio Scheffer

πŸ’»
Sean Dean
Sean Dean

πŸ“–
Philipp Gassmann
Philipp Gassmann

πŸ“– πŸ’» ⚠️
saddfox
saddfox

πŸ“– πŸ’» ⚠️
gsg-git
gsg-git

πŸ“–
Stefan Breunig
Stefan Breunig

πŸ’»
carlomion
carlomion

πŸ’» πŸš‡
stouch
stouch

πŸ’» πŸ“– πŸš‡
Sebastian Drozd
Sebastian Drozd

πŸ’» πŸ“–
Ilia Lazebnik
Ilia Lazebnik

πŸ’»
Denis Rykov
Denis Rykov

πŸ’»
Eric Hayter
Eric Hayter

πŸ“–
Anthony Fok
Anthony Fok

πŸ’»

This project follows the all-contributors specification. Contributions of any kind welcome!

About

100% working container for Nominatim with ca-certificates

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages

  • Shell 76.0%
  • Dockerfile 19.7%
  • Python 4.3%