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 proxy_seed tool.
Configures the logging.
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 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. The key of each layer is also the name of the layer, i.e. the name used in WMS layers argument.

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.


Unter param werden Parameter für die Datenquelle und den Zwischenspeicher gesetzt.

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 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.


You define the data sources of each layer here. The configuration ref:is explained below <sources-conf-label>.


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:


A direct source passes all requests to the configured WMS server and does not cache any data. req defines the source WMS URL and the layers that should be requested.


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


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 transparten 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.


- type: cache_wms
    version: 1.0.0
    featureinfo: True
    url: http://localhost:8080/service?
    layers: roads
    transparent: 'true'


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

Table Of Contents

Previous topic


Next topic


This Page