You just won the lottery. How do you build the most stable HA server?

In fairness, I was presuming from the way you worded your first post that you’d already installed a newer python version, but realised that you can’t ‘upgrade’ the venv.

Adding installation of python to the process, let’s call it a nice round 15 minutes, with time for a tea break at half time.

Honestly, it’s easy as pie.

Download and install python 3.6.4, delete the old venv (NOT your homeassistant folder!), create a new venv with python 3.6, install homeassistant in it, done. :+1:

1 Like

I’ve just looked in that thread you linked to, and I can see why you were apprehensive. There is no reason to do half of the steps in there.

As soon as you copy in your configuration and run homeassistant it will install all the requirements you need, same as it would if you added a new component and restarted. So all that saving requirements.txt is guff tbh (no offence to the author of that thread)

1 Like

I’m planning a new install soon to meet the python requirement. I’m waiting on the new LTS release of Unbutu due later this month.

Running on a old desktop has been rock solid for me.

Detail of my setup are on my repo.

If I won the lottery about the only thing I would change is to move to some more power efficient hardware.

Yeah, agreed, some super-awesome server device but that would just be for fun, the actual install of homeassistant would still be a venv on whatever device I happened to decide was the most minty for shelling out the cash on.

i have zwave and followed the steps in that thread. I skipped the part about requirements.txt and instead did a normal home assistant install once python was updated. Once you copy your configuration everything else will reinstall. If you see any errors in the logs you can most likely manually install the failed module.

My personal install is on a venv in a i5 with 6gb of RAM on a SSD…runs really smooth and hass restarts are 30 seconds normally. I am also running zoneminder, nextcloud, node-red, inlfuxdb and grafana.


Step by step, because I’m sat at work bored so may as well…

(Assumes you have a privileged user, and an unprivileged account called homeassistant upon which you run your instance, and that the venv is located at /srv/homeassistant)


Starting as privileged user…

sudo apt-get install build-essential tk-dev libncurses5-dev libncursesw5-dev libreadline6-dev libdb5.3-dev libgdbm-dev libsqlite3-dev libssl-dev libbz2-dev libexpat1-dev liblzma-dev zlib1g-dev

tar xzvf Python-3.6.4.tgz
cd Python-3.6.4/
sudo make install

Make tea

cd /srv/homeassistant 
sudo rm *
cd .. 
sudo chown homeassistant:homeassistant homeassistant
sudo su -s /bin/bash homeassistant
mv .homeassistant/ .homeassistant_backup
cd /srv/homeassistant
python3.6 -m venv .
source bin/activate
pip3 install homeassistant

Wait a minute, press ctrl + c

cd .homeassistant 
rm *
cd .. 
mv .homeassistant_backup/* .homeassistant/
sudo reboot 

Presuming your autostart service was working before and we’ve installed everything back to the exact same place should be back up and running pretty sharpish. Remember that when it restarts it will be downloading all the requirements and dependencies specific to your installation so it may take a while.

Hope this helps.


I’d build me a bad ass unRaid server and leave my little 24 TB single CPU Xeon box for HomeAssistant, NodeRed, etc all running in docker containers.

1 Like

If running venv I would create script and automate upgrade process. This would include some “upgrading,please check back in 5min” webpage.

Docker is 20 second upgrade, 1 minutes max. Not saying it’s better, just giving time for your reference.

In both cases, breaking changes may hose the process so for this reason I only upgrade for new feature or some security update.

That approach can be a double edged sword. When you do decide to upgrade the chances of hitting breaking changes is higher, and you probably have to address several at once.

Plus finding bugs in every new version helps the software to be better in the long run.

1 Like

@anon43302295 That worked perfectly. No glitches, booted right back up. You didn’t even have any typos (are you a robot? not judging, just curious). Thanks for all the help.


Ha, no, but I type these things out on my phone so much that the predicted next word thingy takes care of most of it :smile:

How long did it take?

maybe 10 minutes

1 Like

Ace :+1:

Glad you’re all sorted :slight_smile:

Expanding on the original question here. With Home Assistant (HA), AppDaemon (AD) and the AD web Dashboard running on the same box, my environment was overwhelming my PI, even breaking it out to two PI’s was still giving me performance issues. So I bit the bullet and bought one of these little headless bricks that are about the size of 2 PI’s put together. This resolved my performance issues and has been rock solid since I did it about 2 months ago.
Because I now have a more powerful system I felt the need to setup virtual environments for HA and AD. This protects them from each other and from any other applications I might decide to install on this server in the future. If you are limiting your server to just HA and AD, and your are not a developer that needs isolated installs of AD or HA, then there really isn’t a need for virtual environments or docker installs in my opinion. Just use the basic install. Personally, I would stay away from hasio for a while (6 months or so) longer until it’s growing pains have subsided.

Thank you so much. I will try tonight.

1 Like

I ended up by installing it in my Synology NAS which has a UPS connected. Zero problems so far. If you have one you may consider it as an option.

1 Like

Same as @soukron but limited to HA 0.64.3 owing to python 3.5.1 limitation on synology. However this setup is very stable

Maybe I can help. I installed Debian Chroot and used it to get a newer python version.

There are a few articles about how to set up Debian Chroot (basically [1]) but feel free to ask me anything you need.

[1] Debian Chroot · SynoCommunity/spksrc Wiki · GitHub

1 Like

Sorry to ask. Is the command above available only for HA version lower than 0.64.3 and python 3.5.1?

Currently, I have HA 0.67.1 and python 3.5.4 (OS Raspbian Stretch Lite and Hassbian) Can I use the command above?

If that was for me, in reference to upgrading to python 3.6.4, then yes those commands should work (so long as the users and venv location are correct).

1 Like