Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Correct default value for fcrepo.ocfl.staging

How to Specify Properties

Properties may either be defined in a Java properties file or passed to Fedora directly using "-D" command-line arguments.

By default, Fedora will look for a properties file at $FCREPO_HOME/config/fcrepo.properties.

For example, you might start Fedora by passing it a "-D" argument that specifies the location of fcrepo.home.

Code Block
languagebash
java -Dfcrepo.home=/data/fcrepo-home

Two ways of  passing configuration:  property file or command-line argument 

Before we enumerate the configurable properties and their defaults it should be noted that there are two ways of passing this configuration to your Fedora instance.  As noted above you can use the -D<param.name>=<param.value> syntax.   Optionally you can pass all the parameters at once by putting them in a java properties file and passing the path of the file as a command line argument.  For example, to pass two parameters at once using a property file,  by file simply create a file with any arbitrary name  and path such as  "my_fcrepo.properties".  Then add your parameters as you would in any Java properties file, like this:

Code Block
# add any number of properties below
fcrepo.home: my_fcrepo_home_directory
fcrepo.autoversioning.enabled: true

Then pass these parameters to Fedora like this: 

Code Block
java -Dfcrepo.config.file=my_fcrepo.properties -jar fcrepo-webapp-6.0.0-SNAPSHOT-<version>-jetty-console.jar

Important Note on Property Precedence

You may pass parameters simultaneously via the command-line params as well as by property file.  However,  please keep in mind that command-line parameter values will overwrite any values defined in your properties file.  So using the above mentioned property file as an example

Code Block
java -Dfcrepo.config.file=my_fcrepo.properties -jar fcrepo-webapp-6.0.0-SNAPSHOT-jetty-console.jar

will have an fcrepo.home value of "my_fcrepo_home_directory"  whereas

Code Block
java -Dfcrepo.home=overridden_fcrepo_home -Dfcrepo.config.file=my_fcrepo.properties -jar fcrepo-webapp-6.0.0-SNAPSHOT-jetty-console.jar

will have an fcrepo.home value of "overridden_fcrepo_home".

Table of Configurable Properties

There are a number of configuration elements that can optionally be set when starting the Fedora web-application, noted below within brackets: <>. 

And then have a properties file at /data/fcrepo-home/config/fcrepo.properties that defines the rest of your properties. For example, it's contents might look like this:

Code Block
# add any number of properties below
fcrepo.autoversioning.enabled = true
fcrepo.persistence.defaultDigestAlgorithm = sha256


Info
titleProperty Precedence

If you define the same property both in a property file and as a "-D" argument, then the "-D" argument has precedence.

Table of Configurable Properties

fcrepo4 references purged from pom files?
Property NameDescriptionDefault ValueConstraints
fcrepo.homeThe home directory for all Fedora generated output and state.  Unless otherwise specified, all logs, metadata, binaries, and internally generated indexes, etc.<cwd/fcrepo-home>
fcrepo.config.file

The path to a properties file containing any property name value pair specified below.  If the file does not exist, Fedora will silently ignore it.   

Important note:

if 

If you create the properties file in the default location (

specfied

specified in the next column) know that any definition of fcrepo.home in that file will be ignored.  The fcrepo.home property will be read from the properties file only when the following two conditions are present: 1) you are using the -Dfcrepo.config.file=... option and 2) you have not specified -Dfcrepo.home=...

<fcreop
<fcrepo.home>/config/fcrepo.properties

fcrepo.spring.configuration

The 


The path to the spring configuration.  While it is generally not recommended to use this option,

 

in some cases you may need to make adjustments to the default spring configuration

 This

This can be set to a path (relative to the current working directory or absolute) to which Fedora repository content will be written.   


<classpath:/config/spring/fcrepo-config.xml>file:/path/to/fcrepo-config.xml
java.io.tmpdirThis specifies the directory for writing temp files.  You may need to set this property to a larger disk/filesystem to upload large files, particularly on Linux where /tmp is sometimes on a small partition.</tmp on Linux, $TMPDIR on MacOSX, and %TEMP% on Windows>
fcrepo.dynamic.jms.port

This specifies the ports used by the embedded JMS-based message broker for OpenWire protocol. Note: If you have multiple instances of Fedora running,  this property must be set to avoid messaging port conflicts.

