Commit 547ef7fc authored by cmulk's avatar cmulk
Browse files

Update README

Use naming for dockerhub repository
parent 486310e9
# wireguard-docker
Wireguard setup in Docker on Debian stable kernel meant for a simple personal VPN
Wireguard setup in Docker on Debian kernel meant for a simple personal VPN
There are currently 2 branches, stretch and buster. Use the branch that corresponds to your host machine if the kernel module install feature is going to be used.
## Overview
This docker image and configuration is my simple version of a wireguard personal VPN, used for the goal of security over insecure (public) networks, not necessarily for Internet anonymity. The docker images uses debian stable, and the host OS must also use the debian stable kernel, since the image will build the wireguard kernel modules on first run. As such, the hosts /lib/modules directory also needs to be mounted to the container on the first run to install the module (see the Running section below). Thanks to [activeeos/wireguard-docker](https://github.com/activeeos/wireguard-docker) for the general structure of the docker image. It is the same concept just built on Ubuntu 16.04.
......@@ -15,21 +16,21 @@ docker build -t wireguard:local github.com/cmulk/wireguard-docker
### First Run
If the wireguard kernel module is not already installed on the __host__ system, use this first run command to install it:
```
docker run -it --rm --cap-add sys_module -v /lib/modules:/lib/modules wireguard:local install-module
docker run -it --rm --cap-add sys_module -v /lib/modules:/lib/modules cmulk/wireguard-docker:stretch install-module
```
### Normal Run
```
docker run --cap-add net_admin --cap-add sys_module -v <config volume or host dir>:/etc/wireguard -p <externalport>:<dockerport>/udp wireguard:local
docker run --cap-add net_admin --cap-add sys_module -v <config volume or host dir>:/etc/wireguard -p <externalport>:<dockerport>/udp cmulk/wireguard-docker:stretch
```
Example:
```
docker run --cap-add net_admin --cap-add sys_module -v wireguard_conf:/etc/wireguard -p 5555:5555/udp wireguard:local
docker run --cap-add net_admin --cap-add sys_module -v wireguard_conf:/etc/wireguard -p 5555:5555/udp cmulk/wireguard-docker:stretch
```
### Generate Keys
This shortcut can be used to generate and display public/private key pairs to use for the server or clients
```
docker run -it --rm wireguard:local genkeys
docker run -it --rm cmulk/wireguard-docker:stretch genkeys
```
## Configuration
......@@ -67,8 +68,7 @@ Sample docker-compose.yml
version: "2"
services:
vpn:
image: wireguard:local
build: github.com/cmulk/wireguard-docker
image: cmulk/wireguard-docker:stretch
volumes:
- data:/etc/wireguard
networks:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment