Code Monkey home page Code Monkey logo

Comments (6)

wsw70 avatar wsw70 commented on May 20, 2024 2

I used it happily for a few months but eventually moved to Traefik

... and then moved back to caddy v2 (using the new API in v2)

from wg-gen-web.

sphen13 avatar sphen13 commented on May 20, 2024 1

simple setup with Caddy (i am using my own built container that uses digitalocean token for dns validation - based upon abiosoft/caddy)

version: '3.6'
services:
  caddy:
    image: "sphen/caddy-digitalocean"
    container_name: caddy
    environment:
      - DO_AUTH_TOKEN=abc123
      - ACME_AGREE=TRUE
    volumes:
      - /home/user/caddy/Caddyfile:/etc/Caddyfile
      - /home/user/caddy:/root/.caddy
    ports:
      - 443:443
    depends_on:
      - wg-gen-web
    restart: always

  wg-gen-web:
    image: vx3r/wg-gen-web
    container_name: wg-gen-web
    restart: always
    environment:
      - WG_CONF_DIR=/data
      - WG_INTERFACE_NAME=wg0.conf
    volumes:
      - /etc/wireguard:/data

Caddyfile:

vpn.xxx.com {
  basicauth / user password
  proxy / http://wg-gen-web:8080 {
    transparent
  }
  tls {
    dns digitalocean
  }
}

from wg-gen-web.

squat avatar squat commented on May 20, 2024 1

Hi (x-posted from the Discord channel), here is a setup for easily running Wg Gen Web on Kubernetes with Kilo:

https://github.com/squat/kilo-wg-gen-web

The manifests can be found at https://raw.githubusercontent.com/squat/kilo-wg-gen-web/master/manifests/kilo-wg-gen-web.yaml

from wg-gen-web.

wsw70 avatar wsw70 commented on May 20, 2024

Traefik 2

version: '3.6'
services:
  wg-gen-web:
    image: vx3r/wg-gen-web:latest
    container_name: wg-gen-web
    restart: unless-stopped
    environment:
      - WG_CONF_DIR=/data
      - WG_INTERFACE_NAME=wg0.conf
      - SMTP_HOST=your.smtp.host
      - SMTP_PORT=465
      - SMTP_USERNAME=your_smtp_username
      - SMTP_PASSWORD=your_smtp_password
      - SMTP_FROM=Wg Gen Web <[email protected]>
    volumes:
      - /etc/docker/container-data/wg-gen-web:/data
    labels:
      - traefik.http.routers.wg-gen-web.entryPoints=http
      - traefik.enable=true

from wg-gen-web.

wsw70 avatar wsw70 commented on May 20, 2024

simple setup with Caddy

@sphen13 you may be interested in https://github.com/lucaslorentz/caddy-docker-proxy - a Caddy proxy to docker containers with automatic reload of the configuration and detection of container exposed ports.

I used it happily for a few months but eventually moved to Traefik

from wg-gen-web.

rahmadsandy avatar rahmadsandy commented on May 20, 2024

Wg Dashboard with caddy

version: '3.6'

networks:
  monitor-net:
    driver: bridge

services:
  wgweb:
    container_name: wgweb
    build: 
      context: .
    volumes:
      - /etc/wireguard:/data

    expose:
      - 8888/tcp
    networks:
      - monitor-net


    
  caddy:
    image: stefanprodan/caddy
    container_name: caddy
    ports:
      - "8282:8888"
    volumes:
      - ./caddy:/etc/caddy
    environment:
      - ADMIN_USER=${ADMIN_USER}
      - ADMIN_PASSWORD=${ADMIN_PASSWORD}
    networks:
      - monitor-net
    labels:
      org.label-schema.group: "monitoring"

Dockerfile

FROM ubuntu
RUN apt update && \
    apt install curl vim net-tools iputils-ping -y
RUN mkdir /data
WORKDIR /app
COPY . /app
WORKDIR /app
EXPOSE 8888
CMD [ "./wg-gen-web" ]

Wireguard API

version: '3.6'
services:
  wg-json-api:
    image: james/wg-api:latest
    container_name: wg-json-api
    restart: unless-stopped
    cap_add:
      - NET_ADMIN
    network_mode: "host"
    command: wg-api --device wg0 --listen 172.27.0.1:8080

Caddyfile

:8888 {
    basicauth / {$ADMIN_USER} {$ADMIN_PASSWORD}
    proxy / wgweb:8888 {
            transparent
        }

    errors stderr
    tls off
}

Env

# IP address to listen to
SERVER=0.0.0.0
# port to bind
PORT=8888
# Gin framework release mode
GIN_MODE=release
# where to write all generated config files
WG_CONF_DIR=/data
# WireGuard main config file name, generally <interface name>.conf
WG_INTERFACE_NAME=wg0.conf

# SMTP settings to send email to clients
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_USERNAME=**************************
SMTP_PASSWORD=**************************
SMTP_FROM=**************************

#fake 
OAUTH2_PROVIDER_NAME=fake

ADMIN_USER=**************************
ADMIN_PASSWORD=**************************
WG_STATS_API=http://172.27.0.1:8080

from wg-gen-web.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.