Howtos

Raspberry Pi 4 Experiment Experience (Version 4B) For Web Server

Hello everyone, this time I want to share your experiences that are also related to this website. Okay, let me tell you right away, this all started when I watched the eta prime youtube channel where he used raspberry pi 4 for the web server and I was interested in it (I also manage 3 websites) and I watched it until end. From there I was really interested in raspberry pi & I researched it. After that i find is very useful for nas server, plex server, pi hole and be used as mini PC (so awesome).

After that came the experiment to create a web server for 3 domains that I manage (i don’t want pay hosting monthly fee.. wkwk), because of my isp have public dynamic IP and mostly my internet is not use at my home, just for cctv.. hahaha (fyi: im not pay for internet, my brothers pay it). After that i manage to save some money to buy my beloved raspberry pi 4 but before that already buy the accessories first like passive cooling heatsinks & adapters (because they were sold separately, when I rolled).

Then my money had accumulated and finally I bought the item at the online marketplace (fyi again: I bought it at the price of the 40$ & after I bought the price went up. hehe). Timeskip a few days & when it rained heavily, the courier came with the package with his raincoat (thanks, mr. courier anteraja, anyway im using free shipping). Immediately opened the package – I realized how compact this raspberry pi board is, I immediately put a thermal pad (I put thermal paste too) then I put the passive cooling heatsink. And to my surprise, it was really cool to be.. Haha. you can see what it looks like in the photo below.

raspberry pi 4 sighting with passive heatsink, uda wear gpio cover also 3D print

Well, how cool is it. Ok, I also went to the next stage, continue installing the OS and just before I was prepare the iso file for the raspberry flash and I found 2 ways, the first one using berryboot & the second using direct booting USB. After I tested both for a few days I also decided to directly boot the USB to the SSD and use ubuntu server 20.04 OS. The OS was installed next according to many tutorials that I got, I started experimenting for the webserver engine. Actually, I have installed openlitespeed but because of the support (actually the software is messed for arm version, i hope there had update in the future, I also hate to bother with the bugs) I finally used the nginx + Cloudflare webserver.

After a few days ane decided to make a 3D printing case using a 90mm fan

I start configuring everything from the firewall to the web panel (here use webmin). if you’ve ever hosted vps, the configuration is more or less the same anyway. FYI again, you guys for this website are now already hosted on my raspberry pi 4B so you can feel for yourself how the performance is (in my opinion, the bottleneck is just on the ISP, the upload speed is only 10mbps). Everything is not smooth as i planned, there is problems when making this server can run 24/7 at home, the problem I encountered is:

1. A dynamic ISP IP that changed to another after a few days but this can be solved with DDNS (I used DDCLIENT on ubuntu that I connected to Cloudflare)
2. When the server power failure & internet is off (can be solved by using a UPS, already buy one UPS now)
3. When the power failure / restart the ISP router sometimes can be a Private IP which becomes the server cannot be accessed via the internet but can be overcome by restarting the modem solution until I can get a Public IP or bridge the ISP router with a mikrotik using the REDIAL PPPoE auto script so that if I get a Private IP mikrotik automatically redial until I get a public IP (I myself use a proxy but only for notifications if the IP changes, then it will send an email to me)

the final result of the raspberry pi 4 webserver has been running 3 months since the article was created

Oh yes, for those of you who want to try to make a DIY webserver project, this is also what I will prepare in the next article, I will try to share my configurations from os installation, ufw firewall configuration, webserver configuration, webmin, ddns configuration (incidentally using a isp whose ip is going to change), and also cloudflare ssl. For this article, just share my experience when I want to make a webserver, anw hope you guys find it useful.. Hehe.

Previous ArticleNext Article