This documentation covers the latest release of DSpace, version 7.x. Looking for another version? See all documentation.
As the DSpace 7 User Interface is built on Angular.io, it aligns with many of the best practices of that platform & the surrounding community. One example is that Configuration files (along with much of the UI code) use the TypeScript language. That said, you do NOT need to be deeply familiar with TypeScript to edit the configuration files. Much of the syntax is very similar to JSON, which is a common configuration format.
You must rebuild after any configuration change
At this time, you must rebuild the UI anytime you modify a configuration setting. This is because the currently active configuration is in your ./
src/environments/environment.ts which is the compiled/deduped version of your configuration after applying all overrides.
The UI configuration files reside in the ./
src/environments/ folder in the Angular UI source code. The default configuration are in
environment.common.ts in that directory.
To change the default configuration values, you simply create (one or more) local files that override the parameters you need to modify. You can use
environment.template.ts as a starting point.
- For example, create a new
- For example, create a new
The "ui" and "rest" sections of the configuration may also be overridden separately via one of the following
By setting any of the following environment variables in your system:
- Or, by creating a
.env(environment) file in the project root directory and setting the environment variables in that location.
The override priority ordering is as follows (with items listed at the top overriding all other settings)
- Environment variables
- The ".env" file
- The "environment.prod.ts", "environment.dev.ts" or "environment.test.ts"
- The "environment.common.ts"
The following configurations are available in
./src/environments/environment.common.ts These settings may be overridden as described above
When Production mode is enabled, this enables Angular's runtime production mode and compresses the built application. This should always be enabled in Production scenarios.
UI Core Settings
The "ui" (user interface) section defines where you want Node.js to run/respond. It may correspond to your primary/public URL, but it also may not (if you are running behind a proxy). In this example, we are setting up our UI to just use localhost, port 4000. This is a common setup for when you want to use Apache or Nginx to handle HTTPS and proxy requests to Node.js running on port 4000.
REST API Settings
The "rest" (REST API) section defines which REST API the UI will use. The REST settings MUST correspond to the primary URL of the backend. Usually, this means they must be kept in sync
with the value of
dspace.server.url in the backend's
This example is valid if your Backend is publicly available at https://api.mydspace.edu/server/ . Keep in mind that the "port" must always be specified even if it's a standard port (i.e. port 80 for HTTP and port 443 for HTTPS).
The "cache" section controls how long objects/responses will remain in the UI cache. The defaults should be OK for most sites.
The "auth" section provides some basic authentication-related settings. Currently, it's primarily settings related to when a session timeout warning will be showed to your users, etc.
The "form" section provides basic settings for any forms displayed in the UI. At this time, these settings only include a validatorMap, which is not necessary to modify for most sites
The "notifications" section provides options related to where user notifications will appear in your UI. By default, they appear in the top right corner, and timeout after 5 seconds.
The set of valid animations can be found in the NotificationAnimationsType, and are implemented in
The "submission" section provides some basic Submission/Deposit UI options. These allow you to optionally enable an autosave (disabled by default), and custom styles/icons for metadata fields or authority confidence values.
Universal (Server-side Rendering) Settings
The "universal" section pertains to enabling/disabling Angular Universal for Server-side rendering. DSpace requires server-side rendering to support Search Engine Optimization. When it's turned off, your site may not be able to be indexed in Google, Google Scholar and other search engines.
The "debug" property allows you to turn on debugging in the Angular UI. When enabled, your environment and all Redux actions/transfers are logged to the console. This is only ever needed if you are debugging a tricky issue.
The "defaultLanguage" and "languages" sections allow you to customize which languages to support in your User Interface. See also Multilingual Support.
The DSpace UI requires that a corresponding language pack file (named with the language code and ending in ".json5") be placed in
./src/assets/i18n/. See also DSpace 7 Translation - Internationalization (i18n) - Localization (l10n) for information about how to create and contribute these files.
Browse By Settings
The "browseBy" section allows you to customize which "Browse by" options appear in the "All of DSpace" header menu at the top of your DSpace site. The "id" MUST correspond to the name of a valid Browse index available from your REST API (see documentation on the REST API /api/discover/browses endpoint). It is possible to configure additional indexes on the Backend using Discovery, and any configured index appears in your REST API.
Both the "item" edit and "collection" edit screens allow you to undo changes within a specific time. This is controlled by these settings:
The "themes" section allows you to configure which theme(s) are enabled for your DSpace site (with the default theme being the "dspace" one). You can enable a single theme across all pages, and/or enable specific alternative themes based on a specific Community, Collection or Item (by UUID or Handle), or based on a Regex match of a URL pattern. This allows you fine grained control over how your site looks, including the ability to customize it per Community or Collection or even per specific pages in the site. See User Interface Customization for details of how to create a new, custom theme.
Media Viewer Settings
The DSpace UI comes with a basic, out-of-the-box Media Viewer (disabled by default). You can choose to enable it for "image/*" or "video/*" MIME types, or both.