Configuration reference
Every CLI flag, YAML key, and GOALFEED_* environment
variable Goalfeed reads, with type, default, and a worked example.
Minimal working config.yaml
Copy this, edit the URL/token and team codes, and you have a working install:
home_assistant:
url: "http://homeassistant.local:8123"
access_token: "your-long-lived-access-token"
watch:
nhl:
- WPG
mlb:
- TOR
cfl:
- BC
- OTT
Goalfeed looks for this file as ./config.yaml in its working
directory, reads it once at startup with Viper, and layers environment variables and
CLI flags on top. Precedence, lowest to highest:
config file → GOALFEED_* env var →
CLI flag
Complete option table
| CLI flag | YAML key | Env var | Type | Default | Description |
|---|---|---|---|---|---|
--nhl | watch.nhl |
GOALFEED_WATCH_NHL | string list | [] |
NHL team codes to watch, e.g. WPG, or * for
every team |
--mlb | watch.mlb |
GOALFEED_WATCH_MLB | string list | [] |
MLB team codes to watch |
--cfl | watch.cfl |
GOALFEED_WATCH_CFL | string list | [] |
CFL team codes to watch |
| — | watch.nfl |
GOALFEED_WATCH_NFL | string list | [] |
NFL team codes to watch — no CLI flag exists, YAML or env only |
| — | watch.olympic_men |
GOALFEED_WATCH_OLYMPIC_MEN | string list | [] |
Olympic Men's Hockey team codes — no CLI flag; see the leagues reference for this league's WIP status |
| — | watch.olympic_women |
GOALFEED_WATCH_OLYMPIC_WOMEN | string list | [] |
Olympic Women's Hockey team codes — no CLI flag; same WIP status |
| — | watch.iihf |
GOALFEED_WATCH_IIHF | string list | [] |
IIHF team codes — only affects the on-demand
/api endpoints, not the live-polling goal
loop (see leagues reference) |
| — | home_assistant.url |
GOALFEED_HOME_ASSISTANT_URL | string | "" |
Home Assistant base URL. Ignored and auto-detected when running as the HA Supervisor add-on |
| — | home_assistant.access_token |
GOALFEED_HOME_ASSISTANT_ACCESS_TOKEN | string | "" |
Home Assistant long-lived access token. Also ignored under the Supervisor |
| — | home_assistant.allow_remote_url |
GOALFEED_HOME_ASSISTANT_ALLOW_REMOTE_URL | bool | false |
Allow home_assistant.url to be a public/remote address.
Default rejects anything that isn't loopback/private/link-local-adjacent or
a clearly local hostname — see Security |
| — | web.allow_config_writes |
GOALFEED_WEB_ALLOW_CONFIG_WRITES | bool | false |
Let POST /api/homeassistant/config persist changes to
config.yaml on disk. By default it only updates the running
process's in-memory config for the current session |
--test-goals | test-goals |
hyphenated key, see note below | bool | false |
Fire a synthetic TEST goal event once a minute, through the
same code path as a real goal — see the
getting-started tutorial |
--web | web |
hyphenated key | bool | false |
Start the REST/WebSocket/web UI server alongside the polling loop. Without it, Goalfeed runs headless |
--web-port | web-port |
hyphenated key | string | "8080" |
Port for the web server |
| — | app_log.path |
GOALFEED_APP_LOG_PATH | string | "app.log.jsonl" |
Path to the JSONL application log behind /api/logs and
/api/events; parent directory is created if missing |
| — | nfl.fastcast.enabled |
GOALFEED_NFL_FASTCAST_ENABLED | bool | true |
Use ESPN's Fastcast WebSocket for near-real-time NFL updates alongside polling |
| — | nfl.fastcast.ping_interval_sec |
GOALFEED_NFL_FASTCAST_PING_INTERVAL_SEC | int (seconds) | 20 | Fastcast keepalive ping interval |
| — | nfl.fastcast.pong_wait_sec |
GOALFEED_NFL_FASTCAST_PONG_WAIT_SEC | int (seconds) | 60 | Fastcast pong timeout |
| — | nfl.fastcast.reconnect_base_ms |
GOALFEED_NFL_FASTCAST_RECONNECT_BASE_MS | int (ms) | 2000 | Fastcast reconnect backoff base |
| — | nfl.fastcast.reconnect_max_ms |
GOALFEED_NFL_FASTCAST_RECONNECT_MAX_MS | int (ms) | 30000 | Fastcast reconnect backoff ceiling |
Notes that bite people
- There is no
--configflag. Goalfeed always looks for./config.yaml(or.yml) in the current working directory. If it's missing, the read fails silently and every key falls back to its zero value — see Troubleshooting. - CLI flags exist only for
--nhl/--mlb/--cfl. NFL, IIHF, and Olympic Men's/Women's Hockey team lists are config-file or environment-variable only — there's no flag for them, and none is planned to appear here without one being added tomain.go. - Precedence is config file → environment variable → CLI flag — a flag always wins over an env var, which always wins over the YAML file.
test-goals,web, andweb-portuse hyphenated Viper keys, which most shells reject inexport NAME=value. Set them via CLI flag, YAML, orenv 'GOALFEED_WEB=true' goalfeedinstead of a plainexport.watch.*accepts"*"as a wildcard meaning "every team in this league" — useful for testing, noisy for daily use.- The Home Assistant Supervisor add-on ignores
home_assistant.urlandhome_assistant.access_tokenentirely whenSUPERVISOR_API/SUPERVISOR_TOKENare present in the environment — which they always are under the add-on. Setting those keys has no effect there.
Worked examples
Watch every NHL team, with test events on, in web mode
watch:
nhl:
- "*"
test-goals: true
web: true
web-port: "8080"
NFL, no CLI flag — YAML only
watch:
nfl:
- CLE
- GB
Same NFL example as environment variables
export GOALFEED_WATCH_NFL=CLE,GB
export GOALFEED_HOME_ASSISTANT_URL=http://homeassistant.local:8123
export GOALFEED_HOME_ASSISTANT_ACCESS_TOKEN=your-long-lived-token
./goalfeed --web
A remote Home Assistant instance, explicitly allowed
home_assistant:
url: "https://myhome.duckdns.org:8123"
access_token: "your-long-lived-access-token"
allow_remote_url: true # required — see Security
Without allow_remote_url: true here, Goalfeed refuses to send events
to this URL at all — see Security for why, and
Troubleshooting for the exact error text.
Next
Turn these into a running instance — Install — or wire the resulting events into Home Assistant — Home Assistant automations.