AmneziaWG 3.1 · Docker · AGPL-3.0

AmneziaWG VPN,
managed in a browser.

AmneziaWG Web UI is a web interface you run in Docker to set up and manage an AmneziaWG VPN server. AmneziaWG is WireGuard with the traffic disguised, so network filters do not recognise it as VPN traffic. The panel creates servers and clients, hands out a .conf file, a QR code or a vpn:// link, and shows traffic live. One image of about 41 MB; no Node, nginx or database.

AmneziaWG 3.1 IPv4 + IPv6 6 UI languages ~41 MB image amd64 + arm64
AmneziaWG Web UI dashboard: traffic, CPU, RAM and storage charts, and the create-server form with IPv4 and IPv6 subnets

What the panel does

Servers, clients, exports and traffic for AmneziaWG, in one browser tab.

One container

One image of about 41 MB. There is no Node, nginx, supervisor or separate database to run next to it.

AmneziaWG 3.1, always on

The obfuscation is on for every server and has no switch: header protection, random trailers, disabled cookies, junk packets and padding are generated for you and copied into each client config.

Several servers per host

Each server has its own port, address range, MTU, DNS and obfuscation settings. Edit them in the panel; they come back after a restart.

One config, three formats

Add, edit, suspend or schedule clients. Each client can be exported as a .conf file, a QR code for mobile apps, or a vpn:// link for the AmneziaVPN app.

Live traffic

Traffic and handshake charts, the last endpoint of every client and the server status, refreshed automatically while the panel is open.

Login in front

A login page sits in front of the panel and the API, with optional audit logging. Scripts can keep using curl -u.

REST API

Everything the UI does is an HTTP endpoint behind the same login, so provisioning and monitoring can be scripted instead of clicked.

IPv4 and IPv6

The panel listens on both stacks, and every server also gets an IPv6 range. A client endpoint and its DNS list accept either family.

Requirements

A Linux host with Docker and Docker Compose 2.24 or newer.

  • Docker Engine and Compose 2.24+. The shipped compose files use features added in that release.
  • /dev/net/tun and NET_ADMIN. amneziawg-go runs in userspace, so there is no kernel module to load and no SYS_MODULE to grant.
  • A public IPv4 address. IPv6 is optional per server; the next section says what a bridge network cannot do.
  • Two host ports. 54845/tcp for the panel and one UDP port per server, 54844/udp by default.
docker --version
docker compose version   # needs v2.24 or newer
ls -l /dev/net/tun

State is a volume. Servers, client configs and web_config.json live in /etc/amnezia. Back that volume up and the panel moves to another host as it is.

Install

A Linux host with Docker and Compose. The panel ends up on port 54845.

The panel generates its admin password on the first start. It writes it once to /etc/amnezia/first-run-password (mode 0600) and stores only its argon2id hash. Read it with docker compose exec app cat /etc/amnezia/first-run-password; the first successful login deletes the file — or set WEB_UI_PASSWORD to a hash of your own.

Optionally: set your own password

Left alone, the panel generates one on the first start and writes it to /etc/amnezia/first-run-password (mode 0600; the first login deletes it). To choose your own, hash it with the image — the password comes from stdin, and the output is an argon2id hash, never the password.

printf '%s' 'your-password' | docker run --rm -i ghcr.io/noelbennettz/amneziawg-ui:latest api hash-password

Save this as docker-compose.yml

Put the hash from step 1 into WEB_UI_PASSWORD, writing every $ of it as $$ (or leave the line out and read the generated password with docker compose exec app cat /etc/amnezia/first-run-password). The addresses, ports and volume are the parameters you are most likely to change — binding the panel to 127.0.0.1 keeps it reachable only from the host, which is what a local TLS proxy needs. Every key is explained in DOCS.md, and the repository ships the same file fully commented as docker-compose.example.yml.

services:
  app:
    image: ghcr.io/noelbennettz/amneziawg-ui:latest
    restart: unless-stopped
    ports:
      # Bind the panel to one address. Recommended: a TLS proxy on this host
      # reaches 127.0.0.1, and the port stays closed to everything else.
      # - "127.0.0.1:54845:54845/tcp"
      - "54845:54845/tcp"   # panel
      - "54844:54844/udp"   # first VPN server
    environment:
      WEB_UI_PORT: "54845"
      WEB_UI_USER: "admin"
      # optional: every $ of the hash written as $$
      # WEB_UI_PASSWORD: "$$argon2id$$v=19$$m=19456,t=2,p=1$$<salt>$$<hash>"
    volumes:
      - data:/etc/amnezia
    cap_add:
      - NET_ADMIN
    devices:
      - /dev/net/tun
    sysctls:
      net.ipv4.ip_forward: "1"
      net.ipv4.conf.all.src_valid_mark: "1"
      net.ipv6.conf.all.disable_ipv6: "0"
      net.ipv6.conf.all.forwarding: "1"
      net.ipv6.conf.default.forwarding: "1"

volumes:
  data:

Start it and log in

Then open http://your-server:54845/ with the user and password from step 1.

docker compose up -d
docker compose ps        # expected: Up ... (healthy)
curl -s localhost:54845/status   # expected: Container Uptime: 0d 0h 0m 3s

If the container restarts instead of staying up, docker compose logs app names the reason: a port already in use, or a host without /dev/net/tun.

After signing in, Create server → Add client produces the .conf, QR code and vpn:// link; a client that imports one shows a handshake time and traffic in the panel within seconds (the page polls every 5 seconds).

The panel serves HTTP. Put a TLS reverse proxy in front of it and set WEB_UI_SECURE_COOKIE=true (or send X-Forwarded-Proto: https).

