Last active
July 23, 2024 04:29
-
-
Save w0rng/15384974aa5fcc922fb8f55fb853eb6d to your computer and use it in GitHub Desktop.
amneziaWg + easy-wg + caddy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {$WG_HOST} { | |
| redir /{$ADMIN_PATH} /{$ADMIN_PATH}/ | |
| handle_path /{$ADMIN_PATH}/* { | |
| reverse_proxy vpn:{$PORT} { | |
| header_up X-Real-IP {remote_host} | |
| } | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ersion: "3.8" | |
| volumes: | |
| etc_wireguard: | |
| caddy_data: | |
| caddy_config: | |
| services: | |
| vpn: | |
| env_file: | |
| - .env | |
| image: ghcr.io/w0rng/amnezia-wg-easy | |
| container_name: vpn | |
| volumes: | |
| - etc_wireguard:/etc/wireguard | |
| ports: | |
| - "${WG_PORT}:51820/udp" | |
| restart: unless-stopped | |
| cap_add: | |
| - NET_ADMIN | |
| - SYS_MODULE | |
| sysctls: | |
| - net.ipv4.ip_forward=1 | |
| - net.ipv4.conf.all.src_valid_mark=1 | |
| devices: | |
| - /dev/net/tun:/dev/net/tun | |
| caddy: | |
| image: caddy | |
| restart: unless-stopped | |
| ports: | |
| - 443:443 | |
| volumes: | |
| - ./Caddyfile:/etc/caddy/Caddyfile | |
| - caddy_data:/data | |
| - caddy_config:/config |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| WG_HOST=YOUR_DOMAIN.COM | |
| ADMIN_PATH=some_path | |
| PASSWORD=🚨YOUR_ADMIN_PASSWORD | |
| LANGUAGE=en | |
| PORT=51821 | |
| WG_DEVICE=eth0 | |
| WG_PORT=51820 | |
| WG_DEFAULT_ADDRESS=10.8.0.x | |
| WG_DEFAULT_DNS=1.1.1.1 | |
| WG_ALLOWED_IPS=0.0.0.0/0, ::/0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment