There are a few different configuration files used by MapProxy. Some are required and some are optional.

This file configures which services and layers the proxy should offer. You can define from where the proxy should get which data. You can also set metadata like contact information for the Capabilities documents.
This is the main configuration of the proxy. Configure which servers should be started, where the cached data should be stored, etc.
This file is the configuration for the mapproxy-seed tool.
develop.ini and config.ini
These are the paster configuration files that are used to start the proxy in development or production mode.


All layers the proxy offers are configured in this file. The configuration uses the YAML format.


The indentation is significant and shall only contain space characters. Tabulators are not permitted for indentation.

The configuration contains the keys service and layers.


Here is an example for the service part:

        text: "© MyCompany"
        title: MapProxy WMS Proxy
        abstract: This is the fantastic MapProxy.
            person: Your Name Here
            position: Technical Director
            address: Fakestreet 123
            city: Somewhere
            postcode: 12345
            country: Germany
            phone: +49(0)000-000000-0
            fax: +49(0)000-000000-0
        access_constraints: This service is intended for private and evaluation use only.
        fees: 'None'


Adds an attribution (copyright) line to all WMS requests.

The text line of the attribution (e.g. some copyright notice, etc).


md is for metadata. These fields are used for the WMS GetCapabilities responses. See the above example for all supported keys.


Here you can define all layers the proxy should offer. Each layer configuration is a YAML dictionary. The key of each layer is also the name of the layer, i.e. the name used in WMS layers argument. If MapProxy should use the same ordering of the layers for capability responses, you should put the definitions in a list (prepend a - before the key).

  - layer1:
    option1: aaa
    option2: bbb
  - layer2:
    option1: xxx
    option2: yyy

Each configuration item contains information about the layer (e.g. name), how the layer is cached (e.g. in which SRS) and where the data comes from (e.g. which WMS-Server).


Metadata for this layer. At the moment only title ist supported. It will be used as the human readable name for WMS layers.


With param you can set the parameters of the data-source and cache.

This is the internal image format for the cache. The default is image/png.
This format is used to request new tiles. If the bandwidth to the WMS server is high (e.g. localhost or LAN) you should use image/tiff here. That prevents unnecessary encoding and decoding of the images. If unset format is used.

The spatial reference system used for the internal cache. You can define multiple SRSs here. One cache is created for each.:

srs: EPSG:4326
srs: ['EPSG:4326', 'EPSG:900913']

MapProxy supports on-the-fly transformation of requests between different SRSs. So it is not required to add an extra cache for each supported SRS. For best performance only the SRS most requests are in should be used.

There is some special handling layers that need geographical and projected coordinate systems. If you set both EPSG:4326 and EPSG:900913 all requests with projected SRS will access the EPSG:900913 cache, requests with geographical SRS will use EPSG:4326. The distortions from the transformation should be acceptable these to cached SRS.

The bounding box of the layer.

The resolution for which MapProxy should cache tiles. For requests with no matching cached resolution the next best resolution is used and MapProxy will transform the result. There are three ways to configure the resolutions.

1. A factor between each resolution. With each step the resolution is multiplied by this factor. Defaults to 2.

2. A list with resolutions in units per pixel (degrees or meter per pixel). The units from the first configured srs are used.

3. The term sqrt2. This option is a shorthand for a resolution factor of 1.4142 (i.e. square root of two). With this factor the resolution doubles every second level. Compared to the default factor 2 you will get another cached level between all standard levels. This is suited for free zooming in vector-based layers where the results might look to blurry/pixelated in some resolutions.

This limits the number of parallel requests MapProxy will issue to the source server. It even works across multiple WMS sources as long as all have the same concurrent_requests and req.url parameter.


You define the data sources of each layer here. The configuration is explained below.


Overwrite the system-wide attribution line for this layer.

If this option is set to true, the colors of the attribution will be inverted. Use this if the normal attribution is hard to on this layer (i.e. on aerial imagery).


Add a watermark right into the cached data. The watermark is thus also present in TMS or KML requests.

The watermark text. Should be short.
The opacity of the watermark (from 0 transparent to 255 full opaque). Use a value between 3 and 10 for unobtrusive watermarks.


Every layer contains one or more sources. The sources define where the proxy should get the data for this layer. Each layer has a type.

MapProxy support the following types:


The cache_wms source passes requests to a WMS server and caches all data for further requests.

req contains the source WMS URL and the layers. For transparent layers the option transparent should be set to 'true'.

This option affects what request the proxy sends to the source WMS server.

version is the WMS version number used for requests (supported: 1.0.0, 1.1.1, 1.3.0). If featureinfo is true, MapProxy will mark the layer as queryable and incoming GetFeatureInfo requests will be forwarded to the source server.


A list with SRSs that the WMS source supports. If the layer caches data in an SRS that the source does not provide, MapProxy will use one of the configured supported_srs to request images and will then transform the result back to the cache SRS.

If you have multiple supported_srs, MapProxy will use the fist projected SRS for requests in projected SRS, and vice versa for geographic SRS. E.g when supported_srs is ['EPSG:4326', 'EPSG:31467'] caches for EPSG:900913 will use EPSG:32467.

Minimal example:

- type: cache_wms
    url: http://localhost:8080/service?
    layers: base

Full example:

- type: cache_wms
    version: 1.0.0
    featureinfo: True
  supported_srs: ['EPSG:4326', 'EPSG:31467']
    url: http://localhost:8080/service?mycustomparam=42
    layers: roads
    transparent: 'true'


The cache_tiles source can retrieve data from existing tile servers. This source takes a url option that contains a URL template. The template format is %(key_name)s. MapProxy supports the following named variables in the URL:

