System Requirements

Table 1. Requirements for users


Chrome or Safari

Table 2. Requirements to run the standalone version

Java Runtime Environment

version 8 or higher

Table 3. Requirements run a WebAnno server

Java Runtime Environment

version 8 or higher

Apache Tomcat

version 6 or higher (Servlet API 2.5)

MySQL Server

version 5 or higher



  • This guide assumes Debian 8.0.0 (Jessie). It may also work on Ubuntu with some modifications, but we do not test this. Instructions for other Linux distributions likely deviate significantly.

  • It is further assumed that the user "www-data" already exists on the system and that it shall be used to run WebAnno. Finally, it is expected that you have set up a MySQL database that WebAnno can use.

  • All commands assume that you are logged in as the root user.

If you cannot log in as root but have to use sudo to become root, then the recommended way to do that is using the command sudo su -.

Install Java 8

You can install an Oracle Java 8 JDK using the following commands.

$ echo "deb trusty main" | tee /etc/apt/sources.list.d/webupd8team-java.list
$ echo "deb-src trusty main" | tee -a /etc/apt/sources.list.d/webupd8team-java.list
$ apt-key adv --keyserver hkp:// --recv-keys EEA14886
$ apt-get update
$ apt-get install oracle-java8-installer
$ apt-get install oracle-java8-set-default

Prepare database

  • Install MySQL

    $ sudo apt-get install mysql-server
  • make sure your MySQL server is configured for UTF-8. Check the following line is present in /etc/mysql/my.cnf:

    character-set-server = utf8
  • login to MySQL

    $ mysql -u root -p
  • create a database

    mysql> CREATE DATABASE webanno DEFAULT CHARACTER SET utf8 COLLATE utf8_bin ;
  • create a database user called webanno with the password t0t4llYSecreT which is later used by the application to access the database (instructions for file below).

    mysql> CREATE USER 'webanno'@'localhost' IDENTIFIED BY 't0t4llYSecreT';
    mysql> GRANT ALL PRIVILEGES ON webanno.* TO 'webanno'@'localhost';
For production use, make sure you choose a different, secret, and secure password.

Dedicated Tomcat instance

  • Install package to install user-instances of Tomcat.

    $ aptitude install tomcat8-user authbind
  • Create new instance

    $ cd /opt
    $ tomcat8-instance-create -p 18080 -c 18005 webanno
    $ chown -R www-data /opt/webanno
