Guide · Open source
How to use wireguard-install: set up a WireGuard VPN on Linux
Updated · written with AI from the project's own documentation and checked against our catalogue data
wireguard-install is a bash script from the angristan project that sets up a WireGuard VPN on a Linux server you control. It is aimed at people who want a personal VPN on a rented server without writing WireGuard configuration files by hand. After this guide you will know what the script needs, how to run it, and how to add or remove clients later.
Quick start
- 1Get a supported Linux server. Start with a Linux server from a supported distribution and make sure you have root access.
- 2Download the script. Run curl -O on the raw wireguard-install.sh file from the angristan repository on GitHub.
- 3Make it executable. Run chmod +x wireguard-install.sh so the script can be started.
- 4Run the installer. Start the script with ./wireguard-install.sh and answer the questions it asks.
- 5Use the client configuration file. Take the client configuration file the script creates and load it on the device you want to connect.
- 6Manage clients later. Run the script again to add or remove clients.
What does wireguard-install do?
WireGuard is a point-to-point VPN. In this setup, your device forwards all its traffic through an encrypted tunnel to the server. The server applies NAT to that traffic, so websites see the server's IP address instead of yours.
The script supports both IPv4 and IPv6. It installs WireGuard (kernel module and tools), configures it, creates a systemd service and generates a client configuration file.
What do you need before you start?
You need a Linux server that you can reach with root access, and it must run one of the supported distributions. The README lists these: AlmaLinux 8 or newer, Alpine Linux, Arch Linux, CentOS Stream 8 or newer, Debian 10 or newer, Fedora 32 or newer, Oracle Linux, Rocky Linux 8 or newer, and Ubuntu 18.04 or newer.
The script is Linux only, so it will not help on Windows or macOS machines as the server.
- A Linux server with root access
- A supported Linux distribution from the README list
How do you download and run the script?
Log in to your server, download the script, make it executable and run it. The script then asks you a few questions and handles the rest.
Answer the prompts as they come. The README says the script takes care of the setup once you have answered them.
curl -O https://raw.githubusercontent.com/angristan/wireguard-install/master/wireguard-install.sh
chmod +x wireguard-install.sh
./wireguard-install.shHow do you add or remove clients?
Run the script again on the same server. Because it is rerunnable, you can use it later to add or remove clients rather than editing WireGuard configuration by hand.
Each client gets a client configuration file that the script creates. Copy that file to the device you want to connect.
./wireguard-install.shIs wireguard-install the right tool for you?
This script suits people who want their own VPN on a server they manage and are comfortable running a shell script as root. It is a command-line tool, so it does not offer a graphical app for managing VPNs.
If WireGuard does not fit your environment, the README points to openvpn-install. Other comparable projects include Algo VPN, PiVPN and wg-easy.
- Good fit: a personal VPN on a rented Linux server
- Good fit: WireGuard without writing the config by hand
- Poor fit: a system the script does not support
- Poor fit: a preference for a graphical VPN manager
What people use it for
- Routing your own browsing through a VPN server you rent, so websites see the server's IP address
- Setting up WireGuard for a few personal devices without writing configuration files by hand
- Adding or removing client devices later by rerunning the same script
- Running a VPN with both IPv4 and IPv6 support on a supported Linux server
Frequently asked questions
Is wireguard-install free to use?
The project is released under the MIT Licence, as stated in the README. You still pay for the Linux server you run it on, and the README mentions providers but does not state their prices here.
What operating systems does wireguard-install support?
The script runs on Linux servers only. The README lists supported distributions including AlmaLinux 8+, Alpine, Arch, CentOS Stream 8+, Debian 10+, Fedora 32+, Oracle Linux, Rocky Linux 8+ and Ubuntu 18.04+.
Does wireguard-install work with IPv6?
Yes. The README says the script supports both IPv4 and IPv6.
How do I add a new client after installation?
Run wireguard-install.sh again on the server. The README says you can rerun it to add or remove clients.
Is wireguard-install an alternative to openvpn-install?
It is the WireGuard counterpart. The README points to openvpn-install for users whose environment does not fit WireGuard. Algo VPN, PiVPN and wg-easy are other comparable projects.
Why does the script need root access?
The script installs WireGuard, configures it and creates a systemd service on the server, which requires root access. The README asks users to run it on a server they manage.
New agent skills, repos and AI tools — every week
The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.
Our verdict
wireguard-install suits people who want a personal WireGuard VPN on a Linux server they control and are comfortable running a shell script as root. Pick something else if you need a graphical VPN manager, a system outside the supported distribution list, or a non-Linux server.
Install options & downloads