Nowadays, there are so many VPN providers (free or paid) that running your own instance is really not necessary and depending on your use case, might not even be any more private or secure.
This endeavour is purely for my own curiosity and for getting myself more familiar with DigitalOcean.
This tutorial is written for macOS but I’d imagine it wouldn’t be too different for Windows.
python -m ensurepip –user
curl https://bootstrap.pypa.io/get-pip.py | python
python -m pip install –user –upgrade virtualenv
python -m virtualenv env && source env/bin/activate && python -m pip install -r requirements.txt
chmod og-rw ~/.netrc
Enter ‘1’ to choose DigitalOcean.
Sign up via my referral link to receive $10 free credit which is more than enough to run your VPN continuously for at least 1 or 2 months. After signing up, navigate to the ‘Applications & API’ page to generate an API key.
Click ‘Generate New Token’.
Enter whatever you want for the ‘Token Name’, it doesn’t really matter (I entered ‘algo’ for convenience sake).
Click the token to copy it to your clipboard and paste it into the terminal and press enter.
Name the vpn server whatever you want, again, it doesn’t really matter.
For the region of your VPN server, it’s generally better to have a server that’s closest to where you are physically, as it will have a lower latency and better performance. However, if you are planning to utilise the VPN to get around geographically restricted content, make your choice accordingly.
If you have no idea what the next few questions mean, just enter ‘n’ for all of them. Once you’ve answered all the questions, the installer will start the installation of your VPN server.
Once setup is complete, DO NOT CLOSE YOUR TERMINAL WINDOW IMMEDIATELY. Take note of the p12 password.
Navigate to the /algo-master/configs folder and you will find a new folder with a corresponding IP address. Inside, you will find a .mobilconfig file. Open it.
You will be prompted to enter the p12 password and your macOS password.
…and you’re done. You can now manage your VPN connection in your Network preferences.
15 June 2018