Running OpenVPN server with Docker on a Raspberry Pi with NoIP
Want to run an OpenVPN server on your Raspberry Pi inside a Docker container? Want to use NoIP because you don’t have a static IP address? You’ve come to the right place.
Setting up a NoIP hostname
NoIP is a dynamic DNS service where you can get up to 3 free hostnames. However, you must remember to confirm that you want to keep each hostname every 30 days.
After creating a NoIP account, download & compile the NoIP Dynamic Update Client on the Raspberry Pi with the following commands. This will update NoIP with your current public IP address that your ISP assigns to you.
(You don’t need to type the ‘$’, this is just the beginning of your terminal line.)
$ cd /usr/local/src
$ sudo wget http://www.no-ip.com/client/linux/noip-duc-linux.tar.gz
$ sudo tar xzf noip-duc-linux.tar.gz
$ cd noip-2.1.9-1
$ sudo make
$ sudo make install
Log in with your NoIP account when prompted during the make install
command. You will also be asked how often you want to update NoIP with your IP address. The minimum is 5 (this interval is in minutes). Personally, I went with the default 30 minutes. It will also ask if you want to run a script on a successful update, I chose the default No option.