Structure of the data directory¶
This section gives an overview of the structure and contents of the GeoServer data directory.
This is not intended to be a complete reference to the GeoServer configuration information, since generally the data directory configuration files should not be accessed directly.
The directories that do contain user-modifiable content are:
Top-level XML files¶
The top-level XML files contain information about the services and various global options for the server instance.
Contains settings common to all services, such as contact information, JAI settings, character sets and verbosity.
Specifies logging parameters, such as logging level, logfile location, and whether to log to stdout.
Contains the service metadata and various settings for the WCS service.
Contains the service metadata and various settings for the WFS service.
Contains the service metadata and various settings for the WMS service.
workspaces directory contain metadata about the layers published by GeoServer. It contains a directory for each defined workspace.
Each workspace directory contains directories for the datastores defined in it. Each datastore directory contains directories for the layers defined for the datastore.
Each layer directory contains a
layer.xml file, and either a
coverage.xml or a
featuretype.xml file depending on whether the layer represents a raster or vector dataset.
data directory can be used to store file-based geospatial datasets being served as layers.
This should not be confused with the main GeoServer data directory, which is the parent to this directory.
This directory is commonly used to store shapefiles and raster files, but can be used for any data that is file-based.
The main benefit of storing data files under the
data directory is portability.
Consider a shapefile stored external to the data directory at a location
datastore entry in
catalog.xml for this shapefile would look like the following:
<parameter name="url" value="file://C:/gis_data/foo.shp" />
Now consider trying to port this data directory to another host running GeoServer. The location
C:\gis_data\foo.shp probably does not exist on the second host. So either the file must be copied to this location on the new host, or
catalog.xml must be changed to reflect a new location.
This problem can be avoided by storing
foo.shp in the
data directory. In this case the
datastore entry in
<parameter name="url" value="file:data/foo.shp"/>
value attribute is rewritten to be relative to the
data directory. This location independence allows the entire data directory to be copied to a new host and used directly with no additional changes.
demo directory contains files which define the sample requests available in the Demo Request page.
gwc directory holds the tile cache created by the embedded GeoWebCache service.
layergroups directory contains configuration information for the defined layergroups.
logs directory contains configuration information for the various defined logging profiles, and the default
geoserver.log log file.
See also the Logging section for more details.
palettes directory is used to store pre-computed Image Palettes. Image palettes are used by the GeoServer WMS as way to reduce the size of produced images while maintaining image quality.
See also the Paletted Images tutorial for more information.
security directory contains the files used to configure the GeoServer security subsystem. This includes a set of property files which define access roles, along with the services and data each role is authorized to access.
See also the Security section for more information.
styles directory contains files which contain styling information used by the GeoServer WMS.
See also the Styling section for more information.
For each SLD file in this directory there is a corresponding XML file:
styles directory can also be used to host support files referenced during style configuration:
Support files: SLD files can reference external graphics. This is useful when supplying your own icons in the form of image files or TrueType font files. Without any path information supplied, the default will be this directory.
A style external graphic is dynamically created for use as a legend. The contents of the directory is published allowing clients to access the legends used. When running GeoServer on localhost, an image file
image.pngstored in this directory can be referenced in a browser using
templates directory contains files used by the GeoServer templating subsystem. Templates are used to customize the output of various GeoServer operations.
See also Freemarker Templates for more information..
user_projections directory contains a file called
epsg.properties which is used to define custom spatial reference systems that are not part of the official EPSG database.
See also Custom CRS Definitions for more information.
www directory is used to allow GeoServer to serve files like a regular web server. While not a replacement for a full web server, this can be useful for serving client-side mapping applications. The contents of this directory are served at
See also Serving Static Files for more information.