algo is a free, open source networking & connectivity project written in Python and released under AGPL-3.0. It has 30,388 GitHub stars, 2,366 forks and 77 open issues, and was last pushed 10 days ago. On this registry it ranks #6 of 14 tracked projects in Networking & Connectivity, with 5 head-to-head comparisons available.

What is algo?

Algo VPN is a set of Ansible scripts from Trail of Bits, written in Python and released under AGPL-3.0, that turns a fresh cloud virtual machine into a personal WireGuard and IPsec VPN server, and it is aimed at individuals and small teams who want to run their own VPN instead of trusting a hosted provider.

What it is

Algo lives in the Infrastructure & Operations / Networking & Connectivity category. It is a collection of Ansible playbooks and helper scripts that provision a new virtual machine at a cloud host and then configure that machine as a hardened VPN server running WireGuard and IPsec with strongSwan. The server base is Ubuntu 22.04 LTS with automatic security updates applied. The project supports only IKEv2 with AES-GCM, SHA2, and P-256 cryptography, and it explicitly rejects legacy cipher suites and protocols such as L2TP, IKEv1, and RSA. It is not a client application and not a hosted service; it is the automation that stands a server up and keeps its user list manageable.

The concrete problem it solves is the manual work of building a private VPN by hand. Choosing ciphers, generating keys, writing server configuration, creating per-device credentials, and distributing client profiles are all error-prone steps that a single operator usually gets wrong once and then maintains badly. Algo replaces that work with one script run from a local machine, which provisions the virtual machine at the chosen provider and writes the matching client configuration. It generates WireGuard .conf files and QR codes for iOS, macOS, Android, and Windows clients, and it generates Apple profiles so that iOS and macOS devices auto-configure for IPsec without any client software installed.

Key capabilities

  • Supports WireGuard on iOS, macOS, Linux, Android, and Windows 11, and IKEv2 with AES-GCM, SHA2, and P-256 on iOS, macOS, and Linux.
  • Generates .conf files and QR codes for WireGuard clients, and Apple profiles for automatic IPsec configuration with no client software required.
  • Includes helper scripts to add, remove, and manage users, with a unique user recommended for each device.
  • Offers an optional local DNS resolver that blocks ads.
  • Offers optional limited SSH users for tunneling traffic.
  • Applies privacy-focused defaults: minimal logging, automatic log rotation, and configurable privacy enhancements.
  • Deploys to DigitalOcean, Amazon Lightsail, Amazon EC2, Vultr, Microsoft Azure, Google Compute Engine, Scaleway, OpenStack, CloudStack, Hetzner Cloud, Linode, or a user's own Ubuntu server.

Who uses it and how

  • A single operator with a cloud account runs the script locally or from Google Cloud Shell and lets it create a new virtual machine at a supported provider.
  • Advanced users with existing infrastructure point Algo at their own Ubuntu server instead of a cloud provider.
  • A household or small team shares one server by listing several named users in config.cfg, one per device that will connect.
  • Remote workers who want their own tunnel and their own keys use it to avoid depending on a third party's logging and retention policies.
  • It is not positioned for users who need anonymity, censorship avoidance, or protection from state-level adversaries; the project states outright that it claims none of these.

Getting started

Clone the repository with git clone https://github.com/trailofbits/algo.git or download the ZIP archive, edit config.cfg to list the users to create, then run ./algo on macOS or Linux, or .\algo.ps1 on Windows. The first run installs the required Python environment (Python 3.11 or newer) automatically.

How it compares

The facts name no directly comparable project in this registry, so Algo stands alone here. OpenVPN and Tor appear only in the anti-features list, as servers Algo deliberately does not install, alongside its refusal to depend on the security of TLS.

When to use it — and when not to

A self-hoster must operate a cloud account and pay that provider, run the script from a local machine, and maintain the resulting server; the project notes that changing configuration decisions later may require deploying an entirely new server. Anyone who needs legacy protocol support such as L2TP, IKEv1, or RSA should not pick it, and neither should anyone expecting anonymity or censorship circumvention. The repository carries 77 open issues and an AGPL-3.0 licence, which matters if the tooling is to be embedded in a closed product.

project readme (upstream, from github) — read inline

Algo VPN

Twitter

Algo VPN is a set of Ansible scripts that simplify the setup of a personal WireGuard and IPsec VPN. It uses the most secure defaults available and works with common cloud providers.

See our release announcement for more information.

Features

  • Supports only IKEv2 with strong crypto (AES-GCM, SHA2, and P-256) for iOS, MacOS, and Linux
  • Supports WireGuard for all of the above, in addition to Android and Windows 11
  • Generates .conf files and QR codes for iOS, macOS, Android, and Windows WireGuard clients
  • Generates Apple profiles to auto-configure iOS and macOS devices for IPsec - no client software required
  • Includes helper scripts to add, remove, and manage users
  • Blocks ads with a local DNS resolver (optional)
  • Sets up limited SSH users for tunneling traffic (optional)
  • Privacy-focused with minimal logging, automatic log rotation, and configurable privacy enhancements
  • Based on Ubuntu 22.04 LTS with automatic security updates
  • Installs to DigitalOcean, Amazon Lightsail, Amazon EC2, Vultr, Microsoft Azure, Google Compute Engine, Scaleway, OpenStack, CloudStack, Hetzner Cloud, Linode, or your own Ubuntu server (for advanced users)

