How to Access Configuration.yaml in Home Assistant

Complete guide to accessing and locating Home Assistant configuration files

Last updated: November 2024 7 min read

Introduction

The configuration.yaml file is the main configuration file for Home Assistant. Accessing this file depends on your installation method. This guide covers all common methods to access and edit the configuration file.

Default File Location

The configuration file location varies by installation type:

Home Assistant OS / Supervised

/config/configuration.yaml

Accessible via File Editor add-on, SSH, or Samba share

Docker Installation

~/homeassistant/configuration.yaml
# or
/path/to/config/configuration.yaml

Location depends on where you mounted the config volume

Python Virtual Environment

~/.homeassistant/configuration.yaml
# or
/home/username/.homeassistant/configuration.yaml

Standard location for Python venv installations

Method 1: File Editor Add-on (Easiest)

Installation Steps

  1. Go to Settings → Add-ons → Add-on Store
  2. Search for "File editor"
  3. Click on "File editor" by Home Assistant
  4. Click "Install" and wait for installation to complete
  5. Click "Start" to launch the add-on
  6. Optionally, enable "Show in sidebar" for quick access

Using File Editor

  1. Open File Editor from the sidebar or Settings → Add-ons
  2. Navigate to configuration.yaml
  3. Click on the file to open it
  4. Make your edits
  5. Click "Save" (or Ctrl+S / Cmd+S)
  6. Validate configuration in Developer Tools → YAML

Method 2: SSH Access

Enable SSH Add-on

  1. Go to Settings → Add-ons → Add-on Store
  2. Search for "SSH & Web Terminal"
  3. Install and start the add-on
  4. Configure a password in the add-on settings
  5. Save and restart the add-on

Connect via SSH

# Connect to Home Assistant
ssh root@homeassistant.local
# or
ssh root@<your-ha-ip>

# Navigate to config directory
cd /config

# Edit configuration.yaml
nano configuration.yaml
# or
vi configuration.yaml

Using SCP (Secure Copy)

Copy file to your local machine for editing:

# Copy from Home Assistant to local
scp root@homeassistant.local:/config/configuration.yaml ./

# Edit locally, then copy back
scp ./configuration.yaml root@homeassistant.local:/config/

Method 3: Samba Network Share

Enable Samba Add-on

  1. Go to Settings → Add-ons → Add-on Store
  2. Search for "Samba share"
  3. Install and start the add-on
  4. Configure username and password
  5. Set workgroup name (optional)
  6. Save and restart the add-on

Access from Windows

  1. Open File Explorer
  2. In the address bar, type: \\homeassistant.local or \\<your-ha-ip>
  3. Enter your Samba credentials when prompted
  4. Navigate to the config folder
  5. Open configuration.yaml with any text editor

Access from macOS/Linux

# Mount Samba share
mkdir ~/homeassistant
mount_smbfs //username@homeassistant.local/config ~/homeassistant

# Or use Finder (macOS)
# Go → Connect to Server
# smb://homeassistant.local/config

# Edit file
nano ~/homeassistant/configuration.yaml

Method 4: Direct File System Access

For Docker and local installations, access files directly:

Docker Container Access

# List running containers
docker ps

# Access container shell
docker exec -it homeassistant bash

# Navigate to config
cd /config
ls -la configuration.yaml

# Edit with nano or vi
nano configuration.yaml

Verifying File Access

After accessing the file, verify it's the correct configuration:

Check File Contents

A valid configuration.yaml should start with:

homeassistant:
  name: Home
  latitude: !secret latitude
  longitude: !secret longitude
  elevation: 0
  unit_system: metric
  time_zone: UTC

Best Practices

  • Use File Editor for beginners - Easiest method with built-in validation
  • Backup before editing - Always create a backup of configuration.yaml before making changes
  • Validate after changes - Use Developer Tools → YAML → Check Configuration
  • Use version control - Consider using Git to track configuration changes

Related Articles