How to Copy Files From GitHub to Home Assistant

Moving files from GitHub into your Home Assistant environment is a common task — whether you're pulling in a custom integration, a YAML configuration snippet, a Lovelace dashboard, or a community-built automation script. The process isn't complicated, but it does branch depending on your setup, your technical comfort level, and how Home Assistant is installed.

Why You Might Need Files From GitHub

The Home Assistant community is deeply connected to GitHub. Most custom components, HACS integrations, Lovelace card plugins, themes, and blueprint automations are hosted there. While some of these are installable through the Home Assistant Community Store (HACS) automatically, there are plenty of cases where you'll want to pull files manually — particularly for unofficial components, personal forks, or configurations shared by other users.

Method 1: Using HACS (Home Assistant Community Store)

If your goal is to install a custom integration or frontend plugin, and that repository is listed in HACS, this is the most straightforward path.

HACS connects directly to GitHub and handles the file transfer for you. Once HACS is installed as an add-on:

  1. Open HACS in the Home Assistant sidebar
  2. Browse or search for the repository
  3. Click Download or Install

HACS places files in the correct directories automatically — typically /config/custom_components/ for integrations or /config/www/ for frontend resources.

The limitation: HACS only works with repositories that are either in its default index or manually added as a custom repository. If the repo you need isn't listed, you'll need a different approach.

Method 2: Using the File Editor or Studio Code Server Add-On

For smaller files — a YAML snippet, a script, a single configuration file — you can copy content from GitHub manually:

  1. Open the file on GitHub and click the Raw button to view plain text
  2. Select all and copy
  3. In Home Assistant, open File Editor (or Studio Code Server if you have it installed)
  4. Navigate to the appropriate directory
  5. Create a new file or open an existing one and paste the content

This works well for blueprints, Lovelace dashboard YAML, and custom template scripts. It requires no command line knowledge and works entirely through the Home Assistant UI.

Method 3: SSH and the Terminal

If you're running Home Assistant OS or Home Assistant Supervised, you can install the SSH & Web Terminal add-on and use command-line tools directly.

Once connected via SSH, git or wget/curl can pull files from GitHub:

# Clone an entire repository git clone https://github.com/username/repository-name.git /config/custom_components/component-name # Or download a single file wget -O /config/scripts/my_script.yaml https://raw.githubusercontent.com/username/repo/main/my_script.yaml 

Using git clone is useful when a repository contains multiple interdependent files — for example, a custom component that includes Python files, a manifest.json, and translation folders. Manually copying each file individually creates risk of missing something.

🔧 Important: After placing files in /config/custom_components/, Home Assistant typically requires a restart to load the new integration.

Method 4: Samba Share or Network File Access

If you prefer to work from your desktop rather than inside Home Assistant's interface, you can mount your Home Assistant config folder as a network drive using the Samba Share add-on.

Once mounted:

  • Download the files from GitHub to your computer (either via git clone or direct download as a ZIP)
  • Copy them into the appropriate folder in the mounted share

This approach is popular with users who are comfortable managing files on a PC or Mac and want a more visual file management experience.

Where Files Need to Go 📁

Placement matters. Putting a file in the wrong directory means Home Assistant either won't find it or won't recognize it.

File TypeCorrect Directory
Custom integrations/config/custom_components/component-name/
Lovelace resources (cards, themes)/config/www/
Blueprints/config/blueprints/automation/
Scripts and automations (YAML)/config/scripts/ or /config/automations.yaml
Python scripts/config/python_scripts/

Always check the repository's own README — it will typically specify exactly where its files should be placed.

Variables That Affect Which Method Works for You

No single method suits every user. A few factors shape which path is practical:

  • Installation type — Home Assistant OS, Supervised, Container, and Core each have different levels of add-on support. SSH and HACS add-ons are only available on OS and Supervised installs.
  • Technical comfort level — Command-line SSH is fast and flexible but assumes familiarity with terminal commands. The File Editor method requires no technical background.
  • Repository structure — A repo with a single YAML file is easy to copy manually. A repo with a full Python package structure is much better handled by git clone or HACS.
  • How often the files update — If the GitHub source is actively maintained and you'll want updates, using git or HACS means you can pull updates without repeating the process manually.
  • Network access and add-on availability — Some Home Assistant setups run in restricted environments where certain add-ons aren't installable, which narrows the options available.

A Note on File Permissions and Ownership

When copying files via SSH or Samba, occasionally file permissions can cause issues — particularly with Python-based custom components. If Home Assistant throws errors about a component not loading despite being in the right place, checking that the files are readable by the Home Assistant process is a worthwhile troubleshooting step. On most standard installs this isn't an issue, but it can surface in more customized environments.

Whether you're adding a single blueprint or deploying a full custom integration, the method that fits you best depends on how your system is set up, what kind of files you're moving, and how hands-on you want the process to be. 🖥️