is it possible to set the data directory of geoserver on a network drive? The data directory path of my existing installation is the default location (C:\Program Files\GeoServer 2.6.1\data_dir). I copied the folder on a network drive (a mapped drive: I:\GeoServer_Data_Dir (read and write permission for the used Windows-User)) and change the environment variable (GEOSERVER_DATA_DIR) to the new location. After restarting the geoserver service he didn´t use the "new" data dir. Instead he uses C:\Program Files\GeoServer 2.6.1\webapps\geoserver\data as the data directory. In addition i installed GeoServer 2.8.3 on this Computer and during the installing i set the data directory path to the existing folder on the network drive. It said that the path contains a valid data directory but the GeoServer 2.8.3 also uses the webapps\geoserver\data-folder in his home-directory.

Has anybody an idea how to fix this problem?

  • In Geoserver Data directory (when you have all your workspaces, layers,... the folder you should copy to make backup) is ..\webapps\geoserver\data not data_dir. You can check this in Geoserver section Server > Server Status > Data directory. May 17, 2016 at 15:09
  • You should edit /webapps/geoserver/WEB-INF/web.xml and modify the context param GEOSERVER_DATA_DIR May 17, 2016 at 15:16
  • Thanks for your comment. No, the original data directory path of my geoserver was C:\Program Files\GeoServer 2.6.1\data_dir (default path on windows installer, compare docs.geoserver.org/maintain/en/user/datadirectory/… ). There are stored all my workspaces, layers... . if i change this path in the enviroment variable to the new location on the network drive (or use it as the path for an existing data directory on a new installation) geoserver ignores this path and uses ..\webapps\geoserver\data instead as data directory.
    – Astrid
    May 18, 2016 at 7:47
  • Do i change this variable back to the default path geoserver use this directory. But i don´t understand why he ignores the network drive path and uses ...\webapps\geoserver\data. I also edit the context param GEOSERVER_DATA_DIR and changed it to the network path but geoserver also ignored it and used ...\webapps\geoserver\data.
    – Astrid
    May 18, 2016 at 7:55
  • Is there maybe a "special" user for geoserver who have to get read and write permission on the network drive (besides the Windows-User)? (See gis.stackexchange.com/questions/188623/… ) But i didn´t installed geoserver on a webserver. I used the windows installer-version.
    – Astrid
    May 18, 2016 at 8:10

2 Answers 2


If you encounter the error when you change the data directory, go changed directory and create a new file called "global.xml" then click Browse button in installation window and select the same directory again. Then complete the installation.

Finally, go to default data directory (C:\Program Files (x86)\GeoServer 2.11.1\data_dir), copy all and paste them to new directory that is contained "global.xml" and accept the replacement. It should be works.


Yes it is possible to set the data directory of geoserver on a network drive.

In windows you need to edit the 'startup.bat' file in (C:\GeoServer_Installation_Folder\bin).

Change the -DGEOSERVER_DATA_DIR flag to -DGEOSERVER_DATA_DIR="Z:\data_dir" where Z is the network drive letter.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.