Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Simple install command for installing Hass.io on a Generic Ubuntu/Debian machine
sudo -i
add-apt-repository universe
apt-get update
apt-get install -y apparmor-utils apt-transport-https avahi-daemon ca-certificates curl dbus jq network-manager socat software-properties-common
curl -sSL https://get.docker.com | sh
curl -sL "https://raw.githubusercontent.com/home-assistant/hassio-installer/master/hassio_install.sh" | bash -s
@pvizeli

This comment has been minimized.

Copy link

commented Jul 6, 2018

Can you provide this to builder repository?

@fortepc

This comment has been minimized.

Copy link

commented Oct 2, 2018

If you're running ubuntu 18.04 you need to add the universe repo to get jq installed.

add-apt-repository universe && sudo apt-get update

source: Tried this on a fresh ubuntu server install and it gave me an error about not being able to find jq, and this website recomended doing that repo add and line 3 worked after https://bonani.tech/how-to-install-hass.io-on-ubuntu-server-18.04/

@aihysp

This comment has been minimized.

Copy link

commented Nov 20, 2018

Hi what is the next step after install ?
coming from openhab...

@frenck

This comment has been minimized.

Copy link
Owner Author

commented Nov 20, 2018

@aihysp Well for installing Hass.io on a Linux system, that is actually it.

From that point on, you can just use the documentation/getting started tutorials as listed on the Home Assistant website.

@Jolly-Roger82

This comment has been minimized.

Copy link

commented Nov 26, 2018

it all went well up until the last command (curl -sL "https://raw.githubusercontent.com/home-assistant/hassio-build/master/install/hassio_install" | bash -s) I constantly get error 404 bash command not found - what am i doing wrong?

@MrFummy

This comment has been minimized.

Copy link

commented Dec 1, 2018

Hi, I've installed Hass.io on my Ubuntu server 18.04 using this tutorial but now I'm not able to enable any addon that I install on my Hass.io ussing the Hass.io addons menu.
Somebody knows how can I fix that?
Thanks!

@rlust

This comment has been minimized.

Copy link

commented Dec 22, 2018

Thanks for the work here! I have the docker running on Ubuntu but cannot figure out how to connect to it with the browser.
I have tried hassio.local and all of the ip address I can find pertaining to the hassio images.

I am missing something!

@gataca

This comment has been minimized.

Copy link

commented Dec 29, 2018

@rlust: Did you try hassio.local:8123, works for me

@denisjoshua

This comment has been minimized.

Copy link

commented Dec 29, 2018

Hi there,
I'm a newbe so please don't be angry with me :-)
Can I install this hassio docker on my Qnap NAS please ?
Usually I copy and paste a docker-compose yaml file

Thanks a lot
Denis

@TEfjLONjDON

This comment has been minimized.

Copy link

commented Jan 3, 2019

Anyone able to point me to how to install HASSIO..latest(hassos) image onto Synology. ( I have the Synology version of docker running on the Synology Nas). I think I just need the docker make file that the latest version of HASSIO uses.

@Shamane2000

This comment has been minimized.

Copy link

commented Jan 3, 2019

Hi there,

thank you for the script, but it doesn't work for me.
After executing all steps from above (Without any error) ther is no HASSIO installed.

root@MediaServer:/usr/share/hassio# sudo curl -sL "https://raw.githubusercontent.com/home-assistant/hassio->build/master/install/hassio_install" | bash -s
[Info] Install supervisor Docker container
[Info] Install supervisor startup scripts
[Info] Install AppArmor scripts
[Info] Run Hass.io`
that seems to be OK

but after checking the running instances:

root@MediaServer:/usr/share/hassio# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
root@MediaServer:/usr/share/hassio#
there is no hassio

So I check the "installation" directory:

root@MediaServer:/usr/share/hassio# ll
insgesamt 20
drwxr-xr-x 3 root root 4096 Jan 2 22:24 ./
drwxr-xr-x 334 root root 12288 Jan 2 22:24 ../
drwxr-xr-x 4 root root 4096 Jan 2 22:35 apparmor/
It seems more to be empty?

then I've checked the log:

root@MediaServer:/usr/share/hassio# journalctl -u hassio-supervisor.service -b
...
Jan 03 21:10:00 MediaServer systemd[1]: Started Hass.io supervisor.
Jan 03 21:10:01 MediaServer hassio-supervisor[1237]: time="2019-01-03T21:10:01+01:00" level=error msg="error waiting for container: context canceled"
Jan 03 21:10:01 MediaServer hassio-supervisor[1237]: Error response from daemon: error while creating mount source path '/usr/share/hassio': mkdir /usr/share/hassio: read-only file system
Jan 03 21:10:01 MediaServer hassio-supervisor[1237]: hassio_supervisor
Jan 03 21:10:02 MediaServer hassio-supervisor[1237]: docker: Error response from daemon: error while creating mount source path '/usr/share/hassio': mkdir /usr/share/hassio: read-only file system.

So it seems to be something wrong in the installation script?
Could please anyone help me?

Thank's a lot,
Shamane2000

PS:
my Environment is a running and hopefully actual Ubuntu 18.04.1 LTS.
Please ask for any other needed and missing Information.

@KasperNS

This comment has been minimized.

Copy link

commented Jan 3, 2019

@Shamane2000 Try running "wget https://raw.githubusercontent.com/home-assistant/hassio->build/master/install/hassio_install" to first download the install script. Then use ./hassio_install. It seems like you have a permissions issue. Apparently the script isn't run completely as sudo when you use curl.

Sidenote: When you first download the script, the permissions may be set to only read(check by running "ls -lah"). In that case run "sudo chmod 755 hassio_install"

@Shamane2000

This comment has been minimized.

Copy link

commented Jan 4, 2019

@Shamane2000 Try running "wget https://raw.githubusercontent.com/home-assistant/hassio->build/master/install/hassio_install" to first download the install script. Then use ./hassio_install. It seems like you have a permissions issue. Apparently the script isn't run completely as sudo when you use curl.

Sidenote: When you first download the script, the permissions may be set to only read(check by running "ls -lah"). In that case run "sudo chmod 755 hassio_install"

@KasperNS Thank you for your quick reply, but it doesn't makes a difference.

root@MediaServer:/usr/share/hassio# wget https://raw.githubusercontent.com/home-assistant/hassio->build/master/install/hassio_install-bash: build/master/install/hassio_install: Datei oder Verzeichnis nicht gefunden
root@MediaServer:/usr/share/hassio# wget https://raw.githubusercontent.com/home-assistant/hassio-build/master/install/hassio_install
--2019-01-04 20:26:17-- https://raw.githubusercontent.com/home-assistant/hassio-build/master/install/hassio_install
Auflösen des Hostnamens raw.githubusercontent.com (raw.githubusercontent.com) … 151.101.112.133
Verbindungsaufbau zu raw.githubusercontent.com (raw.githubusercontent.com)|151.101.112.133|:443 … verbunden.
HTTP-Anforderung gesendet, auf Antwort wird gewartet … 200 OK
Länge: 5033 (4,9K) [text/plain]
Wird in »hassio_install« gespeichert.
hassio_install 100%[==========================================================>] 4,92K --.-KB/s in 0s
2019-01-04 20:26:17 (11,4 MB/s) - »hassio_install« gespeichert [5033/5033]
root@MediaServer:/usr/share/hassio# ll
insgesamt 32
drwxr-xr-x 3 root root 4096 Jan 4 20:26 ./
drwxr-xr-x 334 root root 12288 Jan 2 22:24 ../
drwxr-xr-x 4 root root 4096 Jan 2 22:35 apparmor/
-rw-r--r-- 1 root root 5033 Jan 4 20:26 hassio_install
root@MediaServer:/usr/share/hassio# chmod 755 hassio_install
root@MediaServer:/usr/share/hassio# ./hassio_install
[Info] Install supervisor Docker container
[Info] Install supervisor startup scripts
[Info] Install AppArmor scripts
[Info] Run Hass.io
root@MediaServer:/usr/share/hassio# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES

There is the same output as before.

@Shamane2000

This comment has been minimized.

Copy link

commented Jan 7, 2019

So, I found a solution/workaround.

Iv'e added to the systemd file "/usr/sbin/hassio-supervisor" the docker "--privileged" flag, and now it works.
It would be great to have this change also in the install script. Or is there any point against that fix?

runSupervisor() {
docker rm --force hassio_supervisor || true
docker run --name hassio_supervisor --privileged
$APPARMOR
--security-opt seccomp=unconfined
-v /var/run/docker.sock:/var/run/docker.sock
-v /var/run/dbus:/var/run/dbus
-v ${HASSIO_DATA}:/data
-e SUPERVISOR_SHARE=${HASSIO_DATA}
-e SUPERVISOR_NAME=hassio_supervisor
-e HOMEASSISTANT_REPOSITORY=${HOMEASSISTANT}
${SUPERVISOR}
}

@billybigbass

This comment has been minimized.

Copy link

commented Jan 8, 2019

HI. I have a problem running the last command

connecting to the docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

I'm running these commands via the ubuntu windows app on windows 10. I have a full featured home assistant already setup this way.

I don't know if this is anything to do with my problem but systemd is not PID 1.

@gcorgnet

This comment has been minimized.

Copy link

commented Jan 17, 2019

Great stuff, thanks.
How can I ensure that the Hass.io container run automatically when restarting the machine?

@tomlynn

This comment has been minimized.

Copy link

commented Jan 17, 2019

I followed the directions at the top of this thread and they worked flawlessly.

@jakkritz

This comment has been minimized.

Copy link

commented Jan 22, 2019

Great stuff, thanks.
How can I ensure that the Hass.io container run automatically when restarting the machine?

Restart=always

@houseofbugs

This comment has been minimized.

Copy link

commented Jan 23, 2019

thank you. this works perfect! <3

@stuffedmonkey

This comment has been minimized.

Copy link

commented Jan 24, 2019

How would you go about updating this?

@zana403

This comment has been minimized.

Copy link

commented Jan 25, 2019

How would you go about updating this?

Go to Hass-io dashboard - add-ons and update from there, you should have a card with an update and release notes.

@rlust

This comment has been minimized.

Copy link

commented Jan 30, 2019

How do you increase the amount of disk that the docker image uses?
I am running low on space on my HASSIO environment.

@nor500

This comment has been minimized.

Copy link

commented Feb 5, 2019

After running your script:
url -sL "https://raw.githubusercontent.com/home-assistant/hassio-build/master/install/hassio_install" | bash -s

docker container is starting but quitting after a few seconds later and then restarting again and then quitting again in an endless loop. Docker logs show the following error:

docker.errors.APIError: 403 Client Error: Forbidden (“cannot create network 944af717b2ab356d08c3d52cd179c39a71a47f8bfceab5b67bd29151cd2d171c (hassio): conflicts with network b88ab28cdd7484f95d26fadf685338fd1e585ef2653ab1d42eaa95f7fefdc873 (br-b88ab28cdd74): networks have overlapping IPv4”)

What can I do with that?

@Unpuertomex

This comment has been minimized.

Copy link

commented Feb 7, 2019

Had a problem with my Ubuntu server and had to reinstall everything. Using the same method you have listed here I was able to get hassio installed, however, this time around that last part is giving me an error regardless if I type it in or copy and paste, the error starts with install supervisor Docker container then invalid reference format

I've rebooted the server just incase but the problem persists...

@effemmeffe

This comment has been minimized.

Copy link

commented Feb 11, 2019

How do I uninstall all of this and start from scratch on my ubuntu 18.04?

@seetendra

This comment has been minimized.

Copy link

commented Feb 12, 2019

Install Portainer on docker and then use that to delete the Hassio and start from Scratch

@rlust

This comment has been minimized.

Copy link

commented Mar 5, 2019

Is anyone else running out of disk space on the image?

@bandric1

This comment has been minimized.

Copy link

commented Mar 14, 2019

Amazing Frenck works out of the box!

@jmmartinezcdo

This comment has been minimized.

Copy link

commented Mar 19, 2019

Hello @frenck ,
Thanks for the script, is great.
The only thing I am missing is how to change the hassio container (docker run) command. I'd like to add the --device argument so I can access USB port and enable z-wave. How can I do that? I have looked inside the services code, but as far as I can see, they only start the supervisor container.
Thanks.

@ageurtse

This comment has been minimized.

Copy link

commented Apr 20, 2019

Hello @frenck,

i can't get it installed on my ubunut server 19.04.
Docker won't install

this is the output of the script.
`root@automation:~# sudo curl -sSL https://get.docker.com | sh

Executing docker install script, commit: 2f4ae48

  • sh -c apt-get update -qq >/dev/null
  • sh -c apt-get install -y -qq apt-transport-https ca-certificates curl >/dev/null
  • sh -c curl -fsSL "https://download.docker.com/linux/ubuntu/gpg" | apt-key add -qq - >/dev/null
    Warning: apt-key output should not be parsed (stdout is not a terminal)
  • sh -c echo "deb [arch=amd64] https://download.docker.com/linux/ubuntu disco stable" > /etc/apt/sources.list.d/docker.list
  • sh -c apt-get update -qq >/dev/null
  • [ -n ]
  • sh -c apt-get install -y -qq --no-install-recommends docker-ce >/dev/null
    E: Package 'docker-ce' has no installation candidate`
@stringy92

This comment has been minimized.

Copy link

commented Apr 24, 2019

@jossie67

This comment has been minimized.

Copy link

commented Apr 24, 2019

I changed the line to
curl -sL "https://raw.githubusercontent.com/home-assistant/hassio-installer/master/hassio_install.sh" | bash -s
Finaly I get an error

[Info] Install supervisor Docker container
[Info] Install supervisor startup scripts
Failed to enable unit: File hassio-supervisor.service: Invalid argument

So I changed the install.sh the following

#URL_BIN_HASSIO="https://raw.githubusercontent.com/home-assistant/hassio-installer/master/install/files/hassio-supervisor"
URL_BIN_HASSIO="https://raw.githubusercontent.com/home-assistant/hassio-installer/1da6261ec7b46166fa7e77998a38dab7bcf013bf/files/hassio-supervisor"
#URL_BIN_APPARMOR="https://raw.githubusercontent.com/home-assistant/hassio-installer/master/install/files/hassio-apparmor"
URL_BIN_APPARMOR="https://raw.githubusercontent.com/home-assistant/hassio-installer/1da6261ec7b46166fa7e77998a38dab7bcf013bf/files/hassio-apparmor"
#URL_SERVICE_HASSIO="https://raw.githubusercontent.com/home-assistant/hassio-installer/master/install/files/hassio-supervisor.service"
URL_SERVICE_HASSIO="https://raw.githubusercontent.com/home-assistant/hassio-installer/1da6261ec7b46166fa7e77998a38dab7bcf013bf/files/hassio-supervisor.service"
#URL_SERVICE_APPARMOR="https://raw.githubusercontent.com/home-assistant/hassio-installer/master/install/files/hassio-apparmor.service"
RL_SERVICE_APPARMOR="https://raw.githubusercontent.com/home-assistant/hassio-installer/1da6261ec7b46166fa7e77998a38dab7bcf013bf/files/hassio-apparmor.service"
URL_APPARMOR_PROFILE="http://s3.amazonaws.com/hassio-version/apparmor.txt"

@cogneato

This comment has been minimized.

Copy link

commented Apr 24, 2019

@ageurtse for 19.04 you would need to install docker from test channel at the moment and you would use:
curl -fsSL get.docker.com | CHANNEL=test sh

And things have been moved so the last line would be:
curl -sL https://raw.githubusercontent.com/home-assistant/hassio-installer/master/hassio_install.sh | bash -s

The urls @jossie67 pointed out have been fixed now

@brianhanifin

This comment has been minimized.

Copy link

commented Apr 27, 2019

Thank you @stringy92, that missing .sh was causing all of the 404 errors. I now have it installed on my Ubuntu Server 18.10 laptop.

@frenck

This comment has been minimized.

Copy link
Owner Author

commented Apr 27, 2019

Gist updated with new locations.

@nthewara

This comment has been minimized.

Copy link

commented Apr 28, 2019

Using this method - how can we run validate config from the VM ? most of the documentation points to running hass -c /config but I can't seem to find the hass executable once the installation completes using above method.

@georgem11292

This comment has been minimized.

Copy link

commented Apr 30, 2019

@Shamane2000 I am having the same issue you were. Can you expand on how you solved it with the information above? I am not good with Linux.

@avellanet

This comment has been minimized.

Copy link

commented May 24, 2019

This is what I get...running latest Raspbian on RP3B+. I got HA running, just can't install Hassio.

root@raspberrypi:~# wget https://raw.githubusercontent.com/home-assistant/hassio->build/master/install/hassio_install.sh
-bash: build/master/install/hassio_install.sh: No such file or directory

root@raspberrypi:~# curl -sL "https://raw.githubusercontent.com/home-assistant/hassio-installer/master/hassio_install.sh" | bash -s
[ERROR] Please set machine for armv7l

@clabnet

This comment has been minimized.

Copy link

commented May 24, 2019

On Container Station of my QNAP I have loaded a container Ubuntu 18.04, with all prerequisites for running this script (I think).
At first systemctl start on systemctl start hassio-apparmor.service command I have this error:

. . . 
[Info] Install AppArmor scripts
+ mkdir -p /home/hassio/hassiocfg/apparmor
+ curl -sL https://raw.githubusercontent.com/home-assistant/hassio-installer/master/files/hassio-apparmor
+ curl -sL https://raw.githubusercontent.com/home-assistant/hassio-installer/master/files/hassio-apparmor.service
+ curl -sL http://s3.amazonaws.com/hassio-version/apparmor.txt
+ chmod a+x /usr/sbin/hassio-apparmor
+ systemctl enable hassio-apparmor.service
+ systemctl start hassio-apparmor.service

**System has not been booted with systemd as init system (PID 1). Can't operate.**

Any help ? Thanks

@alain57

This comment has been minimized.

Copy link

commented Jun 10, 2019

just for information at my debian the installation was ok, but i needed modify the hassio-supervisor file and added the docker argument
-p 8123:8123 to access the server
indeed my installation is done on a server that has a local ip in form 192.168.1.X
whereas the supervisor seems to have a docker IP that is different from my local network.

@hazyitsm

This comment has been minimized.

Copy link

commented Jun 10, 2019

I already setup the hassio environment on Ubuntu Server 18.04, using the instructions from OP. Worked perfect. Now my question is, can I use the same process to setup a second hassio environment on the same server? I assume I'd need to adjust the script, but I'm not sure. Or would I be better off creating another Ubuntu server as a VM on the machine and setting everything up there?

My end goal is to have a hassio dev/test instance for playing with. I do have an used RPi if needed, but I was hoping to create the dev instance as close to prod as possible.

I'm open to alternative ideas. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.