7.1 KiB
Windows 11 installation
This folder contains the supported Windows 11 installation and start scripts for RC RaceCore.
For a completely new computer, the shortest supported path is:
winget install --id Git.Git --exact --source winget
Reopen PowerShell, then run:
Set-Location $HOME
git clone https://git.dio.nu/Public/Live_RC.git Live_RC
Set-Location .\Live_RC
.\windows\install.bat
npm.cmd run status
Invoke-RestMethod -Uri "http://127.0.0.1:8081/api/health"
Open http://localhost:8081 when the health check returns ok = True. The sections below explain missing Git, ZIP installation, Node.js, firewall rules and troubleshooting.
Supported runtime
- 64-bit Windows 11 (
x64orarm64) - Node.js
22or24LTS - npm
10or newer - bundled AMMC runtime in
AMMC\windows64
Node.js 18 and 20 are not supported by the current native SQLite dependency.
Get the project files
Git is needed only when you want to clone and later update with git pull. Check it in PowerShell:
git --version
If Git is missing:
winget install --id Git.Git --exact --source winget
Reopen PowerShell, then clone the raw URL without Markdown brackets:
Set-Location $HOME
git clone https://git.dio.nu/Public/Live_RC.git Live_RC
Set-Location .\Live_RC
Without Git, download the ZIP archive from the public repository and extract the complete project. The project root must directly contain package.json, server.js, src\, and windows\.
Recommended installation
- Extract or clone the complete repository, preferably to a short path such as
C:\Live_RC. - Double-click
windows\install.bat. - Approve the Node.js LTS installation if Windows asks for it.
- Wait until the script reports
Windows setup completed. - The installer runs
npm.cmd restart, leaving the backend running in the background. - Open
http://localhost:8081.
The installer:
- checks the Windows architecture
- checks Node.js and installs current LTS with
wingetwhen needed - installs/checks Microsoft Visual C++ 2015-2022 x64 Runtime for bundled AMMC
- runs
npm.cmd cifrompackage-lock.json - verifies that Express loads
- opens an in-memory SQLite database through
better-sqlite3 - verifies
ammc-amb.exe,ammc.dll, andMyLapsSDK.dll - creates
data\andlogs\ - runs
npm.cmd restartso both new installations and updates use the installed code immediately
Run from PowerShell instead when you want options:
Set-ExecutionPolicy -Scope Process Bypass
.\windows\setup.ps1
Install, add inbound firewall rules for 8081 and decoder channels 9000-9003, and start the server:
Start-Process powershell -Verb RunAs -ArgumentList '-ExecutionPolicy Bypass -File .\windows\setup.ps1 -OpenFirewall -StartServer'
Manual installation
Install Node.js 22 or 24 LTS, then run in the repository root:
npm.cmd ci
npm.cmd run verify
npm.cmd start
npm.cmd ci installs exactly the dependency versions in package-lock.json. The install fails early with an actionable message if Node.js is unsupported. The post-install verification also fails if the native SQLite module cannot run.
The project intentionally uses better-sqlite3 v12.11.x. That release provides a working prebuilt Windows binary for the supported Node.js versions. The package is explicitly listed in allowScripts so npm 12 may run its binary installer; do not use npm.cmd ci --ignore-scripts.
Use npm.cmd from PowerShell when local execution policy blocks npm.ps1. The plain npm command works normally from Command Prompt (cmd.exe).
Runtime commands
npm.cmd start
npm.cmd run status
npm.cmd restart
npm.cmd stop
npm.cmd run start:fg
npm.cmd startstartsserver.jsin the background.npm.cmd run statusreadsdata\server.pidand reports process state.npm.cmd restartrestarts the background process.npm.cmd stopstops it.npm.cmd run start:fgruns in the current terminal for troubleshooting.- stdout is written to
logs\server.out.log. - stderr is written to
logs\server.err.log. - SQLite data is written to
data\rc_timing.sqlite.
Windows helper scripts
windows\install.bat: install, verify, and restart the backendwindows\start_backend.bat: start the Node backend in the backgroundwindows\restart_backend.bat: restart the Node backend after copied or pulled updateswindows\start_ammc.bat: start bundled AMMC manuallywindows\start_all.bat: start AMMC, backend, and open the browserwindows\stop_all.bat: stop the backend andammc-amb.exe
Manual AMMC start with a decoder IP:
windows\start_ammc.bat 192.168.1.10
The script resolves the executable to:
AMMC\windows64\ammc-amb.exe
You can override its defaults before starting:
set DECODER_IP=192.168.1.10
set WS_PORT=9000
windows\start_ammc.bat
Managed AMMC from the web UI
For the complete decoder/IP diagram and examples for Main, Split, and Pit roles, see ..\docs\decoder-setup.md or the Swedish guide.
The recommended normal operation is to let the backend manage AMMC:
- Start RC RaceCore with
npm.cmd start. - Open
Settings. - Enable
Managed AMMC. - Set the Main decoder IP and WebSocket port
9000. - Optionally enable Split (
9001) and Pit entry/exit (9002/9003) with the IP address of each physical decoder. - Save and click
Start AMMC. - Use the server WebSocket URLs and connect the decoders.
AMMC always runs on the computer that runs npm.cmd start. Opening the UI from a laptop does not start AMMC on that laptop.
Network access
- Admin/UI/backend: TCP
8081 - Main AMMC WebSocket: TCP
9000 - Optional Split/Pit AMMC WebSockets: TCP
9001-9003
Each physical decoder has its own IP. Each AMMC process on the Windows backend has its own WebSocket port. Main is the only channel that counts laps; Split records intermediate times, while Pit entry and Pit exit open and close a timed pit stop.
Find the Windows server address with:
ipconfig
Then open this from another computer on the LAN:
http://<windows-server-ip>:8081
Do not expose the full admin UI directly to the internet. Publish only /public-overlay/* through a reverse proxy when an external overlay is needed.
Native dependency troubleshooting
better-sqlite3 normally installs a prebuilt Windows binary and does not require Visual Studio. If npm falls back to compiling it:
- Confirm
node --versionreports Node 22 or 24. - Move the repository to a short ASCII path such as
C:\Live_RC. - Run the Node native-tools installer as Administrator:
& "C:\Program Files\nodejs\install_tools.bat"
- Reopen PowerShell and run:
npm.cmd ci
npm.cmd run verify
Update an existing installation
Stop the service, update the files, reinstall locked dependencies, verify, and restart:
npm.cmd stop
git pull
npm.cmd ci
npm.cmd run verify
npm.cmd restart
Keep data\ when updating. It contains the SQLite database, saved state, PID file, and local AMMC configuration.