HASS.IO Docker?

Hassio install wraps all this so you don’t need to have docs. If you use the Linux install for hassio you can see that the installer pulls the supervisor image that’s correct for your cpu architecture, and the the supervisor pulls the ha image.

Well that makes more sense. So which Docker from that list should I use to try an install on my Synology?

Ah ok found the correct Linux install (referenced earlier in the post Installation - Home Assistant )

My problem is I don’t have the knowledge to do the build as looking at the readme prerequisites are required.

Can anyone assist?

I did this (not in a Synology, but in a Ubuntu Server).

I followed the instructions here: https://github.com/home-assistant/hassio-build/tree/master/install#install-hassio.

I reviewed the requirements and then download the installation script with this:

sudo curl -sL https://raw.githubusercontent.com/home-assistant/hassio-build/master/install/hassio_install

once that I reviewed the Script to change couple of things aligned with my setup and run:

sudo ./hassio_install

this created the docker containers & services and in about 20’ everything was installed and configured.

Let me know if you have any issue and I’ll try to help.

1 Like

Did you install this locally or direct on the server? Is it possible to create a Docker file locally say on a Mac/PC then install the created Docker file on the server?

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