# Local Deployment

Many developers prefer to deploy new software within their local environment to explore the new technology and kick the software tires around. Any License can be used for a Local deployment, while the Developer License is restricted to Local Deployments only. The License Keys enable developers to spin up and down instances of the Form.io platform locally on the developer's machine allowing for local development and testing without affecting the remotely deployed platform configuration.&#x20;

{% hint style="info" %}
Contact **<sales@form.io>** to acquire a License
{% endhint %}

{% embed url="<https://www.loom.com/share/7aa561fe43434ea6bc70b447c15a0d0b>" %}

## Docker Compose Local Deployment&#x20;

Form.io uses [Docker Compose](#user-content-fn-1)[^1] to define and run the containers necessary to locally install the Form.io Enterprise platform. Review the [**Prepare Your Environment**](https://help.form.io/deployments/deployment-guide/..#preparing-your-environment) section of the Self-Hosted Deployment guide to learn more about Docker Desktop before continuing with the Local Deployment walkthrough.

### **Download The Docker Compose File**

Now that we have Docker Desktop running, navigate to the Form.io [**Deploy**](https://github.com/formio/deploy) repo. Click the [**deployments/compose**](https://github.com/formio/deploy/tree/main/deployments/compose) folder and download the local.zip file which holds the necessary files to install and run the Form.io containers. Locate the zip file on your Local Machine and unzip it into a  folder.&#x20;

<figure><img src="https://3305536326-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MPHoF2HwOA0s5HV_AIB%2Fuploads%2Fhjf7OiUcrCXbodiJZfQb%2Fdeploymentrepo.jpg?alt=media&#x26;token=9cb8e430-9776-49b8-bc87-0c2b3e159f55" alt=""><figcaption></figcaption></figure>

### **Setting The License Key**

Open the zipped folder within your preferred IDE, click the `.env` file, and locate the following line.

```
LICENSE_KEY=YOURLICENSE
```

Change YOURLICENSE to the Enterprise License key distributed to you by Form.io.

{% hint style="info" %}
Contact **<support@form.io>** to inquire about a license.
{% endhint %}

### **Installing Form.io Using Docker Compose**&#x20;

After saving the .env file, change your terminal directory to your deployment folder and run the following command.

```
docker-compose up --detach
```

This will start the Form.io platform containers and Mongo Database within your local machine.&#x20;

<figure><img src="https://3305536326-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MPHoF2HwOA0s5HV_AIB%2Fuploads%2Fn5AtYVi7QjDoLbWhPzde%2Fdeploymentrun.jpg?alt=media&#x26;token=9ac07c15-83da-42c5-8449-bcdb78854178" alt=""><figcaption></figcaption></figure>

### **Authenticating Into The Portal**

After the installation process has been completed, navigate to the Developer Portal login page:

```
http://lvh.me
```

or

```
http://localhost:3000
```

{% hint style="warning" %}
Currently, local hosting does not support overriding the default connection to the Enterprise Server on port 3000, even if a different port is configured in *docker-compose.yml.*

This should not affect hosted deployments.
{% endhint %}

To authenticate into the platform, use the following credentials:

* <admin@example.com>
* CHANGEME

{% hint style="info" %}
Edit the .env file to modify the authentication credentials for the local deployment.&#x20;
{% endhint %}

<figure><img src="https://3305536326-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MPHoF2HwOA0s5HV_AIB%2Fuploads%2Fzsq59vhtShkmSqJGAZAJ%2Fdeploymenturl.jpg?alt=media&#x26;token=70793d32-58fd-4615-b85f-349693732fbf" alt=""><figcaption></figcaption></figure>

### Data Access Folder

All MongoDB data as well as PDF files are stored within the local `data` directory which is part of the deployment folder.

### Additional Software and Technology&#x20;

The next section will detail additional software you can install to facilitate things like File Storage and Container Management within your local environment.&#x20;

[^1]: Docker Compose is a tool that was developed to help define and share multi-container applications. With Compose, users can create a YAML file to define the services and with a single command, can spin everything up or tear it all down.
