Giter Site home page Giter Site logo

pivpn-web's Introduction

PiVPN Web

Build & Publish Docker Image to Docker Hub Docker Docker Sponsor

PiVPN Web is an open-source Web UI for PiVPN (when using WireGuard).

Features

  • A beautiful & easy to use UI
  • Easy installation: just one command
  • List, create, delete, enable & disable users
  • Show a user's QR code
  • Download a user's configuration file
  • See which users are connected
  • Log in with your Linux username & password
  • Connects to your local PiVPN installation โ€” or remote over SSH
  • Gravatar support ๐Ÿ˜

Requirements

  • Docker installed
  • PiVPN installed (WireGuard, not OpenVPN)
  • SSH enabled

Installation

1. Install Docker

# Install Docker
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh

# Add user 'pi' to group 'docker'
sudo usermod -aG docker pi

2. Install PiVPN

curl -L https://install.pivpn.io | bash

See https://pivpn.io for detailed instructions.

3. Install PiVPN Web

Run this command once to automatically start the service on boot.

docker run -d -p 443:443 --name pivpn-web --restart=unless-stopped iamvinku/pivpn-web

๐Ÿ’ก Remove the restart=always flag to prevent auto-start on boot.

๐Ÿ’ก You can set the environment variable SSH_HOST to a hostname/IP to connect to a different PiVPN server than PiVPN Web is running on.

๐Ÿ’ก There's also a docker-compose.yml file.

Usage

Open https://<ip-of-your-pi> and log in with your Raspberry Pi username & password.

๐Ÿ’ก The default Raspbian username is pi and the default password is raspberry.

๐Ÿ’ก When a client's name is a valid Gravatar e-mail, they will be shown with their avatar.

Updating

Run these commands to update to the latest version.

docker stop pivpn-web
docker rm pivpn-web
docker pull iamvinku/pivpn-web
sudo docker run -d -p 443:443 --name pivpn-web --restart=unless-stopped iamvinku/pivpn-web

Notes on running PiVPN Web on Oracle Cloud Infrastructure

  • If running on Ubuntu compute instances, make sure to attach a network security group allowing Ingress traffic from all source ports to destination TCP port 443 from source CIDR 0.0.0.0/0. If you are only going to access the server from a static IP or a different range of IPs, allow traffic from that CIDR block instead of 0.0.0.0/0.

  • Run the following iptables command as well:

# To access PiVPN Web over HTTPS
sudo iptables -I INPUT 1 -i ens3 -p tcp -m tcp --dport 443 -m comment --comment PiVPN-Web-input-rule -j ACCEPT

# To complete the LetsEncrypt challenge (not required if you already have the certificate)
sudo iptables -I INPUT 1 -i ens3 -p tcp -m tcp --dport 80 -m comment --comment letsencrypt-input-rule -j ACCEPT
sudo iptables-save | sudo tee /etc/iptables/rules.v4
sudo service iptables restart
sudo iptables -S
  • Mount the LetsEncrypt certificate files into the Docker container with:
sudo docker run -d -p 443:443 -v /etc/letsencrypt/live/yourdomain.com/fullchain.pem:/app/sslcerts/server.crt -v /etc/letsencrypt/live/yourdomain.com/privkey.pem:/app/sslcerts/server.key --name pivpn-web --restart=unless-stopped iamvinku/pivpn-web
# /etc/ssh/sshd_config
PasswordAuthentication yes
PermitRootLogin yes
  • Once these changes are made, set a long, secure, auto-generated password for the root user with sudo passwd root and restart the ssh service with sudo service ssh restart. Log in to PiVPN Web using the root user and password by visiting https://yourdomain.com

  • If you're using a dynamic DNS service (e.g. DuckDNS.org) visit the relevant subdomain URL (e.g. https://yoursubdomain.duckdns.org)

  • Since the server would be open to the public (i.e. ingress rule allowing 0.0.0.0/0 traffic to port 443) you might get a lot of unwanted attention (e.g. brute-forcing attempts) so you may want to restrict PiVPN Web and have it only listen for connections originating from within your internal network which would mean that you'll need to have a WireGuard tunnel to the server already set up to be able to access PiVPN Web dashboard.

pivpn-web's People

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.