x, y, z
The tile coordinate.
The format of the tile.
Quadkey for the tile as described in
TileCache path like 09/000/000/264/000/000/345. Note that it does not contain any format extension.

Additionally you can specify the origin of the tile grid with the origin option. Supported values are sw for south-west (lower-left) origin or nw for north-west (upper-left) origin. sw is the default.


- type: cache_tiles
  url: http://localhost:8080/tile?x=%(x)s&y=%(y)s&z=%(z)s&format=%(format)s
  origin: ``nw``


A direct source passes all requests to the configured WMS server and does not cache any data.

Defines the source WMS URL and the layers that should be requested. This is similar to the cache_wms.req parameter.
A list of the SRS the source WMS supportes. Other requests for other SRS will be transformed. See supported_srs for cache_wms.supported_srs.


- type: direct
    url: http://servername/service
    layers: poi,roads


Adds information like resolution and bbox to the response image. This is useful to determine a fixed set of resolutions for the res-parameter.


This file configures some internals of MapProxy.


This configures the MapProxy WMS server. Here you can configure the image formats and SRS your MapProxy should offer in the WMS capabilities.

A list of image mime types.
A list of supported SRS. MapProxy will only accept request for these SRS.


Here you can define some options that affect the way MapProxy generates image results.


The resampling method used when results need to be rescaled or transformed. You can use one of nearest, bilinear or bicubic. Nearest is the fastest and bicubic the slowest. The results will look best with bilinear or bicubic. Bicubic enhances the contrast at edges and should be used for vector images.

With bilinear you should get about 2/3 of the nearest performance, with bicubic 1/3.

See the examples below for results of nearest, bilinear and bicubic.

_images/nearest.png _images/bilinear.png _images/bicubic.png
An integer value from 0 to 100. Larger values result in slower performance, larger file sizes but better image quality. You should try values between 75 and 90 for good compromise between performance and quality.

MapProxy chooses the optimal cached level for requests that do not exactly match any cached resolution. MapProxy will stretch or shrink images to the requested resolution. The stretch_factor defines the maximum factor MapProxy is allowed to stretch images. Stretched images result in better performance but will look blurry when the value is to large (> 1.2).

Example: Your MapProxy caches 10m and 5m resolutions. Requests with 9m resolution will be generated from the 10m level, requests for 8m from the 5m level.


This factor only applies for the first level and defines the maximum factor that MapProxy will shrink images.

Example: Your MapProxy layer starts with 1km resolution. Requests with 3km resolution will get a result, requests with 5km will get a blank response.


MapProxy does not make a single request for every tile but will request a large meta-tile that consist of multiple tiles. meta_size defines how large a meta-tile is. A meta_size of [4, 4] will request 64 tiles in one pass. With a tile size of 256x256 this will result in 1024x1024 requests to the source WMS.
MapProxy will increase the size of each meta-tile request by this number of pixels in each direction. This can solve cases where labels are cut-off at the edge of tiles.
The base directory where all cached tiles will be stored. The path can either be absolute (e.g. /var/mapproxy/cache) or relative to the proxy.yaml file.

MapProxy uses locking to prevent multiple request for the same meta-tile. This option defines where the temporary lock files will be stored. The path can either be absolute (e.g. /tmp/lock/mapproxy) or relative to the proxy.yaml file.


Old locks will not be removed immediately but when new locks are created. So you will always find some old lock files in this directory.



MapProxy uses Proj4 for all coordinate transformations. If you need custom projections or need to tweak existing definitions (e.g. add towgs parameter set) you can point MapProxy yo your own set of proj4 init files. The path should contain a epsg file with the EPSG definitions.

The configured path can be absolute or relative to the proxy.yaml.

axis_order_ne and axis_order_ne

The axis ordering defines in which order coordinates are given, i.e. lon/lat or lat/lon. The ordering is dependent to the SRS. Most clients and servers did not respected the ordering and everyone used lon/lat ordering. With the WMS 1.3.0 specification the OGC emphasized that the axis ordering of the SRS should be used.

Here you can define the axis ordering of your SRS. This might be required for proper WMS 1.3.0 support if you use any SRS that is not in the default configuration.

By default MapProxy assumes lat/long (north/east) order for all geographic and x/y (east/north) order for all projected SRS.

If that is not the case for your SRS you need to add the SRS name to the appropriate parameter:

  # for North/East ordering
  axis_order_ne: ['EPSG:9999', 'EPSG:9998']
  # for East/North ordering
  axis_order_en: ['EPSG:0000', 'EPSG:0001']



You need Python 2.6 or the SSL module for this feature.

MapProxy supports access to HTTPS servers. Just use https instead of http when defining the URL of a source. MapProxy needs a file that contains the root and CA certificates. See the Python SSL documentation for more information about the format.

    ca_certs: ./certs_file

If you want to use SSL but do not need certificate verification, then you can disable it with the insecure option.

    insecure: True


This limits the number of parallel requests MapProxy will make to a source WMS. This limit is per request and not for all MapProxy requests.

Example: A request in an uncached region requires MapProxy to fetch four meta-tiles. A tile_creator_pool_size of two allows MapProxy to make two requests to the source WMS request in parallel.


This defines how long MapProxy should wait for data from source servers. Increase this value if your source servers are slower.


Configuration options for the TMS/Tile service.

The number of hours a Tile is valid. TMS clients like web browsers will cache the tile for this time. Clients will try to refresh the tiles after that time. MapProxy supports the ETag and Last-Modified headers and will respond with the appropriate HTTP ‘304 Not modified’ response if the tile was not changed.