1 # Updating the Database
3 There are many different ways to update your Nominatim database.
4 The following section describes how to keep it up-to-date using
5 an [online replication service for OpenStreetMap data](https://wiki.openstreetmap.org/wiki/Planet.osm/diffs)
6 For a list of other methods to add or update data see the output of
7 `nominatim add-data --help`.
10 If you have configured a flatnode file for the import, then you
11 need to keep this flatnode file around for updates.
13 #### Installing the newest version of Pyosmium
15 It is recommended to install Pyosmium via pip. Make sure to use python3.
16 Run (as the same user who will later run the updates):
19 pip3 install --user osmium
22 #### Setting up the update process
24 Next the update needs to be initialised. By default Nominatim is configured
25 to update using the global minutely diffs.
27 If you want a different update source you will need to add some settings
28 to `.env`. For example, to use the daily country extracts
29 diffs for Ireland from Geofabrik add the following:
31 # base URL of the replication service
32 NOMINATIM_REPLICATION_URL="https://download.geofabrik.de/europe/ireland-and-northern-ireland-updates"
33 # How often upstream publishes diffs (in seconds)
34 NOMINATIM_REPLICATION_UPDATE_INTERVAL=86400
35 # How long to sleep if no update found yet (in seconds)
36 NOMINATIM_REPLICATION_RECHECK_INTERVAL=900
38 To set up the update process now run the following command:
40 nominatim replication --init
42 It outputs the date where updates will start. Recheck that this date is
45 The `replication --init` command needs to be rerun whenever the replication
48 #### Updating Nominatim
50 The following command will keep your database constantly up to date:
54 If you have imported multiple country extracts and want to keep them
55 up-to-date, [Advanced installations section](Advanced-Installations.md) contains instructions
56 to set up and update multiple country extracts.