Connect the AWUS036ACH 5GHz adapter to Ubuntu Server by installing the proprietary RTL8812AU drivers via DKMS, which ensures automatic updates during kernel upgrades. This process requires compiling the driver from source using Git and Make, followed by configuring NetworkManager to recognize the new wireless interface for stable high-speed connectivity.
Verifying Hardware Detection
Before installing any software, it is crucial to confirm that the operating system detects the physical hardware. The Alfa AWUS036ACH uses the Realtek RTL8812AU chipset, which is not included in the mainline Linux kernel due to licensing restrictions. Therefore, you must manually install the driver. Start by opening a terminal and checking if the system sees the device at the USB level. Run the commandlsusb and look for an entry containing "Realtek" or "RTL8812". If the device appears here but does not show up in your network list, the issue is purely driver-related.
Next, verify the current status of wireless interfaces by running ip link. You should see standard interfaces like eth0 or wlan0, but likely no specific interface for the new adapter yet. It is also helpful to check the kernel ring buffer for any errors related to USB enumeration by using dmesg | grep -i usb. This step ensures that the port is providing sufficient power and that the connection is physically secure.
Installing Dependencies and Source Code
To compile the driver, your server needs several build tools and header files. Since this is a server environment, ensure you have internet access via Ethernet or a temporary wired connection. Update your package lists and install the necessary development packages by executing:sudo apt update
sudo apt install git linux-headers-generic build-essential dkms
The dkms (Dynamic Kernel Module Support) package is essential because it allows the driver to be automatically recompiled when you perform a major Ubuntu kernel update. Without DKMS, every kernel upgrade would break your WiFi connectivity until you manually reinstalled the driver. Once the dependencies are installed, clone the repository maintained by Morrownr, which is widely considered the most reliable source for this specific chipset on modern kernels. Use the following commands to download the code:
git clone https://github.com/morrownr/8812au.git
cd 8812au
Compiling and Installing the Driver
Navigate into the cloned directory and run the installation script. This script automates the creation of the DKMS configuration file and compiles the module. Execute the installation with elevated privileges:sudo ./install-driver.sh
This process may take a few minutes as it compiles the C source code into a kernel module. If successful, the script will output a message confirming that the module has been added to DKMS. You can verify the installation by checking the status of the DKMS modules with dkms status. You should see an entry for 8812au showing that it is built and installed for your current kernel version.
After compilation, load the module into the running kernel immediately without rebooting by running sudo modprobe 8812au. Then, check your network interfaces again using ip link. You should now see a new interface, typically named wlx... or similar, representing the AWUS036ACH.
Configuring NetworkManager
With the driver active, Ubuntu’s NetworkManager should automatically detect the new wireless card. However, on minimal server installations, NetworkManager might not be enabled or configured correctly. Ensure NetworkManager is running withsystemctl status NetworkManager. If it is inactive, start it with sudo systemctl start NetworkManager and enable it to start on boot with sudo systemctl enable NetworkManager.
You can now manage the connection using the command line tool nmtui or nmcli. For a graphical text-based menu, use nmtui to select "Activate a connection," find your 5GHz network, and enter the password. Alternatively, using nmcli, you can scan for networks with nmcli dev wifi list and connect with nmcli dev wifi connect "SSID" password "PASSWORD".
If you encounter issues where the interface drops frequently, consider adjusting the power management settings. By default, Linux may put the USB device into low-power mode, causing instability. Disable this by creating a udev rule or modifying the NetworkManager configuration to keep the interface awake. For more advanced networking configurations, such as setting up static IPs or handling IPv6, refer to our guide on Set Up Public IPv6 on Ubuntu Server 22.04 and Raspberry Pi.
Troubleshooting Common Issues
If the interface does not appear after installation, verify that the correct kernel headers were installed. Sometimes,linux-headers-generic points to an older version if updates were pending. Rebooting the server often resolves mismatched header versions. Additionally, ensure that no other conflicting drivers, such as older versions of the RTL88xx driver, are loaded. You can check loaded modules with lsmod | grep rtl and remove them with sudo rmmod if necessary.
For persistent connection issues, check the system logs using journalctl -xe for any error messages related to the 8812au module. If the driver compiles but fails to associate with the router, try connecting to a 2.4GHz band first to test basic functionality, then switch to 5GHz once stability is confirmed. Remember that some older routers may have compatibility quirks with newer driver versions, so updating your router firmware can sometimes resolve handshake failures.
Frequently Asked Questions
Why does my WiFi disconnect after a kernel update?
This happens if you did not install the driver using DKMS. Without DKMS, the compiled module becomes invalid when the kernel changes. Always use the./install-driver.sh method which registers the module with DKMS to prevent this issue.
Can I use this adapter for packet injection?
Yes, the RTL8812AU driver supports monitor mode and packet injection, making it suitable for security auditing. However, you must ensure the driver is properly loaded and that you have the appropriate tools likeaircrack-ng installed. Note that monitor mode may impact throughput performance significantly.
How do I verify the driver is actually loaded?
Run the commandlsmod | grep 8812au in the terminal. If the module is loaded, you will see a list of dependencies associated with it. If nothing returns, the module failed to load, and you should check dmesg for error details.