> For the complete documentation index, see [llms.txt](https://docs.yemreak.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.yemreak.com/my-agent-notes/81c498e3.md).

# Kendi US VPN Sunucunu Sıfırdan Kur (algo + Hetzner + WireGuard)

## NE / NEDEN

Kendi bulut sunucunda çalışan, ABD-IP'li, kişisel bir VPN. Amaç: "bu içerik ülkende yok" duvarını aşmak (US streaming · shopping · siteler). Paylaşımlı ticari VPN (ExpressVPN/Nord) yerine KENDİ sunucun → IP'yi kimseyle paylaşmazsın (flag yeme riski düşük), aylık \~€4 (ticari VPN'in 1/3'ü), tek-komutla kurulur.

## KARAR-ÖZET (neden bu üçlü)

```
araç      algo (trailofbits)   tek-komut VPN kurar · WireGuard+IPsec · en bakımsız · github.com/trailofbits/algo
provider  Hetzner Cloud        ~€3.79/ay · 20TB transfer dahil (VPN ağır transfer · 1TB ay-ortası biter, 20TB bitmez)
                               US region: Ashburn VA ∨ Hillsboro OR
protokol  WireGuard            hızlı · modern · küçük-kod · pil-dostu (OpenVPN yalnız sansür/firewall'da gerekli, normalde gereksiz)
```

maliyet kıyas: AWS Lightsail $3.50/1TB · EC2 "free" ama transfer-ücreti VPN'de patlar (TUZAK) · GCE "free" ama outbound 1GB/ay limit VPN'i öldürür (TUZAK) → SABİT fiyat + bol transfer = Hetzner.

## STEP-BY-STEP

### 1. algo'yu indir

```bash
cd ~ && git clone https://github.com/trailofbits/algo.git
```

algo Python projesi (brew'de YOK — "brew install algo" çalışmaz). Launcher `./algo` ilk çalıştırmada `uv`'yi (Python paket-yöneticisi) brew ile otomatik kurar, Python 3.11+ ortamı hazırlar.

### 2. Hetzner API token al

```
Hetzner Cloud Console → projeyi seç → Security → API Tokens
→ Generate API Token → izin: "Read & Write" → kopyala
```

(AWS seçersen: IAM → Create user → AdministratorAccess → Create access key → CLI)

### 3. ⚠️ TUZAK — config'i düzelt (yoksa kurulum US'te PATLAR)

`~/algo/config.cfg` içinde Hetzner default server\_type EU-only bir tip olabilir. US lokasyonu (Ashburn/Hillsboro) yalnız AMD (CPX) serisini destekler. Düzelt:

```yaml
# ~/algo/config.cfg → hetzner bölümü
  hetzner:
    server_type: cpx11      # cpx22/cx* DEĞİL — cpx11 (2vCPU/2GB/20TB · ~€4.35/ay · US-destekli · VPN'e bol)
    image: ubuntu-22.04
```

hata mesajı bu olursa: `unsupported location for server type` → tam bu, server\_type'ı cpx11 yap.

### 4. Çalıştır + soruları cevapla

```bash
cd ~/algo && ./algo
```

```
provider          6  (Hetzner Cloud)
region            Ashburn, VA   (US-East · ABD-IP burada belirlenir, provider değil REGION!)
API token         (adım 2'deki token'ı yapıştır)
kullanıcı adları   phone laptop desktop   (her cihaza ayrı = temiz)
─ promptlar ─
Cellular On Demand    N   (VPN'i SEN aç-kapat · y = her mobil-veride otomatik açılır, kontrol kaybı)
Wi-Fi On Demand       N   (aynı · y = tüm trafik sürekli US'ten, yavaşlar)
Retain PKI            y   (ileride yeni cihaz eklemek için · N = her yeni cihazda sıfırdan kurulum)
DNS ad blocking       y   (bedava reklam/tracker engelleme · Pi-hole gömülü)
SSH tunneling         N   (sadece sansür/firewall yedek · normalde gereksiz)
```

sonuç: `~/algo/configs/<sunucu-ip>/` üretilir. Başarı işareti: `failed=0` + "Congratulations!".

### 5. Üretilen config'ler

```
configs/<ip>/wireguard/
  <cihaz>.conf   →  bilgisayar için (WireGuard app'e dosya import)
  <cihaz>.png    →  telefon için (QR kod)
configs/<ip>/ipsec/apple/<cihaz>.mobileconfig  →  Apple native (IPsec, istersen)
```

### 6. SECRET'leri MERKEZE al (vault mimarisi · CLAUDE.md/KOD-YERLESIM/DATA secret-uzantısı)

VPN config = TRUTH (tek-nüsha · türetilemez · git'e GİREMEZ). Kaybı = sunucu-erişim kaybı. Çözüm = tek-merkez + pointer + backup (data/cache kuralının aynı fractal'ı):

```bash
ICLOUD="$HOME/Library/Mobile Documents/com~apple~CloudDocs"
VAULT="$ICLOUD/vault"
# 1. merkez kur + configs'i KOPYALA (taşıma değil — önce kopya)
mkdir -p "$VAULT/algo-vpn" && cp -R ~/algo/configs "$VAULT/algo-vpn/"
# 2. DOĞRULA (hakem: dosya-sayısı eşit mi)
[ "$(find ~/algo/configs -type f|wc -l)" = "$(find "$VAULT/algo-vpn/configs" -type f|wc -l)" ] && echo OK
# 3. orijinali POINTER yap (kopya değil → drift-sıfır)
mv ~/algo/configs ~/algo/.bak && ln -s "$VAULT/algo-vpn/configs" ~/algo/configs && rm -rf ~/algo/.bak
# 4. genel vault pointer (data/cache kalıbının ikizi)
ln -sfn "$VAULT" ~/.optionos/vault
```

```
maruziyet katmanları (truth-türü → merkez → pointer → backup)
  data   paylaşılır    repo/data/         ~/.optionos/        git
  cache  çürür         repo/cache/        ~/.optionos/cache   yok
  vault  GİZLİ ⭐       iCloud/vault E2E   ~/.optionos/vault   Backblaze
```

⚠️ **iCloud E2E ŞART**: Ayarlar → \[adın] → iCloud → Advanced Data Protection → Aç. Açık değilse secret'ı Apple okuyabilir (E2E = uçtan-uca şifreleme). git-DEĞİL çünkü: secret git'e girince ship'lenir + history'de kalıcı (silsen bile).

### 7. Bağlan + test

```
telefon   WireGuard app (App Store) → "+" → "Create from QR code" → <cihaz>.png tarat
Mac       WireGuard app → "Import tunnel(s) from file" → <cihaz>.conf
test      whoer.net aç → IP = sunucu-IP (US) görünmeli
```

## BAKIM

```
yeni cihaz/kişi   cd ~/algo && ./algo update-users   (PKI-retain=y sayesinde · vault'a otomatik düşer)
sunucu iptal      Hetzner Console → Servers → server → Delete   (saatlik ücret DURUR · config vault'ta kalır ama işlevsiz)
backup (ileri)    Backblaze → vault'u hard-backup (iCloud ölürse 2. katman · farklı sağlayıcı = correlated-failure yok)
```

## FALSIFY (mimari/kurulum neyle yanlışlanır)

```
VPN çalışıyor mu?      whoer.net → US-IP mi
secret iki-yerde mi?   kopya görürsen drift (pointer kuralı kırık · find ile çift-nüsha ara)
git'e secret sızdı mı? cd ~/algo && git status (configs symlink olmalı, içerik commit'lenmemeli)
iCloud E2E açık mı?    Ayarlar → Advanced Data Protection (kapalı = secret Apple'da)
backup restore-able mı? test-restore yapılmadıysa backup YALAN
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.yemreak.com/my-agent-notes/81c498e3.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
