Skip to main content

Quick start guide

Introduction

The Encap server distribution

First, you need to install the Encap server distribution. The Encap server comes pre-packaged in a ZIP archive that unpacks into a fully self-contained Jetty server.

Default configuration

There is a default configuration in place that should allow you to start the server immediately, provided your database management system is set up to work with these defaults. This guide will also cover the important files within the distribution that may need to be adjusted to work with your environment.

Installation

Download

The latest version of encap-distribution can be found in the Encap repository. For the folder containing the releases, see encap-distribution.

Supported Java version

The Encap server runs on Java 21 or Java 25.

Unpack

Unzip the encap-distribution zip file:

$ unzip encap-distribution-X.Y.Z.zip
Archive: encap-distribution-X.Y.Z.zip
creating: encap-distribution-X.Y.Z/
creating: encap-distribution-X.Y.Z/core/
creating: encap-distribution-X.Y.Z/core/config/
creating: encap-distribution-X.Y.Z/core/scripts/
creating: encap-distribution-X.Y.Z/core/scripts/jars/
creating: encap-distribution-X.Y.Z/core/scripts/lib/
creating: encap-distribution-X.Y.Z/core/lib/
...

Configure database

Ensure database is configured in the file: <ENCAP_HOME>/core/config/encap-db.properties, which is required by the upgrade script.

Database drivers

Download link for Oracle: Oracle JDBC driver.

Download link for MySQL: MySQL JDBC driver

The database driver must be placed in both: <ENCAP_HOME>/core/lib, and <ENCAP_HOME>/core/scripts/lib.

More information about database setup can be found in the Encap server Administration Manual under The Database Management System.

Initialising the database

The initdb.sh upgrade command is used to initialise an empty database or upgrade an existing Encap database to the newest Encap schema DDL version.

Run ./initdb.sh to see command line help and available options.

To initialise the database run the following script:

encap-distribution$ ./core/scripts/initdb.sh upgrade

Start the server and verify startup

The Encap server can be started in two modes, using different start scripts.

Mode 1: Starting in foreground mode

  1. Start the Encap server in foreground mode:
    encap-distribution$ ./core/encap.sh
  2. The Encap server will be running until the active cmd session is aborted. This is also the recommended way to use when running in a container.

Mode 2: Starting using background mode (legacy mode)

  1. Start the Encap server by executing the run.sh script.
    encap-distribution$ ./core/run.sh start
  2. Check the log (./core/logs/stderrout.log) for warnings and error messages.
  3. Stop the server by using the same run.sh script.
    encap-distribution$ ./core/run.sh stop
  4. Type ./run.sh with no parameters to get help and list of flags.
Server log file rollover

The server log file has daily rollover set to this pattern stderrout.%d{yyyy-MM-dd}.log.

Troubleshooting

If trying to start the Encap server and another instance is running, such as an older version, then the script is not able to detect this. It needs to be stopped manually.

Virtualisation considerations

The Encap server requires a minimum of entropy. It uses /dev/random as part of the crypto implementation.

If there is not enough entropy in the host system, then the Encap server will periodically pause, waiting for /dev/random which will lower performance.