Skip to content

Configuration

Go Automate reads its configuration from a single YAML file. It needs your Home Assistant URL and a long-lived access token to connect.

The config file is config.yml inside the Go Automate config directory. The directory is resolved in this order:

  • $XDG_CONFIG_HOME/go-automate if XDG_CONFIG_HOME is set.
  • ~/.config/go-automate otherwise.

So on a typical Linux setup the file lives at ~/.config/go-automate/config.yml.

~/.config/go-automate/config.yml
homeassistant:
url: http://homeassistant.local:8123
token: your-long-lived-access-token
  • homeassistant.url — the base URL of your Home Assistant instance. Defaults to http://homeassistant.local:8123. Use https:// for TLS; Go Automate connects over ws:// or wss:// automatically based on the scheme.
  • homeassistant.token — a Home Assistant long-lived access token.

If the token is empty when you start Go Automate in an interactive terminal, it walks you through a short setup form and writes the file for you.

  1. Run the app in a terminal:

    Terminal window
    go-automate
  2. Enter your Home Assistant URL and long-lived access token when prompted.

  3. Go Automate saves config.yml and continues.

  1. In Home Assistant, open your profile (click your username in the sidebar).
  2. Go to the Security tab and scroll to Long-lived access tokens.
  3. Select Create token, give it a name such as go-automate, and copy the value.

The token is shown only once, so paste it straight into your config or the setup form.