Following this tutorial I was able to configure a tile server correctly using a PostGreSQL/PostGIS database, osm_tiles, renderd/mapnik and osm2pgsql in CentOS 6.

The goal of this is to be able to open tiles that have been uploaded to my DB in QGIS and some interfaces like Leaflet/OpenLayers.

Link between tile server and QGIS enables me to visualize the "World tile" that shows the server is working, using the URL x.x.x.x/{z}/{x}/{y}.png in QGIS.


Now I would like to be able to "read" the tiles that are in my PostGIS DB (I uploaded the Benin) but have no idea how to do it...

1 Answer 1


In your screenshot, you should set CRS ID to 3857, and check Y origin top.

Then you can zoom in to get higher zoom levels.

BTW you can activate the original Openstreetmap basemap as a reference.

Apart from that, the tiles are not IN your postgis DB. You have stored raw OSM data in there, and the mapnik toolchain delivers tiles upon request to the localhost web address.

And it is NOT necessary to set up a virtual machine for that. Postgis and osm2pgsql are also working under Windows (though probably not the whole world). I create my own tiles that way, and just use a pre-rendered folder structure to add them to QGIS. Alternatively, I can query the postgis database directly, but this is much slower if you want all details.

  • Because of a bug I was looking for a solution for the CRS, thanks ! I work in a VM because I'm going to do this configuration in my society server and I don't want to break it all... It's a sort of training. So I did what you said, but in case of zooming into the Benin nothing happen
    – Roozaay
    Aug 22, 2016 at 7:29
  • Have you tried to add an online basemap as reference? Project CRS should be set to 3857 as well. BTW you have to remove and re-add the layer to see settings changes.
    – AndreJ
    Aug 22, 2016 at 7:37
  • ID and Project CRS have been set as you said. here is with the map reference (if you mean in this way) and with mine
    – Roozaay
    Aug 22, 2016 at 7:49
  • So you get at least the coastline. Does it overlap with OSM Mapnik, or is it somewhere else?
    – AndreJ
    Aug 22, 2016 at 7:56
  • 1
    So the coastline is loaded, but nothing from the database. Have a look at the file datasource-settings.xml.inc. The last line should be <Parameter name="extent">-20037508,-20037508,20037508,20037508</Parameter> to cover the whole world. The tutorial is focused on Russia.
    – AndreJ
    Aug 22, 2016 at 8:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.