Updated in November 2026 for installer v6.3.1.
AmneziaWG 3.1 runs on Oracle Cloud's Always Free ARM instances (Ampere A1), so you can have your own DPI-resistant VPN server for $0 a month. I maintain amneziawg-installer, and since v6.2.0 it sets up the 3.1 generation on ARM64 too. This is a rewrite of my guide from April.
Why not plain WireGuard? In Russia, Iran and a few other places DPI recognizes the WireGuard handshake and drops it. AmneziaWG is a WireGuard fork that disguises those packets. It sends a few junk packets first, pads the handshake to random sizes and adds a packet that looks like ordinary traffic (my installer makes it look like a DNS reply). In 3.1 the packet headers are also encrypted with a per-server key, HeaderProtectionKey, so the type field that gives WireGuard away is hidden.
The installer does the server side: kernel module, firewall, sysctl, client configs. On Oracle it comes down to running one command three times.
What you need
- An Oracle Cloud account on the Always Free tier. Oracle asks for a card to verify you, but Always Free resources are not charged.
- An SSH key. If you have none, run
ssh-keygen -t ed25519. - A client app that supports AmneziaWG 3.1: AmneziaWG for Android or iOS 3.1.4+, AmneziaWG for Windows 3.1.0+, Amnezia VPN 5.0.1.5+, or WG Tunnel 5.6.0+ on Android. Routers and other clients are in the client table. The stock WireGuard app cannot import these configs.
What Oracle gives for free now
Oracle has cut the Always Free allowance for Ampere A1. It is now 1,500 OCPU hours and 9,000 GB hours a month, which Oracle itself counts as 2 OCPUs and 12 GB of RAM around the clock. Older guides, my own included, said 4 and 24. A personal VPN uses a small part of that, since the tunnel runs inside the kernel.
Outbound traffic is free up to 10 TB a month, and both AmneziaWG and the installer are open source (the installer is MIT). Inside the allowance the whole setup costs nothing.
Create the instance
In the OCI console: Compute → Instances → Create instance.
- Image: Canonical Ubuntu 24.04. The installer is tested on it the most. Ubuntu 26.04 and Debian 13 work too. Skip Debian 12. Its kernel is 6.1, and on kernels older than 6.7 the installer falls back to AmneziaWG 2.0.
- Shape:
VM.Standard.A1.Flexwith 2 OCPUs and 12 GB, the whole free allowance. A smaller shape is fine as well. - Networking: a VCN with a public IPv4 address.
- SSH keys: paste your
~/.ssh/id_ed25519.pub.
Ampere capacity in the free regions is hit and miss. If you get "Out of capacity", try another availability domain or come back later.
Open the VPN port
The default security list of a new VCN lets in SSH and not much else. Since v6.3.0 the installer picks a random UDP port unless you give it one, so the easiest way on Oracle is to choose the port yourself, say UDP 41234, and pass it with --port=41234. Go to Networking → Virtual Cloud Networks → your VCN → Security Lists → Default Security List → Add Ingress Rules and add:
- Source CIDR:
0.0.0.0/0 - IP Protocol: UDP
- Destination Port Range:
41234, or whatever port you pass with--port
If your mobile carrier drops unfamiliar UDP ports, install with --mobile: the server then uses 443/udp with a mobile preset, so open 443/udp instead.
Install
ssh ubuntu@<your-public-ip>
wget -O install_amneziawg_en.sh https://github.com/bivlked/amneziawg-installer/releases/latest/download/install_amneziawg_en.sh
chmod +x install_amneziawg_en.sh
sudo bash ./install_amneziawg_en.sh --yes --port=41234
The script comes from the latest release rather than the main branch, so you get a version that went through the release checks. If you leave out --port, the final report names the port the installer picked, and that is the one to open in the security list. --yes accepts the defaults: full tunnel, UFW on, and the packages the installer considers unneeded on a VPN-only box removed, snapd and unattended-upgrades among them. Without unattended-upgrades nobody installs security updates for you, so run sudo apt upgrade from time to time, or add --keep-packages to keep those packages. Leave out --yes if you would rather answer the questions yourself.
What follows:
- First run: system update and preparation. With
--yesthe server reboots by itself and SSH drops. Wait a minute, log back in and run the same command. - Second run: the kernel module. On ARM64 it is built with DKMS from the Amnezia PPA for whatever kernel the instance runs, and it rebuilds itself after kernel updates. Oracle instances use Oracle's own kernel, 7.0 on Ubuntu 24.04 at the moment; I checked that the module builds for it. Then another automatic reboot.
- Third run: firewall, configs, the service. The VPN works right away, no extra reboot needed.
It takes about 10 to 15 minutes, most of it the first system update. Progress is saved on disk, so an interrupted run continues where it stopped. If apt fails to download a package on a flaky network, the installer stops instead of retrying (since v6.2.1, because of the apt vulnerability CVE-2026-109518); just run it again.
Oracle's own firewall rules
Oracle's Ubuntu images ship their own iptables rules in /etc/iptables/rules.v4, loaded at boot by netfilter-persistent. They end with a REJECT in INPUT and FORWARD, so the VPN port would stay closed even after you open it in the security list. Installing UFW removes netfilter-persistent, but the rules already loaded stay in memory above UFW's rules until the next boot. Earlier versions of this guide had you reboot once more by hand because of that.
Since v6.2.2 the installer handles it: after setting up UFW it removes exactly that REJECT if it sits above UFW and is listed in rules.v4, and notes it in the log. A REJECT that is not in that file may be your own, so the installer leaves it, warns you and prints the iptables -D command to delete it.
I checked this on an Ubuntu 24.04 ARM64 server with a real rules.v4 and Oracle's rules reproduced, not on a real Oracle instance.
Check the result
The installer finishes with a report. Find the line "Protocol generation", it should say 3.1. If it says 2.0, the report gives the reason, an old kernel for example. Later on, sudo bash /root/awg/manage_amneziawg.sh check shows the same plus the server's health.
Then check the address your clients will connect to:
sudo grep Endpoint /root/awg/my_phone.conf
The instance sits behind Oracle's NAT, and its network interface has a private 10.x address. The installer asks an outside service for the public one, so normally you see your Oracle public IP here and do not need --endpoint. If you see a 10.x address, run the installer again with --endpoint=<your-public-ip>.
Connect your phone
The install creates two clients, my_phone and my_laptop. To add another one:
sudo bash /root/awg/manage_amneziawg.sh add tablet
Each client gets four files in /root/awg/:
-
my_phone.conf: the config for AmneziaWG desktop apps, Linuxawg-quickand routers; -
my_phone.png: a QR code of that config, for the AmneziaWG mobile apps; -
my_phone.vpnuriandmy_phone.vpnuri.png: avpn://link and its QR code, for the Amnezia VPN app.
The two QR codes are different, and Amnezia VPN only takes the vpnuri one.
The quickest way onto a phone is to print the QR code right in the terminal and scan it:
sudo bash /root/awg/manage_amneziawg.sh qr my_phone
Add --vpn at the end to get the one for Amnezia VPN.
If you want the files on your computer instead: /root/awg is readable by root only, and on Oracle you log in as ubuntu. So first copy them to your home directory on the server:
sudo install -m 600 -o ubuntu -g ubuntu /root/awg/my_phone.conf /root/awg/my_phone.png ~/
Then, on your computer:
scp ubuntu@<your-public-ip>:my_phone.conf ubuntu@<your-public-ip>:my_phone.png .
Afterwards delete the copies on the server with rm ~/my_phone.*, since the config holds the client's private key.
Once the phone is connected, sudo awg show awg0 on the server should show a latest handshake from the last minute or two, and a "what is my IP" site on the phone should show the Oracle address.
No handshake?
Before changing settings, look at what reaches the server. Run these on the server while the phone tries to connect (put in your own port, or 443 with --mobile):
sudo tcpdump -ni any udp port 41234
sudo awg show awg0
- tcpdump shows nothing from the phone: the port is closed in the security list, or the traffic is blocked on the way to Oracle.
- Packets arrive, but the peer's
endpointinawg showdoes not change: runsudo iptables -S INPUTand look for a-j REJECTline above theufw-lines. If there is one, it is dropping them (tcpdump sees packets before the firewall does). The installer removes Oracle's own rule by itself and warns about any other such rule, on screen and in/root/awg/install_amneziawg.log. Otherwise the client does not support 3.1, or its config does not match the server. - Packets arrive, the peer's
endpointswitches to the phone's address and its received bytes grow, butlatest handshakestays empty: the network filters the burst of packets sent before the handshake. When I measured this in September on one Russian mobile carrier, the shape of theI1packet decided it, not the number of junk packets: loweringJcdid not help, a DNS-shapedI1did. New installs already get a DNS-shapedI1. Other carriers behave differently, and some needI1removed entirely.
The full walk-through is in ADVANCED: no connection, and the cellular case in handshake fails on mobile data.
Worth knowing before you rely on it
- Oracle reclaims idle Always Free instances. Idle means that over 7 days the 95th percentile of CPU use stayed under 20 %, and network and memory use were under 20 % too. A personal VPN often fits that, and a cron job that loads the CPU twice a week does not move a 95th percentile. Oracle's own advice is to upgrade the account to Pay As You Go. Reclaiming applies only to Always Free accounts, and Always Free resources stay free after the upgrade. A stopped instance can be started again if the shape is available in your region.
- Host IPv6 is off by default.
--allow-ipv6keeps it on, and--allow-ipv6-tunnelalso gives clients IPv6 inside the tunnel. - An ARM64 server set up before v6.2.0 stays on 2.0. A newer installer does not change the generation of a running server; moving to 3.1 means a reinstall and new configs on every device, see the update flow.
- No VPN is guaranteed to get through. AmneziaWG makes the tunnel much harder to recognize, but networks also block by address and by packet shape, and results differ from one network to another. Known cases and workarounds are collected in ADVANCED.
What I have tested
On 3 and 4 November I ran ARM64 with 3.1 on an Ampere server at another provider: clean installs of Ubuntu 24.04, Debian 13 and Ubuntu 26.04, traffic through the tunnel, and a kernel update with the module rebuilt automatically. On 9 November I checked v6.2.2 with a clean install on Ubuntu 24.04 ARM64 with Oracle's firewall rules reproduced. I have not run this release on an actual Oracle instance. If Oracle behaves differently for you, tell me in the comments or in the repo.
Not on Oracle?
The same installer works on any full VM or bare-metal server with Ubuntu 24.04 / 26.04 or Debian 13, x86_64 or ARM64 (AWS Graviton, Hetzner CAX and others). It does not work in containers such as OpenVZ or LXC, because they cannot load a kernel module. On a Raspberry Pi with a 64-bit OS the 3.1 module builds against the Raspberry Pi OS kernels, but I have not run it on a Pi yet.
- General install guide: INSTALL_VPS.md
- ARM details: Raspberry Pi and ARM64 support
- Releases: github.com/bivlked/amneziawg-installer/releases
- The AmneziaWG protocol: docs.amnezia.org
If you hit a problem with a particular carrier, open an issue or a discussion in the repo and mention the carrier and the region. A good part of the mobile fixes in the installer started from reports like that.
Top comments (0)