Hassio as a web server / addon

I’ve recently begun fiddling around with PHP at home, and so have installed Xampp on my Mac and I can access (locally) sites that I create. Nothing fancy but it’s a start. I’m thinking I might make a sort of household ‘organiser’ / to-do list that I can display on an iPad in our kitchen.

However the trouble is that my Mac is not always on, or always at home.

I have a Raspberry Pi running Hassio at home, so I wondered if there was a way / any add-ons for Hassio that essentially allow it to function as an apache / PHP web server?

The other option is to get another Pi and use that as the server but I’d rather not if I can avoid it.

1 Like

Hi, you may have a look here.
The AddOn tutorial includes setting up a python3 http server.

Thanks, I’ll dig into it!

Old topic I know, but a generic web server add-on would be really useful (I’ve looked and not found one). I’ve got some simple php pages that I’d like to use for my weather station.

@frenck could you add one to your repertoire, please? :pleading_face:

1 Like

The problem is “what is generic?” You use PHP as a server side language. Some people use other languages. As a developer of such an add-on it would mean all kinds of people asking to add support for whatever language or Apache module or anything like that to add to the HA add-on. I don’t think this would be a good way to spend HA development time. If you install HA on your RPI on top of a normal raspbian image using docker (explained on the installation page in the documentation on the HA website) you can choose from the many LAMP docker containers on docker hub to run on the side.

Yes I acknowledge that. I’m sure there are solutions to that though. For me, it would certainly not be for anything that required a complex setup - it is for the hosting of a simple mini website. I also suspect that, for someone who knows the add-on system, it would be relatively quick as it seems that various parts are already templated. I would also wager that PHP modules could easily be included (much like Node-RED npm packages can be installed via the options).

My thought is that there are lots of custom views that could then be created using the iframe card in Lovelace that could point to this local webserver.

The problem with a generic docker, is it loses the integration with the supervisor, SSL etc.


If anyone is still searching for this. I have created a apache2 hassio addon.
More information is here: https://github.com/FaserF/hassio-addons/tree/master/apache2


I’ve installed the add-ons for DuckDNS, MariaDB, phpMyAdmin and your Apache2. My index.html displays just fine. Thank you very much! However, none of my .php programs will display. Perhaps you can tell me the most likely cause of php problems. I’m not sure where to start.