Anti-features

  • Does not support legacy cipher suites or protocols like L2TP, IKEv1, or RSA
  • Does not install Tor, OpenVPN, or other risky servers
  • Does not depend on the security of TLS
  • Does not claim to provide anonymity or censorship avoidance
  • Does not claim to protect you from the FSB, MSS, DGSE, or FSM

Deploy the Algo Server

The easiest way to get an Algo server running is to run it on your local system or from Google Cloud Shell and let it set up a new virtual machine in the cloud for you.

  1. Setup an account on a cloud hosting provider. Algo supports DigitalOcean (most user friendly), Amazon Lightsail, Amazon EC2, Vultr, Microsoft Azure, Google Compute Engine, Scaleway, DreamCompute, Linode, other OpenStack-based cloud hosting, CloudStack-based cloud hosting, or Hetzner Cloud.

  2. Get a copy of Algo. The Algo scripts will be run from your local system. There are two ways to get a copy:

    • Download the ZIP file. Unzip the file to create a directory named algo-master containing the Algo scripts.

    • Use git clone to create a directory named algo containing the Algo scripts:

      git clone https://github.com/trailofbits/algo.git
      
  3. Set your configuration options. Open config.cfg in your favorite text editor. Specify the users you want to create in the users list. Create a unique user for each device you plan to connect to your VPN. You should also review the other options before deployment, as changing your mind about them later may require you to deploy a brand new server.

  4. Start the deployment. Return to your terminal. In the Algo directory, run the appropriate script for your platform:

    macOS/Linux:

    ./algo
    

    Windows:

    .\algo.ps1
    

    The first time you run the script, it will automatically install the required Python environment (Python 3.11+). On subsequent runs, it starts immediately and works on all platforms (macOS, Linux, Windows via WSL). The Windows PowerShell script automatically uses WSL when needed, since Ansible requires a Unix-like environment. There are several optional features available, none of which are required for a fully functional VPN server. These optional features are described in the deployment documentation.

That's it! You can now set up clients to connect to your VPN. Proceed to Configure the VPN Clients below.

    "#                          Congratulations!                            #"
    "#                     Your Algo server is running.                     #"
    "#    Config files and certificates are in the ./configs/ directory.    #"
    "#              Go to https://whoer.net/ after connecting               #"
    "#        and ensure that all your traffic passes through the VPN.      #"
    "#                     Local DNS resolver 172.16.0.1                    #"
    "#        The p12 and SSH keys password for new users is XXXXXXXX       #"
    "#        The CA key password is XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX       #"
    "#      Shell access: ssh -F configs/<server_ip>/ssh_config <hostname>  #"

Configure the VPN Clients

Certificates and configuration files that users will need are placed in the configs directory. Make sure to secure these files since many contain private keys. All files are saved under a subdirectory named with the IP address of your new Algo VPN server.

Important for IPsec users: If you want to add or delete users later, you must select yes at the Do you want to retain the keys (PKI)? prompt during the server deployment. This preserves the certificate authority needed for user management.

Apple

WireGuard is used to provide VPN services on Apple devices. Algo generates a WireGuard configuration file, wireguard/.conf, and a QR code, wireguard/.png, for each user defined in config.cfg.

On iOS, install the WireGuard app from the iOS App Store. Then, use the WireGuard app to scan the QR code or AirDrop the configuration file to the device.

On macOS, install the WireGuard app from the Mac App Store. WireGuard will appear in the menu bar once you run the app. Click on the WireGuard icon, choose Import tunnel(s) from file..., then select the appropriate WireGuard configuration file.

On either iOS or macOS, you can enable "Connect on Demand" and/or exclude certain trusted Wi-Fi networks (such as your home or work) by editing the tunnel configuration in the WireGuard app. (Algo can't do this automatically for you.)

If you prefer to use the built-in IPsec VPN on Apple devices, or need "Connect on Demand" or excluded Wi-Fi networks automatically configured, see the Apple IPsec client setup guide for detailed configuration instructions.

Android

WireGuard is used to provide VPN services on Android. Install the WireGuard VPN Client. Import the corresponding wireguard/.conf file to your device, then set up a new connection with it. See the Android setup guide for detailed installation and configuration instructions.

Windows

WireGuard is used to provide VPN services on Windows. Algo generates a WireGuard configuration file, wireguard/.conf, for each user defined in config.cfg.

Install the WireGuard VPN Client. Import the generated wireguard/.conf file to your device, then set up a new connection with it. See the Windows setup instructions for more detailed walkthrough and troubleshooting.

Linux

Linux clients can use either WireGuard or IPsec:

WireGuard: WireGuard works great with Linux clients. See the Linux WireGuard setup guide for step-by-step instructions on configuring WireGuard on Ubuntu and other distributions.

IPsec: For strongSwan IPsec clients (including OpenWrt, Ubuntu Server, and other distributions), see the Linux IPsec setup guide for detailed configuration instructions.

OpenWrt

For OpenWrt routers using WireGuard, see the OpenWrt WireGuard setup guide for router-specific configuration instructions.

Other Devices

For devices not covered above or manual configuration, you'll need specific certificate and configuration files. The files y

readme truncated — read the full docs on github

Frequently asked questions

Is algo free to use?

algo is open source under the AGPL-3.0 licence. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does algo do?

Set up a personal VPN in the cloud

What is algo written in?

algo is primarily written in Python. Its source is publicly available at https://github.com/trailofbits/algo, and it has 30,388 GitHub stars.