{"repo":"kimitrii/self-hosted-vpn","free":true,"listed":false,"github":"https://github.com/kimitrii/self-hosted-vpn","clone":"git clone https://github.com/kimitrii/self-hosted-vpn.git","description":"WireGuard VPN Server on AWS with Terraform","language":"HCL","stars":10,"topics":["aws","ec2","vpn","wireguard"],"license":"MIT","category":"networking-infra","readme_excerpt":"WireGuard VPN Server on AWS with Terraform This project provides an automated setup for deploying a WireGuard VPN server on an EC2 instance running Amazon Linux 2023 using Terraform. This guide will walk you through the process of deploying the VPN server and connecting a single client, with instructions on how to add more clients if needed. Sumary - Requirements - Getting Started - Environment Variables - Infrastructure Overview - Deployment - Running Locally - Running with GitHub Actions - Connecting Your Device to the VPN - VPN Configuration - Connecting Additional Clients - Remote State with S3 - Troubleshooting - Disclaimer Requirements - AWS account with permissions to manage EC2, S3, and VPC resources. - SSH key pair for connecting to the EC2 instance. - Terraform installed on your local machine or a CI/CD pipeline. - wg (WireGuard) tool installed locally for key generation. Getting Started 1. Environment Variables The following environment variables need to be set before running terraform apply : - SERVER PRIVATE KEY : (required) Private key of the WireGuard server. - CLIENT PUBLIC KEY : (required) Public key of the client connecting to the VPN. - CLIENT PRESHARED KEY : (required) Preshared key for extra encryption between the server and client. - VPN PUBLIC KEYPAIR : (required) SSH public key for EC2 instance access. - EC2 TYPE : (required) EC2 instance type (default: t4g.nano for a low-cost option). - EC2 AV ZONE : (required) Availability zone for the EC2 instance (","default_branch":null,"files":null,"tree":[],"storefront":"/r/kimitrii","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/kimitrii/self-hosted-vpn/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}