Rilhas HTML Server (

Rilhas HTML Server (

Rilhas Server This website runs from a Raspberry Pi!
Rilhas HTML Server (
This website runs from a Raspberry Pi!

What is a Raspberry Pi?

This is a Raspberry Pi. It's a tiny 700MHz ARM computer that runs Linux. It has 256 MB 512 MB of RAM, 2 USB ports, 1 Ethernet port, and can output HDMI video at 1080p. Also, it has a NTSC/PAL composite video port!! For its "hard disk" I'm using a 16GB SD card (although I now think 2GB would be quite enough), and for external storage I'm using a 500GB hard disk I had lying around doing nothing.

How is the server connected?

Here it is: the Raspberry Pi!

The thing sticking out at the front is the 16GB SD card. Out of the USB port is the connection to the USB hub, where the 500GB hard disk, ZigBee radio for the domotics, and GSM modem for the house alarm all connect to. Out of the Ethernet port is the connection to the internet through my ISP's router. The black cable comes from a 5V/1A micro USB power supply (actually a mobile phone charger).

... actually, this picture is outdated. The Raspberry Pi is currently connected to my TV in the living room, and so it now has an HDMI cable connected, but I was too lazy to take a picture of it. Also, it is now housed in a proper glossy plastic black case, like all cool things should.

What does it do?

It currently does these tasks:
  • Run the domotics application. This includes the alarm, pool control (heating, filtering), some automatic lights, etc.. It consists of a C/C++ framework that runs the specific Javascript applications with an internal Google v8 Javascript engine, and communicates with the devices in the house using ZigBee radios. It communicates with phones and PC's through LAN (Ethernet and WiFi) and through Bluetooth.

  • Run this web server. This is my own custom built 3MB footprint web server (ported to Linux from my very old version for Windows), so there is no real point in trying to hack it. It doesn't run CGI's. It doesn't run PHP. There is no password to crack. People don't seem to realize it, so it gets attacked hundreds of times per day. For all you hackers: please stop, the server can't run anything, it just serves HTML pages and pictures. And how about buffer overrun exploits? I cleverly programmed it without any buffers! ;-) And there is no money or VISA card numbers hidden here. It currently hosts 3 independent websites.

  • Run the HTTP relay. It's my custom built HTTP relay and port forwarder also originally developped for Windows and now ported to Linux. It takes HTTP requests, looks at them, and routes them to the configured destination (the same machine, another machine, port, or URL). For example, request gets redirected by the HTTP relay to

  • Run the dynamic IP updater. The dynamic IP updater has been integrated into the web server, but, still, it is functionally separated. Originally I developed it for Windows, as there was no good freeware solution available, and although there are many solutions available for Linux I just ported mine. The application goes to to determine the current IP, and if it has changed it reports that to my DNS provider (my IP is dynamic) to keep it up to date for all my sites * (about 20).

  • Run the XBMC media center. I moved the Raspberry Pi from the geek closet in the pictures above to the living room, and it is now connected to the TV serving as a media center. So I can see all my movies (actually my kid can see all his movies), listen to my music, watch all my photos (great when receiving family visits), and also entertain everybody during parties singing karaoke songs. It is nothing I couldn't already do with the PS3 - and the PS3 still has a better slideshow of pictures with the face recognition thing used in zooms and pans - except for karaoke which the PS3 doesn't do. Plus, in the summer the PS3 fans get crazy and make a lot of noise, and the Pi is fanless. Actually it doesn't run XBMC, because it seems to be a little unstable while running it, so I went back from XBian to Raspbian, and developped my own fast NFMC - No-Frills Media Center for the Raspberry Pi.

  • Run the MiniDLNA media server. With this server I can stream all my media to my phone, to the PS3, and to everywhere in the house. This way I can still access them with the PS3 and many don't need to be duplicated on the phone (especially my kid's movies). This server is not the best in the world (it uses an SQL database which I think is too much for what I want it to do), but it gets the job done well enough as a UPnP server.

  • Movie theatre listing sniffer. This is my custom movie listing application that just waits until 4:00 AM and then gets the list of movies showing in theatres all over Portugal (for the current day) from Cinecartaz, translates the titles, and checks IMDB info. Then it compiles a new HTML list (with filters) sorted by IMDB score. Check it out at

  • TV programs listing sniffer. This is my custom TV listing application that just waits until 4:10 AM and then scans ZON MEO program lists for today and the next 2 days, and compiles a new HTML list where you can see everything at once, together with summaries and, whenever title translation is successful, IMDB score. This application then goes through registered users' filter configurations and send e-mails notifying of their programs of interest.

  • Parametric STL file generator. For those of you with 3D printers there is now a parametric STL file generation service running on my Raspberry Pi. It takes the parameters of the 3D shape you want to create and then generates the STL file for you. You can view STL files with this free STL file viewer. Because this service sends the generated files by e-mail you will need to register by creating a user account in order to use it.

  • SVN server. That's right, the Raspberry Pi handles the Subversion repository of my home projects. The whole 500GB now available for all my C++ files and all their versions, together with Visual Studio and Code::Blocks files. Ah, and Eclipse. Since it is very hard to reach the 500GB mark with these files alone, I also decided to version all my music, photos, and videos.

  • SSH server. I didn't use to have a monitor dedicated to the Raspberry Pi so I interacted with it through SSH. Now I have it connected to the TV, but still SSH is the easiest way to get to a shell.

  • Maintenance tools. Automatic e-mail messages when running out of disk space, automated backup to an FTP server, automatic NTP clock fixing every day, automated log file compression and delivery, rsync'ing all the data, and some others.

How much does it cost?

The Raspberry Pi costs about 32 EUR with shipping included. You can then add another 5 EUR for a 4GB SD card and maybe another 8 EUR for a 1000mA power supply. Every Watt of power costs about 0.08 EUR per month in Portugal, so the 2.5W (average) the Raspberry Pi uses costs about 0.25 EUR/month in electricity costs (or maybe a little more since it can consume a little more power when using Ethernet). The hard disk power consumption is much higher, and it depends on traffic to this website, but its power supply is rated to 25W. For comparison, my laptop, rated at about 19W, costs me about 1.52 EUR/month, and a normal desktop rated at about 150W costs about 12 EUR/month.

Go to the website's main page.

Rilhas Home Page ( running on a Raspberry Pi.
Page "RaspberryPi.html", modified 3 years 10 months ago
Page issued on 2017-08-24 07:43:01.667
Powered by Rilhas Server Engine v1.9.8.4

(c) Rogerio Rilhas