selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

amneziawg-installer logo

Self-host amneziawg-installer

v6.1.1

One-command AmneziaWG VPN server that dodges DPI blocks

ReleaseOpen SourceMIT
Updated14 hours ago
LanguageShell
Setup difficultyEasy
Stars
1 422
CPU
1 vCPU
RAM
512 MB
Storage
2 GB free disk
Port
39743 (Default UDP ListenPort of the AmneziaWG VPN tunnel interface awg0 (changeable with --port))
Install with Linux
amneziawg-installer screenshot 1

What is amneziawg-installer?

amneziawg-installer is a pure-bash provisioning script: point it at a clean VPS running Debian 13 or Ubuntu 24.04/26.04 and it delivers a working AmneziaWG VPN box in roughly twenty minutes, with two reboots along the way. AmneziaWG, the obfuscated fork of WireGuard, hides the handshake from deep packet inspection, so tunnels keep working on networks that block standard WireGuard. Fresh setups land on the 3.1 profile (encrypted headers plus extra padding), while --protocol=2.0 covers routers and older apps, and ARM machines or kernels older than 6.7 fall back to 2.0 automatically. The script builds the module through DKMS from the Amnezia PPA rather than using containers, strips packages a VPN box does not need, applies sysctl and BBR tuning sized to the machine's memory, and turns on UFW with deny-all, SSH rate limiting and Fail2Ban. Client configs, QR codes and vpn:// links end up in /root/awg, and the bundled manage script handles add, remove, list, regen, modify, per-client traffic stats, expiring guest profiles, backups, diagnostics and machine-readable JSON replies for bots. There is deliberately no web UI, and the installer wants root on a dedicated virtual machine, not shared hosting or an OpenVZ/LXC/Docker container. It is MIT licensed by bivlked, signed with minisign since v5.29.0, and covered by automated tests.

Should you self-host amneziawg-installer?

amneziawg-installer scores 58/100 on selfhost.directory (how scoring works) and ranks #23 of 56 in VPN. It has 1 422 GitHub stars.

It shipped 25 stable releases in the past year. The latest, v6.1.1, came out on 22 October 2026. New versions land roughly every 3 days.

Setup is easy: most people get it running in one sitting. It is MIT-licensed and written mostly in Shell.

Its closest alternative on selfhost.directory is Tailscale (84/100, 38 231 stars). It scores higher overall, so compare the two before you pick. See amneziawg-installer vs Tailscale side by side.

Features

  • AmneziaWG 3.1 and 2.0 profiles3.1 is only offered on x86_64 with kernel 6.7+; ARM and stock Debian 12 fall back to 2.0.
  • ARM and Raspberry Pi supportARM installs get the AmneziaWG 2.0 profile.
  • Backup and Restore
  • Client management CLI
  • DPI-resistant traffic obfuscation
  • JSON output for automation
  • Kernel-module install without Docker
  • Per-client traffic statistics
  • QR code and vpn:// config import
  • Resume after reboot and DKMS rebuild
  • Routing modes and split tunneling
  • Server hardening by default
  • Time-limited guest clients

amneziawg-installer README

How to install amneziawg-installer

Install amneziawg-installer with Linux

Environment variables
AWG_BRANCH, AWG_FORCE_REINSTALL
wget -O install_amneziawg.sh https://github.com/bivlked/amneziawg-installer/releases/latest/download/install_amneziawg.sh
chmod +x install_amneziawg.sh
sudo bash ./install_amneziawg.sh

Answer y at each reboot prompt, then rerun the same command after the machine comes back; two reboots total. Non-interactive: sudo bash ./install_amneziawg.sh --yes --route-all. An English-locale build (install_amneziawg_en.sh) is published in the same release.

