Setup Geoserver for Oskari

This document describes how to setup a Geoserver environment for Oskari. Geoserver is needed for these functionalities:

  • myplaces
  • analysis
  • userlayers

Note! A prepopulated Geoserver configuration/datadir is available under {JETTY_HOME}/geoserver_data in the Jetty bundle. This however uses preconfigured credentials for geoserver and database which you don't want to use for production. The provided datadir uses EPSG:4326. You can change these by running the setup webapp.


  • Jetty bundle installed
  • Optionally an external Geoserver (tested with 2.7.1)

Using the setup webapp

The Jetty Bundle includes a webapp to help configuring a Geoserver for Oskari using Geoservers REST API. The webapp can be found in {JETTY_HOME}/setup.war. It can be deployed by moving the war-file in to {JETTY_HOME}/webapps and once deployed it can be accessed with http://localhost:8080/setup. The setup asks for the native projection you want to use for saving the usercontent.

When using single geoserver, you can use these properties for the setup-webapp:

# geoserver params for setup

If you use multiple geoservers/different credentials/functionality, you can specify those with:

# geoserver params for myplaces

# geoserver params for analysis

# geoserver params for userlayers

Any missing properties will fallback to one without the module part in the property key.

Note! The setup webapp is accessible to anyone once deployed so remove it from {JETTY_HOME}/webapps after doing the configuration.

Details for configuring manually/debug purposes

The code for configuring geoserver can be found here:

1) Create workspace

2) Create store for the functionality (for oskari workspace):

  • url: key db.url (Tries module specific config first: db.[myplaces|analysis|userlayer].url)
  • user: key db.username (Tries module specific config first: db.[myplaces|analysis|userlayer].username)
  • password: key db.password (Tries module specific config first: db.[myplaces|analysis|userlayer].password)
  • namespace:
  • Loose bbox: true

For userlayer functionality defines also Primary key metadata table: gt_pk_metadata_table

3) Creates layers for the functionalities

Using the store created in step 2.


a) Data for layers (WFS)

  • name: categories

b) Data for places (WFS)

  • name: my_places

c) Rendering for WMS

  • name: my_places_categories


a) Data for WFS

  • name: analysis_data

b) Rendering for WMS

  • name: analysis_data_style


a) Data for WFS

  • name: vuser_layer_data

b) Rendering for WMS

  • name: user_layer_data_style

4) Uploads style specific to the functionality

SLD files can be seen here:

5) Updates layers in database with geoserver info

Updates database table oskari_maplayer with url/username/password that were used when configuring the Geoserver for "base layers" used for these functionalities. Creates the layers if not present and gives output how to configure them in by modifying if they aren't configured properly:[layer id for myplaces][layer id for analysis][layer id for userlayer]

Last modified: Fri Mar 17 2017 17:38:30 GMT+0200 (EET)