You have been redirected from an outdated version of the article. Below is the content available on this topic. To view the old article click here.

structr.conf

The structr.conf is the main configuration file for Structr. The file consists of simple key-value mappings. Comments can be expressed using the # character, and blank lines are used to create a visual distinction between the individual sections.

The most convenient way of editing configuration keys is via the configuration servlet (available under http://<structr-host>:<structr-port>/structr/config/ if not disabled in structr.conf).

Configuration options

Key Value type Description Default value
access.control.max.age integer (seconds) Cross origin resource sharing configuration. See CORS for more information.
access.control.allow.methods string, list of HTTP verbs Cross origin resource sharing configuration. See CORS for more information.
access.control.allow.headers string, list of HTTP headers Cross origin resource sharing configuration. See CORS for more information.
access.control.allow.credentials boolean Cross origin resource sharing configuration. See CORS for more information.
access.control.expose.headers string, list of HTTP headers Cross origin resource sharing configuration. See CORS for more information.
application.encryption.secret string Global secret for encrypted string properties and encrypt() / decrypt()
application.filesystem.enabled boolean If enabled, Structr will create a separate home directory for each user. See Filesystem for more information. false
application.filesystem.indexing.limit integer Maximum number of words to be indexed 50000
application.filesystem.indexing.maxsize integer Maximum size (MB) of a file to be indexed 10
application.filesystem.indexing.word.minlength integer Minimum length of words to be indexed 4
application.filesystem.indexing.word.maxlength integer Maximum length of words to be indexed 40
application.filesystem.unique.paths boolean If enabled, Structr will not allow files of the same name in the same folder. Default value is ‘true’. true
application.ftp.port integer FTP port the Structr server will listen on (if FtpService is enabled below)
application.changelog.enabled boolean If enabled, Structr keeps track of changes to individual entities in the structrChangeLog property. See Changelog for more information.
application.host IP address or host name The listen address of the Structr server, source of the ${host} keyword in Template Expressions
application.http.port integer HTTP port the Structr server will listen on
application.https.enabled boolean Whether SSL is enabled
application.https.port integer HTTPS port the Structr server will listen on (if HTTPS is enabled below)
application.instance.name string The name of the Structr instance (displayed in the top right corner of structr-ui)
application.instance.stage string The stage of the Structr instance (displayed in the top right corner of structr-ui)
application.localization.logMissing boolean Controls logging for requested but non-existing localizations.
application.menu.main string Comma-separated list of main menu entries in structr-ui. Everything not in this list will be moved into a sub-menu Pages,Files,Security,Schema,Data
application.keystore.path string The path to the JKS keystore containing the SSL certificate. See SSL Configuration for more information.
application.keystore.password string The keystore password
application.rest.path URL path segment Defines the URL path of the Structr REST server. Should not be changed because it is hard-coded in many parts of the application.
application.schema.automigration boolean Enable automatic migration of schema information between versions (if possible, may delete schema nodes)
application.security.ownerless.nodes one or more of [read, write, delete, accessControl] The permission level for users on nodes without an owner. See this for more information
application.session.timeout integer The session timeout for HTTP sessions
application.ssh.port integer SSH port the Structr server will listen on (if SSHService is enabled below)
application.title arbitrary string The title of the application as shown in the log file. This entry exists for historical reasons and has no functional impact.
application.uploads.folder string The default path for files uploaded via the UploadServlet (available from Structr 2.1+)
base.path Absolute or relative path Path of the Structr working directory. All files will be located relative to this directory.
configuration.provider Fully-qualified Java class name Fully-qualified class name of a Java class in the current class path that implements theorg.structr.schema.ConfigurationProvider interface.
configured.services List of service classes Services that are listed in this configuration key will be started when Structr starts.
ConfigServlet.enabled boolean Enables the config servlet (available under http(s)://<your-server>/structr/config) true
ConfirmationKey.PasswordReset.validityPeriod integer  Validity period (in minutes) of the confirmation key generated when a user resets his password. 30
ConfirmationKey.Registration.validityPeriod integer  Validity period (in minutes) of the confirmation key generated during self registration 2880
ConfirmationKey.validWithoutTimestamp boolean  How to interpret confirmation keys without a timestamp false
CsvServlet.authenticator Fully-qualified Java class name Authenticator class to use for CSV output. Do not change unless you know what you are doing.
CsvServlet.class Fully-qualified Java class name Servlet class to use for CSV output. Do not change unless you know what you are doing.
CsvServlet.defaultview string Default view to use when no view is given in the URL
CsvServlet.outputdepth integer Maximum nesting depth of JSON output
CsvServlet.path string URL pattern for CSV output. Do not change unless you know what you are doing.
CsvServlet.resourceprovider Fully-qualified Java class name Resource provider class to use in the REST server. Do not change unless you know what you are doing.
CsvServlet.user.autocreate boolean Unused
DateProperty.defaultFormat Date pattern Default ISO8601 date format pattern, uncomment to enable full ISO8601 compliant date handling.
database.cache.node.size integer Size of the database driver node cache, recommend size: 200,000
database.cache.relationship.size integer Size of the database driver relationship cache, recommended size: 1,000,000
database.path Absolute or relative path Path of the Neo4j db/ directory
files.path Absolute or relative path Path to the Structr file storage
geocoding.provider Fully-qualified Java class name Geocoding configuration. See Geocoding for more information.
geocoding.language ISO language code Geocoding configuration. See Geocoding for more information.
geocoding.apikey string Geocoding configuration. See Geocoding for more information.
HtmlServlet.authenticator Fully-qualified Java class name Authenticator class to use for HTTP requests. Do not change unless you know what you are doing.
HtmlServlet.class Fully-qualified Java class name Servlet class to use for HTTP requests. Do not change unless you know what you are doing.
HtmlServlet.defaultview string Default view to use when no view is given in the URL. Not used
HtmlServlet.outputdepth integer Maximum nesting depth of JSON output
HtmlServlet.path string URL pattern for HTTP server. Do not change unless you know what you are doing.
HtmlServlet.resourceprovider Fully-qualified Java class name Resource provider class to use in the HTTP server. Do not change unless you know what you are doing.
HtmlServlet.user.autocreate boolean Enable this to support user self registration
HtmlServlet.resolveProperties list of property names Specifies the list of properties that are be used to resolve entities from URL paths. See URL Entity Resolution for more information.
HtmlServlet.customResponseHeaders string List of custom response headers that will be added to every HTTP response
html.indentation boolean Whether the page source should be indented (compacted) or beautified
HttpService.async boolean Whether the HttpServices uses asynchronous request handling. Disable this option if you encounter problems with HTTP responses.
HttpService.servlets List of available servlets Servlets that are listed in this configuration key will be available in the HttpService.
HttpService.resourceHandlers string This handler is needed to serve static files with the built-in Jetty container.
HttpService.force.https boolean Allows forcing https. false
JsonRestServlet.authenticator Fully-qualified Java class name Authenticator class to use in the REST server. Do not change unless you know what you are doing.
JsonRestServlet.class Fully-qualified Java class name Servlet class to use in the REST server. Do not change unless you know what you are doing.
JsonRestServlet.defaultview string Default view to use when no view is given in the URL
JsonRestServlet.outputdepth integer Maximum nesting depth of JSON output
JsonRestServlet.path string URL pattern for REST server. Do not change unless you know what you are doing.
JsonRestServlet.resourceprovider Fully-qualified Java class name Resource provider class to use in the REST server. Do not change unless you know what you are doing.
JsonRestServlet.user.autocreate boolean Unused
json.parallelization.threshold integer Collection size threshold for multi-threaded JSON generation
json.indentation boolean Whether JSON output should be indented (compacted) or beautified
json.lenient boolean Whether to use lenient serialization, e.g. allow to serialize NaN, -Infinity, Infinity instead of just returning null. Note: as long as Javascript doesn’t support NaN etc., most of the UI will be broken
log.cypher.debug boolean Turns on debug logging for the generated Cypher queries false
log.cypher.debug.ping boolean Turns on debug logging for the generated Cypher queries of the websocket PING command. Can only be used in conjunction with log.cypher.debug false
log.debug boolean Controls the behaviour of the debug() function. If disabled, the debug() function behaves like a NOP. If enabled, it behaves exactly like the log() function false
log.name string, with date pattern File name pattern for the logging output
neo4j.server.host IP address or host name Listen address of the Neo4j Browser (if Neo4jService is enabled below)
neo4j.server.post integer Neo4j Browser port
neo4j.shell.enabled boolean Whether the Neo4j shell is enabled
neo4j.shell.port integer Port of the Neo4j shell
NodeExtender.log boolean Whether to write dynamically created Java code to the logfile, for debugging purposes.
oauth.servers string, list of OAuth providers OAuth configuration. See OAuth for more information.
oauth.github.authorization_location string, URL OAuth configuration. See OAuth for moreinformation.
oauth.github.token_location string, URL information.
oauth.github.client_id string OAuth configuration. See OAuth for moreinformation.
oauth.github.client_secret string OAuth configuration. See OAuth for moreinformation.
oauth.github.redirect_uri string OAuth configuration. See OAuth for more information.
oauth.github.user_details_resource_uri string, URL OAuth configuration. See OAuth for more information.
oauth.github.error_uri string, URL OAuth configuration. See OAuth for more information.
oauth.github.return_uri string, URL OAuth configuration. See OAuth for more information.
oauth.twitter.authorization_location string, URL OAuth configuration. See OAuth for more information.
oauth.twitter.token_location string, URL OAuth configuration. See OAuth for more information.
oauth.twitter.client_id string OAuth configuration. See OAuth for more information.
oauth.twitter.client_secret string OAuth configuration. See OAuth for more information.
oauth.twitter.redirect_uri string OAuth configuration. See OAuth for more information.
oauth.twitter.error_uri string, URL OAuth configuration. See OAuth for more information.
oauth.twitter.return_uri string, URL OAuth configuration. See OAuth for more information.
oauth.linkedin.authorization_location string, URL OAuth configuration. See OAuth for more information.
oauth.linkedin.token_location string, URL OAuth configuration. See OAuth for more information.
oauth.linkedin.client_id string OAuth configuration. See OAuth for more information.
oauth.linkedin.client_secret string OAuth configuration. See OAuth for more information.
oauth.linkedin.redirect_uri string OAuth configuration. See OAuth for more information.
oauth.linkedin.user_details_resource_uri string, URL OAuth configuration. See OAuth for more information.
oauth.linkedin.error_uri string, URL OAuth configuration. See OAuth for more information.
oauth.linkedin.return_uri string, URL OAuth configuration. See OAuth for more information.
oauth.google.authorization_location string, URL OAuth configuration. See OAuth for more information.
oauth.google.token_location string, URL OAuth configuration. See OAuth for more information.
oauth.google.client_id string OAuth configuration. See OAuth for more information.
oauth.google.client_secret string OAuth configuration. See OAuth for more information.
oauth.google.redirect_uri string OAuth configuration. See OAuth for more information.
oauth.google.user_details_resource_uri string, URL OAuth configuration. See OAuth for more information.
oauth.google.error_uri string, URL OAuth configuration. See OAuth for more information.
oauth.google.return_uri string, URL OAuth configuration. See OAuth for more information.
oauth.facebook.authorization_location string, URL OAuth configuration. See OAuth for more information.
oauth.facebook.token_location string, URL OAuth configuration. See OAuth for more information.
oauth.facebook.client_id string OAuth configuration. See OAuth for more information.
oauth.facebook.client_secret string OAuth configuration. See OAuth for more information.
oauth.facebook.redirect_uri string OAuth configuration. See OAuth for more information.
oauth.facebook.user_details_resource_uri string, URL OAuth configuration. See OAuth for more information.
oauth.facebook.error_uri string, URL OAuth configuration. See OAuth for more information.
oauth.facebook.return_uri string, URL OAuth configuration. See OAuth for more information.
Registration.customUserAttributes string User self-registration configuration. See Self Registration for more information.
Registration.allowLoginBeforeConfirmation boolean information.
Registration.customUserClass Structr type information.
security.passwordpolicy.forcechange boolean Indicates if a forced password change is active false
security.passwordpolicy.maxage  integer The number of days after which a user has to change his password 90
security.passwordpolicy.remindtime  integer The number of days (before the user must change the password) where a warning should be issued. (Has to be handled in application code) 14
security.passwordpolicy.maxfailedattempts  integer The maximum number of failed login attempts before a user is blocked 4
 security.twofactorauthentication.level integer See Two Factor Authentication 1
 security.twofactorauthentication.issuer string See Two Factor Authentication Structr
 security.twofactorauthentication.algorithm string See Two Factor Authentication SHA1
 security.twofactorauthentication.digits integer See Two Factor Authentication 6
 security.twofactorauthentication.period integer See Two Factor Authentication 30
 security.twofactorauthentication.logintimeout integer See Two Factor Authentication 30
 security.twofactorauthentication.loginpage string See Two Factor Authentication /twofactor
 security.twofactorauthentication.whitelistedIPs string See Two Factor Authentication
smtp.host IP address or host name Address of the SMTP server used to send e-mails, see E-Mail Configuration for more information.
smtp.port integer SMTP server port to use when sending e-mails
smtp.tls.enabled boolean Whether to use TLS when sending e-mails
smtp.tls.required boolean Whether TLS is required when sending e-mails
StructrUiHandler.contextPath string Static resource handling configuration. See Static Resources for more information.
StructrUiHandler.directoriesListed boolean
StructrUiHandler.resourceBase string
StructrUiHandler.welcomeFiles string
superuser.username arbitrary string Name of the superuser
superuser.password arbitrary string Password of the superuser (or empty to create a random password at runtime)
tcp.port integer CloudService port, see Cloud Service for more information.
tmp.path Absolute or relative path Path to the temporary directory
translation.google.apikey string Google Cloud Translation API Key
UploadServlet.authenticator Fully-qualified Java class name Authenticator class to use for file upload. Do not change unless you know what you are doing.
UploadServlet.class Fully-qualified Java class name Servlet class to use for file upload. Do not change unless you know what you are doing.
UploadServlet.defaultview string Default view to use when no view is given in the URL
UploadServlet.outputdepth integer Maximum nesting depth of JSON output
UploadServlet.path string URL pattern for file upload. Do not change unless you know what you are doing.
UploadServlet.resourceprovider Fully-qualified Java class name Resource provider class to use for file upload. Do not change unless you know what you are doing.
UploadServlet.user.autocreate boolean Unused
UploadServlet.allowAnonymousUploads boolean
UploadServlet.maxFileSize integer (megabytes) Maximum allowed file size for single file uploads.
UploadServlet.maxRequestSize integer (megabytes) Maximum allowed request size for single file uploads.
udp.port integer Unused, was previously used for CloudService over UDP.
ws.indentation boolean Prettyprints websocket responses if set to true
WebSocketServlet.authenticator Fully-qualified Java class name Authenticator class to use for WebSockets. Do not change unless you know what you are doing.
WebSocketServlet.class Fully-qualified Java class name Servlet class to use for WebSockets. Do not change unless you know what you are doing.
WebSocketServlet.defaultview string Default view to use when no view is given in the URL. Not used
WebSocketServlet.outputdepth integer Maximum nesting depth of JSON output
WebSocketServlet.path string URL pattern for WebSockets. Do not change unless you know what you are doing.
WebSocketServlet.resourceprovider Fully-qualified Java class name Resource provider class to use with WebSockets. Do not change unless you know what you are doing.
WebSocketServlet.user.autocreate boolean Unused
WebSocketServlet.frontendAccess boolean
CronService.tasks List with cron task configurations CronService configuration

Search results for "structr.conf"

Periodic Task Scheduler

  • The CronService must be included in the structr.conf setting configured.services to be activated
  • When a cronExpression is added, deleted or edited, the CronService has to be restarted for the changes to take effect. This can be done at runtime via the configuration tool or by restarting structr
  • By default, structr prevents the same cron task to run run while the previous execution is still running. This can be changed via the setting CronService.allowparallelexecution in structr.conf.

structr.conf

Installation Type File Location
Debian Package /usr/lib/structr/structr.conf
ZIP Distribution ./structr.conf

Self-signed certificate for local development

This command will ask for a keystore password and some information and then create a file named “domain.key.keystore”. Place this file inside the structr main directory alongside the structr.conf configuration file. Configure the keystore password in structr.conf in the key application.keystore.password and enable HTTPS by setting application.https.enabled = true. Restarting structr will result in a HTTPS-enabled instance.

NOTE: Some browsers will refuse to connect to servers using self-signed certificates citing security risk as the cause. In some browsers the user can accept the risk and still connect.

REST Request Keywords

There is a legacy mode available via the setting application.legacy.requestparameters.enabled = true in structr.conf. This allows using the old syntax without the prefix but is discouraged for new projects.

Log messages

The reason for this is that, since version 4.1-SNAPSHOT, structr supports connecting to different neo4j databases. The database name has to be configured though. By default the database name is set to “neo4j” (because that is the default database name since neo4j 4.x). If your application started with an older version of neo4j, then the database name might be “graph.db”. If you have configured a different name, then that name has to be used.

The configuration for this is done in structr.conf. A new configuration line has to be added to the existing configuration.

Let us assume the configuration looks like this:

XXXXXXXXXX.database.connection.name = <a name for your connection>
XXXXXXXXXX.database.connection.password = <your database user password>
XXXXXXXXXX.database.connection.url = <your connection string>
XXXXXXXXXX.database.connection.username = <your database username>

XXXXXXXXXX is the custom prefix in your settings.

The new line would need to match the XXXXXXXXXX and look like this:

XXXXXXXXXX.database.connection.databasename =

Neo4j Upgrade

If the version upgrade is from below Neo4j v4, then it is possible that the default database is called “graph.db” instead of the newer “neo4j” in version 4 and up. Since v4.1 Structr supports selecting a database (if supported by the Neo4j installation it is connecting to). The default database it connects to is the “neo4j” database - if the migration happened from an older version, the correct database name needs to be configured via structr.conf file using the “xxxx.database.connection.databasename” setting as shown in the following example in line 4.

Authentication - JSON Web Tokens

The KeyStore file has to be stored beside the structr.conf file in the installation directory of your Structr instance.

General

The configuration settings are grouped by topic. You can access the individual groups by clicking on one of the tabs in the tab row of the main area. The individual settings are listed by their key in the config file, e.g. the “application.title” setting can be found in structr.conf under application.title. If there is a little Information icon next to the title of a setting, you can get additional information about the setting by hovering over the icon.

Changing Settings

To apply the changes, click on the “Save to structr.conf” button on the bottom right.

Configuration Tool

The Configuration Tool is a web application that allows you to manage configuration settings in structr.conf. It is the preferred way to edit the configuration, because the config file only stores the difference to the default, and you can apply the changes immediately. In a default setup, the tool is available at http://localhost:8082/structr/config.

Periodic Task Scheduler

Structr provides a service for periodic task scheduling: the CronService. It is a background service that can be configured in the structr.conf configuration file to schedule the execution of periodic tasks.

structr.conf

structr.conf is the main configuration file. It consists of key-value mappings which are managed automatically by the Configuration Tool. Since the Configuration Interface is the preferred way of editing configuration settings, the config file only stores the values that differ from the default value.

Login

In order to log into the Configuration Tool, you need the superuser password stored in your structr.conf. Up until version 3.4, Structr was configured to create a secure random password on first start. In versions 3.5 and later, you must enter the superuser password when configuring Structr initially.

Cold backup

To backup a Structr installation, do the following:

  • stop the Structr instance
  • copy db/ and files/ directories to a safe place
  • copy structr.conf to a safe place
  • start instance

Login

You can find the password for the Configuration Tool in your structr.conf file.

Cypher

Please note that by default the number of visible results in the Cypher console is limited to 10. If you run a query that returns more than 10 objects, Structr will show an error message. This number is configurable via application.console.cypher.maxresults in structr.conf

SSHService

The SSHService allows admin users to connect to the structr instance via the SSH protocol. The SSH port can be configured via the application.ssh.port key in structr.conf.

Authentication can be done via public key or via password (unless explicitly forbidden via application.ssh.forcepublickey).

After successful authentication the SSH connection allows exactly the same functionality as the Admin Console but via SSH.

letsencrypt

Name Description
server required (staging|production) Staging mode is meant for testing and will generate invalid dummy certificates only, while production creates real, valid certificates but is throttled.
challenge optional Overwrite the default challenge method as set in structr.conf. This is convenient to test an alternative challenge type without the need to restart the Structr instance.
wait optional Let the client wait for the given period (in seconds) in order to have enough time to prepare the DNS TXT record in case of the dns challenge type, or the HTTP response in case of the http challenge.
reload optional Reload the HTTPS certificate after updating it. Allows using the new certificate without restarting.

Create and use Let's Encrypt certificates

Using the parameter challenge, you can overwrite the default challenge method as set in structr.conf. This is convenient to test an alternative challenge type without the need to restart the Structr instance.