How to deploy your Wireguard VPN server with a WEB interface in one command

WireGuard is one of the most popular and easy to use VPN solutions that provide a secure network connection. If you’re looking for a quick and easy way to deploy your own WireGuard WEB-based VPN server, then the Docker container is a great solution. In this article, we will look at how to install and run the WireGuard Docker container with a WEB interface in one command, as well as how to connect to it from various devices.

Sources: https://github.com/denisxab/ext_disk/tree/1.0

Server

Deploying WireGuard WEB UI Server via Docker

Presets

First you need to install Ansible. It is a tool for automating the deployment of applications to remote servers. Run the following command to install Ansible:

sudo apt install ansible

Also to ansible connect to a remote server with a password set:

sudo apt install sshpass

Next, create a file inventory.ymlin which you need to specify data for connecting to the server, for example:

---
all:
    hosts:
        ИмяСервера1:
            ansible_host: IP_Адрес
            ansible_user: Пользователь
            # SSH порт
            ansible_port: 22
            # Для этого устанавливали sshpass
            ansible_ssh_pass: Пароль

Replace ИмяСервера, IP_Адрес, Пользователь And Пароль to the appropriate values ​​for your server.

That’s the only command

Now you can run the command to deploy the WireGuard WEB UI server using the Docker container:

Install_wireguard_server.yml source

ansible-playbook -i ./inventory.yml -l ИмяСервера1 ./script/install_wireguard_server.yml -e PasswordServer=990990

Here ИмяСервера – the name of your server, PasswordServer – password for the WEB version of WireGuard. After successful execution of the command, the WEB version of WireGuard will be available at the following URL: IP_Адрес:51821. Default password 990990

Client

Telephone

To connect to the WireGuard VPN server from your phone, follow these steps:

  1. Install the WireGuard app on your phone.

  2. Scan the QR code as shown in the screenshot below:

  1. Click “Add” and save your VPN settings.

linux

To connect to the WireGuard VPN server on Linux, follow these steps:

Get the configuration file to connect to the VPN server. It looks something like this:

  1. Copy the config file to a folder /etc/wireguard/ with the following command:

    cp ИмяКонфигурации.conf /etc/wireguard/
  2. Connect to the WireGuard VPN server with the following command:

    sudo wg-quick up ИмяКонфигурации
  3. To disconnect from the VPN, run the following command:

    sudo wg-quick down ИмяКонфигурации

Now you have your own WireGuard VPN server with a WEB interface, deployed using a Docker container. You can connect to it from a variety of devices, including phones and Linux computers. WireGuard provides a secure and efficient encrypted connection that protects your privacy and ensures the security of data transmission on the Internet.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *