Skip to main content
Disclaimer: EDIS Global does not and will not provide any support for this setup. However, we have tested it and it works reliably if you follow the steps in this guide. For support, follow the maintainer of this auto installer on Github.

Automated WireGuard VPN setup

This article guides you through a simple interactive script that sets up a Wireguard VPN server with AdguardUnbound and DNSCrypt-Proxy on your VPS of choice. The script also lets you manage the config files using a simple WebUI protected by two-factor authentication.

Features:

  • Wireguard WebUI (via wg-easy)
  • Two-factor authentication for the WebUI (Authelia)
  • Hardened web server (Bunkerweb)
  • Encrypted DNS resolution with optional ad-blocking functionality (Adguard Home, DNSCrypt and Unbound)
  • UFW and Fail2Ban
  • Automated and unattended upgrades
  • SSH hardening and public key pair generation (optional, you can also use your own keys)
  • Email notifications (using an external SMTP server, e.g. GMail)

Requirements:

  • A KVM-based VPS with a dedicated IPv4 address.
  • One of the supported Linux distros:
  • Ubuntu Server 22.04
  • Ubuntu Server 20.04
  • Debian 11

Getting started:

Now that you have your new EDIS Global VPS server up and running, let’s connect to it from the terminal of your preference. On Windows, you can use Putty, for example. Then type:
Once connected to your remote VPS, run the script that will automatically install everything for you.
The script will start to update the system, install required packages and when it’s done it will pause at the following screen: How to set up Wireguard VPN After following the on-screen questions like SSH key, DNS, etc., it will ask you to run the playbook, and you answer YES: How to set up Wireguard VPN After everything has been set up it will ask you and guide you to remote login via ssh to the server using your provided or generated ssh key. After a successful login press ENTER to finish the setup.
The script generates SSL certificates and a subdomain for the Web UI. If the provided domain was mydomain.com, your web UI will be https://wg.mydomain.com to manage Wireguard users.
When logging in to the web UI, remember to use the new user and password provided in the setup. If the optional email was not set up, then while logging in to the web UI you need to get a code by typing in your VPS terminal:
This will generate a link for you to be able to set up 2FA and will look like this: How to set up Wireguard VPN It will present you with a QR code you can scan and add to your 2FA application. After a successful login, you will see a web UI where you can add users to your new Wireguard VPN server. How to set up Wireguard VPN How to set up Wireguard VPN Now you are able to add users and share the credentials. Enjoy your new VPS server! Remember to visit the script author for any support!
Last modified on September 7, 2026