{"id":276,"date":"2018-03-05T09:12:04","date_gmt":"2018-03-05T09:12:04","guid":{"rendered":"http:\/\/www.portfolio.hanicajo.com\/?p=276"},"modified":"2018-04-24T17:18:19","modified_gmt":"2018-04-24T16:18:19","slug":"my-new-server","status":"publish","type":"post","link":"https:\/\/www.portfolio.hanicajo.com\/?p=276","title":{"rendered":"My New Server"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.portfolio.hanicajo.com\/wp-content\/uploads\/2018\/03\/pi.png\" alt=\"\" width=\"1572\" height=\"1314\" class=\"alignnone size-full wp-image-279\" \/><br \/>\nI have been using a Raspberry Pi 3 Model B for a while now as an adblocker for my network (<a href=\"https:\/\/pi-hole.net\" rel=\"noopener\" target=\"_blank\">https:\/\/pi-hole.net<\/a>). As this is already on 24\/7, I decided to see if I could use it to host my websites and projects. Seems I can!<\/p>\n<p>The Pi is running Debian Stretch. For this website I installed an Apache server, PHP7 and a MySQL database. As I have a dynamic IP address at home, I use a dynamic DNS service (<a href=\"https:\/\/duckdns.org\" rel=\"noopener\" target=\"_blank\">https:\/\/duckdns.org<\/a>) that gives me a static address I can point my domain at. I have a cron job that checks if my IP address has changed and if it has, it updates the IP address I use with the duckdns service.<\/p>\n<p>Next was to put my Amazon Alexa skills on the Pi. For this I needed an HTTPS address, so I installed a SSL certificate from <a href=\"https:\/\/letsencrypt.org\" rel=\"noopener\" target=\"_blank\">https:\/\/letsencrypt.org<\/a>. I also have Ruby installed for my code and am running an Icecast server.<\/p>\n<p>Seems to be coping &#8211; so far, but I may add another Pi for load balancing.<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.portfolio.hanicajo.com\/wp-content\/uploads\/2018\/03\/Screen-Shot-2018-03-05-at-17.14.22.png\" alt=\"\" width=\"1336\" height=\"444\" class=\"alignnone size-full wp-image-285\" \/><br \/>\nUPDATE:<br \/>\nI&#8217;ve added another Pi. I&#8217;m working on another skill for the Alexa, so I decided to use a second Pi for development. I am currently handling all web requests on the first Pi. When it receives a request for the new skill I am working on, a reverse proxy sends it to the second Pi. This works fine for development, but I think I will add a third Pi to act as a load balancer.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have been using a Raspberry Pi 3 Model B for a while now as an adblocker for my network (https:\/\/pi-hole.net). As this is already on 24\/7, I decided to see if I could use it to host my websites<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"class_list":["post-276","post","type-post","status-publish","format-standard","hentry","category-projects"],"_links":{"self":[{"href":"https:\/\/www.portfolio.hanicajo.com\/index.php?rest_route=\/wp\/v2\/posts\/276","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.portfolio.hanicajo.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.portfolio.hanicajo.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.portfolio.hanicajo.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.portfolio.hanicajo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=276"}],"version-history":[{"count":9,"href":"https:\/\/www.portfolio.hanicajo.com\/index.php?rest_route=\/wp\/v2\/posts\/276\/revisions"}],"predecessor-version":[{"id":289,"href":"https:\/\/www.portfolio.hanicajo.com\/index.php?rest_route=\/wp\/v2\/posts\/276\/revisions\/289"}],"wp:attachment":[{"href":"https:\/\/www.portfolio.hanicajo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=276"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.portfolio.hanicajo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=276"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.portfolio.hanicajo.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=276"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}