How to Access Configuration.yaml in Home Assistant
Complete guide to accessing and locating Home Assistant configuration files
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
- Go to Settings → Add-ons → Add-on Store
- Search for "File editor"
- Click on "File editor" by Home Assistant
- Click "Install" and wait for installation to complete
- Click "Start" to launch the add-on
- Optionally, enable "Show in sidebar" for quick access
Using File Editor
- Open File Editor from the sidebar or Settings → Add-ons
- Navigate to
configuration.yaml - Click on the file to open it
- Make your edits
- Click "Save" (or Ctrl+S / Cmd+S)
- Validate configuration in Developer Tools → YAML
Method 2: SSH Access
Enable SSH Add-on
- Go to Settings → Add-ons → Add-on Store
- Search for "SSH & Web Terminal"
- Install and start the add-on
- Configure a password in the add-on settings
- 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
- Go to Settings → Add-ons → Add-on Store
- Search for "Samba share"
- Install and start the add-on
- Configure username and password
- Set workgroup name (optional)
- Save and restart the add-on
Access from Windows
- Open File Explorer
- In the address bar, type:
\\homeassistant.localor\\<your-ha-ip> - Enter your Samba credentials when prompted
- Navigate to the
configfolder - Open
configuration.yamlwith 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