]> git.openstreetmap.org Git - nominatim.git/blob - settings/env.defaults
update documentation for configuration
[nominatim.git] / settings / env.defaults
1 # .env
2 # Default configuration settings for Nominatim.
3 # This file uses the dotenv format.
4
5 # Database connection string.
6 # Add host, port, user etc through additional semicolon-separated attributes.
7 # e.g. ;host=...;port=...;user=...;password=...
8 # Changing this variable requires to run 'nominatim refresh --website'.
9 NOMINATIM_DATABASE_DSN="pgsql:dbname=nominatim"
10
11 # Database web user.
12 # Nominatim sets up read-only access for this user during installation.
13 NOMINATIM_DATABASE_WEBUSER="www-data"
14
15 # Directory where to find the PostgreSQL server module.
16 # When empty the module is expected to be located in the 'module' subdirectory
17 # in the project directory.
18 # Changing this value requires to run 'nominatim refresh --functions'.
19 NOMINATIM_DATABASE_MODULE_PATH=
20
21 # Tokenizer used for normalizing and parsing queries and names.
22 # The tokenizer is set up during import and cannot be changed afterwards
23 # without a reimport.
24 # Currently available tokenizers: icu, legacy
25 NOMINATIM_TOKENIZER="icu"
26
27 # Number of occurrences of a word before it is considered frequent.
28 # Similar to the concept of stop words. Frequent partial words get ignored
29 # or handled differently during search.
30 # Changing this value requires a reimport.
31 NOMINATIM_MAX_WORD_FREQUENCY=50000
32
33 # If true, admin level changes on places with many contained children are blocked.
34 NOMINATIM_LIMIT_REINDEXING=yes
35
36 # Restrict search languages.
37 # Normally Nominatim will include all language variants of name:XX
38 # in the search index. Set this to a comma separated list of language
39 # codes, to restrict import to a subset of languages.
40 # Currently only affects the initial import of country names and special phrases.
41 NOMINATIM_LANGUAGES=
42
43 # Rules for normalizing terms for comparisons.
44 # The default is to remove accents and punctuation and to lower-case the
45 # term. Spaces are kept but collapsed to one standard space.
46 # Changing this value requires a reimport.
47 NOMINATIM_TERM_NORMALIZATION=":: NFD (); [[:Nonspacing Mark:] [:Cf:]] >;  :: lower (); [[:Punctuation:][:Space:]]+ > ' '; :: NFC ();"
48
49 # Configuration file for the tokenizer.
50 # The content depends on the tokenizer used. If left empty the default settings
51 # for the chosen tokenizer will be used. The configuration can only be set
52 # on import and not be changed afterwards.
53 NOMINATIM_TOKENIZER_CONFIG=
54
55 # Search in the Tiger house number data for the US.
56 # Note: The tables must already exist or queries will throw errors.
57 # Changing this value requires to run ./utils/setup --create-functions --setup-website.
58 NOMINATIM_USE_US_TIGER_DATA=no
59
60 # Search in the auxiliary housenumber table.
61 # Changing this value requires to run ./utils/setup --create-functions --setup-website.
62 NOMINATIM_USE_AUX_LOCATION_DATA=no
63
64 # Proxy settings
65 # The following settings allow to set a proxy to use when remotely downloading
66 # data. Host and port are required. Login and password are optional.
67 NOMINATIM_HTTP_PROXY=no
68 NOMINATIM_HTTP_PROXY_HOST=
69 NOMINATIM_HTTP_PROXY_PORT=3128
70 NOMINATIM_HTTP_PROXY_LOGIN=
71 NOMINATIM_HTTP_PROXY_PASSWORD=
72 # Also set these standard environment variables.
73 # HTTP_PROXY="http://user:pass@10.10.1.10:1080"
74 # HTTPS_PROXY="http://user:pass@10.10.1.10:1080"
75
76 # Location of the osm2pgsql binary.
77 # EXPERT ONLY. You should usually use the supplied osm2pgsql.
78 NOMINATIM_OSM2PGSQL_BINARY=
79
80 # Directory where to find pre-computed Wikipedia importance files.
81 # When unset, the data is expected to be located in the project directory.
82 NOMINATIM_WIKIPEDIA_DATA_PATH=
83
84 # Configuration file for rank assignments.
85 NOMINATIM_ADDRESS_LEVEL_CONFIG=address-levels.json
86
87 # Configuration file for OSM data import.
88 # This may either be the name of one of an internal style or point
89 # to a file with a custom style.
90 # Internal styles are: admin, street, address, full, extratags
91 NOMINATIM_IMPORT_STYLE=extratags
92
93 # Location of the flatnode file used by osm2pgsql to store node locations.
94 # When unset, osm2pgsql stores the location in the PostgreSQL database. This
95 # is especially useful for imports of larger areas, like continents or the
96 # full planet. The file needs at least 70GB storage.
97 NOMINATIM_FLATNODE_FILE=
98
99 ### Tablespace settings
100 #
101 # The following settings allow to move parts of the database tables into
102 # different tablespaces. This is especially interesting if you have disks
103 # with different speeds. When unset, the default tablespace is used.
104 # Only has an effect during import.
105
106 # Tablespace used for tables used when searching.
107 NOMINATIM_TABLESPACE_SEARCH_DATA=
108 # Tablespace used for indexes used when searching.
109 NOMINATIM_TABLESPACE_SEARCH_INDEX=
110
111 # Tablespace used for the OSM data cache tables. Used for import and update only.
112 NOMINATIM_TABLESPACE_OSM_DATA=
113 # Tablespace used for the OSM data cache indexes. Used for import and update only.
114 NOMINATIM_TABLESPACE_OSM_INDEX=
115
116 # Tablespace used for place import table. Used for import and update only.
117 NOMINATIM_TABLESPACE_PLACE_DATA=
118 # Tablespace used for place import indexes. Used for import and update only.
119 NOMINATIM_TABLESPACE_PLACE_INDEX=
120
121 # Tablespace for tables used during address computation. Used for import and update only.
122 NOMINATIM_TABLESPACE_ADDRESS_DATA=
123 # Tablespace for indexes used during address computation. Used for import and update only.
124 NOMINATIM_TABLESPACE_ADDRESS_INDEX=
125
126 # Tablespace for tables for auxilary data, e.g. TIGER data, postcodes.
127 NOMINATIM_TABLESPACE_AUX_DATA=
128 # Tablespace for indexes for auxilary data, e.g. TIGER data, postcodes.
129 NOMINATIM_TABLESPACE_AUX_INDEX=
130
131
132 ### Replication settings
133 #
134 # The following settings control where and how updates for the database are
135 # retrieved.
136 #
137
138 #
139 # Base URL of replication service.
140 # A replication service provides change files of OSM data at regular intervals.
141 # These are used to keep the database up to date. Per default it points to
142 # the minutely updates for the main OSM database. There are other services
143 # geared towards larger update intervals or data extracts.
144 # Changing this value requires to rerun 'nominatim replication --init'.
145 NOMINATIM_REPLICATION_URL="https://planet.openstreetmap.org/replication/minute"
146
147 # Maximum amount of data to download per batch.
148 # Size is in MB.
149 NOMINATIM_REPLICATION_MAX_DIFF=50
150
151 # Publication interval of the replication service (in seconds).
152 # Determines when Nominatim will attempt again to download again a new
153 # update. The time is computed from the publication date of the last diff
154 # downloaded. Setting this to a slightly higher value than the actual
155 # publication interval avoids unnecessary rechecks.
156 NOMINATIM_REPLICATION_UPDATE_INTERVAL=75
157
158 # Wait time to recheck for a pending update (in seconds).
159 # Time to wait after an expected update was not available on the server.
160 NOMINATIM_REPLICATION_RECHECK_INTERVAL=60
161
162 ### API settings
163 #
164 # The following settings configure the API responses. You must rerun
165 # 'nominatim refresh --website' after changing any of them.
166
167 # Send permissive CORS access headers.
168 # When enabled, send CORS headers to allow access to everybody.
169 NOMINATIM_CORS_NOACCESSCONTROL=yes
170
171 # URL for static icon images.
172 # Set this to the /mapicon directory of your nominatim-ui to enable returning
173 # icon URLs with the results.
174 NOMINATIM_MAPICON_URL=
175
176 # Language to assume when no particular language is requested.
177 # When unset, the local language (i.e. the name tag without suffix) will be used.
178 NOMINATIM_DEFAULT_LANGUAGE=
179
180 # Enable a special batch query mode.
181 # This feature is currently undocumented and potentially broken.
182 NOMINATIM_SEARCH_BATCH_MODE=no
183
184 # Threshold for searches by name only.
185 # Threshold where the lookup strategy in the database is switched. If there
186 # are less occurences of a tem than given, the search does the lookup only
187 # against the name, otherwise it uses indexes for name and address.
188 NOMINATIM_SEARCH_NAME_ONLY_THRESHOLD=500
189
190 # Maximum number of OSM ids accepted by /lookup.
191 NOMINATIM_LOOKUP_MAX_COUNT=50
192
193 # Number of different geometry formats that may be queried in parallel.
194 # Set to zero to disable polygon output.
195 NOMINATIM_POLYGON_OUTPUT_MAX_TYPES=1
196
197 # Offer backwards compatible PHP URLs.
198 # When running one of the Python enignes, they will add endpoint aliases
199 # under <endpoint>.php
200 NOMINATIM_SERVE_LEGACY_URLS=yes
201
202 # Maximum number of connection a single API object can use. (Python API only)
203 # When running Nominatim as a server, then this is the maximum number
204 # of connections _per worker_.
205 NOMINATIM_API_POOL_SIZE=10
206
207 # Timeout is seconds after which a single query to the database is cancelled.
208 # The user receives a 503 response, when a query times out.
209 # When empty, then timeouts are disabled.
210 NOMINATIM_QUERY_TIMEOUT=10
211
212 # Maximum time a single request is allowed to take. When the timeout is
213 # exceeeded, the available results are returned.
214 # When empty, then timouts are disabled.
215 NOMINATIM_REQUEST_TIMEOUT=60
216
217 # Search elements just within countries
218 # If, despite not finding a point within the static grid of countries, it
219 # finds a geometry of a region, do not return the geometry. Return "Unable
220 # to geocode" instead.
221 NOMINATIM_SEARCH_WITHIN_COUNTRIES=False
222
223 ### Log settings
224 #
225 # The following options allow to enable logging of API requests.
226 # You must rerun 'nominatim refresh --website' after changing any of them.
227 #
228 # Enable logging of requests into the DB.
229 # The request will be logged into the new_query_log table.
230 # You should set up a cron job that regularly clears out this table.
231 NOMINATIM_LOG_DB=no
232
233 # Enable logging of requests into a file.
234 # To enable logging set this setting to the file to log to.
235 NOMINATIM_LOG_FILE=
236
237 # Echo raw SQL from SQLAlchemy statements.
238 # EXPERT: Works only in command line/library use.
239 NOMINATIM_DEBUG_SQL=no