# SOMA - (Self Onboarding Mining Application) Installation on Windows Server 2019 (Azure)

## **Installation of SOMA on the cloud environment on Windows Server 2019 (MS Azure)**&#x20;

In this document, we have demonstrated how to create a Windows virtual machine and  and install SOMA on Windows Server 2019 on MS Azure.\
\
Here, for the demonstration purposes we have used the bare minimum configurations which are required to run install and run SOMA.&#x20;

## Signing Up for Microsoft Azure <a href="#somaselfonboardingminingapplicationonwindowsserver2019-azure-signingupformicrosoftazure" id="somaselfonboardingminingapplicationonwindowsserver2019-azure-signingupformicrosoftazure"></a>

1. Create an account in the [Microsoft Azure](https://portal.azure.com/).<br>
2. Next, login to your account [MS Azure portal](https://portal.azure.com/).\
   \
   Find more information on creation of [Windows virtual machine](https://docs.microsoft.com/en-us/azure/virtual-machines/windows/quick-create-portal).

## Creating Windows Virtual Machine on Microsoft Azure <a href="#somaselfonboardingminingapplicationonwindowsserver2019-azure-creatingvirtualmachineinmicrosoftazure" id="somaselfonboardingminingapplicationonwindowsserver2019-azure-creatingvirtualmachineinmicrosoftazure"></a>

1. Select Virtual Machine.

![](https://2539428891-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MJSDRvtSnh5IVozvNlk%2F-MJXvOVnSMr-oMNQ6JGc%2F-MJY-Sx18BY7aPTi-hNG%2FHnet-image1.gif?alt=media\&token=eb3d2d90-716c-4779-848e-3b5435c313e4)

2\. Create a Resource group.

![](https://2539428891-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MJSDRvtSnh5IVozvNlk%2F-MJXvOVnSMr-oMNQ6JGc%2F-MJY0b1XWrurFhPKqa5B%2FHnet-image2.gif?alt=media\&token=4b486fa6-db38-41aa-83e8-15560e810036)

3\. Add Instance Details.

![](https://2539428891-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MJSDRvtSnh5IVozvNlk%2F-MJY0lLUad2esvd1rAnt%2F-MJY0ntMmr_eJcqxrvU2%2FHnet-image3.gif?alt=media\&token=1574b94e-eb2b-46fc-bf55-d9354e9357d1)

4\. Give Username and  Password.

![](https://2539428891-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MJSDRvtSnh5IVozvNlk%2F-MJY0tBKS7msvZKjfqKa%2F-MJY1A2GtBDi8KmEIqfG%2FHnet-image4.gif?alt=media\&token=5c5edf93-669f-44c4-a67e-140bef096e23)

5\. Add Inbound ports, and click on Review+Create.

![](https://2539428891-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MJSDRvtSnh5IVozvNlk%2F-MJY1D4PIrEIu3mGRd15%2F-MJY1Sjt47G9uMzQ_us0%2FHnet-image5.gif?alt=media\&token=0e5f79cb-3994-4848-bd63-3a9cc0c1281c)

6\. Connect to the VM.

## Installing Docker

1. On the Windows desktop, click the **Start** button and type in any part of the name '**Windows PowerShell'** or any terminal of your choice.
2. Right-click Windows PowerShell and select **Run as Administrator**.
3. To install **Hyper**-**V** on a server to which you are connected remotely, run the following command.

```bash
Install-WindowsFeature -Name Hyper-V 
-IncludeManagementTools –Restart
```

4\. Now, install the Docker.&#x20;

```bash
Install-Module DockerProvider Install-Package 
Docker -ProviderName DockerProvider -RequiredVersion preview
```

5\.  Enable Linux Kit system for running Linux containers.

```bash
[Environment]::SetEnvironmentVariable("LCOW_SUPPORTED", "1", "Machine")
```

**6.**  Now Restart your Computer.

```bash
Restart-Computer
```

**7.**  Pull the Shakti (SOMA) Docker image.&#x20;

```bash
docker pull sxeshakticoin/testnet:latest
```

**8.**  Get the SOMA Docker Image ID.

```bash
docker images
```

9\. Run the SOMA container with portnumber = >1024, NODE\_NAME=That is generated from Shakti portal, docker-image-id= image\_id you get from previous command.

```bash
docker run -d -p <port-number>:<port-number> --env NODE_NAME=<node-name> --mount type=bind,source=$(pwd),target=/shakti <docker-image-id>
```

{% hint style="info" %}
**Ex:**  sudo docker run -p 8765:8765 -d --env NODE\_NAME=dockernode01 --mount type=bind,source=$(pwd),target=/shakti 8030aaaef48b
{% endhint %}

10\.  View the **Private** and **Public** **Keys** to connect to the Shakti Network.

```bash
cat shakticoin-poe-server.keys
```
