Application Properties

While many configuration and setup options are available through the Web Administration application Settings > Global page, more fundamental (and security minded) changes to how the application operates are made using “Application Properties” defined by:

  • Java System Properties

  • Web Application context parameters

  • System Environmental Variable

As part of the operating environment GeoServer application properties, unlike settings, cannot be changed at runtime.

GeoServer Property Reference

Application Property

System Property

Context Param

Env Variable

GEOSERVER_DATA_DIR

Setting the data directory location

x

x

x

GEOSERVER_MODULE_SYSTEM_ENVIRONMENT_STATUS_ENABLED

Showing Environment Variables and Java System Properties

x

GEOSERVER_MODULE_SYSTEM_PROPERTY_STATUS_ENABLED

Showing Environment Variables and Java System Properties

x

GEOWEBCACHE_CACHE_DIR

Configuration

x

x

x

GEOSERVER_NODE_OPTS

Make cluster nodes identifiable from the GUI

x

x

x

serviceStrategy

Configuration Considerations, default PARTIAL-BUFFER2

x

x

x

GEOSERVER_CONSOLE_DISABLED

Configuration Considerations

x

GWC_DISKQUOTA_DISABLED

x

x

x

geoserver.login.autocomplete

Configuration Considerations, default on.

x

x

CONFIGURATION_TRYLOCK_TIMEOUT

Delay for REST API and Web Administration configuration changes (default 30000 MS)

x

x

x

COMPARISON_TOLERANCE

Referencing tolerance when matching PRJ to EPSG code (default 0.00000001)

x

x

x

GEOSERVER_CSRF_DISABLED

CSRF Protection

x

x

x

GEOSERVER_CSRF_WHITELIST

CSRF Protection

x

x

x

org.geoserver.catalog.loadingThreads

Number of treads used to load catalogue (Default 4).

x

x

x

CAPABILITIES_CACHE_CONTROL_ENABLED

Use false to disable, defaults to true.

x

x

x

GEOSERVER_FILEBROWSER_HIDEFS

When set to true only GEOSERVER_DATA_DIR available to browse.

x

x

x

GEOSERVER_XSTREAM_WHITELIST

Used to restrict catalogue persistance.

x

x

x

geoserver.xframe.shouldSetPolicy

Configuration Considerations, default true.

x

x

x

geoserver.xframe.policy

Configuration Considerations, default SAMEORIGIN

x

x

x

ows10.exception.xml.responsetype

Configuration Considerations

x

ows11.exception.xml.responsetype

Configuration Considerations

x

ENABLE_MAP_WRAPPING

Default if setting unavailable (true)

x

x

x

ENABLE_ADVANCED_PROJECTION

Default if setting unavailable (true)

x

x

x

OPTIMIZE_LINE_WIDTH

Global variables affecting WMS, default true (can be set false.)

x

x

x

MAX_FILTER_RULES

Global variables affecting WMS, default 20

x

x

x

USE_GLOBAL_RENDERING_POOL

Default is true, can be set false

x

x

x

org.geoserver.render.raster.direct.disable

Used to bypass direct raster rendering

x

wms.raster.disableGutter

Disable gutter used to request larger area when reprojecting raster content.

x

wms.raster.enableRasterChainDebug

Trouble shoot raster rendering

x

GEOSERVER_GLOBAL_LAYER_GROUP_INHERIT

Should workspaces include layer groups from the global workspace, default true.

x

x

x

PROXY_BASE_URL

Supply PROXY_BASE_URL, overriding settings.

x

x

x

org.geoserver.service.disabled

Default comma separated list of disabled services.

x

x

x

GEOSERVER_DEFAULT_CACHE_PROVIDER

Request custom cache implementation for catalog.

x

x

x

org.geoserver.wfs.xml.WFSURIHandler.disabled

Flag to disable internal handling of references to GeoServer. Force reflective references such as DescribeFeatureType to be handled as separate request.

x

org.geoserver.wfs.xml.WFSURIHandler.additionalHostnames

default localhost.

x

force200

Use true to force the http return code to always be 200. Required for WCS2.0, breaks OWS2 and WCS2 standards.

