Building a $0 VPS on Google Cloud: DietPi, Tailscale, IPv6, and the traps I hit
Описание и применение
Создание бесплатного VPS на Google Cloud с DietPi и Tailscale, без публичного IPv4, с IPv6‑выходом и прокси для IPv4‑трафика.
Задача
Create a small, always‑on Linux VM on Google Cloud with no public IPv4, private SSH via Tailscale, and zero monthly cost, while avoiding common pitfalls.
Результат
The author successfully deployed a zero‑cost, IPv6‑only GCP VM running DietPi, reachable exclusively via Tailscale, and configured a proxy to access IPv4‑only services, avoiding five common traps.
Рабочий процесс
- 1. Build a new VM from the official DietPi image to avoid the conversion script’s auto‑remove of Tailscale and guest agents.
- 2. Repackage the DietPi image to meet GCP’s requirement for a single file named disk.raw and enable UEFI_COMPATIBLE.
- 3. Verify instance creation: check for external IPv4, SSH key usage, and default passwords immediately after deployment.
- 4. Ensure the VM is on a VPC with IPV4_IPV6 stack and configure static IPv6 on eth0 using DHCPv6‑derived values.
- 5. Resolve IPv6‑only egress to IPv4‑only destinations by deploying a CONNECT proxy on a dual‑stack peer and configuring apt and curl to use it.
- 6. Enable budget‑triggered shutdown to prevent accidental charges.
Доказательства
"I wanted a small always-on Linux box: private SSH access, no public IPv4, and a bill of exactly zero."
"DietPi ships PREP_SYSTEM_FOR_DIETPI.sh, which converts a running Debian install into DietPi."
"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"
- Дата записи: 2026-11-02T09:59:04.569Z