English | Русский
Installation script and system components to run the official desktop client AmneziaVPN (Qt6 GUI + AmneziaVPN-service daemon) on Void Linux (glibc x86_64, runit init system, without systemd or systemd-resolved).
The official AmneziaVPN client is tightly coupled with systemd and systemd-resolved. To provide seamless and native operation on Void Linux with runit, this project implements:
- Installer Shim: Bypasses installer requirements by providing a dummy
systemctlstub during the execution of the official.runinstaller (Qt Installer Framework). - D-Bus DNS Bridge (
amnezia-dns-bridge):- A Python daemon implementing the
org.freedesktop.resolve1interface on the D-Bus system bus (SetLinkDNS,SetLinkDNSEx,SetLinkDomains,RevertLink,RevertLinkDNS). - Intercepts DNS configuration requests from AmneziaVPN and translates them into
openresolv(resolvconf -a amnezia-vpn -x -m 0) in exclusive mode, preventing DNS leaks. - Passes search domains for seamless domain resolution across private subnets.
- Supports multiple protocol tunnel interfaces: AmneziaWG (
awg*), WireGuard (wg*), OpenVPN (tun*),tap*,amn*,ppp*,vpn*. - Built-in Kernel Watchdog: Periodically monitors network interface states and automatically flushes DNS configuration upon unexpected tunnel drops or disconnects.
- A Python daemon implementing the
- D-Bus Security: Isolated security policy in
/etc/dbus-1/system.d/org.freedesktop.resolve1.confrestricted toroot. - Runit Services: Automated service definitions for
AmneziaVPNandamnezia-dns-bridgeunder/etc/sv/with integrated streaming logs and rotation viasvlogd. - Desktop Integration: Symlinks in
/usr/local/bin, XDG.desktoplauncher registration, and system icon placement.
.
├── install_amnezia_void.sh # Automated installation script
├── uninstall_amnezia_void.sh # Complete uninstallation script
├── assets/
│ └── AmneziaVPN.png # Official application icon
├── src/
│ └── amnezia-dns-bridge.py # D-Bus DNS Bridge (org.freedesktop.resolve1)
├── conf/
│ ├── org.freedesktop.resolve1.conf # D-Bus security policy
│ └── AmneziaVPN.desktop # XDG desktop launcher
└── services/
├── AmneziaVPN/ # Runit service for AmneziaVPN-service (+ svlogd)
│ ├── run
│ └── log/run
└── amnezia-dns-bridge/ # Runit service for DNS bridge (+ svlogd)
├── run
└── log/run
The installation script automatically installs required packages via xbps-install:
- Networking & Utilities:
curl,wireguard-tools,openvpn,openresolv,iptables,iproute2 - DNS Bridge & D-Bus:
dbus,python3,python3-dbus,python3-gobject,procps-ng - GUI Environment & Qt6:
libsecret,libglvnd,libxcb,xcb-util-cursor,xcb-util-wm,xcb-util-keysyms,xcb-util-image,xcb-util-renderutil,libxkbcommon,libxkbcommon-x11 - Kernel:
tunmodule (modprobe tun)
-
Clone the repository:
git clone https://github.com/yar101/amnezia-vpn-setup-for-void-linux.git cd amnezia-vpn-setup-for-void-linux -
Make scripts executable:
chmod +x install_amnezia_void.sh uninstall_amnezia_void.sh
-
Run the installer:
./install_amnezia_void.sh
[!NOTE] If the
AmneziaVPN_*_linux_x64.runinstaller package is not present in the directory, the script will automatically fetch the latest release from GitHub Releases. You can specify a specific version as an argument:./install_amnezia_void.sh 5.0.0.5
Once installation finishes, both AmneziaVPN and amnezia-dns-bridge services are automatically registered and started.
sudo sv status amnezia-dns-bridge AmneziaVPNLaunch AmneziaVPN from your desktop application menu or run from a terminal:
AmneziaVPN- Stop services:
sudo sv down AmneziaVPN amnezia-dns-bridge
- Start services:
sudo sv up AmneziaVPN amnezia-dns-bridge
- Disable autostart:
sudo rm /var/service/AmneziaVPN /var/service/amnezia-dns-bridge
- VPN Service logs:
tail -f /var/log/AmneziaVPN/current
- DNS Bridge logs:
tail -f /var/log/amnezia-dns-bridge/current
- Inspect active openresolv DNS records:
resolvconf -l
- Manually flush VPN DNS (if needed):
sudo resolvconf -f -d amnezia-vpn && sudo resolvconf -u
-
GUI displays: "AmneziaVPN service is not running" / "Service connection failed":
- Check the runit service status:
sudo sv status AmneziaVPN
- Check the logs in
/var/log/AmneziaVPN/current.
- Check the runit service status:
-
DNS names do not resolve after connecting:
- Verify that
amnezia-dns-bridgeservice is active:sudo sv status amnezia-dns-bridge
- Check
/etc/resolv.confand the output ofresolvconf -l. An active tunnel should show anameserverentry associated withamnezia-vpn.
- Verify that
-
Conflicts with NetworkManager / dhcpcd:
openresolvdynamically manages DNS configurations. The DNS configuration created foramnezia-vpnsets the exclusive flag (-x) and highest metric priority (-m 0), preventing queries from leaking via local network adapter resolvers.
To completely remove AmneziaVPN, runit services, the DNS bridge, and desktop entries:
./uninstall_amnezia_void.shFor unattended / automated uninstallation without interactive prompts:
./uninstall_amnezia_void.sh -y