The Monkey Playground
mVNC | Words | Random Pictures and Screenshots

Bookmark and Share

:~ registering a .dev domain on a raspberry pi
So, you registered a sweet .dev domain and didn't realize you needed to have a cert. Or was that just me?

Seems like a good time to try Let's Encrypt
https://letsencrypt.org/

The steps I took to get things going are below.

I will be hosting my domain at home on my RasperryPi that the boy and I will be putting together so I will need Dynamic DNS.

I moved my DNS to Cloudflare. They have free plans and feel less icky than GoDaddy where I bought the domain as well as you can use Dynamic DNS with their free plan.

Before we do that make sure you have your API key from Cloudflare.
Located under the Overview Section of your domain.





To do this, we need to use DDClient as per Cloudfare instructions:
https://www.cloudflare.com/technical-resources/#ddclient


There are a few missing pieces, which I'll add here to help out.

Download and environment setup is up to date:

cp ddclient /usr/sbin/
mkdir /etc/ddclient
mkdir /var/cache/ddclient
cp sample-etc_ddclient.conf /etc/ddclient/ddclient.conf
vi /etc/ddclient/ddclient.conf

Here is where things go a bit different:

##
## Cloudflare (cloudflare.com)
##
ssl=yes
protocol=cloudflare,
server=www.cloudflare.com,
[email protected]
password=my-cloudflare-api-key
my-awesome-site.com,

Let's edit: /etc/ddclient/ddclient.conf
Above they note ssl=yes under the Cloudfare area.
This is actually in the general config area and should already be uncommented and ready to go
To not have mail sent - comment out the two lines to do with mail




Scroll down a bit
Uncomment use=web, web-checpip.dyndns.org





*** If you are running a VPN connection on the machine - shut it off for this.

Now, search for cloudfare - it's near the end.

User you hostname for the zone and make sure you type in your login correctly.





Run the script with debug to make sure it connects and updates for you.

ddclient -daemon=0 -debug -verbose -noquiet

You may get the following error:





Install the following to get past it:
#sudo apt-get install libdata-validate-ip-perl


On my raspberryPi I received the following error and needed to run the debian install to get things going.




Finally - If all worked well - you will get a success message:



DDClient github documentation shows how to set it up as a daemon
https://github.com/ddclient/ddclient/blob/master/README.md

Testing I was able to see that the DNS was pointing to my domain - which I had not yet set up on the Pi with Let'sEncrypt.

Now, it was time to install Apache and Let's Encrypt on my Pi.

I just followed the directions here - https://pimylifeup.com/raspberry-pi-ssl-lets-encrypt/ Really, it was that easy. One could say it was Easy as Pi(e).

And I was up and running...


------
3/3/2019

 

0 comments

 

 


Comment submission has been temporarily disabled as I deal with shoe spam.

 

Words
eric at the monkey playground dot com