Configuration of ANNIS

For the desktop version of ANNIS, you most probably don't need to change any of the default configuration and you can skip this section. If you are installing ANNIS on a server however, you might want to tweak the settings. The Java Properties, TOML and JSON file formats are used for different kind of configuration.

ANNIS uses the Spring Boot configuration system and thus it will search for a Java Properties based configuration file named in the current working directory or a config sub-directory of the working directory.1 You can also use the command line argument --spring.config.location=file:/<location-on-disk> to specify a specific configuration file. More search paths for configurations files are documented in the Spring Boot documentation.

The following is an example configuration with ANNIS-specific configuration values.

# The port on which this service is listening

# Defines from where the user interface service can be accessed from.
# as value will only allow connections from the server itself (localhost)
# The default value allows connections from everywhere.

# Allows to change the context path the ANNIS frontend application is deployed to
# E.g. you can change this to /annis4 to change the path to 
# http://localhost:5711/annis4

# A configuration file for the embedded REST Service, which is started automatically
# by the ANNIS application.
# See 
# for more information on how to configure the graphANNIS service.

# If non-empty this URL is used to communicate with the REST backend service instead of using the embedded service (which will not be started)
# annis.webservice-url=http://localhost:5711/v1

# set to "true" to globally disable right-to-left text detection
# set to an valid e-mail adress in order to enable the "Report a bug" button

# If "true", the user can create reference links with shortened URLs

# Path to the persistent database, where e.g. the reference links are stored  

Being a Spring Boot application, ANNIS configuration properties also be directly given as command line argument.


Depending on how you start ANNIS, the working directory can be different. When using java -jar /path/to/annis-server.jar, the working directory is the same as the working directory of your current shell. If you start ANNIS by treating it like an executable file, e.g. by running /path/to/annis-server.jar directly, the directory containing the jar is used as the working directory of the application per default.