Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

...

  • [dspace]/config/dspace.cfg : The primary configuration file, which contains the main configurations for DSpace.
  • [dspace]/config/modules/*.cfg : Module configuration files, which are specific to various modules/features within DSpace.
  • [dspace]/config/local.cfg : A (optional, but highly recommended) localized copy of configurations/settings specific to your DSpace (see see The local.cfg documentation Configuration Properties File below)
  • Additional feature-specific configuration files also exist under [dspace]/config/, some of these include:

...

Info
titlebuild.properties has been replaced by local.cfg

As of DSpace 6, the old "build.properties" configuration file has been replaced by this new "local.cfg" configuration file.  For individuals who are familiar with the old build.properties file, this new local.cfg differs in a few key ways:

  • Unlike build.properties, the local.cfg file can be used to override ANY setting in any other configuration file (dspace.cfg or modules/*.cfg).  To override a default setting, simply copy the configuration into your local.cfg and change its value(s).
  • Unlike build.properties, the local.cfg file is not utilized during the compilation process (e.g. mvn package). But, it is automatically copied alongside the final dspace.cfg into your installation location ([dspace]/config/), where it overrides default DSpace settings with your locally specific settings at runtime.
  • Like build.properties, the local.cfg file is expected to be specified in the source directory by default ([dspace-source]). There is an example ([dspace-source]/dspace/config/local.cfg.EXAMPLE) provided which you can use to create a [dspace-source]/local.cfg.If you are using Git to checkout the DSpace code, the [dspace-source]/local.cfg file will be ignored by default (to avoid committing your local configs to source code).  But, if you wanted to store your local.cfg file in your own local copy of the source code, you can move it over into the [dspace-source]/dspace/config/local.cfg (where it won't be ignored by Git, and will still be copied into your final [dspace]/config/ installation directory).
Warning
titleMany configurations have changed names between DSpace 5 (and below) and DSpace 6

If you are upgrading from an earlier version of DSpace, you will need to be aware that many configuration names/keys have changed. Because Apache Commons Configuration allows for auto-overriding of configurations, all configuration names/keys in different *.cfg files MUST be uniquely named (otherwise accidental, unintended overriding may occur).

In order to create this powerful ability to override configurations in your local.cfg, all modules/*.cfg files had their configurations renamed to be prepended with the module name.  As a basic example, all the configuration settings within the modules/oai.cfg configuration now start with "oai.".

Additionally, while the local.cfg may look similar to the old build.properties, many of its configurations have slightly different names. So, simply copying your build.properties into a local.cfg will NOT work.

This means that DSpace 5.x (or below) configurations are NOT guarranteed guaranteed compatible with DSpace 6.  While you obviously can use your old configurations as a reference, you will need to start with fresh copy of all configuration files, and reapply any necessary configuration changes (this has always been the recommended procedure). However, as you'll see below, you'll likely want to do that anyways in order to take full advantage of the new local.cfg file.

...

A example [dspace-source]/dspace/config/local.cfg.EXAMPLE is provided wtih with DSpace. The example only provides a few key configurations which most DSpace sites are likely to need to customize. However, you may add (or remove) any other configuration to your local.cfg to customize it as you see fit.

To get started, simply create your own [dspace-source]/dspace/config/local.cfg based on the example, e.g.

Code Block
cd [dspace-source]/dspace/config/
cp local.cfg.EXAMPLE local.cfg

You can then begin to edit your local.cfg with your local settings for DSpace. There are a few key things to note about the local.cfg file:

  • Override any default configurations: Any setting in your local.cfg will automatically OVERRIDE a setting of the same name in the dspace.cfg or any modules/*.cfg file.  This also means that you can copy ANY configuration (from dspace.cfg or any modules/*.cfg file) into your local.cfg to specify a new value.
    • For example, specifying dspace.url in local.cfg will override the default value of dspace.url in dspace.cfg.
    • Also, specifying oai.solr.url in local.cfg will override the default value of oai.solr.url in config/modules/oai.cfg
  • Configuration Syntax: The local.cfg file uses the Apache Commons Configuration Property file syntax (like all *.cfg files) . For more information see the section on Configuration File Syntax above.
    • This means the local.cfg also supports enhanced features like the ability to include other config files (via "include=" statements).
  • Override local.cfg via System Properties: As needed, you also are able to OVERRIDE settings in your local.cfg by specifying them as System Properties or Environment Variables.
    • For example, if you wanted to change your dspace.dir in development/staging environment, you could specify it as a System Property (e.g. -Ddspace.dir=[new-location]). This new value will override any value in both local.cfg and dspace.cfg.

...

Here's a very basic example of settings you could place into your local.cfg file (with inline comments):

...