Advice for someone starting from scratch?

[quote=“flamingm0e, post:31, topic:135555”]
None of the add-ons run inside hassio. It doesn’t do docker inside of docker.

Add-ons are other docker containers running alongside hassio on the same host. It’s not really any different at all to running docker and managing it yourself.
[/quote]Oh. I assumed the add-ons were running inside the Hass.io container. I didn’t realize that the add-ons were separate Docker containers. Yeah, Docker containers inside a Docker container doesn’t make much sense. Clearly, I won’t be avoiding Docker like the plague! Thanks for clearing up my misconception, Flamingmoe!

If you ever get around to installing Portainer, you will be able to see all the Docker containers, including the ones that you have installed via Hass.io. Every add-on is a separate Docker container.

That’s pretty cool! Best of both worlds, right?

Fair enough. Reviewing my initial post, I see what you mean. My bad. Sorry. The thing is, I’m no stranger to Raspberry Pi’s and SD card issues. What I was really asking (ergo my very first question about add-ons — and again, I apologize for not communicating this better) was essentially - “So, I’ve installed Hass.io… what should my next steps be?”

Got it. Now that I understand that all these add-ons are going to be running in containers (and I’ll be unable to avoid my nemesis, the evil Docker :rofl: ), I guess Portainer is going to be fairly essential. I’ll let the add-ons do the work, though since Docker seems to have it in for me! :rofl:

Awesome! I totally missed the earlier link. I’ll read it thoroughly. Much obliged for the help!

I’m following your guide and I have a couple of follow up questions. I don’t understand the intent of this step:

6.) Copy your yaml files to the NUC /PC/ RPi, normally in the location /usr/share/hassio/homeassistant.

Copy them to where? Is this an extension of “4.) If you have a current HA install on another machine”… and only applies if that applies?

7.) Install Portainer to manage your Docker containers for anything that you might want to run that isn’t available through Hass.io or HACS.

I thought that if I installed Hass.io in a Docker container, then any add-ons I install will be inside that same Docker container. You and others on this thread said I was wrong (@flamingmoe even laughed at me about this) – but the way you worded step 7 makes it sound like I was right in the first place. Now I’m really confused!

Run this command in terminal/Putty;
sudo docker run -d -p 9000:9000 --name portainer --restart always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer

This is the command, regardless of whether I’m installing to a PC or a RasPi? Don’t Docker commands usually differ depending on the host platform?

Install and configure Samba for file sharing.

Just to confirm, if the rest of my machines are Linux or Mac, I don’t really need Samba, right? This is just for Windows PCs?

I didn’t laugh at you about this. I laughed that you said HassIO doesn’t have any problems. I find this absolutely hilarious.

The Docker command itself doesn’t differ. Sometimes there is a particular image associated with an architecture (that’s up to you to figure out if the docker image you want to run has different tags based on the architecture). It’s dependent on the developer of that image.

Samba works on every platform, so Samba is the best way to go about it. Samba is not just for Windows. It is the recommended file sharing protocol for pretty much any LAN.

2 Likes

Got it. Thank you for all the clarifications!

OK, so that’s a little scary…

It’s open source software bud, if you want a bulletproof solution without the odd bug here and there, HA isn’t for you.

Exactly where it says in the line your quoted - "normally in the location /usr/share/hassio/homeassistant "

And yes, you are still wrong. :wink:

Add-ons are still not installed inside the hassio container. They are installed in their own containers.

The point of that line was to say that since this is a generic Linux install in docker there are other apps you do can run besides the ones available as an add-on. And if you install an add-on you don’t necessarily need pertained because those are managed thru hassio. But you can also still manage them with pertained too if you want.

2 Likes

I went through this recently. I didn’t even know what portainer was until a few weeks ago, but what it will do is show you visually how docker is setup. You can see the individual dockers… If you are a visual slanted person like, me it makes it easier to understand what is going on.

As far as samba goes: Yes you probably still want it because it makes it easy to backup your configs every night. If you are just getting started MAKE DARN SURE YOU BACKUP… You will make mistakes, the update might hose your existing install, you just need to be prepared because having a backup takes away the pain of losing your work and having to start over.

