Deploy a Docker-based OpenVPN Server and one-time UI for retrieving the VPN configuration.
This repo is primarily for deployment scripts. The application, itself, can now be found in jmarhee/vpn_deployer_heroku.
Note: If you are not a user of DigitalOcean (the platform used in the deployment Terraform included), but wish to deploy the server, I recommend using the user-data script with any Ubuntu or Debian machine on a provider, more details can be found here.
Deploys a Docker-based VPN server one-click solution on DigitalOcean. The package this deploys is jmarhee/dockvpn.
Visit my Deployer instance: https://vpn-deploy.public.engineering/
You can read more about this project on Medium.
This will allow you to provide a one-click solution to DigitalOcean users for a VPN service, through your application. Running a private instance of this can be for your own use (it will work when run in development mode locally!), or to provide more availability for helping others run their own VPN servers and begin being more mindful about how they browse the Internet.
Note This repo only runs the deployer. To run the VPN server itself, check out jmarhee/dockvpn.
To deploy to DigitalOcean behind a Load Balancer:
cd deployThen populate terraform.tfvars, and apply:
terraform apply
Copy environment.rb.example to environment.rb, or using environmental variables with Docker below, populate with your DigitalOcean Application key and secret, and build:
docker build -t vpn_deployer-app .
and run:
docker run -d --restart always --name vpn_deployer -p 8080:4567 -e pushover_token=${pushover_token} -e pushover_user=${pushover_user} -e client_id="${client_id}" -e client_secret="${client_secret}" vpn_deployer
Once the image is available
If you are planning to run the VPN service by itself, and don't particularly want to run an instance of the deployer itself (totally not necessary!), it will run on any Docker host running a recent Debian (7+)/Ubuntu (14.04+) release, and you can jump ahead to running this script (if your provider supports cloud-init/provisioning scripts, or just run manually):
#!/bin/bash
function install_pkgs() {
apt-get update && \
apt-get install -y git-core curl
}
function install_compose() {
curl -L "https://github.com/docker/compose/releases/download/1.21.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose && \
chmod +x /usr/local/bin/docker-compose
}
function deploy_vpn() {
git clone https://github.com/jmarhee/dockvpn.git && \
cd dockvpn && \
docker-compose up -d
}
install_pkgs && install_compose && deploy_vpnDetails on this project can be found in the jmarhee/dockvpn project.