> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bigcapital.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Environment Variables

Bigcaptial requires the following environment variables to be configured:

### Mail

Following environment variables related to the application mail.

| Variable                | Description                                                                  |
| ----------------------- | ---------------------------------------------------------------------------- |
| **MAIL\_HOST**          | The hostname or IP address of the mail server used for sending emails.       |
| **MAIL\_USERNAME**      | The username or email address used for authentication when sending emails.   |
| **MAIL\_PASSWORD**      | The password associated with the **MAIL\_USERNAME** for authentication.      |
| **MAIL\_PORT**          | The port number on the mail server used for email communication.             |
| **MAIL\_SECURE**        | Indicates whether the email communication should be secured with encryption. |
| **MAIL\_FROM\_NAME**    | The sender's display name shown in the "From" field of outgoing emails.      |
| **MAIL\_FROM\_ADDRESS** | The email address shown in the "From" field of outgoing emails.              |

### System Database

Following environment variables related to the system database.

| Variable                 | Description                                                                                                                                                            |
| ------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **SYSTEM\_DB\_HOST**     | The hostname or IP address of the **system database** server.                                                                                                          |
| **SYSTEM\_DB\_USER**     | The port number on the **system database** server where the database service is running.                                                                               |
| **SYSTEM\_DB\_PASSWORD** | The password associated with the `SYSTEM_DB_USER` for authentication.                                                                                                  |
| **SYSTEM\_DB\_NAME**     | The name of the **system database** that your application will connect to. the docker-compose config will create a new fresh database after initial container running. |
| **SYSTEM\_DB\_CHARSET**  | Defines the character set or encoding for the **system database** connection.                                                                                          |

### Tenant Database

Following environment variables related to the tenant databases.

| Variable                     | Description                                                                                                                                                                             |
| ---------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **TENANT\_DB\_NAME\_PERFIX** | The prefix name of the **tenant databases** e.g. if the prefix name is `bigcapital_` the created tenant database at the runtime wil be `bigcapital_123123` with unique organization id. |
| **TENANT\_DB\_HOST**         | The hostname or IP address of the **tenants database** server.                                                                                                                          |
| **TENANT\_DB\_USER**         | The port number of the **tenants database** server where the database service is running.                                                                                               |
| **TENANT\_DB\_PASSWORD**     | The password associated with the `TENANT_DB_USER` for authentication.                                                                                                                   |
| **TENANT\_DB\_CHARSET**      | Defines the character set or encoding for the **tenants databases** connection.                                                                                                         |

### Database

Following environment variables is mutual variables between system and tenant databases if both holding the same values.

:::info
If you have set the environment variable `DB_USER=bigcapital` and `SYSTEM_DB_USER=acme`, the value of `DB_USER` will be deprecated and the system's database user will be "**acme**". Similarly, if you have defined `TENANT_DB_NAME=acme`, the tenant databases will default to "**bigcapital**" until a value set to `TENANT_DB_NAME`.
:::

| Variable         | Description                                                                                          |
| ---------------- | ---------------------------------------------------------------------------------------------------- |
| **DB\_HOST**     | The hostname or IP address of the **system and tenant databases** server.                            |
| **DB\_USER**     | The port number of the **system and tenant databases** server where the database service is running. |
| **DB\_PASSWORD** | The password associated with the `DB_PASSWORD` for authentication.                                   |
| **DB\_CHARSET**  | Defines the character set or encoding for the **system and tenants databases** connection.           |

### Application

| Variable        | Description                                                           |
| --------------- | --------------------------------------------------------------------- |
| **JWT\_SECRET** | Should be a strong, random, and unique value to enhance the security. |

### Signup Restrictions

Following environment variables related to the [Signup Restrictions](/docs/deployment/signup_restriction).

| Variable                     | Description                                                                                                               |
| ---------------------------- | ------------------------------------------------------------------------------------------------------------------------- |
| **SIGNUP\_DISABLED**         | Disable the signing up of new users .                                                                                     |
| **SIGNUP\_ALLOWED\_DOMAINS** | Restrict signups to emails belonging to only a specific set of domains. This field takes a comma-separated set of values. |
| **SIGNUP\_ALLOWED\_EMAILS**  | restrict signups to specific email addresses. This field takes a comma-separated set of values.                           |
