> ## Documentation Index
> Fetch the complete documentation index at: https://openops-f559c8bf.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Azure VM Deployment

> How to deploy OpenOps on Azure Virtual Machines

This guide explains how to install the OpenOps Docker Compose release on a newly created Azure VM.

You’ll need relevant permissions to create a new VM, edit its networking settings, and set up required permissions for Cloud Shell.

## Initial deployment

### Create a new virtual machine

1. Navigate to [Create a virtual machine](https://portal.azure.com/#create/Microsoft.VirtualMachine-ARM) in Azure.

   ![Virtual machines](https://mintcdn.com/openops-f559c8bf/jHP4JOF17NoTQvTt/images/deploy-azure-vms.png?fit=max\&auto=format\&n=jHP4JOF17NoTQvTt\&q=85\&s=933340a8508e7f026f03f917bf244f58)
2. Name your machine and select the latest Ubuntu Server as the image. Choose a size with at least **2 CPUs and 8GB of RAM**. Other settings can be left as default.

   ![Instance details](https://mintcdn.com/openops-f559c8bf/jHP4JOF17NoTQvTt/images/deploy-azure-instance-details.png?fit=max\&auto=format\&n=jHP4JOF17NoTQvTt\&q=85\&s=a328863166c7347b1d63f2cc43aac218)
3. Click **Review + create** at the bottom, then **Create** to create the machine. You will be asked to download the private key.
   You may see a warning about leaving port 22 (SSH) open. For production use, it’s recommended to open this port only to relevant IPs, depending on your network configuration. In this guide, we’re using CloudShell to connect to the machine, so the port needs to remain open.
4. Once the machine is created, click **Go to resource**, then navigate to **Networking > Network settings** and **Create port rule > Inbound port rule** to set the required destination port to **80**. You can open the port to everyone, to your personal IP address only, or to a preferred range. Click **Add** to create the rule.

   ![Creating a port rule](https://mintcdn.com/openops-f559c8bf/jHP4JOF17NoTQvTt/images/deploy-azure-create-port-rule.png?fit=max\&auto=format\&n=jHP4JOF17NoTQvTt\&q=85\&s=748c7aff7e7cc799ef0f56c5f693cb4d)

   ![Adding an inbound security rule](https://mintcdn.com/openops-f559c8bf/jHP4JOF17NoTQvTt/images/deploy-azure-add-inbound-security-rule.png?fit=max\&auto=format\&n=jHP4JOF17NoTQvTt\&q=85\&s=75705d188012d5af8ae3c691d411f395)

### Connect to the virtual machine with Cloud Shell

1. Under **Overview**, select **Connect** and **SSH using Azure CLI** to open the Cloud Shell inside Azure Portal.

   ![CloudShell overview](https://mintcdn.com/openops-f559c8bf/jHP4JOF17NoTQvTt/images/deploy-azure-cloudshell-overview.png?fit=max\&auto=format\&n=jHP4JOF17NoTQvTt\&q=85\&s=4be7c6cfe4b45f4589445d2c9cab1f1f)

   ![SSH using Azure CLI](https://mintcdn.com/openops-f559c8bf/jHP4JOF17NoTQvTt/images/deploy-azure-ssh.png?fit=max\&auto=format\&n=jHP4JOF17NoTQvTt\&q=85\&s=1ec23074707404165f7828b82ab62751)

   ![SSH using Azure CLI - configure and connect](https://mintcdn.com/openops-f559c8bf/jHP4JOF17NoTQvTt/images/deploy-azure-ssh-configure-connect.png?fit=max\&auto=format\&n=jHP4JOF17NoTQvTt\&q=85\&s=a4be37cd3112bf7433cbe6298e4a1563)

   After a quick validation and setup, CloudShell should open and connect to the machine.
2. Ensure you're using the Bash shell by running the following command (you may need to paste it using a right-click instead of *Ctrl+V*):
   ```shell theme={null}
   [ -z "$BASH_VERSION" ] && exec bash
   ```

### Download OpenOps release files

1. Create a new directory and download the OpenOps release files:
   ```shell theme={null}
   mkdir -p openops && cd openops && \
   wget https://openops.s3.amazonaws.com/releases/0.2.0/openops-docker-compose-0.2.0.zip && \
   python3 -m zipfile -e openops-docker-compose-0.2.0.zip . && cp -n .env.defaults .env
   ```
2. Edit the application URL to use the machine’s public IP address:
   ```shell theme={null}
   sed -i 's/http:\/\/localhost/http:\/\/'$(wget -qO - https://ipv4.myip.wtf/text)'/g' .env
   ```

Feel free to edit the `.env` file with *vim* or another text editor according to your needs.

### Install Docker and start the containers

1. Install Docker using Snap:
   ```shell theme={null}
   sudo snap install docker
   ```
2. Pull the images and run the Docker containers (rerun the pull command if you encounter a rate limit):
   ```shell theme={null}
   sudo COMPOSE_PARALLEL_LIMIT=4 docker compose pull && sudo docker compose up -d
   ```

You can now access the application by navigating to the public IP address of your virtual machine, for example, `http://20.20.20.20`. The login credentials are configured in the `.env` file. If you haven't changed them, the default username is `admin@openops.com`, and the password is `please-change-this-password-1`.

## Getting credentials for Azure connections

See [this guide](https://docs.google.com/document/d/1WhwMk3he4d4vEv_7hIw7u_4ZIz_8ZewUS1yUKxpdYR0/edit?tab=t.0#heading=h.4lq77bkice4n).

## Using Azure CLI in workflows: running with local credentials

It is possible to share your local Azure session with the OpenOps platform for local applications.

To do this, set the following environment variables in the `.env` file in the installation folder:

* `OPS_ENABLE_HOST_SESSION=true`. This enables sharing of the host session with the platform container.
* `HOST_AZURE_CONFIG_DIR=/root/.azure`. This defines the path to the host machine's Azure configuration folder that will be shared with the platform container.

Before running OpenOps, log in to Azure from your VM:

```shell theme={null}
sudo az login
```

## TLS

For production usage, it’s recommended to enable TLS (HTTPS). You can achieve this by adding an Azure Application Gateway to serve traffic to your VM.

Without TLS, cloud templates may not load properly when using the Safari browser.

## Updating OpenOps to a newer version

1. First, stop the running containers:
   ```shell theme={null}
   sudo docker compose down
   ```
2. To update your OpenOps Docker Compose installation, unzip the new release into the same location where you initially installed it:
   ```shell theme={null}
   cd openops && wget https://openops.s3.amazonaws.com/releases/0.2.0/openops-docker-compose-0.2.0.zip && \
   python3 -m zipfile -e openops-docker-compose-0.2.0.zip .
   ```
   (This code sample refers to a specific version. Don't forget to update it to the version you're installing.)
3. Restart the application and fetch the new images:
   ```shell theme={null}
   sudo COMPOSE_PARALLEL_LIMIT=4 docker compose pull -q && sudo docker compose up -d
   ```

## Support

Feel free to contact [support@openops.com](mailto:support@openops.com) if you have any questions or need help with the installation.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.