How to configure amneziawg-installer

  • --allowed-ipsPer-client AllowedIPs list (comma-separated CIDRs) instead of the global routing mode, used with add.

    Per-client AllowedIPs list (comma-separated CIDRs) instead of the global routing mode, used with add.

  • --allow-ipv6Keep IPv6 enabled on the host instead of turning it off.

    Keep IPv6 enabled on the host instead of turning it off.

  • --allow-ipv6-tunnelGive clients dual-stack IPv6 inside the tunnel using ULA (opt-in).

    Give clients dual-stack IPv6 inside the tunnel using ULA (opt-in).

  • --apply-modesyncconfHow config changes are applied to the live interface.

    How config changes are applied to the live interface.

    values: syncconf|restart

  • AWG_APPLY_MODEПолный перезапуск вместо syncconf (можно сохранить в `awgsetup_cfg.init`)

    Полный перезапуск вместо syncconf (можно сохранить в `awgsetup_cfg.init`)

  • AWG_BRANCHFetch the companion scripts from another branch instead of the installer's own release tag (development use).

    Fetch the companion scripts from another branch instead of the installer's own release tag (development use).

  • AWG_FORCE_REINSTALLEnvironment equivalent of the --force reinstall flag.

    Environment equivalent of the --force reinstall flag.

    values: 1

  • AWG_PORT39743VPN UDP port stored in the generated /root/awg/awgsetup_cfg.init install config.

    VPN UDP port stored in the generated /root/awg/awgsetup_cfg.init install config.

  • AWG_SKIP_APPLYПропустить apply_config. Для автоматизации: накопить N операций, применить одной командой

    Пропустить apply_config. Для автоматизации: накопить N операций, применить одной командой

  • AWG_STRICT_CONFIRMНеинтерактивный запуск деструктивной команды без `--yes`/`AWG_YES=1` отказывает (rc 1) вместо тихого согласия. Для cron/CI/ботов (v5.21.0)

    Неинтерактивный запуск деструктивной команды без `--yes`/`AWG_YES=1` отказывает (rc 1) вместо тихого согласия. Для cron/CI/ботов (v5.21.0)

  • AWG_TUNNEL_SUBNET10.9.9.1/24Tunnel subnet recorded in the generated install config file.

    Tunnel subnet recorded in the generated install config file.

  • AWG_YESНе спрашивать подтверждение (эквивалент флага `--yes`)

    Не спрашивать подтверждение (эквивалент флага `--yes`)

  • --carrierWith diagnose, compare obfuscation parameters against a known mobile-carrier profile.

    With diagnose, compare obfuscation parameters against a known mobile-carrier profile.

    values: beeline_msk, yota_msk, tele2_msk, tele2_krasnoyarsk, tattelecom, megafon_regions, tmobile_us

  • --client-ipv6-directWith --route-amnezia, send device IPv6 traffic directly instead of through the VPN.

    With --route-amnezia, send device IPv6 traffic directly instead of through the VPN.

  • --conf-dir/root/awgDirectory holding the AWG client files.

    Directory holding the AWG client files.

  • --diagnosticProduce a diagnostic report for the server.

    Produce a diagnostic report for the server.

  • --disallow-ipv6Force IPv6 off on the host.

    Force IPv6 off on the host.

  • --endpointExternal server address (FQDN, IPv4 or [IPv6]) written into client configs, for hosts behind NAT.

    External server address (FQDN, IPv4 or [IPv6]) written into client configs, for hosts behind NAT.

  • --expiresLifetime for a client added with add; expiry is removed automatically by cron.

    Lifetime for a client added with add; expiry is removed automatically by cron.

    values: 1h, 12h, 1d, 7d, 30d, 4w

  • --forceReinstall over an already working AmneziaWG setup.

    Reinstall over an already working AmneziaWG setup.

  • --isolationonWhether VPN clients can reach each other through the tunnel.

    Whether VPN clients can reach each other through the tunnel.

    values: on|off

  • --jcNumber of junk packets, overriding the preset; 0 disables them.

    Number of junk packets, overriding the preset; 0 disables them.

    values: 0-122

  • --jmaxMaximum junk packet size in bytes, overriding the preset.

    Maximum junk packet size in bytes, overriding the preset.

    values: 0-1280

  • --jminMinimum junk packet size in bytes, overriding the preset.

    Minimum junk packet size in bytes, overriding the preset.

    values: 0-1280

  • --jsonMachine-readable JSON output on most management commands.

    Machine-readable JSON output on most management commands.

  • --keep-packagesDo not remove system packages such as snapd, but keep firewall, Fail2Ban and optimization.

    Do not remove system packages such as snapd, but keep firewall, Fail2Ban and optimization.

  • --mobileCellular preset in one flag: mobile obfuscation profile plus 443/udp unless a port is given.

    Cellular preset in one flag: mobile obfuscation profile plus 443/udp unless a port is given.

  • --no-cpsDisable the I1 concealment packet for clients that cannot handle it (for example macOS).

    Disable the I1 concealment packet for clients that cannot handle it (for example macOS).

  • --no-prebuiltOn ARM, skip the prebuilt kernel module package and build through DKMS instead.

    On ARM, skip the prebuilt kernel module package and build through DKMS instead.

  • --no-tweaksSkip package cleanup, performance tuning and hardening (UFW, Fail2Ban); forwarding is still applied.

    Skip package cleanup, performance tuning and hardening (UFW, Fail2Ban); forwarding is still applied.

  • --port39743UDP port the VPN listens on for client connections, 1-65535.

    UDP port the VPN listens on for client connections, 1-65535.

    values: 1-65535

  • --presetdefaultObfuscation parameter set (Jc/Jmin/Jmax and padding).

    Obfuscation parameter set (Jc/Jmin/Jmax and padding).

    values: default, mobile

  • --protocol3.1Protocol generation for a new install; without it the installer falls back to 2.0 on ARM or kernels below 6.7.

    Protocol generation for a new install; without it the installer falls back to 2.0 on ARM or kernels below 6.7.

    values: 2.0|3.1

  • --pskGenerate a PresharedKey for a newly added client.

    Generate a PresharedKey for a newly added client.

  • --repair-moduleFix the kernel module on an already installed server.

    Fix the kernel module on an already installed server.

  • --reset-routesWith regen, reset clients' AllowedIPs to the server's global routing mode.

    With regen, reset clients' AllowedIPs to the server's global routing mode.

  • --route-alldefault modeRouting mode: send all client traffic (0.0.0.0/0) through the tunnel.

    Routing mode: send all client traffic (0.0.0.0/0) through the tunnel.

  • --route-amneziaRouting mode: Amnezia list plus DNS, leaving private networks outside the tunnel.

    Routing mode: Amnezia list plus DNS, leaving private networks outside the tunnel.

  • --route-customRouting mode: tunnel only the listed networks.

    Routing mode: tunnel only the listed networks.

  • --server-confPath to the server config file used by the manage script.

    Path to the server config file used by the manage script.

  • --server-nameAWG ServerName shown in the Amnezia app when a vpn:// link is imported.

    Name shown in the Amnezia app when a vpn:// link is imported.

  • --ssh-portPort used for the UFW SSH allow rule; normally auto-detected, comma-separated for several.

    Port used for the UFW SSH allow rule; normally auto-detected, comma-separated for several.

  • --subnet10.9.9.1/24Tunnel subnet in CIDR notation between /16 and /30.

    Tunnel subnet in CIDR notation between /16 and /30.

    values: /16-/30

  • --uninstallRemove what the installer added: module, configs, sysctl files, cron jobs and firewall rules.

    Remove what the installer added: module, configs, sysctl files, cron jobs and firewall rules.

  • --yesNon-interactive run; every confirmation is answered automatically.

    Non-interactive run; every confirmation is answered automatically.

