Files
vpn/.env.example
T
davide fc5d6209c1 docs: add resource limits guide for low-RAM devices
- README: new section explaining WG_MEM_LIMIT / WG_MEMSWAP_LIMIT with
  per-RAM-tier values and host swap configuration for SBC boards
- CLAUDE.md: simplify resource limits table, drop device-specific
  measurements, reference README for per-board guidance
- .env.example: update comments with per-tier values and OOM warning

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-07 08:22:43 +02:00

37 lines
1.4 KiB
Bash

# ============================================================
# WireGuard VPN — Configurazione locale
# Copia .env.example in .env e compila i valori richiesti.
# ============================================================
# Fuso orario (formato IANA)
# Lista completa: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
TZ=Europe/Rome
# --- OPZIONALI (valori di default mostrati) ---
# Porta UDP WireGuard
WG_PORT=51820
# Porta TCP interfaccia web
WG_UI_PORT=51821
# --- OPZIONALI — Limiti risorse container (SBC) ---
# Decommenta e adatta alla RAM disponibile:
# 512 MB RAM (RPi 3B) → WG_MEM_LIMIT=96m (reale: ~37 MB, 96 m è già doppio)
# 1 GB RAM (RPi 3B+) → WG_MEM_LIMIT=128m
# 2 GB+ RAM (RPi 4/5) → WG_MEM_LIMIT=256m (default)
# Tenere WG_MEMSWAP_LIMIT = WG_MEM_LIMIT per disabilitare lo swap del container.
# Su single-core (Pi Zero / Pi 1) impostare WG_CPUS=0.75.
#
# ATTENZIONE — RPi 3 con uptime lungo: il processo Node.js può crescere nel
# tempo. Con 1 GB di RAM totale e OS+Docker che occupano ~350 MB, un limite
# di 256 m lascia pochissimo margine; il kernel OOM-killa SSH prima del
# container. Usare 96-128 m e assicurarsi che lo swap host sia >= 512 MB
# (vedi CLAUDE.md §SBC per il comando).
# WG_MEM_LIMIT=256m
# WG_MEMSWAP_LIMIT=256m
# WG_CPUS=1.0
# NOTA: host VPN, password e DNS si configurano dalla web UI al primo avvio —
# non servono variabili d'ambiente per questi valori (comportamento v15+).