Expose home server services through a VPS using WireGuard, Traefik, socat, and Cloudflare — even behind CGNAT.
Infrastructure guide (WireGuard, Docker, Cloudflare, hardening): docs/VPS-Guide.md Deploy-the-whole-stack checklist (Traefik, apps, honeypot, optional auth): docs/STACK-SETUP.md
This repo is a standalone CGNAT tunnel + reverse-proxy setup — WireGuard, Traefik, socat, Cloudflare. It has no auth-backend coupling. Two optional add-ons live in their own repos and can be dropped in when needed:
- Xore/auth-backend — SSO/forward-auth portal for any admin surface on this stack (lockout, 2FA, passkeys, credential recovery docs)
- Xore/www — the personal homepage example that
used to live in
examples/
- VPS: plain Docker Compose at
/root/vps/docker-compose.yml(Traefik, Portbridge, Suricata, and all socat bridges). Dockge is not used. - Home honeypot: Dockge stack at
/opt/stacks/honeypot-stack/compose.yml. - The reusable CGNAT gateway remains in
vps/. The complete honeypot deployment lives in the publicXore/honeypot-stackrepository.
cgnat/
├── README.md # This file
├── docs/
│ └── VPS-Guide.md # Complete setup guide
├── vps/
│ ├── README.md # VPS stack + optional auth-portal add-on
│ ├── docker-compose.yml # Traefik + socat bridges on VPS
│ └── traefik/
│ ├── traefik.yml # Traefik static config
│ └── dynamic.yml # Routing rules (add new services here)
├── wireguard/
│ └── wg0-vps.conf.example # WireGuard server config template
├── scripts/
│ ├── README.md # Script usage docs
│ ├── harden-vps.sh # VPS hardening checker + applicator
│ └── harden-homeserver.sh # Home server hardening checker + applicator
└── examples/
├── README.md # Examples index
├── reverse-proxy/ # Passthrough to any LAN host (no app container)
│ ├── docker-compose.yml
│ └── README.md
├── uptime-kuma/ # Self-hosted uptime monitoring
│ ├── docker-compose.yml
│ └── README.md
└── cowrie-gpu/ # Cowrie SSH/Telnet honeypot, fake GPU host persona
- Read the full guide
- Set up the WireGuard tunnel using
wireguard/as the VPS-side template - Deploy the VPS stack:
cd /root/vps && docker compose -f docker-compose.yml up -d - Deploy each selected home example as its own Dockge stack under
/opt/stacks/. For the honeypot, cloneXore/honeypot-stackand deploy itsdocker-compose.ymlas the authoritative/opt/stacks/honeypot-stack/compose.yml. - Add DNS record in Cloudflare
- Pick an example and wire it in
| Example | Port | Description |
|---|---|---|
| reverse-proxy | any | Forward traffic to any upstream (no app container needed) |
| uptime-kuma | 3001 | Self-hosted uptime monitoring dashboard |
| cowrie-gpu | — | Cowrie SSH/Telnet honeypot with a fake GPU-equipped host persona |
Auth & security: Xore/auth-backend (optional add-on repo — hardened Traefik forward-auth SSO at auth. — lockout, 2FA, bot traps) · honeypot-stack (separate public repository containing the home Dockge stack + VPS gateway: Cowrie, multipot, Dionaea, six Conpot/OT personas, HTTP/API decoys, SNARE/TANNER, native AdminLTE 4.1.0/Bootstrap operations frontend, GeoIP, payload/script risk and IOC analysis, session replay, ATT&CK Enterprise/ICS mapping, campaign/infrastructure correlation, runtime and ingestion health, Filebeat/Elasticsearch/Kibana, real offline YARA triage, durable alert and intelligence state, Prometheus metrics, tested backups, an optional isolated KVM/libvirt malware lab, EveBox and Arkime; Suricata runs on the VPS public interface)
Every example includes:
- A ready-to-run
docker-compose.ymlwith a socat bridge - A
README.mdwith quick start commands and a Traefikdynamic.ymlsnippet
| Script | Target | Run |
|---|---|---|
| scripts/harden-vps.sh | VPS | sudo bash scripts/harden-vps.sh --apply |
| scripts/harden-homeserver.sh | Home server | sudo bash scripts/harden-homeserver.sh --apply |
Both scripts support --check (audit only, no changes) and --apply (fix everything).
See scripts/README.md for full usage.
⚠️ Open a second SSH session before running--applyon the VPS — it changes the SSH port to2222.
Internet → Cloudflare (WAF/CDN) → VPS
Traefik :443 → socat → WireGuard tunnel
→ Home Server socat → App container
See docs/VPS-Guide.md § Architecture Overview for the full traffic flow diagram.