Skip to content

Instantly share code, notes, and snippets.

@Pablohn26
Created March 5, 2021 14:16
Show Gist options
  • Save Pablohn26/529ab78c88c9778e4305090086608d31 to your computer and use it in GitHub Desktop.
Save Pablohn26/529ab78c88c9778e4305090086608d31 to your computer and use it in GitHub Desktop.
Migrate from Home Assistant container (docker-compose) to Home Assistant Supervised

We want to migrate from Home Assistant Container (docker-compose.yml) to Home Assistant Supervised.

The main idea is to copy the /config file from docker container to main Home Assistant Supervised config folder (/usr/share/hassio/homeassistant by default)

To do so, first we need the path to the source /config folder, in my case /root/compose/ha/config

Then we need to know the path to the destination /config folder, /usr/share/hassio/homeassistant using Home Assistant Supervised default installation

The steps are:

  1. Install Home Assistant Supervised
  2. Stop your Home Assistant Container with docker-compose stop
  3. Sync config folders using the following command rsync -avh --delete /root/compose/ha/config/ /usr/share/hassio/homeassistant/
  4. Rebuild Home Assistant Supervised using the following command ha core rebuild
  5. Now you will have your Home Assistant Container installation migrated to Home Assistant Supervised.
version: "3"
services:
homeassistant:
container_name: home-assistant
image: homeassistant/home-assistant:stable
volumes:
- ./config:/config
devices:
- /dev/ttyACM0:/dev/ttyACM0
environment:
- TZ=Europe/Madrid
restart: always
network_mode: host
@janmalec
Copy link

Thanks, worked great first time!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment