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 (in order of priority):
- Java System Properties
- Web Application context parameters
- System Environmental Variables
As part of the operating environment GeoServer application properties, unlike settings, cannot be changed at runtime.
For more information see Configuration Considerations.
GeoServer Property Reference¶
| Application Property | System Property | Context Param | Env Variable |
|---|---|---|---|
| GEOSERVER_DATA_DIR /datadirectory/setting |
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 /geowebcache/config |
x | x | x |
| GEOSERVER_NODE_OPTS /production/identify |
x | x | x |
| serviceStrategy /production/config, default PARTIAL-BUFFER2 |
x | x | x |
| GEOSERVER_CONSOLE_DISABLED /production/config |
x | ||
| GWC_DISKQUOTA_DISABLED | x | x | x |
| geoserver.login.autocomplete /production/config, 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 /security/webadmin/csrf |
x | x | x |
| GEOSERVER_CSRF_WHITELIST /security/webadmin/csrf |
x | x | x |
| org.geoserver.web.csp.strict User interface non-responsive, default true. |
x | ||
| org.geoserver.catalog.loadingThreads Number of threads 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 persistence. |
x | x | x |
| ENTITY_RESOLUTION_UNRESTRICTED /production/config, default false. |
x | x | x |
| ENTITY_RESOLUTION_UNRESTRICTED_INTERNAL /production/config, default false. |
x | x | x |
| ENTITY_RESOLUTION_ALLOWLIST /production/config. |
x | x | x |
| geoserver.xframe.shouldSetPolicy /production/config, default true. |
x | x | x |
| geoserver.xframe.policy /production/config, default SAMEORIGIN |
x | x | x |
| geoserver.xContentType.shouldSetPolicy /production/config, default true |
x | x | x |
| geoserver.xXssProtection.shouldSetPolicy /production/config, default false |
x | x | x |
| geoserver.xXssProtection.policy /production/config, default 0 |
x | x | x |
| geoserver.hsts.shouldSetPolicy /production/config, default false |
x | x | x |
| geoserver.hsts.policy /production/config, default max-age=31536000 ; includeSubDomains |
x | x | x |
| geoserver.csp.remoteResources /security/csp |
x | x | x |
| geoserver.csp.frameAncestors /security/csp |
x | x | x |
| geoserver.csp.fallbackDirectives /security/csp, default base-uri 'none'; form-action 'none'; default-src 'none'; frame-ancestors 'none'; |
x | x | x |
| GEOSERVER_DISABLE_STATIC_WEB_FILES Static Web Files, default false |
x | x | x |
| GEOSERVER_STATIC_WEB_FILES_SCRIPT /tutorials/staticfiles, default UNSAFE |
x | x | x |
| GEOSERVER_FEATUREINFO_HTML_SCRIPT WFS GetFeatureInfo CSP Policy, default SELF |
x | x | x |
| GEOSERVER_FORCE_FREEMARKER_ESCAPING /production/config, default true |
x | x | x |
| GEOSERVER_FREEMARKER_ALLOW_LIST /tutorials/GetFeatureInfo/html |
x | x | x |
| GEOSERVER_FREEMARKER_BLOCK_LIST /tutorials/GetFeatureInfo/html |
x | x | x |
| GEOSERVER_FREEMARKER_API_EXPOSED /tutorials/GetFeatureInfo/html, default false |
x | x | x |
| GS_FILETYPES_UNRESTRICTED If true, do not validate uploaded file type. default false |
x | ||
| ows10.exception.xml.responsetype /production/config |
x | ||
| ows11.exception.xml.responsetype /production/config |
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 /services/wms/global, default true (can be set false.) |
x | x | x |
| MAX_FILTER_RULES /services/wms/global, 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 |
| PROXY_BASE_URL_HEADER Enables PROXY_BASE_URL to use headers variables if set to true, overriding GeoServer datadir settings. Default false. |
x | x | x |
| org.geoserver.service.disabled Layer service 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 /services/wms/global |
x | x | x |
| XML_LOOKAHEAD Number of bytes read to determine XML POST request (default 8192). |
x | x | x |
| org.geoserver.wfs.getfeature.cachelimit /production/config, default 0 (disabled) |
x | ||
| org.geoserver.wfs.xml.entityExpansionLimit Default 100. |
x | x | x |
| org.geoserver.htmlTemplates.staticMemberAccess /tutorials/GetFeatureInfo/html |
x | x | x |
| ENABLE_OL3 Default true. |
x | x | x |
| GEOSERVER_LOG_LOCATION /configuration/logging |
x | x | x |
| GEOSERVER_PRINT_CONFIG_DIR Printing Installation |
x | x | |
| RELINQUISH_LOG4J_CONTROL /configuration/logging |
x | x | x |
| GT2_LOGGING_REDIRECTION /configuration/logging |
x | x | x |
| wicket.configuration Wicket RuntimeConfigurationType (DEPLOYMENT or DEVELOPMENT) |
x | x | x |
| GEOSERVER_FILESYSTEM_SANDBOX /security/sandbox |
x | x | x |
| GEOSERVER_ROOT_LOGIN_ENABLED Root account |
x | x | x |
| ALLOW_ENV_PARAMETRIZATION /datadirectory/configtemplate |
x | ||
| ENV_PROPERTIES /datadirectory/configtemplate |
x | x | x |
| WORKSPACE_ADMIN_SERVICE_ACCESS |
x | x | x |
| GEOSERVER_DATA_DIR_LOADER_ENABLED /datadirectory/setting |
x | x | |
| GEOSERVER_DATA_DIR_LOADER_THREADS /datadirectory/setting |
x | x | |
| TRACK_USER Flag to enable user tracking in GeoServer. Allows to store the username of user that performed creation/modification of layer, layergroup, store, style, workspace. Has precedence over "Display the user who performed last modification" option in global settings. |
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:
-
Java System Properties: Supplied to the java virtual machine as part of your application server configuration.
- For Tomcat on Linux edit
setenv.shto 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:
While not commonly used for GEOSERVER_DATA_DIR, this approach is a popular way to enable/disable optional GeoServer functionality.
- For Tomcat on Linux edit
-
Web Application context parameter:
- Tomcat: Use your application server to configure the GeoServer web application via
conf/Catalina/localhost/geoserver.xmlfile:
<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
override="false"is not the most straight forward to understand. This setting prevents parameter defined inWEB-INF/web.xml(from thegeoserver.war) to override the provided file location.Other application servers provide a user interface to manage web application properties and are more intuitive.
- Not recommended: Hand editing the
webapps/geoserver/WEB-INF/web.xmlfile:
<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.
- Tomcat: Use your application server to configure the GeoServer web application via
-
System environmental variable:
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: