2022-11-03 15:37:53 +00:00
|
|
|
# wg-manager
|
|
|
|
|
|
|
|
|
|
WireGuard manager allow initialize WireGuard server and manage users.
|
|
|
|
|
|
2022-11-03 15:53:56 +00:00
|
|
|
You can start the WireGuard server with one command, and then create (and delete) users.
|
|
|
|
|
|
|
|
|
|
|
2022-11-03 15:37:53 +00:00
|
|
|
```bash
|
|
|
|
|
Usage: ./wg-manager.sh [<options>] [command [arg]]
|
|
|
|
|
Options:
|
|
|
|
|
-i : Init (Create server keys and configs)
|
|
|
|
|
-c : Create new user
|
|
|
|
|
-d : Delete user
|
|
|
|
|
-p : Print user config
|
2022-11-03 16:09:53 +00:00
|
|
|
-q : Print user QR code
|
2022-11-03 15:37:53 +00:00
|
|
|
-u <user> : User identifier (uniq field for vpn account)
|
|
|
|
|
-s <server> : Server host for user connection
|
|
|
|
|
-h : Usage
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## Quick start
|
|
|
|
|
|
|
|
|
|
Run server (bare-metal or VPS) with Ubuntu 22.02
|
|
|
|
|
|
|
|
|
|
### Install WireGuard
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
apt install wireguard wireguard-tools -y
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
### Setup
|
|
|
|
|
|
2022-11-03 15:42:20 +00:00
|
|
|
- Download this script [wg-manager.sh](https://danuk.github.io/wg-manager/wg-manager.sh) from GitHub
|
2022-11-03 15:37:53 +00:00
|
|
|
- Initialize WireGuard server: `./wg-manager.sh -i -s YOUR_SERVER_IP`
|
|
|
|
|
- Add your user: `./wg-manager.sh -c -u my_user -p > wg-client.conf`
|
|
|
|
|
- Install WireGuard on the client
|
|
|
|
|
- Start client with config `wg-client.conf`
|
|
|
|
|
|
|
|
|
|
|