Created
February 23, 2026 04:51
-
-
Save surajssd/7931a2d03ed8f3e51fb1a05a27236821 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Let's create a vm on azure, deploy openclaw! | |
| export AZURE_RESOURCE_GROUP="" | |
| export AZURE_REGION="westus" | |
| export VM_NAME="" # Unique name for the VM so that it can be used as a DNS name for the public IP address. | |
| export VM_SIZE="Standard_D8as_v5" # or equivalent | |
| export VM_IMAGE="Canonical:ubuntu-24_04-lts:server:latest" | |
| export SSH_KEY="~/.ssh/id_rsa.pub" # Make sure to have an ssh key pair generated and the public key is added to the azure vm. The private key will be used to ssh into the vm. | |
| export SSH_PRIV_KEY="${SSH_KEY%.pub}" | |
| export USER_NAME="openclaw" | |
| az group create \ | |
| --name "${AZURE_RESOURCE_GROUP}" \ | |
| --location "${AZURE_REGION}" | |
| az vm create \ | |
| --resource-group "${AZURE_RESOURCE_GROUP}" \ | |
| --name "${VM_NAME}" \ | |
| --size "${VM_SIZE}" \ | |
| --location "${AZURE_REGION}" \ | |
| --image "${VM_IMAGE}" \ | |
| --admin-username "${USER_NAME}" \ | |
| --ssh-key-values "${SSH_KEY}" \ | |
| --authentication-type ssh \ | |
| --public-ip-address-dns-name "${VM_NAME}" \ | |
| --accelerated-networking true \ | |
| --output table | |
| fqdn=$(az vm show -d \ | |
| --resource-group "${AZURE_RESOURCE_GROUP}" \ | |
| --name "${VM_NAME}" \ | |
| --query fqdns -o tsv) | |
| ssh -i "${SSH_PRIV_KEY}" "${USER_NAME}@${fqdn}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment