I have a data of older geonetwork catalog stored in /var/lib/geonetwork_data. I need to configure the data directory in geonetwork 4.0.5, but I can't find in which file to do it. I have set geonetwork.dir in the web.xml file but it does not recognize the data directory.

Which file should I set the geonetwork data directory?

  • do you have any environment variables pointing at the old location?
    – nmtoken
    Dec 15, 2021 at 10:51
  • I do not have variables configured, in the geonetwork administration graphical interface the value that appears for the data folder is /var/lib/tomcat9/webapps/portal/WEB-INF/ data/data/metadata_data Dec 15, 2021 at 14:50

1 Answer 1


It depends on your Linux... For example Ubuntu

File: /etc/default/tomcat9

Entry: JAVA_OPTS="${JAVA_OPTS} -Dgeonetwork.dir=/var/lib/geonetwork_data"

And don't forget to edit /etc/systemd/system/multi-user.target.wants/tomcat9.service, add ReadWritePaths /var/lib/geonetwork_data because tomcat is sandboxed too

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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