On Azure
MarkdownOpen in ClaudeOpen in ChatGPT
At the end, you have a box on Microsoft Azure, a virtual machine (VM) in Azure's words, with Docker on it, and a Terminal on it from your laptop.
Set this up with your agent
Copy this to a coding agent on your laptop. It runs the commands and checks each step with you; what you sign in to, press or paste stays yours.
This is for a coding agent that can run commands on my laptop (Claude Code, Codex, Cursor), not a chat website.
Walk me through Loopgate's guide "On Azure": https://loopgate.dev/runner/guides/azure.md. The guides it links to are beside it, each ending in .md.
Run its commands yourself, on my laptop or on my box over SSH as the guide says, one step at a time, and check each "You should see" line before the next step.
These are mine: tell me when it is my turn, wait for me, and never ask me to type them into this chat. Signing in to anything (the portal, a cloud console, Slack, GitHub), pressing Add a runner, every token and password, my AI subscription's device code, and making the Slack app.
If I paste you the portal's install line, run it on the box: its token works once, for an hour.At a glance
Time: 15 minutes, then Any Linux computer with Docker.
What you need:
- An Azure account with a subscription you can create resources in
- About 30 to 40 dollars a month while the box runs
Steps:
- Rent the box
- Let only you in
- Connect to it
- Install Docker
Steps
Sign in to the Azure portal, type Virtual machines in the search bar at the top and open it.
Press Create, then Azure virtual machine, and fill it in:
- Resource group: press Create new and name it
loopgate. It is a folder for everything this box uses. - Virtual machine name:
loopgate-runner. - Region: the one nearest your team.
- Image: Ubuntu Server 24.04 LTS - x64 Gen2. The "x64" part matters.
- Size: press See all sizes and choose B2s (2 processors and 4 GiB of memory).
- Authentication type: SSH public key. Username:
azureuser. SSH public key source: Generate new key pair. Key pair name:loopgate. - Public inbound ports: Allow selected ports, then SSH (22) only.
- Disks tab: check that OS disk size is at least 30 GiB.
- Resource group: press Create new and name it
Press Review + create, then Create, then Download private key and create resource. Your browser downloads
loopgate.pem, the key to the box; keep it safe.You should see: "Your deployment is complete" after a minute or two.
Press Go to resource and copy the Public IP address, four numbers with dots such as
20.71.45.67.Open Networking → Network settings and the rule for port 22 (SSH).
Change Source from Any to My IP address and press Save. Now only your laptop's current address can knock.
On your laptop, in Terminal, lock the key file so only you can read it. SSH refuses a key that others can read.
chmod 400 ~/Downloads/loopgate.pemConnect, with the address from step 4 in place of
<address>.ssh -i ~/Downloads/loopgate.pem azureuser@<address>You should see: a question about the box's fingerprint. Type
yesand press Enter. Then a welcome message and a prompt that startsazureuser@.Install Docker with Docker's own script.
curl -fsSL https://get.docker.com | sudo shYou should see: a few minutes of output ending with a note about running Docker as a non-root user.
Let your user run Docker without
sudo, then leave.sudo usermod -aG docker $USER && exitConnect again with the
sshcommand from step 8, so the change takes hold.
Check
Docker answers without sudo with Docker Compose version v2. followed by more numbers:
docker compose versionNext
Your box is ready. Paste the command from the portal: Any Linux computer with Docker.
If something is off
- SSH stops connecting one day. Your address at home or at the office changed. Set the port 22 rule to My IP address again (step 6).
- SSH says the key's permissions are too open. Run step 7 again.
- Docker says permission denied. Leave and connect again (step 11).
Doing it by hand
Once Docker answers, By hand sets the runner up from files instead of the portal's line.