WireGuard Easy Print

  • 0

Installing WireGuard Easy on Ubuntu Using Ansible 1. Prerequisites Before starting, make sure you have: An Ubuntu 24.04 LTS VPS/server Ansible installed on the control machine SSH access to the Ubuntu server Root access or a user with sudo privileges A public server IP address 1. Create Ansible project mkdir ~/wg-easy-ansible cd ~/wg-easy-ansible 2. Create inventory nano inventory Add: [wireguard] YOUR_SERVER_IP ansible_user=root 3. Test connection ansible -i inventory wireguard -m ping Expected: pong 4. Create playbook nano wireguard-easy.yml Paste: --- - name: Install WireGuard Easy hosts: wireguard become: true tasks: - name: Install Docker apt: name: - docker.io - docker-compose-v2 state: present update_cache: true - name: Start Docker service: name: docker state: started enabled: true - name: Create directory file: path: /opt/wg-easy state: directory mode: "0755" - name: Create Compose file copy: dest: /opt/wg-easy/docker-compose.yml content: | services: wg-easy: image: ghcr.io/wg-easy/wg-easy:15 container_name: wg-easy volumes: - etc_wireguard:/etc/wireguard - /lib/modules:/lib/modules:ro ports: - "51820:51820/udp" - "51821:51821/tcp" restart: unless-stopped cap_add: - NET_ADMIN - SYS_MODULE sysctls: net.ipv4.ip_forward: "1" net.ipv4.conf.all.src_valid_mark: "1" volumes: etc_wireguard: - name: Start WireGuard Easy command: cmd: docker compose up -d chdir: /opt/wg-easy 5. Run the playbook ansible-playbook -i inventory wireguard-easy.yml 6. Check installation ssh root@YOUR_SERVER_IP cd /opt/wg-easy docker compose ps 7. Open WireGuard Easy Open: http://YOUR_SERVER_IP:51821 WireGuard VPN uses: YOUR_SERVER_IP:51820/UDP 8. If UFW is enabled ufw allow 51820/udp ufw allow 51821/tcp That's the complete simplified installation.


Bu cavab sizə kömək etdi?
Back