Terraguard – Create And Destroy Your Own VPN Service Using WireGuard

Click the icon to Follow me:- twitterTelegramRedditDiscord

This project’s goal is to be simple to create and destroy your own VPN service using WireGuard.


  • Terraform >= 1.0.0
  • Ansible >= 2.10.5

How to Deploy


Run with sudo is necessary because we need permission on localhost to install packages, configure a network interface and start a process.

Select your cloud provider AWS, DigitalOcean and open the directory

You can change the region or key name in the variable.tf

  • Initialize Terraform
terraform init
  • Plan our modifications
terraform plan “>

sudo terraform plan
  • Apply the changes
sudo terraform apply
  • For Digital Ocean you need to declare your token(do_token) in variable.tf or command line:
sudo terraform plan -var "do_token=value"
sudo terraform apply -var "do_token=value"

Tests – Checking the IP

  • Test the connection without VPN
curl ipinfo.io/ip
  • Start VPN
sudo systemctl start [email protected]
  • Test the connection with VPN
curl ipinfo.io/ip


  • Just run:
sudo terraform destroy

Cloud Providers

  • AWS
  • Digital Ocean
  • GCP
  • OCI


Contributions, issues and feature requests are welcome!
Feel free to check issues.


  • Work
  • Linux client(Debian, RedHat and Arch base)
  • Terraform to deploy server on AWS
  • Mac client
  • Add other cloud providers


João Freire

  • Twitter: @p0ssuidao
Download Terraguard

If you like the site, please consider joining the telegram channel or supporting us on Patreon using the button below.


Original Source
Available for Amazon Prime