# Azure virtual machine

To deploy UI Bakery to an Azure virtual machine, follow these steps:

1. Open [Azure Portal](http://portal.azure.com/) and in the search field at the top type in `Virtual machines` and select this item in the result search window.
2. Click on the `+ Create` button in the top left corner and select `Azure Virtual machine` in the menu.
3. Select an image of `Ubuntu 18.04` or higher.
4. For the instance size, select the minimum `Standard_F2s_v2 - 2 vCPUs, 4 GiB memory.`
5. In the `Administrator account` section in the `Authentication type` menu item, select `SSH public key,` and it will generate the keys after VM creation.
6. In `Inbound port rules` leave `SSH(22)` as by default.
7. In the `Networking` tab, select existing or create a new Virtual Network and Subnet used by this VM.
8. In `NIC network security group` select `Advanced.`
9. In `Configure network security group` click `Create new.`
10. Click `+ Add an inbound rule.`
11. Add {BakeryPort} (use 3030 by default, you will need to select the same port during UI Bakery installation later) in the `Destination port ranges.`
12. In `Protocol` Choose `TCP.`
13. Click `Add.`
14. Check that `SSH (TCP/22)` is configured by default. If not, add it manually using the same algorithm as for {BakeryPort}.
15. Click `Ok` to finish creating a Network security group.
16. Click `Review + create.`
17. Click `Create.`
18. After creating and running the virtual machine, connect to it from outside using SSH protocol.
19. Run this command preferably from the `/home` Linux directory to download, install and launch UI Bakery:

    ```bash
    curl -k -L -o install.sh https://raw.githubusercontent.com/uibakery/self-hosted/main/install.sh && bash ./install.sh
    ```
20. Upon request, enter the previously received license code, hosting URL - Azure Virtual Machine IP address, and port ({BakeryPort} which you selected in the earlier steps 3030 by default).
21. After the installation is completed and launched, enter the bakery from a browser on your local machine at http\://{Public IP address Azure VM}:{BakeryPort}.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.uibakery.io/on-premise/install-and-update/installing-on-premise-version/azure-virtual-machine.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
