HASS.IO Docker?

hassio is not just one docker container. It’s one for the supervisor, one for HA, and then one per add-on.
The install script also configures systemd to start the supervisor as/when needed - e.g. on boot.
You may be able to get hassio unofficially working by doing the following, but I cannot check it as I dont have synology/DSM:

  1. Check what CPU architecture you have (ARM or X86) here:
    https://github.com/SynoCommunity/spksrc/wiki/Architecture-per-Synology-model
    It will inform you which version of supervisor to pull.

  2. Review the hassio linux install script to understand how the systemd script starts hassio supervisor - you’ll need to start it with the same parameters/arguments (e.g. volume mounts etc)

  3. Essentially do what the install script does: create dirs, pull the supervisor image, start the supervisor etc.

    docker run --name hassio_supervisor
    -v /var/run/docker.sock:/var/run/docker.sock
    -v /var/run/hassio-hc.sock:/var/run/hassio-hc.sock
    -v %%DATA_SHARE%%:/data
    -v /var/log/supervisor-log:/var/log
    -e SUPERVISOR_SHARE=%%DATA_SHARE%%
    -e SUPERVISOR_NAME=hassio_supervisor
    -e HOMEASSISTANT_REPOSITORY=%%HOMEASSISTANT_IMAGE%%
    %%SUPERVISOR_IMAGE%%

You need to have an up-to-date version of docker.
If you can read shell scripts you have a relatively good chance, but honestly though as someone who is not using DSM I have no way to test this, and the long term supportability of such an install is not good IMO.

2 Likes

Thanks for that info @hijinx, I’m assuming once installed (if installed) any futures updates to HASSIO can be done from within HASSIO or will updates need a new clean install?

Yes. Once you get docker images installed they self manage via UI.
However I dont know what the hassio developers have planned for future, and this would definitely be in the category of non-standard install…

1 Like

Hi @apt … Did u finally get this running on your Synology? I have a DS918+ and in the same situation… want to install hassio with plugin support

@its,
perhaps my blogpost can help to point you in the right direction.

It’s basically installing pre-requisites as listed on the official GitHub page and then running the code. However, I had some complications and I could imagine the same happening on a Syno.

Thanks… I have already installed entware and installed socat which was the only thing missing… but then the script assumes systemctl is on NAS as well but its not a full blown linux system thus it doesn’t have that

Great post @naveci

So I started playing around a few weeks ago, trying to get a way for HASS IO to run on Synology. I don’t want to run the install script at all from the Synology, as I don’t want things to brick.

I started by creating a Docker container which would house the HASS IO requirements, like socat and jq etc. I got this installed fine. I was then able to get the install script to start downloading the Home Assistant supervisor image, which it was able to do.

I had it configured so that the Docker container for HASS IO was directly connected to the Synology Docker, so it would create sibling containers. It would download the HASS IO supervisor image, and I can do docker images and see it installed on the NAS Docker, which is perfect.

However I ran into a roadblock. HASS IO uses supervisord to manage processes. Unfortunately this cannot be used from inside a Docker container. There are hacks around this, but most of them are complicated and not recommended for production use.

So, my initial work on this so far has stopped. Until HASS IO can support something other than supervisord I can’t see HASS IO having its own Docker install method.

I started trying to swap out supervisord for the Alpine version, but couldn’t get that to work either.

1 Like

I think the problem here is that the script indeed assumes systemctl.
Synology is a “full blown” linux, or whatever that means, but tailored towards the needs of NAS users. Basically it’s own distro.

Synology uses upstart. I’m not too familiar with upstart, but it can do pretty much the same as systemctl. So you have two options:

  1. Download the script, edit the systemctl commands to something in upstart that does something similar and then run the script from there.

  2. Install systemd package on the NAS. I think it’s possible, but I’m not sure what consequences there are in terms of conflicting with upstart. Perhaps it can run side-by-side.

I don’t think the services impact the system in any meaningful way as these are mostly extra’s on top of existing services and basically run by themselves (such avahi).
However, would it not be possible to create a separate docker container with these services, on top of alpine or something, and then have that set up as a pre-requisite for the hypervisor?
I’m not sure how deep the hypervisor is nested in the host system, but I would imagine there is a way around your issue.

I’m thinking along the line of using docker-compose with the depends_on option in the hypervisor container.

Yeah that’s what I had essentially done.

I had a docker image named hassio, which installed avahi and everything else like socat and jq.

It would then start the install script, which would kick off the systemd calls. But that would fail as systemd can’t run inside a docker image.

systemd ins’t available for alpine, so I changed the base image from Ubuntu to the official Docker base image, which is based off alpine. However you need to use the alpine equivalent of systemd, which I couldn’t get to work properly inside the container.

Sorry for the late reply, no I didn’t unfortunately. I’ve been informed I can install HASSIO in a virtual environment (guide on here somewhere) but my Synology is not in the right state to use Virtual Machine Manager at present so not tried that route.

Still hoping someone who knows a lot more about this than me can come up with a ready to roll docker install though. Looking at you @philhawthorne :wink:

This might be a bit overkill, but what about:
creating a docker container with lets say ubuntu that runs on the synology nas.
That Ubuntu instanstance runs home assistant with hass io and everything you need.

Any thoughts on that?

I attempted that. Got pretty far, but then couldn’t get hassio to start.

Hassio uses Supervisor, which can’t be run inside a docker container. It needs to be running on the host. Which makes it tricky to install on the NAS

`Hey Phil, did u mamange to get this sored or what did u end up doing, i am facing the same issue trying to run hssio on a qnap nas on container station using the option amd64-hassio-supervisor-1 within docker and it installs but does not start up. did u end up installing linux first and the hassio

1 Like

Looking to do the same thing on unRAID docker with Hass.io. I have the Home assistant standalone docker container but feel like Hass.io would be a better way to go.

3 Likes

Unfortunately not. I did some research and there’s a big problem trying to run supervisor within a docker image.

I installed a ubuntu container, with the intent of just doing a standard HASS.IO basic linux install, but ran into the Supervisor issue.

Does the recently announced HASSIO OS make any of this any more viable? I’m guessing from the tweet I received from Pascal Vizeli it might not.

I just wanted to add the code here of where we are getting stuck.

Install start-hassio

echo “[INFO] Install startup scripts”
curl -sL “$URL_START_HASSIO” > “$BIN_DIR/hassio-start”

sed -i “s|%%SUPERVISOR_IMAGE%%|$HASSIO_DOCKER|g” “$BIN_DIR/hassio-start”
sed -i “s|%%HOMEASSISTANT_IMAGE%%|$HOMEASSISTANT_DOCKER|g” “$BIN_DIR/hassio-start”
sed -i “s|%%DATA_SHARE%%|$DATA_SHARE|g” “$BIN_DIR/hassio-start”

chmod a+x “$BIN_DIR/hassio-start”

Init system

if [ “$INIT_SYSTEM” == “systemd” ]; then
echo “[INFO] Init systemd”
curl -sL “$URL_SERVICE_HASSIO” > “/etc/systemd/system/hassio-supervisor.service”
curl -sL “$URL_SERVICE_HOSTCONTROL” > “/etc/systemd/system/hassio-hc.service”

sed -i "s|%%BIN_DIR%%|$BIN_DIR|g" "/etc/systemd/system/hassio-hc.service"
sed -i "s|%%BIN_DIR%%|$BIN_DIR|g" "/etc/systemd/system/hassio-supervisor.service"

systemctl enable hassio-supervisor.service

echo "[INFO] Start services"
systemctl start hassio-hc.service
systemctl start hassio-supervisor.service

fi

Have you made any progress in that sense?

I’m not liking the responsiveness of my RaspberryPi Hass.io and it seems the SD card finally gave in this morning (or the Pi itself, haven’t had the time to look into it yet), so I decided to look into (re)creating it all on the home unRAID server.

I’ve seen it done in an VM (diyfuturism dude) but would first like to try what I imagine is a bit more direct aproach, doing it directly in unRAID docker(s).

Im really interested at this.
I own a Micro Server with Xeon and Server grade hardware where I run Unraid in it.
I would love to move hassio to the docker or to a VM at least so I can free up my pi3 for something else (looking at DIY 4k Ambilight)