RaceLink Standalone Guide¶
This guide explains how to install and run racelink-host in standalone mode on Windows and Linux.
Standalone mode runs the RaceLink host runtime and the shared RaceLink WebUI without RotorHazard. It is intended for gateway-backed operation, so a connected RaceLink Gateway is expected for normal use.
Requirements¶
- Python
3.10or newer - A terminal or shell
- A RaceLink Gateway connected by USB for normal operation
- Network access to install Python packages
The packaged standalone entrypoint is:
Default standalone URL:
Windows installation and usage¶
Create and activate a virtual environment:
Install RaceLink Host:
Start standalone mode:
Open the UI in a browser:
Stop the server with Ctrl+C.
Windows notes:
- The RaceLink Gateway usually appears as a
COMport such asCOM3orCOM4 - If multiple serial devices are connected, confirm which
COMport belongs to the gateway in Device Manager - If the UI loads but the gateway is not detected, check the configured port and the USB connection first
Linux installation and usage¶
Create and activate a virtual environment:
Install RaceLink Host:
Start standalone mode:
Open the UI in a browser:
Stop the server with Ctrl+C.
Linux notes:
- The RaceLink Gateway usually appears as a serial device such as
/dev/ttyUSB0or/dev/ttyACM0 - If RaceLink cannot open the gateway, check user permissions for serial devices
- On some systems you may need to add the user to a group such as
dialout - Wi-Fi helper features that depend on
nmclionly work in environments where NetworkManager andnmcliare installed
Linux first-time setup for firmware updates¶
The OTA flow connects the host's WiFi directly to a WLED node's AP via
nmcli dev wifi connect <SSID> password <PASS> and disconnects it
afterwards. No pre-created NetworkManager profile is required — NM
creates one persistent profile per SSID on first connect and reuses it
on subsequent runs.
The nmcli command needs polkit authorisation. On a fresh Linux host,
run the bundled setup helper once as root to grant the running user
unattended access:
sudo apt install network-manager # Debian/Ubuntu/Pi OS only
sudo $(which racelink-setup-nmcli) # absolute path; see below
# restart the host (RotorHazard or racelink-standalone) so the running
# Python process re-establishes its polkit subject
racelink-setup-nmcli is shipped as a console script alongside
racelink-standalone, so a pip install racelink-host puts it on the
host's PATH. Use sudo $(which racelink-setup-nmcli) rather than
the bare command — sudo's default secure_path strips the venv's
bin/ directory, so sudo racelink-setup-nmcli fails with
command not found on piwheel / venv installs (the typical
RotorHazard plugin layout). The OTA failure dialog also surfaces the
exact absolute command for the install you're running, so you can
copy-paste it directly from the toast if which isn't on your PATH
either.
The helper is idempotent: adds the user to the netdev (or wheel
on Fedora/RHEL) group and installs a polkit rule at
/etc/polkit-1/rules.d/49-racelink-nmcli.rules that authorises
org.freedesktop.NetworkManager.* actions for that specific user.
Verify with nmcli dev wifi list — if it lists nearby APs without
prompting for a password, the host is ready.
If you've cloned the source repo instead of installing via pip, the
equivalent bash variant lives at scripts/setup_nmcli_polkit.sh and
writes the same polkit rule.
The Firmware Update dialog ships sensible defaults (SSID list
WLED_RaceLink_AP, WLED-AP, password wled1234). Override per-OTA if
your fleet uses a custom WLED AP password.
Configuration file¶
Standalone mode stores its local configuration in:
On Windows this usually expands to something like:
On Linux this usually expands to something like:
Example configuration:
Useful fields:
host: bind address for the standalone Flask serverport: TCP port for the standalone Flask serverdebug: Flask debug modeoptions: persisted RaceLink options used by the host runtime
To change the bind address or port, edit the config file before starting racelink-standalone.
Verifying that standalone mode works¶
After starting the server:
- Open
http://127.0.0.1:5077/ - Confirm it redirects to
/racelink - Confirm the RaceLink WebUI loads successfully
- Watch the terminal output for gateway startup messages
Expected behavior:
- Without a connected gateway, the UI can still load, but gateway communication will not be ready
- With a connected gateway, standalone mode should report that the communicator is ready and the WebUI should be able to interact with RaceLink services
Manual validation checklist¶
- Create a fresh virtual environment
- Install
racelink-host - Start
racelink-standalone - Open the browser at
/racelink - Confirm
/redirects to/racelink - Confirm the shared RaceLink WebUI loads
- Confirm the gateway is reported as unavailable when no gateway is connected
- Confirm the gateway is detected when the correct serial port is configured and the hardware is connected