# Setup loadbalancer

Taskforce.sh requires a load balancer so that we can enable HTTPS which is mandatory for Auth0.

{% hint style="info" %}
Note that the screenshots in this page belongs to the old AWS dashboard.&#x20;

![](https://2160637802-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MG01zoyzHgr18e2IutZ%2Fuploads%2FaBaZ3j8OZ7HjAGSucrIk%2Fimage.png?alt=media\&token=cffffb9c-6a79-4572-92ed-399f13fa1459)
{% endhint %}

Go to EC2 load balancers and create a new application load balancer:

![](https://2160637802-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MG01zoyzHgr18e2IutZ%2F-MhRYcWCZCCNCWzrs3F1%2F-MhRZ_Q_fEJuO44oNvOa%2Fimage.png?alt=media\&token=b80b22ba-c428-489e-b183-bfbfd9cbf254)

#### Step 1. Configure the load balancer.

Make sure to choose the HTTPS listener:

![](https://2160637802-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MG01zoyzHgr18e2IutZ%2F-MhRYcWCZCCNCWzrs3F1%2F-MhRZuartUmu6do6ODzW%2Fimage.png?alt=media\&token=283d541a-9fdf-4c92-988b-2e4854405c75)

Choose your Availability zones:

![](https://2160637802-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MG01zoyzHgr18e2IutZ%2F-Mi4MORFXreTYBYRGKFp%2F-Mi4p6gtzcL4phob4b0E%2Fimage.png?alt=media\&token=5f2f051c-2c46-4e97-afea-f946a9d293eb)

#### Step 2. Configure security settings.

In this step you will choose an appropriate TLS certificate that you must have created previously (<https://docs.aws.amazon.com/acm/latest/userguide/gs-acm-request-public.html>)

#### Step 3. Configure security groups.

In this step you must choose the security group that you created and assigned to your EC2 instance where Taskforce.sh is running.

You may also need to add a security group to make your load balancer accessible. For example for a public-faced Taskforce.sh dashboard you would define a security groups with the following inbound rules:

<figure><img src="https://2160637802-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MG01zoyzHgr18e2IutZ%2Fuploads%2FbUXQ9UAqyIClouVYcmj7%2Fimage.png?alt=media&#x26;token=ceeb6886-95ba-493e-a04f-9b0e902bec6c" alt=""><figcaption></figcaption></figure>

#### Step 4. Configure Routing.

Just leave the settings on this step with its defaults, but port **4200** and just name the target group to something like *taskforcesh-target*.

![](https://2160637802-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MG01zoyzHgr18e2IutZ%2F-Mi4r9PloazPeyQOnSi-%2F-Mi4re-3r7C-eDmh9jab%2Fimage.png?alt=media\&token=59fe3ecf-0b9c-4414-ac34-7e5cbe3d144f)

#### Step 5. Register targets.

Choose the EC2 instance running Taskforce.sh, target port **4200** and click on "Add to registered".

![](https://2160637802-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MG01zoyzHgr18e2IutZ%2F-Mi4s830eRn6wDs3uE_t%2F-Mi4sIl55HarbtFu_KZc%2Fimage.png?alt=media\&token=81ba091f-3e5a-43a1-ad62-4588cbf64fa1)
