Hosting an online website on your own server

This unit of the course is really for your own curiosity and shouldn't be apply for security reasons!!!

Hosting an online website on your own server require a lot of expertise. In fact it means that:
  • You have a computer which is always on within your house, so it means full electricity running + full internet connection running. Those two conditions are hard to have as the electrecity may cut from time to time so as the internet connection.
  • It also means that high chances that you will have a dedicated machine for that. So it costs some money, even if you can find some machines which are very affordable such as the Raspberry Pi.
  • It means extra security. Your machine will always be on in order to ensure that your website is always accessible. You can imagine that the machine will be warm and that if your room is not fresh enough it could burn.
  • It means that your machine will be subject to attacks from the outside. Some people and bots have a lot of fun attacking servers online and yours won't be an exception. As a result you need to have system administrators skills in order to know how to monitor and protect your servers. This is not the kind of knowledge that marketers have.

In this unit I am going to imagine that you are interested anyway to see how it looks like to have your own server.

So I am going to install the website on a cheap server, probably one of the cheapest we can find on the market, the NodeMCU https://en.wikipedia.org/wiki/NodeMCU

A 5$ server

It costs about 5$ and it is mostly used for IOT projects (Internet Of Things) but will be good enough to host our web page.

Note that the web server of a NodeMCU is really trivial, there is nothing fancy such as Apache, so roughly you can just upload your code on it and that's all.

In order to upload your code on it, you will need use the Arduino software and as all to make all your code fit on one line and espace the quotes.

To convert all your code into one line you can use the following service: https://lingojam.com/TexttoOneLine. Then in order to escape quotes, you just need to do a search/replace from a text editor or you can use online services such as http://davidjwatts.com/youtube/esp8266/esp-convertHTM.html.

Once done your website will be accessible through the IP address given by your internet box... which is probably an information that you wouldn't like to disclose. Here we are reaching the point where you would to purchase a domain name and/or use the server of web hosting companies.

If you are passionate about this topic, you can also look for alternatives such as https://yunohost.org  which will provide you the right programs in order to easily set a server at your home either on one of your old laptop, Raspberry Pi or on a virtual machine.


Last modified: Tuesday, 4 August 2020, 3:16 PM