# Installation / Update

## Prerequisites

* HCL Domino 9.0.1 FP8 or higher (requires Java Virtual Machine 1.8 or higher)
* Connection to the Internet mail server(s) from the HCL Domino server
* Root (and intermediate) certificates of the Internet mail server(s) in the CACert keystore file (see [Administrator Tips](https://squirrel.k43.ch/tips-for-the-administrator))
* Java Virtual Machine heap size with 256MB or more

## Installation / Update

### Step 1: Check Java VM Heap Size

To avoid out-of-memory errors in the Java Virtual Machine, make sure that the JVM heap size is set to at least 256 MB in the Notes.ini on the HCL Domino server, e.g. *JavaMaxHeapSize=256MB*

### Step 2: Copy distribution files

After [downloading](https://squirrel.k43.ch/quick-start/download) and unzipping the installation package, the distribution files must be copied as follows:

| File Name                   | Target Directory      | Description                                                                                           |
| --------------------------- | --------------------- | ----------------------------------------------------------------------------------------------------- |
| SOFA-Logging.properties     | Domino                | *Only needed to enable OAUTH debugging (see* [*Debugging*](https://squirrel.k43.ch/debugging-tips)*)* |
| Squirrel.jar                | Domino/ndext/         | Server add-in                                                                                         |
| 1-Squirrel-Jakarta-Mail.jar | Domino/ndext/         | Eclipse Jakarta Mail                                                                                  |
| Squirrel.ntf                | Domino data directory | Database template                                                                                     |

{% hint style="warning" %}
Under Linux/Unix/AIX, make sure that the JAR files are marked with executable rights thru 'chmod +rx‘
{% endhint %}

{% hint style="info" %}
The file name prefix '1-' ensures that the newer Eclipse Jakarta Mail is loaded in favor of the standard mail.jar included in HCL Domino (required for OAuth 2.0)
{% endhint %}

### Step 3: Create / Update Squirrel Database

* Sign the database template *Squirrel.ntf* with the HCL Domino server-id
* Create a new database *Squirrel.nsf* in the root data directory or replace the design of the existing database using the signed template
* Create, edit or verify the configuration, connection and account documents

The database access control (ACL) must be set as follows:

| User types     | Role                                         |
| -------------- | -------------------------------------------- |
| Users          | EditAcc                                      |
| Administrators | EditConfigSrv, EditConn                      |
| Servers        | EditConfigSrv, EditConn, EditAcc, ReadAllAcc |

The HCL Domino database *Squirrel.nsf* contains configuration and status information. There are three types of documents:

* One Configuration Document per Domino server is used to define the Squirrel add-in running on a server (ACL Role *EditConfigSrv*).
* One Host Connection Document must be defined for each Internet mail server referenced in the mail account documents (ACL Role *EditConn*).
* One Mail Account Subscription Document must be defined for each mail account to be processed (ACL Role *EditAcc*) .

### Step 4: Post-installation

* If you plan to process all folders from the IMAP host, check the [Developer Tips](https://squirrel.k43.ch/developer-tips) on how to move the messages in the users mail box to the corresponding folders after processing.
* If any RunJava task is running on the server,  it is necessary to restart RunJava to load the newly installed Java containers.

### Step 5: Start the Application

Now you are ready to [start the Application](https://squirrel.k43.ch/quick-start/start-stop-squirrel).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://squirrel.k43.ch/quick-start/installation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
