...
Back

AgentAura on Microsoft Azure: Set Up a Linux VM

Create an Ubuntu 24.04 x64 VM on Azure that AgentAura can deploy to: account, key pair, SSH rule, azureuser login, and what a stopped VM costs.

AgentAura on Microsoft Azure: Set Up a Linux VM

AgentAura on Microsoft Azure: Set Up a Linux VM ☁️

By the end of this guide you will have an Ubuntu 24.04 virtual machine in your own Azure subscription, a private key that logs in to it, and the four values that AgentAura's My Server option asks for. On Azure, My Server is the only path: you create the VM in the Azure portal, and AgentAura logs in to it over SSH.

You do not need an Azure service principal, client secret or any other Azure API credential. AgentAura never calls Azure's API; it only logs in to the VM over SSH. Creating one "because a guide said so" just adds a credential with power over your subscription that you then have to protect.

What every provider has in common (server requirements, which keys AgentAura accepts) is in our overview, Getting a Server for AgentAura. The Azure portal changes from time to time, so a label may look slightly different from ours.


1. Create an Azure Account

Sign up at azure.microsoft.com. Microsoft asks for a phone number, a credit or debit card (not prepaid) and a Microsoft or GitHub account, and uses the phone and card to verify your identity. You may see a temporary hold of about one dollar on the card.

At the time of writing (September 2026), you can start with pay as you go or with a free account that includes $200 of credit to use within 30 days. New customers also get 12 months of free amounts, including 750 hours each of the B1s, B2pts v2 and B2ats v2 VM sizes. None of those suits AgentAura: B2pts v2 is Arm-based, and B1s and B2ats v2 have only 1 GiB of memory, which is too tight to recommend. The size we use below is paid; on a free account, the credit covers it for 30 days.

After 30 days, or once the credit is used up, a free account must move to pay as you go. Otherwise Microsoft disables the account and its services, and your agent goes offline with them.


2. Decide Where the SSH Key Comes From

  • Let Azure generate the key pair while creating the VM. This is the portal's default. You download the private key once as a .pem file, and AgentAura accepts that file as it is.
  • Or use your own key, made just for this server and without a passphrase:
# macOS or Linux
mkdir -p ~/.ssh
ssh-keygen -t ed25519 -f ~/.ssh/agentaura -N "" -C "agentaura"
# Windows 10 or 11, in PowerShell. When asked for a passphrase, press Enter twice.
New-Item -ItemType Directory -Force "$HOME\.ssh" | Out-Null
ssh-keygen -t ed25519 -f "$HOME\.ssh\agentaura" -C "agentaura"

Azure accepts RSA and ed25519 public keys, not ECDSA. The steps below let Azure generate the key; with your own, choose the option to use an existing public key and paste the contents of agentaura.pub.


3. Create the VM

  1. In the Azure portal (portal.azure.com), search for Virtual machines, then select Create and Virtual machine.
  2. On the Basics tab, check the subscription and Create new resource group, for example agentaura-rg. A group of its own makes cleanup a single delete later.
  3. Name the VM and pick a region near you. Under Availability options, No infrastructure redundancy required is fine.
  4. For Image, choose Ubuntu Server 24.04 LTS from Canonical, in its x64 version, not Arm64.
  5. For Size, open the full list and pick Standard_B2als_v2: 2 vCPUs and 4 GiB of memory on AMD EPYC, which is x86-64. In Azure size names a lowercase p marks an Arm-based processor, so skip those. The older B2s has the same 2 vCPU and 4 GiB, but Microsoft lists it as End of Life. Which sizes you see depends on the region.
  6. Under Administrator account, set Authentication type to SSH public key and keep the Username azureuser (or choose another and note it). Leave SSH public key source on Generate new key pair and name the key, for example agentaura-key.
  7. Under Inbound port rules, choose Allow selected ports and select SSH (22) only.
  8. Select Review + create, then Create. When the key window opens, select Download private key and create resource. Keep the downloaded agentaura-key.pem safe.
  9. When the deployment finishes, select Go to resource and copy the public IP address from the overview page.

4. Keep SSH Open, and Only SSH

Azure's network security group blocks inbound internet traffic unless a rule allows it. The SSH rule from step 7 is the one AgentAura needs, and its source must stay "Any", even if the portal warns that every IP address can reach the port. AgentAura connects from its own cloud, not from your computer, for the install and later for logs, restarts, reconnecting a credential, adding agents and updates. A rule narrowed to "My IP" breaks all of those. Key-only login is what keeps the open port safe, and Azure turns off password login on VMs created with SSH keys.

Leave two other things alone:

  • Other ports. The installer sets up an outbound Cloudflare Tunnel, and Azure allows outbound traffic by default. Nothing else needs to be open.
  • Just-in-time VM access in Microsoft Defender for Cloud. It keeps port 22 closed until someone requests access, and AgentAura cannot make that request.

Microsoft retired Basic public IPs in 2025, so a new VM gets a Standard public IP, which is static: the address survives stops and starts and is released only when you delete it. Public IPv4 addresses carry a small charge of their own.


5. Log In Once Yourself

On macOS or Linux:

chmod 400 ~/Downloads/agentaura-key.pem
ssh -i ~/Downloads/agentaura-key.pem azureuser@203.0.113.10

On Windows, in PowerShell:

ssh -i "$HOME\Downloads\agentaura-key.pem" azureuser@203.0.113.10

Use your VM's address instead of 203.0.113.10. Then confirm that sudo works without a password, which the installer needs:

sudo -n true && echo "passwordless sudo OK"

If the login is slow or apt reports a lock, the VM is still running first-boot updates. Give it a few minutes before deploying.


6. Fill In AgentAura

In AgentAura, add a server with My Server and enter:

Field in AgentAuraWhat to enter for Azure
Server IPThe VM's public IP address
Login userazureuser, or the username you chose. Not root.
Password or SSH keyChoose SSH key and paste the whole .pem file, including the -----BEGIN and -----END lines
SSH port22

To print the key for copying, run cat ~/Downloads/agentaura-key.pem on macOS or Linux, or Get-Content "$HOME\Downloads\agentaura-key.pem" in PowerShell. Start the deployment and watch the output: each step is reported, and a failure says which step and why. The quick start covers what comes next.


7. Costs and Cleanup

Azure bills a VM by its power state:

StateHow you get thereVM billed?
RunningNormal operationYes
StoppedShutting down from inside the VMYes
Stopped (deallocated)Stop in the portalNo, but the disk and public IP still are

So a VM shut down with sudo poweroff still costs the full price. Stop it from the portal and check that the status says deallocated. Leave Auto-shutdown off, too: the agent is offline whenever the VM is stopped.

When you are finished, open agentaura-rg, select Delete resource group, type its name and confirm. That removes the VM, its disk, its public IP and its network pieces together. Removing the agent in AgentAura does not delete anything in Azure.


Common Problems

  • "Permission denied (publickey)". The login user is wrong (not root on Azure), or the .pub file was pasted instead of the private key.
  • Connection timed out. The SSH rule's source was narrowed, just-in-time access is on, or the VM is stopped.
  • The install stops because sudo wants a password. The VM was created with password authentication. Create it again with SSH public key.
  • The size is not offered. Pick another x64 size with about 2 vCPU and 4 GiB and no p in its name, or another region.
  • Everything stopped after 30 days. The free account was not moved to pay as you go.

Microsoft's references: Create a Linux VM in the Azure portal · VM states and billing · Basv2 sizes · Azure account options