https://github.com/bfren/docker-wireguard
Docker WireGuard image.
https://github.com/bfren/docker-wireguard
docker docker-wireguard wireguard wireguard-vpn
Last synced: about 1 month ago
JSON representation
Docker WireGuard image.
- Host: GitHub
- URL: https://github.com/bfren/docker-wireguard
- Owner: bfren
- License: mit
- Created: 2023-09-15T07:34:48.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2026-01-20T20:02:00.000Z (5 months ago)
- Last Synced: 2026-01-21T05:20:11.144Z (5 months ago)
- Topics: docker, docker-wireguard, wireguard, wireguard-vpn
- Language: Nushell
- Homepage:
- Size: 80.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# Docker WireGuard
   
[Docker Repository](https://hub.docker.com/r/bfren/wireguard) - [bfren ecosystem](https://github.com/bfren/docker)
Comes with [WireGuard](https://www.wireguard.com/) pre-installed.
Once started you can show configuration for a peer in two ways:
```bash
# print configuration as text
wg-conf peer1
# print configuration as QR code
wg-qr peer1
# print all registered clients with connection statistics
wg-clients
# show all clients, auto refreshing every 2sec (similar to wg show)
wg-show
```
## Contents
* [Ports](#ports)
* [Volumes](#volumes)
* [Environment Variables](#environment-variables)
* [Helper Functions](#helper-functions)
* [Licence / Copyright](#licence)
## Ports
* 51820
## Volumes
| Volume | Purpose |
| --------- | --------------------------------------------- |
| `/config` | Stores server and peer configuration values. |
## Environment Variables
| Variable | Values | Description | Default |
| --------------------------------- | ------ | ---------------------------------------------------------------------------------------- | --------------------- |
| `BF_WIREGUARD_EXTERNAL_ADDRESS` | string | The external IP Address or domain of the server - peers will use this to connect. | *None* - **required** |
| `BF_WIREGUARD_INTERFACE` | string | The name to use for the WireGuard interface. | wg0 |
| `BF_WIREGUARD_IP_RANGE` | string | The IP range to use for the WireGuard host and peers - **without** the final segment. | 192.168.100 |
| `BF_WIREGUARD_DNS` | string | The IP Address of an upstream DNS resolver. | 1.1.1.1 (Cloudflare) |
| `BF_WIREGUARD_PEERS` | string | List of peers to create on startup. | *Blank* |
## Helper Functions
| Function | Arguments | Description |
| ------------- | ------------- | ------------------------------------------------- |
| `wg-clients` | *none* | Displays all configured clients with statistics. |
| `wg-conf` | 0: Peer name | Display a peer's configuration as text. |
| `wg-show` | *none* | Displays output from `wg show` with client names. |
| `wg-qr` | 0: Peer name | Display a peer's configuration as a QR code. |
## Licence
> [MIT](https://mit.bfren.dev/2023)
## Copyright
> Copyright (c) 2023-2026 [bfren](https://bfren.dev) (unless otherwise stated)