amneziawg-installer releases & version history

FAQ

AmneziaWG won't connect, though plain WireGuard works?

That is nearly always a parameter mismatch rather than a network problem: S1-S4 and H1-H4 must agree on both ends, and a 3.1 server requires the identical HeaderProtectionKey on every client. Jc/Jmin/Jmax, the concealment packets and ContentPaddingAddition do not have to match.

Can I drive it from a script or a bot?

Yes. Most management commands accept --json and always print one parseable JSON object, there is --yes for unattended runs, and AWG_STRICT_CONFIRM=1 makes destructive commands refuse without it. A third-party Telegram bot already uses this interface.

How do I update to a new release?

Download the newer release script on the same server and run it with --force; keys, clients, obfuscation parameters and the protocol generation are preserved. After a kernel upgrade DKMS rebuilds the module automatically.

Does it run on ARM and Raspberry Pi?

Yes, with prebuilt kernel modules for Raspberry Pi and ARM64 cloud servers, falling back to a DKMS build where no package matches. ARM installations use the AmneziaWG 2.0 profile for now.

Which AmneziaWG version does the installer set up, 3.1 or 2.0?

3.1 on x86_64 with kernel 6.7 or newer; on older kernels and on ARM the installer selects 2.0 by itself and explains why in its report. Clients that lack 3.1 support need a server installed with --protocol=2.0.

Does it bypass DPI and censorship?

AmneziaWG layers obfuscation on WireGuard to withstand DPI such as the systems used in Russia, Iran and China. A new install also gets encrypted packet headers. The docs state plainly that no method is guaranteed against every operator.

Which VPS should I pick?

A dedicated, clean Ubuntu or Debian VPS with 1 vCPU and at least 512 MB RAM, ideally with a working emergency console. If SSH listens on a non-standard port, pass it with --ssh-port during installation.

Do I need Linux experience?

No. You paste one command into an SSH session on a fresh VPS; the script handles the kernel module, firewall, forwarding and initial client profiles, whose files and QR codes are stored in /root/awg.

Is it free?

Yes, the installer itself costs nothing and is MIT licensed; the only expense is the VPS, which the docs put at about 3 to 5 dollars a month.

How do I install AmneziaWG 3.1 on my own server?

Download the release script on a clean x86_64 Ubuntu or Debian server and run it with sudo bash as root. The 3.1 profile is installed by default as a kernel module, and you rerun the same command after each of the two reboots.

What is AmneziaWG?

It is a WireGuard fork by the Amnezia team that removes the fixed packet signature plain WireGuard has, using junk packets, padding, randomized identifiers and an optional concealment packet, which makes the tunnel harder for DPI to fingerprint.

More in Network Security

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…