# Map tiles

> Where OpenCTI takes the tiles and country boundaries of its maps, and how to replace them with your own files, with no external map server.

- URL: https://filigran.io/docs/lts/7.260811-lts/deploy/configure/maps/
- Products: OpenCTI 7.260811.0-lts.1
- OpenCTI line: 7.260811 LTS · 7.260811.0-lts.1
- For: platform engineers, administrators
- Type: How-to guide

OpenCTI draws its maps, such as the locations of an entity or the map widgets of dashboards, from map data it serves itself. This page explains where that data comes from, and how to replace it with a more detailed or regional map. Since version 7.260811, maps work with no configuration, air-gapped deployments included; before, the browsers load the tiles from a tile server.

*(OpenCTI 7.260811 and later)*

## How OpenCTI serves its maps {#how-opencti-serves-its-maps}

The browser renders the maps from vector tiles in a [PMTiles](https://pmtiles.io/) file. OpenCTI serves it at `/maps/world.pmtiles` and answers range requests, so the browser downloads only the tiles of the area and zoom level it shows. No external map server is involved, and the map follows the light or dark theme of the interface.

**Diagram: The browser loads its map tiles from OpenCTI, which serves the custom file of its S3 bucket when an administrator uploaded one, else the file bundled in its image**

- Browsers: Browser (Renders vector tiles), Administrator (Settings > Parameters > Map configuration)
- OpenCTI: OpenCTI (/maps/world.pmtiles)
- Map files: Custom file (In the S3 bucket of OpenCTI), Bundled file (In the image of OpenCTI)

Connections:

- Browser → OpenCTI: range requests
- Administrator → OpenCTI: upload
- OpenCTI → Custom file: wins when present
- OpenCTI → Bundled file: otherwise

The tiles come from one of two files:

- the bundled file, in the image of OpenCTI, at the path `APP__MAP_BUNDLED_FILE_PATH` (`./static/maps/world.pmtiles` by default);
- a custom file, uploaded by an administrator and stored in the S3 bucket of OpenCTI.

A custom file, when there is one, wins over the bundled one.

*(OpenCTI before 7.261030)*

Browsers keep the tiles for up to 24 hours: after an upload or a deletion, a browser that already showed a map keeps the previous tiles until then, unless its cache is emptied.

The `APP__MAP_*_BUNDLED_FILE_PATH` settings only move the bundled files, for a custom image of OpenCTI: you do not need them to use your own map.

## Get a PMTiles file {#get-a-pmtiles-file}

[Protomaps](https://protomaps.com/) publishes a daily build of the whole planet, about 137 GB. A low-zoom extract, from zoom 0 to 6, is about 30 to 80 MB and enough for OpenCTI. The [go-pmtiles](https://github.com/protomaps/go-pmtiles) command line extracts it with range requests, without downloading the whole planet:

```bash
pmtiles extract https://build.protomaps.com/20260722.pmtiles world.pmtiles --maxzoom=6
```

Replace the date with that of a recent build. For a regional map, the [Protomaps command line](https://docs.protomaps.com/guide/getting-started) extracts an area with `--bbox`; [planetiler](https://github.com/onthegomap/planetiler) builds tiles from OpenStreetMap data.

## Upload your map {#upload-your-map}

*(OpenCTI before 7.261030)*

1. Go to **Settings > Parameters > Map configuration**.
2. In the **Custom map** row, click **Upload**, then select your `.pmtiles` file. A new upload replaces the custom map in place.

   **Check that it worked**

   The **Custom map** row shows your file, with its name and size. A browser that already showed a map shows your tiles once its copy of the previous file expires, within 24 hours.

To go back to the bundled map, click **Delete** in the **Custom map** row: it takes effect at once, with no confirmation.

## Coming from an external tile server {#coming-from-an-external-tile-server}

Earlier versions loaded raster tiles from a tile server, set with `APP__MAP_TILE_SERVER_DARK` and `APP__MAP_TILE_SERVER_LIGHT`. OpenCTI now ignores these settings: remove them, and the tile server if you ran one.

## What's next {#what-s-next}

- [Install offline or with FIPS 140-3](https://filigran.io/docs/lts/7.260811-lts/deploy/install/air-gapped/).
- [Configure the shared services](https://filigran.io/docs/lts/7.260811-lts/deploy/configure/shared-services/), for the S3 bucket that holds the custom files.
