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
.
java -Dfcrepo.home=/data/fcrepo-home -jar fcrepo-webapp-<version>-jetty-console.jar
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:
# add any number of properties below fcrepo.autoversioning.enabled = true fcrepo.persistence.defaultDigestAlgorithm = sha256
Property 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
Property Name | Description | Default Value | Constraints |
---|---|---|---|
fcrepo.home | The 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 you create the properties file in the default location (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=... | <fcrepo.home>/config/fcrepo.properties | |
fcrepo.spring.configuration | 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 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.tmpdir | This 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. | 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.configuration | Specifies the path to the xml configuration of your ActiveMQ service. | classpath:/config/activemq.xml | |
fcrepo.activemq.directory | Contains the reliable messaging information maintained by ActiveMQ. | <fcrepo.home>/data/ActiveMQ/kahadb | |
fcrepo.external.content.allowed | This 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:
| true | true, false |
fcrepo.session.timeout | This sets the duration for which a transaction will stay active before auto-rolling back. | 180,000ms (3 minutes) | |
fcrepo.jms.baseUrl | This 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 . | <fcrepo.home/logs/velocity.log> | |
Database (more info) | |||
fcrepo.db.url | This parameter allows you to set the database connection url. In general the format is as follows: 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:
MariaDB: jdbc:mariadb://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 | The database username | None - H2 doesn't require it | |
fcrepo.db.password | The database password | None - H2 doesn't require it | |
fcrepo.db.connection.checkout.timeout | The amount of time to wait before assuming checkout failed in milliseconds | 10000 | |
fcrepo.db.connection.idle.test.period | The 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. | true | true, false |
OCFL | |||
fcrepo.ocfl.root | Sets the root directory of the OCFL. | <fcrepo.home>/data/ocfl-root | |
fcrepo.ocfl.temp | Sets the temp directory used by OCFL. | <fcrepo.home>/data/ocfl-temp | |
fcrepo.ocfl.staging | Sets the staging directory used by OCFL. | <fcrepo.home>/data/ocfl-staging | |
fcrepo.persistence.defaultDigestAlgorithm | The digest algorithm used by OCFL, also used to calculate resource checksums | sha512 | sha256, sha512 |
fcrepo.ocfl.reindex.failOnError | Indicate whether reindexing should fail on error. | true | true, 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.rebuild.on.start | A boolean flag that when set to true directs Fedora to rebuild internal Fedora indices on start. | false | true,false |
fcrepo.rebuild.validation.fixity | Determines if file fixity should be checked as part of rebuild validation. This may take a long time. | true | true, false |
fcrepo.storage | The type of backend storage format | ocfl-fs | ocfl-fs, 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. This may also be configured using environment variables or an AWS credentials file |
Other properties
The following properties are only configurable via the command-line using the -Dname=value syntax:
Allowing user updates to certain server managed triples
You can relax certain restrictions on updating some server managed triples using the following setting:
fcrepo.properties.management=relaxed
For details please refer to the following article: Updating Server Managed Triples.