Skip to content

0xb1b1/wireguard-docker

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Wireguard VPN

Docker Image Size (latest by date) Docker Pulls

Easy Wireguard server setup using Docker Engine

Information related to Wireguard VPN you can find at official website - https://www.wireguard.com/

Requirements

  • GNU/Linux host with a recent kernel (5.x)
  • Wireguard module installed using
sudo apt install wireguard-tools

Setup

  • manual run
docker run --rm \
  --cap-add sys_module \
  --cap-add net_admin \
  -v ./wireguard:/etc/wireguard \
  -p 55555:55555/udp 0xb1b1/wireguard
version: "3"
services:

  wireguard:
    image: 0xb1b1/wireguard
    environment:
      - PUBLIC_IP=1.2.3.4
      - PORT=55555
      - DNS=1.1.1.1
    volumes:
      - ./wireguard/:/etc/wireguard/
    ports:
      - 55555:55555/udp
    cap_add:
      - SYS_MODULE
      - NET_ADMIN
    restart: unless-stopped

To start your instance:

docker-compose up -d wireguard

There will be a QR code within the container's logs for the test user:

docker-compose logs wireguard

...as well as simple copy-paste instructions for your desktop clients :)

Adding a new client peer is easy:

docker-compose exec wireguard addclient client1

P.S.: Please give this repo a star if you like it 😉

About

Easy Dockerized Wireguard Server setup

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 83.2%
  • Dockerfile 16.8%