Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

Building a $0 VPS on Google Cloud: DietPi, Tailscale, IPv6, and the traps I hit

说明与用途

在 Google Cloud 上部署零成本 VPS,使用 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