# Cloud Deployment

Leverage the power of the cloud with AWS, Azure, and Google Cloud Run ensuring high availability, data security, and automatic scalability in conjunction with the Form.io platform.

<table data-view="cards"><thead><tr><th></th><th></th><th></th><th data-hidden data-card-cover data-type="files"></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><p></p><p><strong>AWS</strong></p></td><td>Learn more about deploying and managing the Form.io Platform using AWS </td><td></td><td><a href="https://4287632785-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKgNM52jrdfkHgHDfKCH9%2Fuploads%2F4Xd3xcc0XSxHJSDG2gKO%2Faws2.jpeg?alt=media&#x26;token=5670917a-62bb-4555-b2d7-c218a1455949">aws2.jpeg</a></td><td><a href="cloud-deployment/aws-deployment">aws-deployment</a></td></tr><tr><td></td><td><strong>Azure</strong></td><td>Learn more about deploying and managing the Form.io Platform using Microsoft Azure</td><td><a href="https://4287632785-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKgNM52jrdfkHgHDfKCH9%2Fuploads%2FVdkjS464yfgbCBe8uPY9%2Fazure2.jpeg?alt=media&#x26;token=47873d1b-3052-4f7a-ac10-cc57fd023906">azure2.jpeg</a></td><td><a href="cloud-deployment/azure-deployment">azure-deployment</a></td></tr><tr><td></td><td><p><strong>Google Cloud Run</strong></p><p>Learn more about deploying Form.io within GCP<br></p></td><td></td><td><a href="https://4287632785-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKgNM52jrdfkHgHDfKCH9%2Fuploads%2F0Dt4cYw1cyWSa7HgT4aO%2FBlank.jpg?alt=media&#x26;token=88187e26-038b-4a3f-b615-665b9a00bf1f">Blank.jpg</a></td><td><a href="cloud-deployment/gcp-deployment">gcp-deployment</a></td></tr></tbody></table>

## Getting Started

Review the [**Prepare Your Environment**](https://help.form.io/deploy/deployment-overview#preparing-the-environment) section of the Self-Hosted Deployment guide before continuing with the Cloud Deployment walkthrough. It is important to be familiar with some of the general concepts there for an effective coud deployment.

### Preparing The Deployment Files

Before deploying an application, first define or construct the files necessary to run the Form.io containers. There are many tools and services available to accomplish this, and the decision to choose a particular tool may be determined by the existing toolchain or infrastructure.&#x20;

#### Docker Compose

[**Docker-Compose**](https://docs.docker.com/compose/) is a tool that allows users to define and manage Form.io's multi-container application and is used in conjunction with the Docker infrastructure. It can simplify the the deployment and definition of container dependencies and configurations. Docker-Compose can define Form.io's  services, networks, and variables within a YAML file called `docker-compose.yml.`&#x20;

To use docker-compose, refer to the process described in the Readme of the [Form.io Github Repo Deploy Repo](https://github.com/formio/deploy/).\
The process will accomplish the following steps to begin the deployment:

1. Install the `formio-deploy` tool.
2. Configure the appropriate environment variables.
3. Create the appropriate deployment package.

#### Terraform

[**Terraform**](https://www.terraform.io/) is an open-source infrastructure as code (IaC) tool that allows developers to describe their entire infrastructure as code and build resources across different providers. Terraform supports a wide range of cloud providers, including Amazon Web Services (AWS), Microsoft Azure, Google Cloud Platform (GCP), and many others. It can provision and manage infrastructure resources across multiple cloud platforms or on-premises data centers. Terraform will build all these resources across all these providers in parallel.

#### Helm

[**Helm**](https://helm.sh/) is a package manager for [**Kubernetes**](https://help.form.io/deploy/kubernetes), designed to simplify the deployment and management of applications on a Kubernetes cluster. It provides a framework for packaging, distributing, and managing Kubernetes resources, making it easier to define, install, and upgrade complex applications. With Helm, users can create and share packages called "charts" that contain all the necessary Kubernetes manifests, configurations, and dependencies for deploying an application. A chart is a collection of files that describe the resources required to run a specific application or service, such as pods, deployments, services, and configmaps.

As Terraform and Helm Charts are specific to each customer's deployment, Form.io does not explicitly provide these files.&#x20;

{% hint style="info" %}
Please contact **<support@form.io>** for any questions or support regarding Terraform or Helm Charts.&#x20;
{% endhint %}

### Database Options

The Form.io platform requires MongoDB or MongoDB-compatible DB (such as DocumentDB or CosmosDB). Most cloud providers support multiple appropriate options.  Compare the different systems before deploying. &#x20;

{% hint style="info" %}
**Note:** When using [**docker-compose**](#preparing-the-container-files), MongoDB is automatically installed during the deployment process.
{% endhint %}

*AWS Cloud Options*

* [**MongoDB Atlas On AWS**](https://www.mongodb.com/mongodb-on-aws?utm_source=google\&utm_campaign=search_gs_pl_evergreen_atlas_general_prosp-brand_gic-null_amers-us_ps-all_desktop_eng_lead\&utm_term=atlas%20mongodb%20aws\&utm_medium=cpc_paid_search\&utm_ad=e\&utm_ad_campaign_id=1718986498\&adgroup=66929789946\&cq_cmp=1718986498\&gad=1\&gclid=Cj0KCQjw4s-kBhDqARIsAN-ipH3YHiWl18e_AYMyMnp9ajelny3EZmDBrsBfkZQMKmti19YTO-ObEosaAmkuEALw_wcB)
* [**Amazon DocumentDB** ](https://www.mongodb.com/compare/documentdb-vs-mongodb)

*Azure Cloud Options*

* [**MongoDB Atlas On Azure** ](https://www.mongodb.com/mongodb-on-azure)
* [**Microsoft Cosmos DB**](https://www.mongodb.com/mongodb-vs-cosmos-db)

### Network Considerations

#### VPC

When deploying with a VPC, it is important to ensure any instances in a private subnet can connect to services outside the VPC. This is typically achieved using a NAT gateway. The process for configuring a NAT gateway will vary according to the cloud provider chosen. Refer to the provider's documentation for help:

* AWS - [NAT Gateways](https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html)
* Azure -[ What is Azure NAT Gateway?](https://learn.microsoft.com/en-us/azure/nat-gateway/nat-overview)
* Google Cloud - [Public NAT](https://cloud.google.com/nat/docs/public-nat)

### Additional Information

Be sure to review the [**Enterprise Server** ](https://help.form.io/deploy/enterprise-server)and [**PDF Server** ](https://help.form.io/deploy/pdf-server)documentation for more information on things like Environment Variables and DB connection Strings.
