Skip to content

Running the Bridge

The bridge keeps a single WebSocket connection to Home Assistant and shares it with every watcher on your machine. Running it as a background service means commands like ha bridge watch entity and status-bar modules reuse one connection instead of each opening their own.

The bridge listens on a Unix socket, by default at $XDG_RUNTIME_DIR/go-automate/home-assistant.sock. Watchers connect to that socket rather than to Home Assistant directly. The service runs:

Terminal window
go-automate ha bridge serve

See the Bridge Protocol reference for the socket details.

The Arch package installs a user service called go-automate-home-assistant-bridge.service and enables it globally for future logins. If it is not running in your current session yet, enable it manually.

  1. Reload the user systemd daemon:

    Terminal window
    systemctl --user daemon-reload
  2. Enable and start the service:

    Terminal window
    systemctl --user enable --now go-automate-home-assistant-bridge.service
  3. Check the service status:

    Terminal window
    systemctl --user status go-automate-home-assistant-bridge.service

To follow the logs:

Terminal window
journalctl --user -u go-automate-home-assistant-bridge.service -f

If you built from source, install the unit yourself:

  1. Copy the unit file from the repository to your user units directory:

    Terminal window
    mkdir -p ~/.config/systemd/user
    cp .scripts/linux/go-automate-home-assistant-bridge.service ~/.config/systemd/user/
  2. Reload, enable and start it:

    Terminal window
    systemctl --user daemon-reload
    systemctl --user enable --now go-automate-home-assistant-bridge.service

For quick troubleshooting you can run the bridge directly instead of as a service:

Terminal window
go-automate ha bridge serve

Pass --socket to use a custom socket path:

Terminal window
go-automate ha bridge serve --socket /tmp/go-automate-ha.sock