NOTICE: is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

Hello, we got an issue with private instance using official docker image. We have issue with some postal codes. For example the public api returns correct data (the issue also occurs with street name and number) for the city:

but our instance returns empty reply. However, when refering to county postcode:

we do get proper reply from our selfhosted instance, including detailed query with street name/number (we get correct geolocation using the general county post-code)

Our instance configuration is as follows (deployed using docker compose):







Docker image we use is: mediagis/nominatim:4.0.

Checked for update using:

sudo -u nominatim nominatim replication -v --check-for-updates --project-dir /nominatim

and its up-to-date. Any hints on what may be the issue here? Can too low level import style have anything to do with it?

The 89-500 is general county code, the 89-501 is strictly city code . The issue extends to other cities as well. If address is specified with general county code everything works, but when local city code is used, reply is empty. The issue does not occur on public api - all local city codes give correct rply. Anything in config we should change?

asked 12 May '22, 08:53

mzaw9's gravatar image

accept rate: 0%

edited 12 May '22, 10:57


When was the initial import?

(12 May '22, 09:19) lonvia

around 2 months ago. replication is working once/day the issue is wide - it has county codes, but missing local city-codes; however, it works on public api.

can this: difference between address and full import be a culprit?

(12 May '22, 09:22) mzaw9

Quick answer: You need to update the postcode data on your instance with the following command: nominatim refresh --postcode. Make sure that there are no updates running at the same time. The update takes between 20min and an hour, depending on your hardware.

Background: Postcode data is not directly available in OSM. There are only postcodes as part of addresses. To make search for postcodes work, Nominatim takes the postcodes from all the address and computes a centroid point for each of them. This is a rather expensive process, so it is not done as part of the regular updates. You have to occasionally run the process manually using the command above.

Addresses with the postcode '89-501' were first entered in OSM only a couple of weeks ago. That's why your instance does not have them yet. If you have regularly applied updates, the data is there. Recomputing the postcode centroids will make them searchable.

permanent link

answered 18 May '22, 08:34

lonvia's gravatar image

accept rate: 40%

thanks, that helped; we also automated the refresh to once a day (same as update)

(19 May '22, 14:17) mzaw9

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 12 May '22, 08:53

question was seen: 1,748 times

last updated: 19 May '22, 14:17

NOTICE: is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum