Page 1 of 1

Running HASS.IO on Docker

Posted: Thu Jan 11, 2018 11:41 pm
by its
Hi

So I am trying to run hass.io on docker. I don't want to use the homeassistant/home-assistant image as that is not the hass.io image which supports plugins

So I did an install with script here https://github.com/home-assistant/hassi ... all-hassio

socat was missing so I installed entware and then installed the package

The script which does the install is having issues: https://raw.githubusercontent.com/home- ... io_install

I did some modifications to the script

Everything installs fine till it reaches "# Init system" part.

Code: Select all

# 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
First of all /etc/systemd/system/ doesn't exist so I changed all the path to a local /volume1/hassio

But systemctl also don't exist in DSM 6.2 as well. I read that upstart exists apparently which is same. But I am not sure about this last piece of code

Can anyone help me with the last bit of code so that I can get both the scripts started and keep it running on reboots?

Code: Select all

    systemctl enable hassio-supervisor.service

    echo "[INFO] Start services"
    systemctl start hassio-hc.service
    systemctl start hassio-supervisor.service
    
Content of hassio-hc.service: https://github.com/home-assistant/hassi ... hc.service
Content of hassio-supervisor.service: https://github.com/home-assistant/hassi ... or.service

Re: Running HASS.IO on Docker

Posted: Thu Sep 06, 2018 1:39 pm
by caudingo
HI, did you manage to make this work?

Re: Running HASS.IO on Docker

Posted: Thu Sep 06, 2018 10:58 pm
by its
no. I just used homeassistant docker instead of hass.io

Re: Running HASS.IO on Docker

Posted: Fri Sep 07, 2018 8:54 am
by caudingo
Crazy, isn't it? I spent entire days trying everything I could read and think of without success... how can it be so hard!

So no choice but going with simple HA then. Now I'm trying to figure out how to install at least the hassio automation editor. Did you by any chance manage to do that?

Cheers
Chris

Re: Running HASS.IO on Docker

Posted: Fri Sep 07, 2018 10:04 am
by its
caudingo wrote:
Fri Sep 07, 2018 8:54 am
Crazy, isn't it? I spent entire days trying everything I could read and think of without success... how can it be so hard!

So no choice but going with simple HA then. Now I'm trying to figure out how to install at least the hassio automation editor. Did you by any chance manage to do that?

Cheers
Chris
You mean https://hub.docker.com/r/causticlab/has ... or-docker/

Yeah..

1) Create a docker with mount for /config (hass-editor config), /hass-config (point this to your homeassistant config folder to expose config files to edit), /ssl (I have this pointed to my SSL certificate I share with homeassistant - if u doing that)

2) Set the network to host

3) settings.conf in /config folder for hass-editor

Code: Select all

{
    "LISTENIP": "0.0.0.0",
    "LISTENPORT": 3218,
    "BASEPATH": null,
    "SSL_CERTIFICATE": "/ssl/fullchain.pem", #pointing to DOMAIN cert in /ssl
    "SSL_KEY": "/ssl/privkey.pem", #pointing to DOMAIN cert in /ssl
    "HASS_API": "https://DOMAIN:8123/api/",
    "HASS_API_PASSWORD": "API PASSWORD FROM HA",
    "CREDENTIALS": "admin:password",
    "ALLOWED_NETWORKS": [],
    "BANNED_IPS": [],
    "BANLIMIT": 0,
    "IGNORE_PATTERN": [],
    "DIRSFIRST": false,
    "SESAME": null
}
4) Put the following config in homeassistant configuration.yaml

Code: Select all

panel_iframe:
  configurator:
    title: Configurator
    icon: mdi:wrench
    url: https://DOMAIN:3218/
If this is not what you were after, please ignore :)

Re: Running HASS.IO on Docker

Posted: Fri Sep 07, 2018 1:47 pm
by caudingo
Yes, that's it! Thanks a lot, it's perfect :)