61616fcrepo.dynamic.stomp.portThis specifies the ports used by the embedded JMS-based message broker for STOMP protocol.  Note: If you have multiple instances of Fedora running,  this property must be set to avoid messaging port conflicts.
61613

fcrepo.
activemq.directoryContains the reliable messaging information maintained by ActiveMQ.<fcrepo.home>/data/ActiveMQ/kahadbfcrepo.
external.content.allowedThis provides the path to a file defining a list of allowed external binary content paths. If this parameter is not provided, then clients will be disallowed from creating external binary resources. See the external content allowed paths configuration for more details.</path/to/allowed.txt>
fcrepo.autoversioning.enabled

This option results in every change to Fedora resources either:

  • false - being persisted in the OCFL "mutable-head" extension
, as opposed in
  • true - being persisted as a new OCFL version.

See here for more details.

truetrue, false
fcrepo.session.timeoutThis sets the duration (in milliseconds) for which a transaction will stay active before auto-rolling back.180,000ms (3 minutes)
fcrepo.velocity.runtime.logThe HTML template code uses Apache Velocity, which generates a runtime log called velocity.log.<fcrepo.home/logs/velocity.log>
fcrepo.namespace.registryThis provides the path to a YAML file defining a list of desired prefixes for  namespace URIs. See the RDF Namespaces documentation for more information.none
fcrepo.properties.managementControls if updating server managed triples is allowed in user RDF. By default, it is not allowed. See here for more details.strictstrict, relaxed
fcrepo.metrics.enableControls if applications metrics are collected and emitted. See the metrics page for more information.falsetrue, false
fcrepo.event.threads Controls the number of threads that are used to process events on Fedora's internal event bus. This is used for asynchronous tasks like search indexing and emitting JMS messages.1> 0
fcrepo.banner.enabled Controls the display of the registration banner on the UI pagestruetrue, false

Anchor
cache
cache
Cache

fcrepo.cache.db.ocfl.id_map.size.entries Specifies the number of Fedora ID to OCFL ID mappings stored in cache.1024
fcrepo.cache.db.ocfl.id_map.timeout.minutes Specifies the number of minutes before entries in the Fedora ID to OCFL ID mapping cache expire.10
fcrepo.cache.types.size.entriesSpecifies the number of Fedora ID to user type rdf mappings stored in cache1024
fcrepo.cache.types.timeout.minutesSpecifies the number of minutes before entries in the Fedora ID to  to user type rdf mapping cache expire.10

Anchor
auth
auth
Auth (more info)

fcrepo.auth.enabledSpecifies if authorization should be enabled. Note, this does not disable authentication.truetrue, false
fcrepo.auth.principal.header.enabledEnables the principal provider that extracts a principal out of a specified HTTP header.falsetrue, false
fcrepo.auth.principal.header.nameThe name of the header to extract a principal from.some-header
fcrepo.auth.principal.header.separatorThe separator in the principal header.,
fcrepo.auth.principal.roles.enabledEnables the principal provider that uses Tomcat roles.falsetrue, false
fcrepo.auth.principal.roles.listThe list of Tomcat roles. This should be a comma separated list of roles.tomcat-role-1,tomcat-role-2comma separated list
fcrepo.auth.principal.delegate.enabledEnables the delegate principal provider that allows a principle to be specified using the On-Behalf-Of header.truetrue, false
fcrepo.auth.webac.authorizationSpecifies the path to the ACL to use for the Fedora repository root resource. Use this to override the default ACL.

fcrepo.auth.webac.userAgent.baseUriSpecifies the base URI that should be prepended to the user agent

fcrepo.auth.webac.groupAgent.baseUriSpecifies the base URI that should be prepended to the group agent

Anchor
database
database
Database (more info)

fcrepo.db.url

This parameter allows you to set the database connection url.

 

In general the format is as follows:

Code Block
jdbc:<database_type>://<database_host>:<database_port>/<database_name> 

Fedora currently supports H2, PostgresQL 12.3, MariaDB 10.5.3, and MySQL 8.0

So using the default ports for the supported databases here are the values we typically use: 


PostgresQL: jdbc:postgresql://localhost:5432/fcrepo

