> For the complete documentation index, see [llms.txt](https://ofn-user-guide.gitbook.io/ofn-testing-handbook/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ofn-user-guide.gitbook.io/ofn-testing-handbook/testers-toolkit/enabling-open-street-maps.md).

# Enabling Open Street Maps

Quick guide to enable OSM in staging servers

To enable OSM on a staging server, you'll need:

* ssh access to the server (with admin rights)
* an OFN user account (with superadmin rights)
* a geocoder API key

Then, follow the steps:

* Log in to the staging server via ssh and edit the configuration file for the respective environment. For OFN staging servers that should be `~/apps/openfoodnetwork/current/.env.staging`
* Comment or delete existing Google Maps and replace it with the Mapbox key.&#x20;
  * &#x20;`#GOOGLE_MAPS_API_KEY=...`&#x20;
  * Add the `GEOCODER_API_KEY=pk.eyJ1IjoiZmZ1cnR...<look within the testing section of Bitwarden>`
* restart puma `sudo systemctl restart puma.service`
* Log in as superadmin and visit the Content section (under Configuration).

  * Find the MAP section and tick the `Open Street Map enabled` checkbox
  * Under `Open Street Map provider name:` add `OpenStreetMap.Mapnik`
  * Save the changes by clicking `Update`

  <figure><img src="https://88588569-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M7NnFH2urYVKG6zlEtN%2Fuploads%2F4S16E15OKEm1uqGHXGt5%2Fimage.png?alt=media&amp;token=e1384153-a4d4-48a4-896a-3541dc58e4da" alt=""><figcaption></figcaption></figure>

Visit `/map` ; you should be looking at an OSM map :tada:

You can check it in the bottom-right corner of the map:

<figure><img src="https://88588569-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M7NnFH2urYVKG6zlEtN%2Fuploads%2F9JE55UDWbP01ptfu0NR2%2Fimage.png?alt=media&amp;token=17e19dbd-597a-460a-9ed7-f4aec66d04fe" alt=""><figcaption></figcaption></figure>