x

GS_SHAPEFILE_CHARSET

Supply default for shapefile datastore

x

x

x

GEOSERVER_GEOJSON_LEGACY_CRS

true to enable legacy GeoJSON output.

x

x

x

ENABLE_JSONP

Global variables affecting WMS

x

x

x

XML_LOOKAHEAD

Number of bytes read to determine XML POST request (default 8192).

x

x

x

org.geoserver.wfs.getfeature.cachelimit

Configuration Considerations, default 0 (disabled)

x

org.geoserver.wfs.xml.entityExpansionLimit

Default 100.

x

x

x

org.geoserver.htmlTemplates.staticMemberAccess

HTML output format

x

x

x

ENABLE_OL3

Default true.

x

x

x

GEOSERVER_LOG_LOCATION

Advanced log configuration

x

x

x

RELINQUISH_LOG4J_CONTROL

Advanced log configuration

x

x

x

GT2_LOGGING_REDIRECTION

Advanced log configuration

x

x

x

wicket.configuration

Wicket RuntimeConfigurationType (DEPLOYMENT or DEVELOPMENT)

x

x

x

Setting Application property

Application properties are determined using the first value obtained from: Java System Properties, Web Application context parameters, or System Environmental Variable.

Using GEOSERVER_DATA_DIR as an example:

  1. Java System Properties: Supplied to the java virtual machine as part of your application server configuration.

    -DGEOSERVER_DATA_DIR=/var/lib/geoserver_data
    
    • For Tomcat on linux edit setenv.sh to append additional java system properties:

      # Append system properties
      CATALINA_OPTS="${CATALINA_OPTS} -DGEOSERVER_DATA_DIR=/var/lib/geoserver_data"
      
    • For Tomcat on windows use Apache Tomcat Properties application, navigating to the Java tab to edit Java Options:

      -DGEOSERVER_DATA_DIR=C:\ProgramData\GeoServer\data
      

    While not commonly used for GEOSERVER_DATA_DIR, this approach is a popular way to enable/disable optional geoserver functionality.

  2. Web Application context parameter:

    • Tomcat: Use your application server to configure the GeoServer web application via conf/Catalina/localhost/geoserver.xml file:

      <Context docBase="geoserver.war">
        <Parameter name="GEOSERVER_DATA_DIR"
                   value="/var/opt/geoserver/data" override="false"/>
      </Context>
      

      Note

      Tomcat management of application properties as using overide="false" is not the most straight forward to understand. This setting prevents parameter defined in WEB-INF/web.xml (from the geoserver.war ) to overide the provided file location.

      Other application servers provide a user inteface to manage web application properties and are more intuitive.

    • Not recommended: Hand editing the webapps/geoservere/WEB-INF/web.xml file:

      <context-param>
        <param-name>GEOSERVER_DATA_DIR</param-name>
        <param-value>/var/lib/geoserver_data</param-value>
      </context-param>
      

      Note

      This file is part of the GeoServer application and will be replaced when updating the application.

      As a result this approach is error prone making updates more difficult and is not recommended.

  3. System environmental variable:

    export GEOSERVER_DATA_DIR=/var/lib/geoserver_data
    

    This approach can be useful for GEOSERVER_DATA_DIR when running GeoServer in a docker container, traditionally managed with environmental variables.

Additional system properties

Cascading WFS and WMS services where GeoServer acts as a client for another web service make use of the Apache Http Components HTTP client library.

The HTTP client library respects the following java system properties:

ssl.TrustManagerFactory.algorithm
javax.net.ssl.trustStoreType
javax.net.ssl.trustStore
javax.net.ssl.trustStoreProvider
javax.net.ssl.trustStorePassword
ssl.KeyManagerFactory.algorithm
javax.net.ssl.keyStoreType
javax.net.ssl.keyStore
javax.net.ssl.keyStoreProvider
javax.net.ssl.keyStorePassword
https.protocols
https.cipherSuites
http.proxyHost
http.proxyPort
https.proxyHost
https.proxyPort
http.nonProxyHosts
http.keepAlive
http.maxConnections
http.agent

Reference: