Best OS to use

Im curious what people are running on? Ive used an ubuntu vm and the speeds are so much faster however it crashes every few hours. I just tried debian 9 on a vm, but having python issues. Let me know what os your running, i would prefer to be able to make it a vm.

Thanks!

My Docker host runs Alpine Linux, on a NUC. I run all the things in Docker. I never have to worry about python versions.

hmmm thank you. I dont know much about docker but I guess I should start looking into it.

This NUC is dedicated to running home automation related functions only, so my home assistant container is started like this:

docker run -d --name="home-assistant" --privileged --restart unless-stopped -v /dev/ttyACM0:/dev/ttyACM0 -v /srv/docker/hass-config:/config -v /etc/localtime:/etc/localtime:ro --net=host homeassistant/home-assistant:latest

/srv/docker/hass-config contains my configuration directory. I also have syncthing pointing to that directory and it syncs up with my desktop and laptop so that I can modify my configs on my desktop/laptop with a real text editor and it syncs in almost real time over to the NUC

1 Like

My test configuration is a virtualbox vm with Lubuntu 17.10. I’ve never had problems with it, but obviously it is not running all the time.

Is this HA or the VM that crashes?

home assistant. it just stops with nothing at all in the logs…

This how it looks at my side:

  • Development: Fedora 27
  • Production: Debian 9
  • “Play around”: Alpine Linux, Ubuntu, CentOS

using Ubuntu/Docker/Hass.io. running on VMware ESXI.
Loving Hass.io atm!

I’m running Home assistant on Ubuntu 16.04 Core under Hyper-V and it runs fantastically. I do not get any “crashing” problems as you say.

This seems more likely to be something to do with your configuration than the OS.

Do you have some hardware attached? What components are you using? I would try removing a few components at a time until the problem goes away.

1 Like

Thanks for all the feedback. It sounds like a lot of docker installs. Is docker more stable than venv? Im thinking of trying a ubuntu server with docker install on esx.

@Ross_Davey are you running in docker on ubuntu or venv or just right on ubuntu?

The server will only be used for HA, is there a reason I shouldnt just install it without using docker or venv?

Thanks again

EDIT: Ive actually been running on ubuntu 16 server with venv for 3 days with only one crash…but it was due to some myq errors that randomly happened for a day. I would LOVE for it to be so stable i didnt worry about it

on the install page it shows how to install and i got it installed using docker and can see the config files. But do I need to “enter” the docker container like I do with venv or if im ssh’d to that server am i already in it. What im thinking is i upgraded to python 3.6 and want to make sure that HA is using that version, along with if i install some dependencies I want to make sure ha has access to those…

That’s not how Docker works. :wink:

i got it setup and working, trying to add duckdns and letsencrpt. i got my cert fine but i was doing the change permission thing and say homeassistant isnt a user. if you could elaborate a little it would be helpful. Ive been reading and getting alot of progress. I think if i get this lets encrpt setup im good. ill let it ride in here awhile and hopefully be more stable

a Docker container is it’s own environment. You shouldn’t ‘enter’ it for anything if it is set up correctly. You don’t ‘install’ anything within the already running Docker container.

I don’t really know what this means, but you need to look at how Docker works first.

i got that, i been reading and i have it setup with all my config files over. understand upgrading and dependencies, set static ip, got my certificate from lets encrpt. On a venv install i have to change permissions to the certs and i create a ssl group and assign homeassistant user. its man im sure ill figure that last part out, thanks for the help

Yeah, you don’t have to do all that here.

You should use a letsencrypt docker container and bind mount where your certificates are located on your host, and let the HASS docker container access them through a bind mount…

Yes, I’m running on straight up ubuntu, no docker or venv. Had no problems with it.

Docker with Alpine as host on a Nuc! That’s exactly my setup also (since a couple of days). :slight_smile:
Do you still run it in that environment?
Seem’ed like the ultimate solution, but I have run in to problems.

I have the xiaomi_aqara component configured, and I have tried my config both on different flavors of Raspberry PI, on my previous install on my Nuc which was Debian. No problem. But in Docker and Alpine linux as host, I get this error when trying to send events to the Xiaomi Gateway (play ringtone, turn on light etc):

Error executing service <ServiceCall light.turn_on: entity_id=['light.gateway_light_34ce00fb510b']>
Traceback (most recent call last):
  File "/usr/src/app/homeassistant/core.py", line 1010, in _event_to_service_call
    yield from service_handler.func(service_call)
  File "/usr/src/app/homeassistant/components/light/__init__.py", line 270, in async_handle_light_service
    yield from light.async_turn_on(**params)
  File "/usr/local/lib/python3.6/asyncio/futures.py", line 327, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/local/lib/python3.6/asyncio/tasks.py", line 250, in _wakeup
    future.result()
  File "/usr/local/lib/python3.6/asyncio/futures.py", line 243, in result
    raise self._exception
  File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/app/homeassistant/components/light/xiaomi_aqara.py", line 98, in turn_on
    if self._write_to_hub(self._sid, **{self._data_key: rgbhex}):
  File "/usr/local/lib/python3.6/site-packages/xiaomi_gateway/__init__.py", line 288, in write_to_hub
    data['key'] = self._get_key()
  File "/usr/local/lib/python3.6/site-packages/xiaomi_gateway/__init__.py", line 337, in _get_key
    backend=default_backend()).encryptor()
  File "/usr/local/lib/python3.6/site-packages/cryptography/hazmat/backends/__init__.py", line 15, in default_backend
    from cryptography.hazmat.backends.openssl.backend import backend
  File "/usr/local/lib/python3.6/site-packages/cryptography/hazmat/backends/openssl/__init__.py", line 7, in <module>
    from cryptography.hazmat.backends.openssl.backend import backend
  File "/usr/local/lib/python3.6/site-packages/cryptography/hazmat/backends/openssl/backend.py", line 54, in <module>
    from cryptography.hazmat.bindings.openssl import binding
  File "/usr/local/lib/python3.6/site-packages/cryptography/hazmat/bindings/openssl/binding.py", line 13, in <module>
    from cryptography.hazmat.bindings._openssl import ffi, lib
ImportError: /usr/local/lib/python3.6/site-packages/cryptography/hazmat/bindings/_openssl.abi3.so: cannot change memory protections: Permission denied

I am new to Alpine, and I don’t find anything at all on this by Google. Perhaps you have an idea on what could be causing the problem?
I am running the HA container in privileged mode with host networking, so I guess it has to do with the host.

Yes.

Are you running your docker instance with --net=host?