MariaDB:  jdbc:mariadb://localhost:3306/fcrepo

MySQL:  jdbc:mysql://localhost:3306/fcrepo


If you wish to configure h2, there are a variety of options detailed in the H2 Reference docs.

By default Fedora uses an embedded H2 database.
fcrepo.db.user
=<database_username> -
The database username None - H2 doesn't require it
fcrepo.db.password
=<database_password>
The database passwordNone - H2 doesn't require it

fcrepo.db.connection.checkout.timeout

The amount of time to wait before assuming checkout failed in milliseconds
10000
30000
fcrepo.db.
connection
max.
idle
pool.
test.periodThe amount of time in seconds between idle connection tests.300

fcrepo.db.connection.test.on.checkout

Specifies  whether or not to test a database connection on checkout. trueMessagingfcrepo.jms.baseUrlThis specifies the baseUrl to use when generating JMS messages. You can specify the hostname with or without port and with or without path. If your system is behind a NAT firewall you may need this to avoid your message consumers trying to access the system on an invalid port. If this system property is not set, the host, port and context from the user's request will be used in the emitted JMS messages.<http://localhost:8080/fcrepo/rest>

fcrepo.velocity.runtime.log

The HTML template code uses Apache Velocity, which generates a runtime log called velocity.log. By default this is placed inside fcrepo.home, but it is possible to override the location to have it written to an alternate location.<$fcrepo.home/velocity.log>Persistencefcrepo.session.timeoutThis sets the duration for which a transaction will stay active before auto-rolling back. Defaults to 180000 ms, or 3 minutes.180000

fcrepo.persistence.defaultDigestAlgorithm

This sets the default digest algorithm on ingested binary resources.

 Valid values: [sha512|sha256]sha512
sizeSpecifies the maximum number of connections in the pool available for connecting to the database.10

Anchor
ocfl
ocfl
OCFL

fcrepo.ocfl.rootSets the root directory of the OCFL.  <fcrepo.home>/data/ocfl-root
fcrepo.ocfl.tempSets the temp directory used by OCFL.  <fcrepo.home>/data/ocfl-temp
fcrepo.ocfl.stagingSets the staging directory used by OCFL. <fcrepo.home>/data/
ocfl-staging
staging
fcrepo.persistence.defaultDigestAlgorithmThe digest algorithm used by OCFL, also used to calculate resource checksums. Changing the digest algorithm to sha256 will reduce the amount disk overhead consumed by OCFL related metadata.sha512sha256, sha512
fcrepo.ocfl.unsafe.write.enabled When this option is enabled, files are stored in OCFL objects without calculating their digest again. This eliminates a redundant digest calculation, speeding up writes, at the cost of less safe write operations. If there is a bug in Fedora that results in it calculating incorrect digests, then there is a risk that it will create corrupted OCFL objects with this option enabled.falsetrue,false
fcrepo.ocfl.verify.inventoryWhen enabled, the inventory for an OCFL object will be validated during read and write operations.truetrue,false

fcrepo.ocfl.reindex.failOnError

Indicate whether reindexing should fail on error.truetrue, false

fcrepo.ocfl.reindex.batchSize

The size of batches of OCFL ids used by the reindexer.100

fcrepo.ocfl.reindex.threads

The number of threads to be used by the reindexer. By default it will attempt to guess a reasonable number of threads based on the CPU characteristics-1
fcrepo.ocfl.upgrade.enabled

When updating  older OCFL 1.0  objects, upgrade the new version of the object to OCFL 1.1.  By default, this property is false, which means newer versions of objects will  maintain the same OCFL version as previous versions of the object.  

falsetrue,false
fcrepo.rebuild.on.startA boolean flag that when set to true directs Fedora to rebuild internal Fedora indices on start.falsetrue,false
fcrepo.rebuild.continue

A boolean flag that when set to true directs Fedora to rebuild internal Fedora indices but only add records it does not find in the indexes. This does not destroy existing index tables.

This flag takes precendence if fcrepo.rebuild.on.start is also set to true.

falsetrue,false
fcrepo.rebuild.validationDetermines if ocfl validation should be run as the first step of the rebuild operation.truetrue,false
fcrepo.rebuild.validation.fixityDetermines if file fixity should be checked as part of rebuild validation. This may take a long time.falsetrue, false

