Installing on Tomcat (Local or Cloud)¶
Apache Tomcat is an open source Java web server that can be used to serve ODK Aggregate.
This document guides you through the installation and initial setup of a self-hosted instance of ODK Aggregate, running on Tomcat with a PostgreSQL, or MySQL database server. "Self-hosted" could mean on your own hardware or on a cloud-based server.
If you're planning on hosting your server on a cloud provider, you can use these provider-specific guides:
- Local hosting implies that you are taking ownership of the off-site back up and restoration of your data and are documenting the steps necessary to return your systems to operation in circumstances that might include a full hardware failure or the destruction of your facility. You must also plan for the security of your data and systems.
- Local hosting requires that you configure your network routers. It is recommended to seek assistance from your local computer technical support community before proceeding. The set-up of the ODK Aggregate web server and database are very easy in comparison.
Considerations before you begin¶
Please, read the Aggregate deployment planning guide before continuing.
ODK Aggregate works with any of these database servers:
PostgreSQL is the recommended database server for Aggregate.
Although MySQL is supported, it's not actively being tested during the release cycle. MySQL tables have a row size limit that will affect performance for very large forms.
- Install the Java 8 JRE:
- Ensure that the installed Java bin directory is in the PATH environment variable.
- Install Apache Tomcat 8.5:
- Configure your server and network devices so that laptops or Android devices connecting to the internet from an external access point can access your server.
If your organization has a network or systems administrator, contact them for assistance. The steps for this are:
- configure your server firewall to allow access
- make your server visible on the internet (optional)
- establish a DNS name for the server
- Obtain and Install an SSL certificate if you need secure
- Install PostgreSQL:
- Install ODK Aggregate. Select the latest release for your operating system.
The installer will guide you through configuring ODK Aggregate for your setup. The installer will produce a WAR file (web archive) containing the configured ODK Aggregate code, a
create_db_and_user.sqlscript for creating the database and user that ODK Aggregate will use to access this database, and a
Readme.htmlfile with instructions on how to complete the installation.
- When asked for the fully qualified hostname of the ODK Aggregate server, you should enter the DNS name you established above.
- The install also asks for a database name, user and password. The user should not be postgres (PostgreSQL), or root (MySQL).
- ODK Aggregate will use this user when accessing this database (and it will only access this database).
- By specifying different databases and users, you can set up multiple ODK Aggregate servers that share the same database server, store their data in different databases, and operate without interfering with each other.
- If you are upgrading to a newer version of ODK Aggregate, as long as you specify the same database name, user and password, you do not need to re-run the