Devices
Google Cloud
Add Compute Engine VMs by hand or have every new VM join at boot with a startup script.
Compute Engine VMs join like any Linux server. You don't need an external IP or firewall rules: Underpass connects outward, and falls back to a relay if a direct path isn't possible.
Get a key
In the dashboard, open Machines → Add device → Google Cloud and generate a key. VMs are tagged tag:gcp, so access rules can target them, and they never expire.
Make the key reusable if several VMs, or VMs you recreate, will use it.
One VM
SSH into the VM (for example with SSH in the console) and paste the setup script from the dashboard:
curl -fsSL https://coord.getunderpass.com/download/install.sh | UNDERPASS_AUTH_KEY=tskey-auth-xxxxxxxxxxxx shEvery new VM, at boot
Add a startup script so VMs join on their own. In the console: Edit VM → Automation → Startup script, or set the startup-script metadata key:
#!/bin/sh
# Join Underpass once; later boots find it installed.
command -v underpass >/dev/null || \
curl -fsSL https://coord.getunderpass.com/download/install.sh | UNDERPASS_AUTH_KEY=tskey-auth-xxxxxxxxxxxx shWith gcloud:
gcloud compute instances create my-vm --metadata-from-file=startup-script=join-underpass.shUse a reusable key here, and an ephemeral one for VMs in managed instance groups that come and go: they're removed after 10 minutes offline.
Note
Startup scripts are readable by anyone who can see the VM's metadata. Keep the key's expiry short, or store it in Secret Manager and fetch it in the script.
Next
- Access controls for
tag:gcp - Subnet routes to reach a whole VPC through one VM