[Guide]Transfer files to components folder

Spent a good few hours trying to figure out how to get access to the components folder without going through the whole USB key transfer steps documented in https://developers.home-assistant.io/docs/operating-system/debugging/#ssh-access-to-the-host

I host HASS on Proxmox and so following the whole USB loading to gain ssh wasn’t a good method for me. Instead here’s how I did it

A small disclaimer here:
Proceed only if you know exactly what you’re doing. I will not be personally responsible or provide solutions if you break anything in HA and can’t revert your changes. There IS a good reason for keeping this out of reach in GUI.

Go into the Proxmox console and type


docker ps -a 

Shows you all the docker containers currently running on the OS

docker exec -it homeassistant /bin/bash 

to get into the container’s environment

This is where you can find the custom_components folder that everyone has access to

The components folder is located here - /usr/src/homeassistant/homeassistant

In my case what I needed to do was clone an unreleased commit into the integration folder. I did it by uploading the file into custom_components and then moving it into the relevant integration folder.
The changed file was


I made a backup of the current one and copied the updated copy into the integration folder before restarting HA.

##In the integration components folder (eg. /usr/src/homeassistant/homeassistant/components/myintegration/)
mv __init__.py __init__.py.bak
cp /config/custom_components/__init__.py __init__.py
1 Like

Why not just install the samba add-on? Or transfer using SFTP with the SSH add-on? Or get the FTP server add-on to transferring over plain old FTP?

Sounds like quite the hassle for something that can just be done dragging and dropping instead.

Because none of the addons will actually let you access the components folder. They are basically sandboxed in other containers.

This is what ssh will show you about the /usr/src folder… empty.

Well, the thing is, you shouldn’t be needing the components folder at all. Any integration can be overridden as a custom_integration.

The practice shown in this thread is complex and really not needed.

And of course, you can alternatively (and recommended) use a development environment as written/documented on our developer portal.

I totally understand, but it’s not for lack of trying. I have tried to place the integration in the custom_components folder but it wouldn’t load correctly whether it was the current branch or unreleased one.
In my case as described, it’s a small edit in init.py that fixed a big problem for me so well worth the effort. In weeks or months should a new HA release finally contain the fix, then these changes will get overwritten anyway as intended.

Thank you! Huge help.