Updating environment variables when upgrading to CollectionSpace 4.2, 4.3, or higher

This document describes how to update environment variables, if you are upgrading:

  • From CollectionSpace version 4.1.x or earlier
  • To CollectionSpace version 4.2, 4.3, or higher

Depending on your current version, go here:

Background

CollectionSpace 4.3 introduced one new environment variable. This change was made to support running multiple CollectionSpace systems on a single host, each with its own port number.

CollectionSpace 4.2 introduced three new environment variables. These changes were made to support the use of remotely-hosted database systems, as well as sharing of database systems across multiple CollectionSpace systems.

CollectionSpace 4.1 changed the names of four environment variables, as well as deprecating one existing variable. These changes were made to support database best practices (establishing an application-specific superuser with some privilege limitations, rather than using the all-powerful database administrator account), for clarity of purpose, and for consistency throughout code and configuration.

If you have an existing CollectionSpace 4.1.x or earlier system - or a 4.0 or earlier system - you'll need to change your environment variable declarations to match those shown in the appropriate table below:

  • For any system user account (e.g. for Linux, OS X, or Microsoft Windows) that owns the CollectionSpace server process.
  • For any system user account that runs builds or deploys from CollectionSpace source code.

Upgrading from 4.1.x? Environment variable changes to make

New environment variable (CollectionSpace 4.2 and higher)Replaces earlier environment variablePurpose / notes

CSPACE_INSTANCE_ID

(no previous equivalent)

A string identifying a specific instance of a CollectionSpace server. It should begin with an underscore. The recommended value is simply _default  However, if your server will be part of a configuration where two or more CollectionSpace servers will be storing their data in the same PostgreSQL database server, set this instead to a unique name for your server; e.g., _myservername  (This string will be appended to the names of certain databases and database users, to help avoid naming conflicts.)

DB_HOST(no previous equivalent)The hostname or IP address for the machine/server running the PostgreSQL database server. E.g., localhost, 10.10.2.158, etc.
DB_PORT(no previous equivalent)The port number that the PostgreSQL database server is listening on. This is usually 5432.
JEE_PORT(no previous equivalent)The web port number used to access the web UI and services API. A default value of 8180 is appropriate. (This environment variable was first introduced in v4.3)

Upgrading from 4.0 or earlier? Environment variable changes to make

 

New environment variable (CollectionSpace 4.2 and higher)Replaces earlier environment variablePurpose / notesChange introduced
in version

(no current equivalent - this environment variable is now deprecated)

DB_USERThis environment variable can be safely removed. If it is still present, it will simply be ignored.4.1
DB_CSADMIN_PASSWORDDB_PASSWORDThe password for a database (e.g. PostgreSQL) user that has the ability to create and manage databases and tables for the CollectionSpace application. (By default, this user is named csadmin.)

Formerly, this user was one and same as the all-powerful database administrator account (by default named postgres). In CollectionSpace 4.1, a new application-specific database administrator account, with fewer privileges, is now created alongside the former.
4.1
DB_CSPACE_PASSWORDDB_PASSWORD_CSPACEThe password for a database user that can access database data related to users, roles, and permissions.  (By default, this user is named cspace.)4.1
DB_NUXEO_PASSWORDDB_PASSWORD_NUXEOThe password for a database user that can access database data related to everything else: for all the objects, procedures, authority terms, relations and more that are managed, at CollectionSpace's back-end, by the Nuxeo enterprise content management system.  (By default, this user is named nuxeo.)4.1
DB_READER_PASSWORD(no previous equivalent)The password for a database user with read-only access privileges to the database data managed by Nuxeo.  This database user is often used as a default user account for running reports directly against that database data. (By default, this user is named reader.)4.1

CSPACE_INSTANCE_ID

(no previous equivalent)

A string identifying a specific instance of a CollectionSpace server. It should begin with an underscore. The recommended value is simply _default  However, if your server will be part of a configuration where two or more CollectionSpace servers will be storing their data in the same PostgreSQL database server, set this instead to a unique name for your server; e.g., _myservername  (This string will be appended to the names of certain databases and database users, to help avoid naming conflicts.)

4.2
DB_HOST(no previous equivalent)The hostname or IP address for the machine/server running the PostgreSQL server; e.g., localhost, 10.10.2.158, etc.4.2
DB_PORT(no previous equivalent)The port number that the PostgreSQL server is listening on. This is usually 5432.4.2
JEE_PORT(no previous equivalent)The web port number used to access the web UI and services API. A default value of 8180 is appropriate. (This environment variable was first introduced in v4.3)
4.3