# .env

## Example

This is an environment variables file that is loaded into the Monolith Docker deployment at build/run time.  These values determine various setup options and licensing information for your Monolith deployment.

The values are typically set for you when you purchase Monolith.

{% hint style="info" %}
Make sure the file name is changed to ".env" from "env.txt".
{% endhint %}

```
### Application Settings ###

### Mandatory Options ###

### Monolith License key
# Used to activate license

MONOLITH_LICENSE_KEY=
MONOLITH_LICENSE_TOKEN=

### API Token Secrets
# Used to generate secure access tokens and refresh tokens
# Set these to long, random alphanumeric strings

ACCESS_TOKEN_SECRET=
REFRESH_TOKEN_SECRET=


### Monolith Database Config

MONOLITH_DB_NAME=monolith
MONOLITH_DB_USER=monolith
MONOLITH_DB_PORT=3306
MONOLITH_DB_HOST=mysql
MONOLITH_DB_PASSWORD=

### Initial Monolith User - Only needed for initial setup

MONOLITH_ADMIN_FIRST_NAME=
MONOLITH_ADMIN_LAST_NAME=
MONOLITH_ADMIN_EMAIL=
MONOLITH_ADMIN_PASSWORD=

### Monolith Forms Settings

FORM_TENANT_NAME=
FORM_ORG_NAME=
FORM_TENANT_SLUG=
FORM_TENANT_EMAIL=

### OPTIONAL SETTINGS ###

### API Instance Total
# Set the number of API cluster instances to run
# default is 1 - which should be plenty for most deployments

#API_INSTANCE_COUNT=1

### File Service
# Choose the file service you wish to use
# Options are "S3" and "LOCAL"
# Defaults to "LOCAL" if not set
# S3 keys required if using S3 service

# FILE_SERVICE=S3
# FILE_SERVICE=LOCAL



### AWS S3 Config

# AWS_ENDPOINT={aws_endpoint}
# MONOLITH_FORMS_BUCKET={aws_bucket_name}
# MONOLITH_CLOUD_BUCKET={aws_bucket_name}
# S3_ACCESS_KEY={s3_access_key}
# S3_SECRET_KEY={s3_secret_key}

### SMTP settings
SMTP_HOST=
SMTP_PORT=
SMTP_USER=
SMTP_PASSWORD=
```

## Values

### MONOLITH\_LICENSE\_KEY

This is a license key that allows for your Monolith deployment to get licensing information from our online license server.  Using this value ensures that your Monolith deployment always has up to date license info.

This key will be provided to you upon purchase.

### MONOLITH\_LICENSE\_TOKEN

This is a signed token that contains licensing information for your Monolith purchase.  This can be used to utilize cached license info without needed to query our licensing server for license info.

This is a good option for Monolith deployments that exist in air-gapped environments.

If this value is provided, Monolith will use this instead of the license key value.

### ACCESS\_TOKEN\_SECRET

This should be a long alphanumeric string.  This value is used for various cryptographic operations related to access tokens, encryption, and session management.

### REFRESH\_TOKEN\_SECRET

This should be a long alphanumeric string.  This value is used for various cryptographic operations related to access tokens, encryption, and session management.

### MONOLITH\_DB\_NAME

This is the name of the MySQL schema that the Monolith API server should connect to.

### MONOLITH\_DB\_HOST

This is the domain or IP address of the MySQL database host that the Monolith API server should connect to.

### MONOLITH\_DB\_USER

This is the MySQL user name that should be used for database connections.

{% hint style="info" %}
NOTE: This should only be root if you are using the default MySQL container.  If using an external MySQL database, you should provision a user account other than root to use here.
{% endhint %}

### MONOLITH\_DB\_PORT

The port that should be used for database connections.  The default MySQL port is 3306.

### MONOLITH\_DB\_PASSWORD

MySQL password used to establish database connections.

### MONOLITH\_ADMIN\_FIRST\_NAME

First name of initial Monolith user.  Only required for first time setup/deployment.

### MONOLITH\_ADMIN\_LAST\_NAME

Last name of initial Monolith user.  Only required for first time setup/deployment.

### MONOLITH\_ADMIN\_EMAIL

Email of initial Monolith user.  Only required for first time setup/deployment.

### MONOLITH\_ADMIN\_PASSWORD

Password of initial Monolith user - this will be used for firs time login to Monolith.  Only required for first time setup/deployment.

### FORM\_TENANT\_NAME

Initial tenant name for your Relay deployment. Only required for first time setup/deployment.

### FORM\_ORG\_NAME

Organization name for your Relay deployment. Only required for first time setup/deployment.

### FORM\_TENANT\_SLUG

URL slug for your Relay deployment. Only required for first time setup/deployment.

{% code title="Slug Example" %}

```
my-forensic-company
```

{% endcode %}

### FORM\_TENANT\_EMAIL

Initial tenant email for your Relay deployment. Only required for first time setup/deployment.

### API\_INSTANCE\_COUNT

The Monolith API server runs in "cluster" mode.  This allows multiple instances to run at the same time, which increases scalability.  This value defaults to 1 and is disabled by default.  You will likely not need to use this value, but contact support if you think this is needed.

### FILE\_SERVICE

This value determines whether Monolith will use a local file system or Amazon S3 to store Monolith files.  Allowed values are "S3" or "Local".  The default value is "Local".  If you set this to "S3", you will also need to set the S3 access key values.

### AWS\_ENDPOINT

This value configures Monolith to use the correct AWS region with your S3 bucket.

### MONOLITH\_FORMS\_BUCKET

The S3 bucket where you would like to store files uploaded to Relay.

### MONOLITH\_CLOUD\_BUCKET

The S3 bucket where you would like to store files uploaded to Monolith.

### S3\_ACCESS\_KEY

AWS access key to use S3 APIs for file storage.

### S3\_SECRET\_KEY

AWS secret key to use S3 APIs for file storage.

### SMTP\_HOST

Email host domain to enable email capabilities in Monolith.

### SMTP\_PORT

Email port to enable email capabilities in Monolith.  This value is typically 587.

### SMTP\_USER

User value to enable email capabilities in Monolith.  May not be required if you are using an SMTP relay.

### SMTP\_PASSWORD

User password to enable email capabilities in Monolith.  May not be required if using an SMTP relay.
