Installation on Ubuntu/Debian

Mapbender is shipped with a preconfigured SQLite database which includes preconfigured applications (the database is located under <mapbender>/app/db/demo.sqlite).

For productive use PostgreSQL is recommended. You can find the neccessary configuration steps in chapter Optional > Mapbender Deployment on PostgreSQL.


  • PHP (from version 5.6 to 7.2)
  • Apache installation with the following modules activated:
    • mod_rewrite
    • libapache2-mod-php

Nginx can also be used as web server (this will not be discussed in detail here).


Installation of mandatory PHP extensions:

sudo apt install php-gd php-curl php-cli php-xml php-sqlite3 sqlite3 php-apcu php-intl openssl php-zip php-mbstring php-bz2

Unpack and register to web server

Download the current Mapbender version and unzip it into /var/www/mapbender:

wget -O /var/www/mapbender-starter-current.tar.gz
tar -zxf /var/www/mapbender-starter-current.tar.gz -C /var/www
mv $(ls -d /var/www/*/ | grep mapbender) /var/www/mapbender/

Configuration Apache 2.4

Create the file /etc/apache2/sites-available/mapbender.conf with the following content:

Alias /mapbender /var/www/mapbender/web/
<Directory /var/www/mapbender/web/>
 Options MultiViews FollowSymLinks
 DirectoryIndex app.php
 Require all granted

 RewriteEngine On
 RewriteBase /mapbender/
 RewriteCond %{REQUEST_FILENAME} !-f
 RewriteRule ^(.*)$ app.php [QSA,L]

Activate the site and reload Apache:

a2ensite mapbender.conf
service apache2 reload

Directory rights

sudo chown -R www-data:www-data /var/www/mapbender/app/logs
sudo chown -R www-data:www-data /var/www/mapbender/app/cache
sudo chown -R www-data:www-data /var/www/mapbender/web/uploads

sudo chmod -R ug+w /var/www/mapbender/app/logs
sudo chmod -R ug+w /var/www/mapbender/app/cache
sudo chmod -R ug+w /var/www/mapbender/web/uploads

sudo chmod -R ug+w /var/www/mapbender/app/db/demo.sqlite

First steps

The Mapbender installation can now be accessed under http://hostname/mapbender/. User data by default:

username: “root”, password: “root”

Troubleshooting is available via the following command (must be executed in the application directory):

app/console mapbender:config:check

Congratulations! Mapbender is now set up correctly and ready for further configuration. More information on proper configuration of Mapbender: Mapbender Quickstart Document.



To use the optional LDAP-connection, following PHP-LDAP-extension is required:

sudo apt install php-ldap

Mapbender installation with PostgreSQL

Configuration of PostgreSQL database for productive use:

Requirements: - configured PostgreSQL database (version < 10) - database for Mapbender configuration - possibly user for access

Installation PHP-PostgreSQL driver

sudo apt install php-pgsql

Configuration of database connection (app/config/parameters.yml):

database_driver:   pdo_pgsql
database_host:     localhost
database_port:     5432
database_name:     mapbender
database_path:     ~
database_user:     postgres
database_password: secret

For further information: YAML Configuration (Configuration and Application files).

Initialisation of the database connection:

cd /var/www/mapbender
app/console doctrine:database:create
app/console doctrine:schema:create
app/console assets:install web --symlink --relative
app/console doctrine:fixtures:load --fixtures=./mapbender/src/Mapbender/CoreBundle/DataFixtures/ORM/Epsg/ --append
app/console doctrine:fixtures:load --fixtures=./mapbender/src/Mapbender/CoreBundle/DataFixtures/ORM/Application/ --append

Following information: installation_configuration_en

Mapbender installation with MySQL:

Similar to configuration with PostgreSQL.

Installation MySQL driver:

apt install php-mysql

Following parameters (parameters.yml) need to be adapted:

database_driver:   pdo_mysql
database_port:     3306

To initialize your database connection, see PostgreSQL.