Automatically provision WireGuard VPN configurations upon successful BTCPay Server payments.
Go to file
2024-12-11 09:07:12 +00:00
ansible Initial commit: Add WireGuard VPN provisioning system 2024-12-11 08:32:30 +00:00
app InFlask app update and fix 2024-12-11 09:05:26 +00:00
venv Initial commit: Add WireGuard VPN provisioning system 2024-12-11 08:32:30 +00:00
.env.example Initial commit: Basic project structure 2024-12-11 08:32:30 +00:00
.flaskenv InFlask app update and fix 2024-12-11 09:05:26 +00:00
.gitignore Initial commit: Basic project structure 2024-12-11 08:32:30 +00:00
inventory.ini Initial commit: Add WireGuard VPN provisioning system 2024-12-11 08:32:30 +00:00
LICENSE Initial commit 2024-12-11 08:25:29 +00:00
README.md README change 2024-12-11 08:32:30 +00:00
requirements.txt Initial commit: Basic project structure 2024-12-11 08:32:30 +00:00

vpn-btcpay-provisioner

Automatically provision WireGuard VPN configurations upon successful BTCPay Server payments.

VPN BTCPay Provisioner

Automatically provision WireGuard VPN configurations upon successful BTCPay Server payments.

Features

  • Automated WireGuard VPN configuration generation
  • BTCPay Server integration via webhooks
  • Secure key management with Ansible vault
  • Automated IP allocation for new clients

Prerequisites

  • Python 3.x
  • Ansible
  • WireGuard
  • BTCPay Server instance

Installation

  1. Clone the repository:
git clone https://git.sovbit.dev/Enki/vpn-btcpay-provisioner.git
cd vpn-btcpay-provisioner
  1. Install dependencies:
python -m venv venv
source venv/bin/activate  # On Windows: .\venv\Scripts\activate
pip install -r requirements.txt
  1. Copy example environment file and edit with your values:
cp .env.example .env
  1. Set up Ansible vault:
ansible-vault create ansible/group_vars/vpn_servers/vault.yml

Configuration

  1. Update .env with your environment-specific values
  2. Configure BTCPay Server webhook to point to your webhook endpoint
  3. Update inventory.ini with your VPN server details

Usage

  1. Start the webhook handler:
flask run
  1. Test the setup with BTCPay Server's test webhook feature

Security Notes

  • Keep your .env file secure and never commit it to version control
  • Regularly rotate webhook secrets and access tokens
  • Monitor logs for unauthorized access attempts
  • Keep system dependencies updated

License

MIT