Moving from RPi to Docker


I thought I’d investigate running my Home Assistant on a Synology NAS.

Before investing I decided to have a play with Home Assistant in a docker container running on my iMac.

It’s all installed and running, albeit empty of automations, and I notice a few differences from the RPi.

I have a couple of issues I’d appreciate some help with:

  1. As there’s no Add-On store, how do I add Samba Share and IDE like on my RPi?

  2. With no HassIO, how do I restore from a snapshot created on my RPi and subsequently make a snapshot back-up?

I’m sure there’'l be loads of other tweaks required but these are the two I need help with to get me going.

Any other advice on the transition will be much appreciated.

  1. You don’t need the add-on for Samba. If you’re on linux simply run sudo apt-get install samba (or equivalent command to install)
  1. what snapshot are you looking to restore? You just need to copy the content of your HA folder on the new system and make sure it’s set as a volume for Docker to give to HA’s container


This isn’t hassio, so you would have to install hassio if you want the easy to add features like these.

If you are running home assistant on a NAS, let the NAS handle the SAMBA Share, since that’s its job.

If you want an IDE like the add-on provides, you can duplicate this with docker and some work on your part.

Add-ons are nothing more than docker images running alongside home assistant.



I’m running Docker Desktop for mac. I just entered the following in Terminal and Home Assistant now appears on localhost:8123.

$ docker run -d --name="home-assistant" -v /PATH_TO_YOUR_CONFIG:/config -e "TZ=America/Los_Angeles" -p 8123:8123 homeassistant/home-assistant

So, I may well have Linux now but I’m not sure where to run _sudo apt-get install samba

The snapshot I was planning to restore has been created on my RPi.

How do I set it as a volume for Docker?

Apologies if this is all basic but I have no experience of terminal, Linux or Docker.


No, you’re running on a Mac. You don’t apt-get install anything.

You don’t set your backup as a volume.

If you ran this exactly, your /PATH_TO_YOUR_CONFIG directory doesn’t exist.


Thank you. What work on my part will be required? Could you please point me at some instructions?

As of a couple of hours ago I had no experience of Docker and want to determine wether the befits are there to make me move from RPi to a Synology NAS.


I know, I edited before pasting in Terminal.

My docker home assistant lives at /homeassistantdock/


You will need to stand up your own docker container using similar methods that the add-on uses. You will need to figure out what you need to convert.

You would need to find an add-on you want, read the dockerfile for it, and figure out how to convert that to your needs for your system.

It sounds like you need to just run HASSIO on a VM, because I doubt at this point you will understand any of this.


Personally, I recommend just running normal Home Assistant Docker, and not hassio. Learn how to do it yourself. You don’t need a web IDE, you can use any text editor you like. The add-ons are merely a way of expanding on the ‘appliance’ like nature of hassio. You can do any of that stuff if you learn how Docker works.


OK, that all makes sense.

What other differences are there to running HassIO that I should be aware of?

Does an MQTT server need to be run in a separate docker container?


It’s recommended, but HA has a built in broker.

Not really much else.

There are no snapshots, add-ons are not easy to install (you will have to figure out how to replicate the functionality of what you want), and that’s about it.


Thank you!

What makes it recommended over the built in broker and which broker would you recommend?


I did the samething back in august, I run the standard Homeassistant/home-assistant docker. And seperate docker for Node-red, Samba, appdeamon, nginx and a few other things.

This thread helped me out a great deal.


You can also use the embedded MQTT broker. A separate broker is advised for more stability.


Brilliant! Thank you.


Having MQTT broken out gives you a little flexiblity. I have some DIY devices that send status updates to MQTT. If HASS is down or rebooting , those updates are not put on the MQTT server and picked up when HASS comes back up. I can reboot HASS docker and everything else stays up. MQTT. NGINX , NodeRed , etc.


I’ve inadvertently stopped my HA server running in docker and now can’t access it to restart it.

How od I restart the docker container, if that’s the correct terminology?

EDIT: Should have guessed at it! $ docker restart home-assistant


OK, now that I’m back in, I’ve copied the contents of my Rpi HA Config folder to my new instance of HA running in Docker on my iMac.

However, I’m not seeing anything from my Rpi version. The docker version is still virgin.

What do I need to do have it pick up the copied config files?



You literally only need the config directory where the configuration.yaml is


Yes, that’s what I’ve copied over.