# Create Virtual Machine

<span style="white-space: pre-wrap;">Sure! Let’s make your Virtual Machine and name it </span>****finmars-platform-vm****. Follow these steps:

1. ****Sign in to Azure****
    - <span style="white-space: pre-wrap;">Open your browser and go to </span>[https://portal.azure.com/](https://portal.azure.com/).
    - Enter your Azure email and password or Log in with your Microsoft Account.
2. ****Open Virtual Machines****
    - <span style="white-space: pre-wrap;">At the top, click the search box and type </span>****Virtual machines****.
    - <span style="white-space: pre-wrap;">Click </span>****Virtual machines****<span style="white-space: pre-wrap;"> under “Services.”</span>
3. ****Launch a new instance****
    - <span style="white-space: pre-wrap;">Click the </span>****Create****<span style="white-space: pre-wrap;"> button and pick </span>****Virtual Machine****.
4. ****Pick your Resource Group (or create New One)****
5. ****Pick Region (or leave default)****
6. ****Name your instance****
    - <span style="white-space: pre-wrap;">In the </span>****Virtual machine name****<span style="white-space: pre-wrap;"> box, type </span>****finmars-platform-vm****.
7. ****Choose Image (Ubuntu 24.04)****
    - <span style="white-space: pre-wrap;">Scroll or search for </span>****Ubuntu Server 24.04 LTS****.
    - Pick 64-bit (x86) (should be default)
    - <span style="white-space: pre-wrap;">Click </span>****Select****.
8. ****Select instance Size (2 vCPU, 8 GiB RAM)****
    - <span style="white-space: pre-wrap;">Find and click </span>****B2ms****<span style="white-space: pre-wrap;"> (it has 2 vCPU and 8 GiB).</span>
9. ****Create or select key pair****
    - <span style="white-space: pre-wrap;">Choose </span>****Username - azureuser****.
    - <span style="color: rgb(41, 40, 39); background-color: rgb(255, 255, 255);">SSH public key source</span><span style="white-space: pre-wrap;"> - Generate new key pair</span>
    - <span style="white-space: pre-wrap;">Key pair name - </span>****finmars-platform-vm-key****<span style="white-space: pre-wrap;"> - </span><span style="color: rgb(224, 62, 45);">Do not Lose this file, if you lose it, you will not able to connect to your VM again</span>
10. ****Select Inbound Ports****
    - <span style="white-space: pre-wrap;">Turn on checkbox </span>****SSH****
    - <span style="white-space: pre-wrap;">Turn on checkbox </span>****HTTPS****
    - Turn on checkbox ****HTTP****
    - <span style="white-space: pre-wrap;">Click </span>****Next: Disks****
11. ****Add storage (256 GiB)****
    - <span style="white-space: pre-wrap;">Change the size from </span>****8****<span style="white-space: pre-wrap;"> to </span>****256****<span style="white-space: pre-wrap;"> in the root volume row. (</span><span style="color: rgb(41, 40, 39); background-color: rgb(255, 255, 255);">OS disk size</span>)
    - <span style="white-space: pre-wrap;">Keep the volume type as </span>****Premium SSD****
    - <span style="white-space: pre-wrap;">Click </span>****Next: Networking****
12. ****Networking****
    - <span style="white-space: pre-wrap;">Public IP: New Public IP </span>****finmars-platform-vm-ip****
13. ****Review and Create****
    - Check all your settings.
    - <span style="white-space: pre-wrap;">Click </span>****Review + Create****.
14. ****Wait for your VM****
    - <span style="white-space: pre-wrap;">Click </span>****View Instances****.
    - <span style="white-space: pre-wrap;">Wait until its status is </span>****running****<span style="white-space: pre-wrap;"> and checks pass.</span>
15. ****Connect to your VM****
    - <span style="white-space: pre-wrap;">Select the instance named </span>****finmars-platform-vm****.
    - <span style="white-space: pre-wrap;">Click </span>****Connect****.
    - Follow the instructions, for example:  
        ```
        # Move your Download key file to secure folder (~/Downloads not recommended)
        
        # if this first connect 
        chmod 400 "finmars-platform-vm.pem"
        ssh -i ./finmars-platform-vm.pem ubuntu@<Public-IP>
        
        
        # if this first connect
        # Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
        # yes
        ```
16. When your Virtual Machine is created, go to Virtual Machine Details Page in Azure Portal
    - <span style="white-space: pre-wrap;">On Sidebar, go to </span>****Networking****.
    - <span style="white-space: pre-wrap;">Open </span>****Network Settings****
    - <span style="white-space: pre-wrap;">You should see </span>****Network Security Group****
    - <span style="white-space: pre-wrap;">Press </span>****Create Port Rule****<span style="white-space: pre-wrap;"> button (Inbound Port Rule)</span>
    - Follow this configuration:
        - Source: Any
        - Source Port Ranges: \*
        - Destination: Any
        - Service: Custom
        - <span style="white-space: pre-wrap;">Destination Port Ranges: </span>****8888**** <span style="color: rgb(224, 62, 45);">This is important</span>
        - Protocol: TCP
        - Action: Allow
        - Priority: 420
        - <span style="color: rgb(41, 40, 39); background-color: rgb(255, 255, 255);">Name</span>: Allow8888Inbound
    - <span style="white-space: pre-wrap;">Then press </span>****Add****<span style="white-space: pre-wrap;"> button</span>

<span style="white-space: pre-wrap;">Your Virtual Machine named </span>****finmars-platform-vm****<span style="white-space: pre-wrap;"> is ready! 🎉</span>

---

  
Now you need to assign your Public IP of your freshly created VM to subdomain of your domain.

1. ****Go to your DNS Provider****
2. ****Create the first record****
    - <span style="white-space: pre-wrap;">Click </span>****“Create record.”****
    - <span style="white-space: pre-wrap;">In </span>****Record name****<span style="white-space: pre-wrap;">, type </span>`<span class="editor-theme-code">finmars</span>`<span style="white-space: pre-wrap;"> (so full name is </span>`<span class="editor-theme-code">finmars.example.com</span>`). - It is Record for Actual Finmars Platform
    - <span style="white-space: pre-wrap;">For </span>****Record type****<span style="white-space: pre-wrap;">, choose </span>****A – IPv4 address****.
    - <span style="white-space: pre-wrap;">In </span>****Value****<span style="white-space: pre-wrap;">, type your VM public IP (for example, </span>`<span class="editor-theme-code">203.0.113.25</span>`<span style="white-space: pre-wrap;">). You can find it in VM details </span>
    - <span style="white-space: pre-wrap;">Leave </span>****TTL****<span style="white-space: pre-wrap;"> as default (300).</span>
    - <span style="white-space: pre-wrap;">Click </span>****“Create records.”****
3. ****Create the second record****
    - <span style="white-space: pre-wrap;">Click </span>****“Create record”****<span style="white-space: pre-wrap;"> again.</span>
    - <span style="white-space: pre-wrap;">In </span>****Record name****<span style="white-space: pre-wrap;">, type </span>`<span class="editor-theme-code">finmars-auth</span>`<span style="white-space: pre-wrap;">(so full name is </span>`<span class="editor-theme-code">finmars-auth.example.com</span>`). - It is Record for Single-Sign-On (SSO) Finmars
    - <span style="white-space: pre-wrap;">For </span>****Record type****<span style="white-space: pre-wrap;">, choose </span>****A – IPv4 address****.
    - <span style="white-space: pre-wrap;">In </span>****Value****, type the same VM public IP.
    - <span style="white-space: pre-wrap;">Click </span>****“Create records.”****
4. ****Wait a few minutes****  
    DNS needs a little time to spread out. After about 5 minutes, both
    - `<span class="editor-theme-code">finmars.example.com</span>`
    - `<span class="editor-theme-code">finmars-auth.example.com</span>`  
        will go to your VM’s public IP.

<span style="white-space: pre-wrap;">That’s it! Now both sub-domains point to your </span>****finmars-platform-vm****<span style="white-space: pre-wrap;"> server.</span>

You can verify it by run following command in Terminal (On Mac or Linux)  
  
`<span class="editor-theme-code">dig finmars.example.com</span>`  
`<span class="editor-theme-code">dig finmars-auth.example.com</span>`

  
Output should be like:

```bash
; <<>> DiG 9.10.6 <<>> finmars.example.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 39082
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;finmars-platform-vm.finmars.com. IN	A

;; ANSWER SECTION:
finmars.example.com. 300 IN	A	203.0.113.25

;; Query time: 12 msec
;; SERVER: 192.168.178.1#53(192.168.178.1)
;; WHEN: Wed Jun 11 20:10:02 CEST 2025
;; MSG SIZE  rcvd: 76
```

---

  
  
<span style="white-space: pre-wrap;">Now go to next step: </span>[Install Finmars Platform](https://docs.finmars.com/books/installation-guide-with-azure-advanced/page/install-finmars-platform)