Skip to main content
To connect to a WireGuard VPN from your local machine to a remote server using the AmneziaWG configuration file you previously received from the configured server, follow these steps. This guide assumes you are using Ubuntu 22.04. You’ll need to install the WireGuard software, configure it, and initiate the VPN connection. Here’s how to do it:

1. Change sources.list on the client’s operation system:

Open a terminal and back up your sources.list:
Edit the File:
Uncomment deb-src Lines: Remove the # from the beginning of any deb-src lines you want to activate.
Save and Exit.

2. Upgrade the System

3. Install AmneziaWG on Ubuntu 22.04

Check the availability of all necessary drivers in the system:
If the command doesn’t show any outputs execute this command:

4. Copy AmneziaWG client config to Linux (Ubuntu)

Include the command:
Where:
  • username - the username of the server
  • server-ip-address - the IP address of the server
  • /root/awg/ - directory where located an amneziawg client config files
  • wg-client1.conf - amneziawg config file
  • /etc/amnezia/amneziawg/ - the local directory on your Linux machine

5. Get your Amnezia WireGuard configuration

The Amnezia wireguard configuration file must be downloaded from VPS. The .conf file, is usually in the following format:
Save this file with a .conf extension, e.g., wg0.conf.

6. Move configuration to AmneziaWG directory

Move your configuration file to AmneziaWG’s directory, where wg-client1.conf this is a client config that was previously downloaded from the server:
Ensure the file permissions are restricted to prevent unauthorized access:

7. Start the WireGuard VPN connection

To start the VPN connection using the configuration file, run the following command:
If everything is configured properly, you’ll be connected to the WireGuard VPN.

8. Verify the Connection

To check if the connection is active, use:
This command shows details about the active WireGuard connection, such as the interface name, peer details, and data transfer statistics.

9. Disconnect from the VPN

To stop the VPN connection, use:

10. Optionally enable WireGuard on boot

If you want the VPN to start automatically on boot, you can enable it with:
To disable it from starting on boot, use:

Troubleshooting Tips:

  • Ensure that your private key, public key, and endpoint details in the configuration are correct.
  • If you face any connection issues, check the system logs for more detailed error messages:
Following these steps, you should be able to connect to AmneziaWG on Ubuntu. Links:
Last modified on June 8, 2026