Linux Mint and Libre Office are open source, too. They both give me less trouble than Windows or MS Office!

OK, then copy them from where? I still don’t understand the instruction.

No great surprise there! Thank you, finity, for the clarification.

I think you missed some of the earlier stuff. I’ve used Docker (and Portainer) before. I understand what they are and what they do - but I had some really gnarly errors/failures that no one was able to explain or help me resolve. I’m starting from scratch again largely due to the nightmares I had with Docker so I’m more than a little gun-shy. I put quite a few hours into it before and had to scrap it all. With two small businesses and a disabled wife, I don’t get a lot of discretionary time for stuff like this, so when I put a lot of time into something and it all just goes down the toilet, it feels pretty catastrophic. I just really don’t want it to happen again.

That’s good advice and I’m a big believer in backups. I plan to install and use the Google Drive backup add-on. Have you tried that one?

4.) If you have a current HA install on another machine, backup all your yaml files, lovelace config, etc to your PC, USB or HDD.
.
5.) Hass.io installation steps…
.
6.) Copy your yaml files to the NUC /PC/ RPi, normally in the location /usr/share/hassio/homeassistant.

If you have a brand new installation, steps 4 and 6 do not apply to you. If you have a current HA install, you would have backed up your files in step 4, therefore, would have them to restore in step 6.

The decision you make regarding install method is totally up to you and as mentioned, there are pros / cons to everything, even if the only con is that you might not fully understand the setup (like my general lack of Linux knowledge).

