Skip to content
ImportantAmneziaWG 3.1: how to upgrade and how to roll back to 2.0Reinstalling the protocol, default parameters, rolling back to 2.0 — and why issued configurations stop working afterwards.Read the guide →

Set up a VPN on your own server ​

Last updated:

If you don't have a server yet, choose a VPS that fits your needs from Amnezia Hosting. All Amnezia Hosting servers meet AmneziaVPN's setup requirements. You can compare server specifications when choosing a plan.

Use the AmneziaVPN app to set up a VPN on a Linux server you own or rent. You won't need to enter any terminal commands.

Before you start, have your server's IP address, username, and password or SSH private key ready.

Servers from other hosting providers

Check the server requirements before you start. Installation may fail if your server doesn't meet them.

Incompatible hosting providers

The Amnezia setup guide lists servers from Reg.ru and Yandex Cloud as incompatible with VPN installation through AmneziaVPN.

Set up your VPN ​

Update the app

Update AmneziaVPN to the latest version before setting up or making changes to a self-hosted server. Updates improve AmneziaWG, fix bugs, and make connections more stable.

  1. Download and install AmneziaVPN from the official download page (mirror) or the latest stable release on GitHub. If you already have the app, update it.

  2. Open AmneziaVPN. Click ➕, or Let's get started if you haven't added any connections yet.

  3. Select Self-hosted VPN.

  4. Enter your server's login details

    Once you've purchased a server, you'll find its login details in your Amnezia Hosting account. Sign in with the email address and password you used to create your account.

    You'll need:

    • Server IP address [:port]. If the server uses an SSH port other than 22, add the port after a colon, for example 203.0.113.10:2221.
    • SSH Username — for example, root or a user with sudo privileges who can run commands as an administrator.
    • Password or SSH private key.

    Click Continue.

    Adding a server: select Self-hosted VPN and enter your server's login details

  5. Choose an installation type and click Continue:

    • Automatic installs AmneziaWG only. You can add other protocols later.

      Automatic AmneziaWG setup and the new VPN connection

    • Manual lets you choose which protocol to install. Select a protocol and click Install. You can add other protocols later.

      Manual setup: select XRay and install it on the server

When setup is complete, the app creates a VPN connection with full access to your server. The connection is ready to use.

Choose an AmneziaWG port below 9999

By default, AmneziaWG uses a randomly assigned port. Some internet providers block UDP traffic on high ports. After installation, we recommend switching to an unused port below 9999, such as 585 or 1234. Make sure no other service on the server is using that port.

If your VPN isn't working, see the AmneziaWG troubleshooting guide.

Changing and saving the AmneziaWG port in the server settings

To connect another device or give someone access to your VPN, see Share and revoke VPN access.

If you clicked “Skip setup” ​

Clicking Skip setup adds an empty connection without running any commands on the server.

Use this option if the server already has a VPN installed through AmneziaVPN. It lets you add a connection with full access without a backup file or a full-access key.

Skipping setup creates a connection with no VPN protocol installed

VPN is already installed on the server

  1. Click any connection name.
  2. Click ⚙️ next to your server.
  3. Open the Management tab and select Check the server for previously installed Amnezia services.

The app updates the connection to show the VPN protocols and services already installed on the server.

The option to check for installed Amnezia services on the Management tab

You skipped setup by mistake on a fresh server

  1. Click any connection name.
  2. Click ⚙️ next to your server. You'll see a list of protocols you can install.
  3. Click 📥 next to the protocol you want, then click Install.

Installing AmneziaWG after skipping setup

Installing AmneziaWG after skipping setup.

Once installation is complete, you can use the connection to access the VPN and manage the server.

You can install other protocols in the same way:

Adding XRay to a server that already has AmneziaWG installed

Adding XRay as another VPN protocol.

What you can do with the connection ​

With full access, you can connect to the VPN and manage your server in AmneziaVPN: