A homelab is an educational & hobby learning environment for all software & hardware. It can be set up with no budget or a very large budget. This can be configured using virtualization (like VirtualBox) or a hardware-centric setup.
Azure has a $200 credit free trial available for new users of cloud services. This is ideal for the homelab because it is a risk-free learning environment that reduces the burden of using bare-metal hardware.
You are going to want to set up a free trial for Microsoft Azure ($200 credit/month). You can use a throwaway Protonmail email for this; feel free to use all of your normal information when setting this up. Typically you will need to access the account using 2FA. You will login in order to view your dashboard.

homelab1ResourceGroup1homelabnet1homelablogs1blob-storage-logsRun the following query in your Log Analytics workspace:
StorageBlobLogs
| where TimeGenerated > ago(1h)
| project TimeGenerated, OperationName, StatusCode, Uri, CallerIpAddress
| order by TimeGenerated desc
homelab-containerhomelab-vmazureuserhomelab-vm_keyhomelabnet1)snet-eastus-1)homelab-vm-ip.pem file somewhere safe (e.g., Downloads folder). You will need this to SSH into the VM.
>_) in the top menu bar.pem file you downloaded — it uploads to your Cloud Shell home directory# Set correct permissions on the key
chmod 400 homelab-vm_key.pem
# Get your VM's public IP (or copy it from the portal)
VM_IP="xx.xxx.xx.xx"
# SSH into the VM
ssh -i homelab-vm_key.pem azureuser@$VM_IP
# Confirm adding SSH key
yes
# Test the VM
whoami
On Windows (PowerShell):
ssh -i C:\Users\YourName\Downloads\homelab-vm_key.pem azureuser@<PUBLIC_IP>
First time connecting, you'll see: "The authenticity of host... can't be established." Type yes and press Enter. You should then see:
Welcome to Ubuntu 24.04.3 LTS (GNU/Linux 6.2.0-1018-azure x86_64)
...
azureuser@homelab-vm:~$
Update the system:
sudo apt update && sudo apt upgrade -y
Install essential tools:
sudo apt install -y \
curl \
wget \
git \
htop \
net-tools \
ufw \
fail2ban \
unattended-upgrades
Set timezone (optional):
# List available timezones
timedatectl list-timezones | grep America
# Set your timezone (example: Eastern Time)
sudo timedatectl set-timezone America/New_York
# Verify
timedatectl
Enable automatic security updates:
sudo dpkg-reconfigure -plow unattended-upgrades
# Select "Yes" when prompted
Once connected to the VM, run the following:
# Update package list
sudo apt-get update
# Install Azure CLI
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
Verify installation and exit:
az --version
exit
Azure Subscription 1homelab1Back in your SSH session on the VM:
# Login using managed identity
az login --identity
# Set variables (replace with your actual values)
STORAGE_ACCOUNT="homelab1"
CONTAINER="homelab-container"
# List blobs in your container
az storage blob list \
--account-name $STORAGE_ACCOUNT \
--container-name $CONTAINER \
--auth-mode login \
--output table
Expected output:
Name Blob Type Length Content Type
-------- ----------- -------- --------------
test.txt BlockBlob 42 text/plain
az storage account show \
--name homelab1 \
--resource-group ResourceGroup1 \
--query networkRuleSet \
--output json
In the next writeup, I will explain how to configure Tailscale VPN for secure tunneling into your Azure VM.