I started off with HA by installing HassIO on a RPi3b and it worked fine for about 2 years on a single SD card. I recently upped it to a NUC purely because I figured I was pushing my luck with the SD card, but more importantly I wanted the power to run a CCTV NVR on the same device and the RPi simply wasn’t going to cut it. After a failed attempt at installing Ubuntu server/ Docker / HassIO which simply lost everything after a power cut I started again. The second time around I opted for the super easy option of the NUC HassOS/HassIO image. It has now been working perfectly for months. It can do everything you stated to want to do in your first post. However, I can’t mount a external drive to get the CCTV recording to save to that rather than the internal SSD. This is pretty much the only reason I plan to have another crack at installing Ubuntu server/ Docker/ HassIO again (this time using @kanga_who 's awesome tutorial that I saved to my Google Drive!) …that and I have another Docker container I would like to run

Some people get all uptight about not having full control / access over the host (don’t attack me for saying it) but you will probably find that this is not something you need out of your HA server anyway. At the end of the day, I could just run my CCTV NVR on another device if I wanted to and leave HA the way it is… or just fit a bigger SSD

Nice of you to say, thanks @sparkydave. I’m doing some minor updates to that guide, I’ll message you the new version (Ubuntu specific with RPi info removed) when it’s finalized. 99% done.

Cheers! I plan to buy a new SSD to install onto tomorrow, that way I always have the original HassOS/HassIO SSD as a fallback if I c0ck it up :laughing:

Gotcha. That’s what I assumed you meant but I didn’t want to screw something up by skipping an important step. Thanks for the clarification.

Thanks, too, for the really excellent guide. I’ve incorporated it into the build guide/project plan for my Home Automation project. I always like to map out big projects in detail, fully documenting the WILLWIF (What It Looks Like When It’s Finished), Goals, Milestones, Steps, Sub-Steps, etc. (It’s admittedly rather anal but it has served me well over the years as an ADHD coping mechanism.) Then, as I execute the plan, I add notes so that if I have to do it again later (or if I pass it on to help someone else), hopefully it’s trained-monkey simple.

I am by no means a Linux guru, but my main workstation is a triple monitor affair running Linux Mint. I also have a couple different servers and a laptop running various flavors of Linux. On top of all that, I’ve converted several friends and family members from Windows to Linux. So… if I can be of help, please feel free to PM me.

That’s extremely encouraging! I plan to set a reminder for myself to (every other month) shut down HA, image the SD card, write it to a different card and pop that one in and start back up. That way, even if a card dies, I’ll have a backup that I can just pop in and boot up. My system can be back online in minutes and, at the most, I’ll have to restore (from Google Drive backups) no more than 2 months worth of updates and changes. This situation also allows me the luxury of designating a 3rd SD card as a test/dev card that I can pop in, play around, test things, and have the production environment back up before the wife even notices that things aren’t working right.

A few months ago, I did some deep thinking about whether to go with one, big, powerful server or several smaller, more lightweight, single purpose servers. I got a lot of great input from people over on the ServeTheHome and OpenMediaVault forums. In the end, I came to the conclusion that if a Raspberry Pi (or an Odroid HC2) can get the job done, I’ll lean that way because they’re so ubiquitous and cost effective. Even if the motherboard goes bad, I’m looking at $40-70 to replace it. (And at that price, I can afford to keep a spare around!) As for SD card failures, those are easily mitigated as mentioned above.

P.S. You might consider an Odroid HC1 or HC2 for your NVR.

1 Like

My current machine is an old Dell Optiplex 990, Core i5 2400, 8gb ram, SSD and HDD. I paid $105 for it on eBay, plus the cost of a new SSD ($40). So all in for $150.

That machine currently runs everything in docker;

  • Hass.io
  • Portainer
  • PiHole (hass.io add-on)
  • Unifi Controller (hass.io add-on)
  • Zigbee2mqtt gateway (hass.io add-on)
  • Google Drive Backup (hass.io add-on)
  • Plex media server
  • Transmission
  • Radarr
  • Sonarr
  • HA-Dockermon
  • Shinobi (CCTV - 6 cameras connected)
  • OVPN
  • MQTT server

My point being when a single RPi is $50, plus power brick, SD, case etc, lets call it $100 all in, for not much extra you can have a far more powerful (yes, older) machine, that can be an AIO solution. You don’t need to spend much to get something that will comfortably run everything you will probably want or need.

Just a thought.

I hear you. I’ve thought about the value proposition and I’ve considered repurposing a few of the many older desktops I have on shelves out in my garage. There’s no question that it costs more (up front) to have several single (or sometimes dual) purpose machines. The biggest problem with the “1 big server” approach is that it puts all my eggs in one basket. If my Hass.io fails, my Emby Server will probably experience some down time while I fix it. If my NextCloud fails, it could take out my personal web server, etc. I don’t have the resources to build a big server cluster or a second/redundant system, and even if I did, I don’t want a jet engine in my office with me. Multiple Raspberry Pis and/or multiple Odroid HC1s/2s take up a LOT less space, generate zero noise, and use less electricity (not that the savings adds up to much) plus there’s a lot of good info/resources out there in case I decide to cluster some RasPis.

My backup plan back when I was still running HA in a venv on a RPi was to keep copies of my folder for the configuration files. Then right before I did a HA version update or any other “big” software upgrade I would make an entire SD card image. So that put me on a maximum of every two weeks or less.

I had a bad update experience one time and because I had the image from right before the update attempt all I had to do was re-burn the good image to the card & in 15 minutes I was back up and running with no other input required to fix anything additional.

1 Like

I think you missed some of the earlier stuff. I’ve used Docker (and Portainer) before. I understand what they are and what they do - but I had some really gnarly errors/failures that no one was able to explain or help me resolve. I’m starting from scratch again largely due to the nightmares I had with Docker so I’m more than a little gun-shy. I put quite a few hours into it before and had to scrap it all. With two small businesses and a disabled wife, I don’t get a lot of discretionary time for stuff like this, so when I put a lot of time into something and it all just goes down the toilet, it feels pretty catastrophic. I just really don’t want it to happen again.

Then you need to use something like virtual box or proxmox so if something goes wrong with the host (docker, etc) you can go back in time with their snapshot abilities.
I did not have any issue with docker but had plenty of trouble getting Zwave to tranfer over and those snapshots saved the day more than once.

That’s good advice and I’m a big believer in backups. I plan to install and use the Google Drive backup add-on. Have you tried that one?

No I just back up that samba share to my nas every night. Then that backup along with the ubunta host is backed up to a second nas as well.