> ## Documentation Index
> Fetch the complete documentation index at: https://multiwoven-74-feature--update-docker-compose-docs.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Docker-Compose

> Deploying Multiwoven using Docker-Compose

The steps below will guide you through deploying Multiwoven using docker-compose.

## Prerequisites

* [A Gmail account with an app password](https://support.google.com/accounts/answer/185833?hl=en)
* [Docker](https://docs.docker.com/get-docker/)
* [Docker Compose](https://docs.docker.com/compose/install/)

<Info> All our Docker images are available in x86\_64 architecture, make sure your server supports x86\_64 architecture.</Info>

## Deployment Steps

1. On your VM or Local Machine, you will need to first create a directory for the Multiwoven deployment files.

```bash theme={null}
mkdir mw
cd mw
```

2. Create a self-signed certificate for psuedo-TLS and store them in a sub-directory named **certs**. Please use the command below and do not change the names of the cert and key files.

```bash theme={null}
mkdir -p certs && openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout certs/selfsigned.key -out certs/selfsigned.crt
```

3. Download the Multiwoven docker-compose assets

```bash theme={null}
# docker-compose.yaml
curl -O https://aiseepublicstorage.blob.core.windows.net/multiwoven-docker-compose/docker-compose.yaml

# nginx configuration file
curl -O https://aiseepublicstorage.blob.core.windows.net/multiwoven-docker-compose/nginx.conf

# platform environment variable file
curl -O https://aiseepublicstorage.blob.core.windows.net/multiwoven-docker-compose/platform.env

# temporal environment variable file
curl -O https://aiseepublicstorage.blob.core.windows.net/multiwoven-docker-compose/temporal.env
```

4. Follow steps 5-8 to edit the platform.env and temporal.env environment variable files
5. For the following variables, replace `0.0.0.0` with either **localhost** or the **ip address** of your virtual machine

* ALLOWED\_HOST="0.0.0.0"
* API\_HOST="[https://0.0.0.0](https://0.0.0.0)"
* UI\_HOST="[https://0.0.0.0](https://0.0.0.0)"
* VITE\_API\_HOST="[https://0.0.0.0](https://0.0.0.0)"

6. For the SECRET\_KEY\_BASE, use a random string of 32 characters.

* SECRET\_KEY\_BASE="01010101010101010101010101010101"

7. The following variables will allow the application to send you a single verification email during the account creation process. If you are using Gmail as recommended, you only need to change the following variables. For SMTP\_SENDER and SMTP\_USERNAME, you should use your gmail username/email address. For SMTP\_PASSWORD, you should use an [app password](https://support.google.com/accounts/answer/185833?hl=en) associated with this gmail account. Note, your gmail account's default password will not work. You *must* create an app password.

* SMTP\_PASSWORD="000 111 222 333"
* SMTP\_SENDER\_EMAIL=[mw\_test@gmail.com](mailto:mw_test@gmail.com)
* SMTP\_USERNAME=[mw\_test@gmail.com](mailto:mw_test@gmail.com)

8. If you are not using Gmail, you will also need to update the following variables with the appropriate values for the email service that you are using.

* SMTP\_ADDRESS=smtp.gmail.com
* SMTP\_HOST=gmail.com
* SMTP\_PORT=587

9. (Optional) The following changes are only required if you are using an external/cloud postgresql database.

* DB\_HOST=db
* DB\_PASSWORD=password
* DB\_PORT="5432"
* DB\_USERNAME=multiwoven

10. (Optional) If you are using an external database, please comment out the following lines in the docker-compose.yaml file.

* 59-65
* 81
* 103

11. Once your envrionment variables have been updated, please run the following command to deploy the application:

```bash theme={null}
docker-compose up -d
```

12. You should now be able to access your deployment using either `https://localhost` or `https://VM_IP_ADDRESS`. The nginx proxy will terminate TLS and route your requests back to the
    necessary services. You can also access the **Temporal UI** directly via `localhost:8080` or `VM_IP_ADDRESS:8080`.
