Web Server with RPi 3

Got a web server running a raspberry pi 3 today!

Step 1: Start up the pi and install raspbian

Step 2: https://diyhacking.com/raspberry-pi-web-server/ (follow everything until the stuff about no-ip - then things were different because I'm using google domains)

Step 2.5: (found this out later) Make sure to add a permanent lease for the internal IP address that the RPi has - do this using your router settings.  If you don't, then your router might unexpectedly change your RPi's IP and you'll have to figure out what it is again, and change the port forwarding as well.

Step 3: add 2 entries to the Dynamic DNS section of your google domains page - 1st one is '@', 2nd is 'www'.

Step 4: go on the RPi and install ddclient (sudo apt-get install ddclient) - when the install prompts come up, use the username and password from either of the new DDNS entries in google domains (expand it).  Use wlan0 (unless you're on ethernet now).  I think the rest should be easy to choose in setup.

Step 5: (install vim), and then 'sudo vim /etc/ddclient.conf'
use the following to set it up, so that both 'www.yourdomain.com' and 'yourdomain.com' work:


password='yourpass' # don't forget the single quotes

password='yourpass2' # don't forget the single quotes

Step 6: save and go to command line and run:
sudo service ddclient restart
sudo service ddclient start
sudo ddclient -daemon=0 -debug -verbose -noquiet

The last command might take a few minutes - be patient, no more than 5.  Some lines in the output should tell you for each of the 2 domains if the DNS entries were updated.  If you see that they were then you're done, otherwise troubleshooting begins.  This site might help, it showed me how to get the proper ddclient.conf with 2 domains : http://www.mogness.net/dynamic-dns-with-google-domains-using-ddclient-on-debian/

Have fun!


Popular Posts