chris.builds.stuff
home / guides / esphome-secrets

Keep Wi-Fi passwords out of your ESPHome YAML

Using secrets.yaml and a shared base file across every node.

A code editor showing an ESPHome configuration with a secrets reference

One file for the passwords

Put the values in secrets.yaml and reference them with !secret. The YAML you share never contains a password.

secrets.yaml
wifi_ssid: "MyNetwork"
wifi_password: "not-in-git"
node.yaml
wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

This is a short sample guide. Replace it with the real write-up.