As a new Docker user on a Synology DiskStation I’d be interested to see a Docker image of HASS.IO.
What are the communities thoughts? Are there any technical difficulties?
As a new Docker user on a Synology DiskStation I’d be interested to see a Docker image of HASS.IO.
What are the communities thoughts? Are there any technical difficulties?
Not sure about running on synology, but https://github.com/home-assistant/hassio-build/tree/master/install#install-hassio is likely what you’re looking for. It allows you to run hassio on a generic docker host instead of resinos.
Be interested to hear how this works out
Seems there are some HASSIO dockers out there:
https://hub.docker.com/search/?isAutomated=0&isOfficial=0&page=1&pullCount=0&q=hassio&starCount=0
Thanks to @cogneato on discord.
Not sure what I’m looking at here, they also get low or no stars so not sure of success rate.
Can anyone shed any light?
Hassio is built on docker and these look like the official hassio docker images.
Targeting different processors? (AMD, intel etc)
Some seem to be split into add-on and supervisor with little or no documentation.
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.
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:
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.
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)
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.
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…
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.
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:
Download the script, edit the systemctl commands to something in upstart that does something similar and then run the script from there.
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.