What you will do
- Create Azure networking (VNet, subnets, NSG) and compute resources with the Azure CLI
- Apply NSG rules so VM SSH is allowed only from Azure Bastion
- Use Azure Bastion for SSH access (no public IP on the VM)
- Install OpenClaw with the installer script
- Verify the gateway
What you need
- An Azure subscription with permission to create compute and network resources
- Azure CLI installed (see Azure CLI install steps)
- An SSH key pair (this guide covers generating one if needed)
- About 20-30 minutes
Configure deployment
Register required resource providers (one time)
Registered.Set deployment variables
/26.Select VM size and OS disk size
- Start smaller for light usage and scale up later.
- Use more vCPU/RAM/disk for heavier automation, more channels, or larger model/tool workloads.
- If a size is unavailable in your region or subscription quota, pick the closest available SKU.
Deploy Azure resources
Create the network security group
Create the NSG and add rules so only the Bastion subnet can SSH into the VM.Rules evaluate by priority, lowest number first: Bastion traffic is allowed at 100, then all other SSH is blocked at 110 and 120.
Create the virtual network and subnets
Create the VNet with the VM subnet (NSG attached), then add the Bastion subnet.
Create the VM
The VM gets no public IP. SSH access goes exclusively through Azure Bastion.
--public-ip-address "" prevents a public IP from being assigned. --nsg "" skips a per-NIC NSG since the subnet-level NSG already handles security.To pin a specific Ubuntu image version instead of latest, list available versions first:Install OpenClaw
Install OpenClaw (in the VM shell)
Verify the gateway
After onboarding completes:If your organization already has GitHub Copilot licenses, you can choose the GitHub Copilot provider during onboarding instead of a separate model API key. See GitHub Copilot provider.
Cost considerations
Approximate monthly costs (verify current pricing in the Azure Pricing Calculator, since rates vary by region and change over time):- Azure Bastion Standard SKU: roughly $140/month
- VM (
Standard_B2as_v2): roughly $55/month
-
Deallocate the VM when not in use. This stops compute billing (disk charges remain). The gateway is unreachable while deallocated.
- Delete Bastion when not needed and recreate it when you need SSH access again; it is the largest cost component and provisions in a few minutes.
-
Use the Basic Bastion SKU (roughly $38/month) if you only need Portal-based SSH and do not need CLI tunneling (
az network bastion ssh).
Cleanup
Delete all resources created by this guide:Next steps
- Set up messaging channels: Channels
- Pair local devices as nodes: Nodes
- Configure the gateway: Gateway configuration
- More detail on Azure deployment with the GitHub Copilot model provider: OpenClaw on Azure with GitHub Copilot