IPv4 and IPv6

The panel and every tunnel are dual-stack. Whether clients get IPv6 internet depends on the Docker network.

  • Both stacks by default. The panel listens on 0.0.0.0 and [::], and a client config accepts an IPv4 or IPv6 endpoint and DNS resolvers of either family.
  • Each server gets a ULA /64 and NAT6. The firewall script decides per family and only writes forwarding and masquerade rules when that family has a default route and a routable source.
  • By default a bridge network has no IPv6 uplink. Docker gives the container a unique local address at best, so clients get an IPv6 tunnel and no IPv6 egress; nat6.state reads ula-only.
  • Three ways to give clients IPv6. Add a global prefix to the default network; give the service its own IPv6 network — compose can create it, or you create it with docker network create and mark it external; or run with host networking. nat6.state then reads ok.
# Option 1: compose creates the network (named <project>_awg6)
services:
  app:
    networks: [awg6]

networks:
  awg6:
    enable_ipv6: true
    ipam:
      config:
        - subnet: 2001:db8:1::/64

# Option 2: create it first, then reference it as external
#   docker network create --ipv6 --subnet=2001:db8:1::/64 awg6
# networks:
#   awg6:
#     external: true
# or give the default network a global prefix
networks:
  default:
    enable_ipv6: true
    ipam:
      config:
        - subnet: 2001:db8:1::/64
# or host networking
docker compose \
  -f docker-compose.yml \
  -f docker-compose.host.yml up -d

# and on the host, once:
sysctl -w net.ipv4.ip_forward=1 \
         net.ipv6.conf.all.forwarding=1 \
         net.ipv6.conf.default.forwarding=1

Before you expose it

The defaults are conservative; what has to change on a public host is short.

Know where the password is

It is generated on the first start and written once to /etc/amnezia/first-run-password (mode 0600); the first successful login deletes that file, and /etc/amnezia/admin.hash holds an argon2id hash only. Replace it with your own before the port is reachable from the internet — docker compose exec app api reset-password does it in place. Failed sign-ins are limited by default, and WEB_UI_TOTP_SECRET turns on a second factor. The panel signs a 12-hour cookie and ends every session when the password changes.

Least privilege

The container is root inside its own network namespace, which is what creating the tunnel and writing iptables rules needs there. Outside that namespace it holds two grants only: NET_ADMIN and /dev/net/tun. It cannot load kernel modules (SYS_MODULE is not granted), and it sees the host's network only if you switch to host networking yourself.

TLS and an audit trail

Terminate TLS in Caddy, nginx or Traefik and set WEB_UI_SECURE_COOKIE=true. Turn on WEB_UI_AUDIT_LOG for one JSON line per login and change, with a retention window you choose.

Specifications

Versions, ports and where the data lives.

Image
ghcr.io/noelbennettz/amneziawg-ui
Tags
latest, YYYY.MM.DD
Platforms
linux/amd64, linux/arm64
Size
~41 MB compressed image
Backend
Go 1.26, Fiber
Front end
Fyne v2.8, compiled to WebAssembly
Ports
54845/tcp panel, 54844/udp default VPN server
State
/etc/amnezia volume
Host needs
Docker + Compose, /dev/net/tun, NET_ADMIN
Languages
6 — English, Spanish, French, Russian, Simplified Chinese and Traditional Chinese
License
AGPL-3.0
Origins
Started from mycelium-mesh/amneziawg-ui (Apache-2.0), rewritten since

FAQ

The questions that come up while installing and running it.

How is AmneziaWG different from WireGuard?

It is the same cryptography and speed with obfuscation added: junk packets, padding and altered headers keep network filters from recognising the protocol. AmneziaWG 3.0 added header protection; 3.1 adds random trailers and disables the cookie exchange. This panel turns all of that on by default.

Which client apps work?

The official AmneziaVPN 5.0.1.5 or newer on Windows, macOS, Linux, Android and iOS: paste the vpn:// link or scan the QR code. For older AmneziaWG clients, clear RandomTrailers and DisableCookies in the server form.

How do I change the panel password?

Run printf '%s' 'your-password' | docker run --rm -i ghcr.io/noelbennettz/amneziawg-ui:latest api hash-password, put the $argon2id$… result in WEB_UI_PASSWORD with every $ written as $$, and restart — or run docker compose exec app api reset-password to generate one in place. Changing it ends all sessions at once.

Do I need HTTPS?

The container serves HTTP. Put Caddy, nginx or Traefik in front for TLS, publish the port on the host loopback if the proxy is local, and set WEB_UI_SECURE_COOKIE=true or forward X-Forwarded-Proto: https.

Why do clients have IPv6 but no IPv6 internet?

By default a Docker bridge gives the container only a unique local address, so NAT6 can only translate to a ULA. Two fixes: put a global prefix on the compose network — enable_ipv6: true plus an ipam subnet from a prefix your provider routes to the host, with "ipv6": true and "ip6tables": true in the Docker daemon config — or run with docker-compose.host.yml. nat6.state in the API tells you which case you are in.

How do I update or move it?

Update with docker compose pull then docker compose up -d. The package keeps only the newest build, so save the image you run now (docker save) if an upgrade has to wait. To move, copy the /etc/amnezia volume to the new host and start the container there.

Does it run on a small VPS or ARM?

The image is published for amd64 and arm64, and the container itself is about 41 MB. The tunnel is userspace, so there is no kernel module to match against the host.

What does the AGPL mean here?

Self-hosting, forking and selling support are all fine. If you run a modified panel as a network service, its users must be able to get the source of the version you run — that is section 13.