PiVPN WireGuard GUI
A simple (unofficial) GUI for PiVPN.
Add, revoke and download WireGuard vpn profiles with QR Code support.
Setup
composer install
cp .env.example .env
- Set
APP_KEY
to a random string. cp ./storage/app/users/users.json.example ./storage/app/users/users.json
- Setup a user with a username and password I strongly recommend the use of a UUID as a password
- Serve
./public
Extend
New drivers can be added by implementing the VPNDriver.php
interface.
Serve with lighttpd
DON'T WORKS!!
Infor extracted from https://tecadmin.net/setup-virtualhosts-in-lighttpd-server/:
To reuse the lighttpd installed by pihole, you need:
- add this to
/etc/lighttpd/external.conf
:
root@raspberrypi:/etc/lighttpd# cat external.conf
# para incluir vhosts
include_shell "cat /etc/lighttpd/vhosts.d/*.conf"
- create vhost config to serve
public
:
root@raspberrypi:/etc/lighttpd/vhosts.d# cat pivpn-wireguard-gui.conf
$HTTP["host"] == "pivpn-wireguard-gui.lan" {
server.document-root = "/home/pi/pivpn-wireguard-gui/public/index.php"
server.errorlog = "/var/log/lighttpd/pivpn-wireguard-gui.error.log"
accesslog.filename = "/var/log/lighttpd/pivpn-wireguard-gui.access.log"
}
- check syntax
root@raspberrypi:/etc/lighttpd# lighttpd -t -f /etc/lighttpd/lighttpd.conf
Syntax OK
- restart lighttpd
root@raspberrypi:/etc/lighttpd# service lighttpd restart
root@raspberrypi:/etc/lighttpd#