Self-hosting a Wireguard VPN, the easy way

Ed Leeman
3 min readFeb 14, 2021

Introduction

We’re going to cover setting up a Wireguard VPN on your home server or cloud service. For secure remote access to your internal network, or a cheap, secure connection to a cloud service for some increased privacy when browsing online.
VPN’s don’t make you anonymous, there’s a lot of stigma around this. Here’s some helpful information if you want to read into this some more.

Setting up Wireguard, the easy way

I initially found setting up Wireguard confusing. Keys kept getting mixed up, I had no way of sending public keys between devices so that I could set up a client on my mobile device etc..

After around 30 seconds of lazy Duck Duck Go’ing (Not quite the same ring to it). I found a script on Github provided by angristan. Here’s the repo.

It’s just a bash script which does all of the config for you, but still providing user prompts for entering the public server IP and choosing a preferred DNS address for the server.

Step 1: Clone and execute the Wireguard Installer

After ssh’ing to your server, whether it’s local, or cloud-hosted, we need to pull down the Wireguard installer code from Github. We’re just going to curl

--

--

Ed Leeman
0 Followers

Full-time Software Engineer based in the UK. Passionate about self-hosting, Linux, software architecture and network infrastructure.