If WebAnno is the only application you install on your server, then you can also have WebAnno running on port 80 or port 443. In that case, substitute all instances of port 18080 in these guidelines with the respective port. Mind that running via SSL on port 443 requires additional steps that we have not yet documented. Ports lower than 1024 are privileged and the WebAnno init script will automatically use a tool called authbind to allow WebAnno to operate on these ports as the unprivileged www-data user.
  • Configure the startup script. Edit /etc/init.d/webanno and add the following contents or just download the file from here and place it in /etc/init.d.

    # Licensed under the Apache License, Version 2.0:
    # kFreeBSD do not accept scripts as interpreters, using #!/bin/sh and sourcing.
    if [ true != "$INIT_D_SCRIPT_SOURCED" ] ; then
        set "$0" "$@"; INIT_D_SCRIPT_SOURCED=true . /lib/init/init-d-script
    # Provides:          webanno
    # Required-Start:    $remote_fs $syslog
    # Required-Stop:     $remote_fs $syslog
    # Default-Start:     2 3 4 5
    # Default-Stop:      0 1 6
    # Short-Description: WebAnno init script
    # Description:       This file should be placed in /etc/init.d. It
    #                    allows starting/stopping WebAnno using the
    #                    "service" command and ensures that WebAnno starts
    #                    when the system is booted.
    # Author: Richard Eckart de Castilho
    JAVA_OPTS="-Djava.awt.headless=true -Xmx750m -XX:+UseConcMarkSweepGC -Dwebanno.home=$WEBANNO_HOME"
    setup_authbind() {
      # log_action_msg "Setting up authbind configuration for $DESC on port $WEBANNO_PORT"
      touch /etc/authbind/byport/$WEBANNO_PORT
      chmod 500 /etc/authbind/byport/$WEBANNO_PORT
      chown $WEBANNO_USER /etc/authbind/byport/$WEBANNO_PORT
      AUTHBIND="authbind --deep"
    tomcat_pid() {
      echo `ps -fe | grep -- "-Dcatalina.base=$CATALINA_BASE" | grep -v grep | tr -s " "|cut -d" " -f2`
    do_start_cmd_override() {
      if [ $WEBANNO_PORT -lt 1024 ]
      su - www-data -s "/bin/bash" -c "JAVA_OPTS=\"$JAVA_OPTS\" $AUTHBIND $CATALINA_BASE/bin/" > /dev/null 2>&1
    do_stop_cmd_override() {
      su - www-data -s "/bin/bash" -c "$CATALINA_BASE/bin/" > /dev/null 2>&1
    do_status() {
      local pid
      if [ -n "$pid" ]
        log_action_msg "Status $DESC: running"
        return 0
        log_action_msg "Status $DESC: stopped"
        return 1
  • Make the script executable and register it to run during system start:

    $ chmod +x /etc/init.d/webanno
    $ update-rc.d webanno defaults
If you deploy WebAnno on a Linux machine that is short on entropy, you can significantly decrease startup time by adding to the JAVA_OPTS variable in the init script.

Now we have a dedicated Apache Tomcat instance for WebAnno installed at /opt/webanno/ that automatically starts when the system boots and that can be managed through the usual service commands.

Deploy WAR file

  • Place the WebAnno WAR into the Tomcat webapps folder:

    $ cp webanno-webapp-3.2.1.war /opt/webanno/webapps/webanno.war
    Mind that the copy command above renames the WAR file to webanno.war! This is important so that WebAnno is accessible at the URL noted later in the present guidelines.
  • Create WebAnno home folder. This is the directory where webanno settings files and projects (Serialized Cases, Source documents…​) are stored

    $ mkdir /srv/webanno
  • Edit /srv/webanno/ to define the database connection as well as internal backup properties:

    # 60 * 60 * 24 * 30 = 30 days
    # 60 * 5 = 5 minutes
    ui.brat.sentences.number = 5
    If you are using MySQL 5.5.45+, 5.6.26+ or 5.7.6+, you may have to append ?useSSL=false to the database.url value.
  • Fix permissions in WebAnno home folder

    $ chown -R www-data /srv/webanno
  • Start WebAnno

    $ service webanno start
  • Open it with your browser at http://localhost:18080/webanno. If you chose to run WebAnno behind the Apache web-server use http://localhost/webanno. The first time, it will create a username admin with password admin. login with this username and proceed.

You can start with the SampleProjects to explore some of the functionalities.

Running behind Apache HTTPD

These are optional instructions if you want to run WebAnno behind an Apache web-server instead of accessing it directly. This assumes that you already have the following packages installed:

  • Apache Web Server

  • mod_proxy

  • mod_proxy_ajp

  • Edit /opt/webanno/conf/server.xml and enable AJP Connector on localhost (comment in, add address, and change port

    <Connector port="18009" protocol="AJP/1.3" redirectPort="8443" address=""/>
  • Disable HTTP Connector (just comment it out)

    <!--Connector port="8080" protocol="HTTP/1.1".
               redirectPort="8443" /-->
  • Edit /etc/apache2/conf.d/webanno.local

    ProxyPreserveHost On
    <Proxy ajp://localhost/webanno >
      Order Deny,Allow
      Deny from none
      Allow from all
    <Location /webanno >
      ProxyPass ajp://localhost:18009/webanno timeout=1200
      ProxyPassReverse http://localhost/webanno
  • Restart Apache web server

    $ service apache2 restart


WebAnno uses an SQL database to store project and user data.

We test MySQL using a MySQL server. WebAnno uses by default an embedded HSQLDB database. However, we recommend using the embedded database only for testing purposes. For production use, we recommend using a MySQL server. The reason for this is, that:

  • we do more testing on the MySQL server and

  • in the past, we had cases where we described in-place upgrade procedures that required performing SQL commands to change the data model as part of the upgrade. We promise to try avoiding this in the future. However, in case we offer advice on fixing anything directly in the database, this advice will refer to a MySQL database.

We try to keep the data model simple, so there should be no significant requirements to the database being used. Theoretically, it should be possible to use any JDBC-compatible database after adding a corresponding driver to the classpath and configuring WebAnno to use the driver in the file.

If you plan to use UTF-8 encoding for project name and tagset/tag name, make sure either of the following settings for MySQL databse a) in the file, make sure that database.url includes


b) change the my.conf MySQL databse configuration file to include the following line

character-set-server = utf8

Using HSQLDB in production

WebAnno displays a warning in the user interface when an embedded database is being used. In case that you really want to run WebAnno with an embedded database in production, you probably want to disable this warning. To do so, please add the following entry to the file:




  • Log into WebAnno and export all the projects that you wish to migrate using the Export pane in the project settings

  • Move your WebAnno home folder to a safe location so that WebAnno and create a new home folder in the old location

  • Copy the and (if present) back from your moved folder

  • Start the new WebAnno version to initialize the database

  • Recreate the users

    • If you are using MySQL

      • create a new database for the new WebAnno version and update the accordingly

      • use mysqldump to dump the tables users and authorities from the old database and load it back into the new database

    • If you are not using MySQL, you have to recreate the users manually

  • When upgrading to WebAnno 2.x from a pre 2.x version, remove the file from the WebAnno home folder

  • Restart WebAnno and import the previously exported projects

In-place update

This method should work when updating only a bugfix version, e.g. from 2.0.9 to 2.0.10. When performing a minor or major update, better use the exporting/importing method above.

  • Make a backup of your data before upgrading to a new version:

    • Make a copy of your WebAnno home folder

    • If you are using MySQL, make a backup of your WebAnno database, e.g. using the mysqldump command.

  • Standalone version

    • clean up the temporary installation before running the new version:

      • On OS X: rm -R "$TMPDIR/winstoneEmbeddedWAR"

      • On Linux: rm -R /tmp/winstoneEmbeddedWAR

      • On Windows: remove the winstoneEmbeddedWAR that should be somewhere under C:\Users\<username>\AppData\Local\Temp

    • start the new version

  • WAR version

    • while Tomcat is running, delete the old WAR from your webapps folder

    • wait until Tomcat has automatically deleted the WebAnno folder

    • stop Tomcat

    • place the new WAR file into your webapps folder

    • start Tomcat

Upgrading Tomcat 6 to Tomcat 7

If you have been using our installation instructions to install WebAnno on Linux, you are probably running an instance of Tomcat 6. WebAnno 3 is no longer compatible with Tomcat 6 and requires at least Tomcat 7.

To upgrade your existing instance, you can try the following procedure (adapt the procedure as necessary if you have deviated from our installation instructions):

  • Stop the current WebAnno Tomcat 6 instance

$ service webanno stop
  • Move your old Tomcat instance out of the way

$ mv /opt/webanno /opt/webanno-tomcat6
  • Install tomcat7-user package (this will automatically uninstall Tomcat 6)

$ apt-get install tomcat7-user
  • Create new instance

$ cd /opt
$ tomcat7-instance-create -p 18080 -c 18005 webanno
$ chown -R www-data /opt/webanno
  • Copy the WAR file over to the new instance

$ mv /opt/webanno-tomcat6/webapps/webanno.war /opt/webanno/webapps/webanno.war
  • Stop the new WebAnno Tomcat 7 instance

$ service webanno start
If you have made additional changes to the Tomcat 6 configuration files, e.g. changed conf/server.xml, please make sure to redo them in the new Tomcat 7 instance.

Version 2.3.1 to 3.0.0

  • The access permissions of the super admin have changed. Super admins can no longer access annotation, curation, and monitoring pages for all projects. They can only access them if they are annotators, admins, or curators in the respective projects. However, they still have full access to the project settings of all projects and can simply give themselves the missing permissions. After an upgrade to 3.0.0, all super admins who require project permissions on existing projects should assign these permissions to themselves. This also applies when importing old projects. For new projects, the creator of the project always starts with annotator, curator, and project admin permissions. If these permissions are not required by the project creator, they should be removed after project creation.

System Properties

Setting Description Default Example


WebAnno home folder




Disable JavaMelody




Setting Description Default Example


Authentication mode




Principal header


some other header


Default roles for new users (comma separated)




Extra roles for user (comma separated)




Database dialect




Database driver




JDBC connection string

location in WebAnno home



Database username




Database password




Initial database connection pool size



Minimum database connection pool size



Maximum database connection pool size



Time between backups (seconds)


300 (60 * 5 = 5 minutes)


Maximum number of backups to keep




Maximum age of backups to keep (seconds)


2592000 (60 * 60 * 24 * 30 = 30 days)


The number of sentences to display per page



Logo image displayed in the upper-right corner


path to an image file


Warn about using an embedded database




Warn about unsupported browser




Show a page with a stack trace instead of an "Internal error" page. Do not use in production!




Custom message to appear on the login page, such as project web-site, annotation guideline link, …​ The message can be an HTML content.


<span style="color:red; font-size: 200%;">Use are your own risk.</span>


Whether regular users can access their own profile to change their password and other profile information. This setting has no effect if WebAnno is running in pre-authentication mode.



Internal backups

WebAnno stores its annotations internally in files. Whenever a user performs an action on a document, the file is updated. It is possible to configure WebAnno to keep internal backups of these files, e.g. to safeguard against crashes or bugs.

The internal backups are controlled through three properties:

Setting Description Default


Time between backups (seconds)

0 (disabled)


Maximum number of backups to keep

0 (unlimited)


Maximum age of backups to keep (seconds)

0 (unlimited)

By default, backups are disabled (backup.interval is set to 0). Changing this properties to any positive number enables internal backups. The interval controls the minimum time between changes to a document that needs to have elapsed in order for a new backup to be created.

When backups are enabled, either or both of the properties backup.keep.number and backup.keep.time should be changed as well, because their default values will cause the backups to be stored indefinitely and they will eventually fill up the disk.

The properties backup.keep.number and backup.keep.time control how long backups are keep and the maximal number of backups to keep. These settings are effective simultaneously.

Example: Make backups every 5 minutes and keep 10 backups irrespective of age
backup.interval    = 300
backup.keep.number = 10
backup.keep.time   = 0
Example: Make backups every 5 minutes and all not older than 7 days (60 * 60 * 24 * 7 seconds)
backup.interval    = 300
backup.keep.number = 0
backup.keep.time   = 604800
Example: Make backups every 5 minutes and keep at most 10 backups that are not older than 7 days
backup.interval    = 300
backup.keep.number = 10
backup.keep.time   = 604800

External pre-authentication

WebAnno can be used in conjunction with header-based external per-authentication. In this mode, WebAnno looks for a special HTTP header (by default remote_user) and if that header exists, it is taken for granted that this user has been authenticated. WebAnno will check its internal database if a user by the given name exists, otherwise it will create the user.

Pre-authentication can be enabled by setting the property auth.mode to preauth. When enabling pre-authentication mode, the default roles for new users can be controlled using the auth.preauth.newuser.roles property. The ROLE_USER is always added, even if not specified explicitly. Adding also the role ROLE_PROEJCT_CREATOR allows all auto-created users also to create their own projects.

Since the default administrator user is not created in pre-authentication, it is useful to also declare at least one user as an administrator. This is done through the property auth.user.<username>.roles where <username> must be replaced with the name of the user. The example below shows how the user Franz is given administrator permissions.

Example: Authenticate using the remote_user header, new users can create projects, user Franz is always admin.
auth.mode                     = preauth
auth.preauth.header.principal = remote_user
auth.preauth.newuser.roles    = ROLE_PROJECT_CREATOR
auth.user.Franz.roles         = ROLE_ADMIN
The roles specified through auth.preauth.newuser.roles are saved in the database when a user logs in for the first time and can be changed after creation through the user interface.
The roles added through auth.user.<username>.roles properties are not saved in the database and cannot be edited through the user interface.