Hosting Your Own VPN Server In The Cloud

Hosting Your Own VPN Server In The Cloud

Last week Friday was my last working day of the year, it’s been a year of continuous learning mostly on Azure and security. To take a break from Azure I thought it would be a great opportunity to try something out on AWS for a change of Public Cloud. I recently decided to take on the 100 days of cloud challenge.

I’ve been coming across a plethora of ads for VPN’s when I’m on Youtube. Most of the solutions cost just over $ 10 per month. Light bulb moment… how much would it cost to host my own VPN server in the cloud ?

I’ve setup a VPN Server on AWS in the past, it was a rather costly experiment. Surely there has to be a cheaper solution. After much deliberation I decided to give Amazon Lightsail a try, for those unfamiliar with Lightsail, it is a simplified platform that allows the deployment of simple workloads at a low and predictable cost.

Taking a look at the Lightsail pricing, the cheapest offering costs $ 3.50 per month and gets you a Linux / Unix instance that includes 512 MB of memory, 1vCPU, 20 GB SSD storage and 1 TB data transfer allowance.

I opted for an Amazon Linux 2 OS only blueprint.

Once you have created your instance, ensure that you create and assign a static IP to your instance. This will ensure you retain the same IP address even when the instance is rebooted.

Next you’ll need to connect to your instance via SSH, run the below commands to apply all updates and install OpenVPN on your instance:

sudo yum update
sudo yum -y install

The administrative account has no password so you’ll need to set it with the below command :

passwd openvpn

Head over back to your browser and paste the static IP address of your instance and append the URL to include /admin

Running a speedtest yielded a fairly decent download speed of 21.7 Mbps. The current setup allows for 2 concurrent connections without requiring a license. This is ideal for my MacBook Pro and iPad Pro, I even tested a few video streaming sites and there was no buffering and additional content became available compared to the dismal offerings we have available for the South African market.

“With great power comes great responsibility.” - Uncle Ben

Below are some resourceful links to documentation from OpenVPN that shows how to create users, additional configuration and system hardening:


Adrian Mudzwiti

Posted on


Updated on


Licensed under