Building a $0 VPS on Google Cloud: DietPi, Tailscale, IPv6, and the traps I hit
Description and use
Building a $0 VPS on Google Cloud with DietPi and Tailscale, no public IPv4, IPv6 egress, and zero cost, after overcoming five common pitfalls.
Problem
Create a minimal, always‑on Linux VM on Google Cloud with no public IPv4, private SSH via Tailscale, and zero cost, while avoiding common pitfalls.
Outcome
The VM operates with no public IPv4, secure SSH via Tailscale, and zero monthly cost, after addressing five traps: DietPi conversion script, disk.raw naming, unintended public IP, IPv6 misconfiguration, and IPv4‑only egress.
Workflow
- 1. Download DietPi Native PC image and repack it to meet GCP’s disk.raw requirement.
- 2. Create a new VM from the repacked image, ensuring UEFI_COMPATIBLE guest‑os‑features.
- 3. Verify instance has no external IPv4 and that SSH keys are used instead of passwords.
- 4. Configure network interfaces: use a custom VPC with IPV4_IPV6 stack, and set static IPv6 address and gateway in /etc/network/interfaces.d/eth0.conf.
- 5. Test reachability with tailscale ping and curl to confirm IPv6 connectivity and IPv4 egress.
- 6. Monitor Cloud Billing to confirm zero charges.
Evidence
"The RAM number matters. On plain Debian the box idled at 389 MB used. On DietPi it idles at 248 MB — 36% less, which on a 964 MB machine is the difference between "can run one small service" and "cannot".
"GCP only accepts a file literally named disk.raw"
"The VM came up with a public IP and a default password"
"active in the tailnet is not proof of reachability"
"IPv6-only egress cannot reach IPv4-only destinations"
- Record date: 2026-10-25T03:11:17.594Z