3 This page contains generic installation instructions for Nominatim and its
4 prerequisites. There are also step-by-step instructions available for
5 the following operating systems:
7 * [Ubuntu 24.04](Install-on-Ubuntu-24.md)
8 * [Ubuntu 22.04](Install-on-Ubuntu-22.md)
10 These OS-specific instructions can also be found in executable form
11 in the `vagrant/` directory.
13 Users have created instructions for other frameworks. We haven't tested those
14 and can't offer support.
16 * [Docker](https://github.com/mediagis/nominatim-docker)
17 * [Docker on Kubernetes](https://github.com/peter-evans/nominatim-k8s)
18 * [Kubernetes with Helm](https://github.com/robjuz/helm-charts/blob/master/charts/nominatim/README.md)
19 * [Ansible](https://github.com/synthesio/infra-ansible-nominatim)
25 For running Nominatim:
27 * [PostgreSQL](https://www.postgresql.org) (12+ will work, 13+ strongly recommended)
28 * [PostGIS](https://postgis.net) (3.0+ will work, 3.2+ strongly recommended)
29 * [osm2pgsql](https://osm2pgsql.org) (1.8+, optional when building with CMake)
30 * [Python 3](https://www.python.org/) (3.7+)
32 Furthermore the following Python libraries are required:
34 * [Psycopg3](https://www.psycopg.org)
35 * [Python Dotenv](https://github.com/theskumar/python-dotenv)
36 * [psutil](https://github.com/giampaolo/psutil)
37 * [Jinja2](https://palletsprojects.com/p/jinja/)
38 * [PyICU](https://pypi.org/project/PyICU/)
39 * [PyYaml](https://pyyaml.org/) (5.1+)
40 * [datrie](https://github.com/pytries/datrie)
42 These will be installed automatically when using pip installation.
44 When using legacy CMake-based installation:
46 * [cmake](https://cmake.org/)
47 * [expat](https://libexpat.github.io/)
48 * [proj](https://proj.org/)
49 * [bzip2](http://www.bzip.org/)
50 * [zlib](https://www.zlib.net/)
51 * [ICU](http://site.icu-project.org/)
52 * [nlohmann/json](https://json.nlohmann.me/)
53 * [Boost libraries](https://www.boost.org/), including system and file system
54 * PostgreSQL client libraries
55 * a recent C++ compiler (gcc 5+ or Clang 3.8+)
57 For running continuous updates:
59 * [pyosmium](https://osmcode.org/pyosmium/)
61 For running the Python frontend:
63 * [SQLAlchemy](https://www.sqlalchemy.org/) (1.4.31+ with greenlet support)
64 * [asyncpg](https://magicstack.github.io/asyncpg) (0.8+, only when using SQLAlchemy < 2.0)
65 * one of the following web frameworks:
66 * [falcon](https://falconframework.org/) (3.0+)
67 * [starlette](https://www.starlette.io/)
68 * [uvicorn](https://www.uvicorn.org/)
70 For dependencies for running tests and building documentation, see
71 the [Development section](../develop/Development-Environment.md).
75 A minimum of 2GB of RAM is required or installation will fail. For a full
76 planet import 128GB of RAM or more are strongly recommended. Do not report
77 out of memory problems if you have less than 64GB RAM.
79 For a full planet install you will need at least 1TB of hard disk space.
80 Take into account that the OSM database is growing fast.
81 Fast disks are essential. Using NVME disks is recommended.
83 Even on a well configured machine the import of a full planet takes
84 around 2.5 days. When using traditional SSDs, 4-5 days are more realistic.
86 ## Tuning the PostgreSQL database
88 You might want to tune your PostgreSQL installation so that the later steps
89 make best use of your hardware. You should tune the following parameters in
90 your `postgresql.conf` file.
93 maintenance_work_mem = (10GB)
94 autovacuum_work_mem = 2GB
96 synchronous_commit = off
98 checkpoint_timeout = 60min
99 checkpoint_completion_target = 0.9
100 random_page_cost = 1.0
104 The numbers in brackets behind some parameters seem to work fine for
105 128GB RAM machine. Adjust to your setup. A higher number for `max_wal_size`
106 means that PostgreSQL needs to run checkpoints less often but it does require
107 the additional space on your disk.
109 Autovacuum must not be switched off because it ensures that the
110 tables are frequently analysed. If your machine has very little memory,
111 you might consider setting:
113 autovacuum_max_workers = 1
115 and even reduce `autovacuum_work_mem` further. This will reduce the amount
116 of memory that autovacuum takes away from the import process.
118 ## Downloading and building Nominatim
120 ### Downloading the latest release
122 You can download the [latest release from nominatim.org](https://nominatim.org/downloads/).
123 The release contains all necessary files. Just unpack it.
125 ### Downloading the latest development version
127 If you want to install latest development version from github, make sure to
128 also check out the osm2pgsql subproject:
131 git clone --recursive https://github.com/openstreetmap/Nominatim.git
134 The development version does not include the country grid. Download it separately:
137 wget -O Nominatim/data/country_osm_grid.sql.gz https://nominatim.org/data/country_grid.sql.gz
140 ### Building Nominatim
142 #### Building the latest development version with pip
144 Nominatim is easiest to run from its own virtual environment. To create one, run:
146 sudo apt-get install virtualenv
147 virtualenv /srv/nominatim-venv
149 To install Nominatim directly from the source tree into the virtual environment, run:
151 /srv/nominatim-venv/bin/pip install packaging/nominatim-{db,api}
153 #### Building in legacy CMake mode
156 Installing Nominatim through CMake is now deprecated. The infrastructure
157 will be removed in Nominatim 5.0. Please switch to pip installation.
159 The code must be built in a separate directory. Create the directory and
167 Nominatim uses cmake and make for building. Assuming that you have created the
168 build at the same level as the Nominatim source directory run:
176 Nominatim installs itself into `/usr/local` per default. To choose a different
177 installation directory add `-DCMAKE_INSTALL_PREFIX=<install root>` to the
178 cmake command. Make sure that the `bin` directory is available in your path
182 export PATH=<install root>/bin:$PATH
185 Now continue with [importing the database](Import.md).