fcrepo.storage

The type of backend storage format
: Valid values: 
ocfl-fsocfl-fs, ocfl-s3

Anchor
jms
jms
JMS

ocfl-fs

fcrepo.jms.enabled

Specifies if JMS should be enabled.truetrue, false
fcrepo.jms.destination.typeSpecifies if a JMS topic or queue should be used. Queues are recommended for production environments.topictopic, queue
fcrepo.jms.destination.nameThe name of the topic/queuefedora
fcrepo.dynamic.jms.port

This specifies the ports used by the embedded JMS-based message broker for OpenWire protocol. Note: If you have multiple instances of Fedora running,  this property must be set to avoid messaging port conflicts.

61616
fcrepo.dynamic.stomp.port

This specifies the ports used by the embedded JMS-based message broker for STOMP protocol.  Note: If you have multiple instances of Fedora running,  this property must be set to avoid messaging port conflicts.

61613
fcrepo.activemq.configurationSpecifies the path to the xml configuration of your ActiveMQ service. classpath:/config/activemq.xml
fcrepo.activemq.directoryContains the reliable messaging information maintained by ActiveMQ.<fcrepo.home>/data/ActiveMQ/kahadb
fcrepo.jms.baseUrlThis specifies the baseUrl to use when generating JMS messages. You can specify the hostname with or without port and with or without path. If your system is behind a NAT firewall you may need this to avoid your message consumers trying to access the system on an invalid port. If this system property is not set, the host, port and context from the user's request will be used in the emitted JMS messages.<http://localhost:8080/fcrepo/rest>

Anchor
ocfl_s3
ocfl_s3
OCFL/S3 Configuration (more info)

fcrepo.ocfl.s3.bucket

The s3 bucket to host the OCFL.

fcrepo.ocfl.s3.prefix

A prefix can be provided to partition the S3 bucket so that Fedora uses only a portion of the bucket.

fcrepo.aws.region

The default region used by the client. The region codes found in  the table  provided by Amazon's documentation are all available, such as "us-east-2", "eu-west-1", etc.us-east-1

fcrepo.aws.access-key

The AWS access key. This may also be configured using environment variables or an AWS credentials file

fcrepo.aws.secret-key

The AWS secret key

Other properties 

The following properties are only configurable via the command-line using the -Dname=value syntax: 

Parallel stream processing

Code Block
fcrepo.streaming.parallel:false

If you are running Fedora on a multiprocessor machine you can level parallel processing across single requests by turning this option on.   Parallel processing of streams can boost the retrieval speeds of the RDF associated with objects with large numbers of inlinks (ie dependent objects with memberOf associations).  Enabling this option in conjunction with increasing with cacheSize parameter in your repository.json file can boost retrieval speeds significantly.

Allowing user updates to certain server managed triples 

You can relax certain restrictions on updating some server managed triples using the following setting:

Code Block
fcrepo.properties.management=relaxed

For details please refer to the following article: How to allow user-updates to certain server managed triples.

Setting the default  digest  algorithm

By default the digest algorithm is SHA-512.  To change it  to  SHA-256 use the  following  setting

...

. This may also be configured using environment variables or an AWS credentials file

fcrepo.s3.endpointThe URL to the S3 endpoint. Only needs to be set if you are using a non-standard endpoint

fcrepo.s3.path.style.accessIf path style S3 access should be enabled. Some non-AWS S3 implementations only support path style access.falsetrue, false
fcrepo.ocfl.s3.db.enabledDetermines if the OCFL client caches OCFL object inventories in a database table. This is intended to speed things up a little and solve the eventual consistency problem. Amazon S3 is now strongly consistent, so this table is not strictly necessary, but non-AWS implementations may or may not be. When enabled, Postgres must be used.truetrue, false

Anchor
logging
logging
Logging (more info)

logback.configurationFile

The path of a custom logback configuration file for Fedora to use. If not specified, then the default logback configuration included with Fedora will be used. For more information, see the Logging documentation. Must be specified as a command-line option rather than via a properties file.

additional logging properties

There are additional logging properties available if using the default Fedora logback configuration. The full documentation can be found on the Fedora Logging page.