This is the simplest setup on Windows.
It runs Matterbridge when the current user logs in and uses the standard directories:
%USERPROFILE%\Matterbridge%USERPROFILE%\.matterbridge%USERPROFILE%\.mattercertschtasks /delete /tn "Matterbridge" /f
Remove-Item -Recurse -Force "$HOME\Matterbridge", "$HOME\.matterbridge", "$HOME\.mattercert" -ErrorAction SilentlyContinue
npm uninstall -g matterbridge
Nvm is a development tool and is not supported for production.
node -v
npm -v
It should output something like:
v22.20.0
10.9.3
where.exe node
It should output something like:
C:\Program Files\nodejs\node.exe
This will create the required directories if they don't exist and install matterbridge globally for the current user.
New-Item -ItemType Directory -Force -Path "$HOME\Matterbridge", "$HOME\.matterbridge", "$HOME\.mattercert" | Out-Null
npm install -g matterbridge --omit=dev
where.exe matterbridge.cmd
matterbridge --version
Run PowerShell as Administrator
$NodeExe = (where.exe node | Select-Object -First 1)
$MatterbridgeCmd = (where.exe matterbridge.cmd | Select-Object -First 1)
$MatterbridgeJs = Join-Path (Split-Path $MatterbridgeCmd -Parent) "node_modules\matterbridge\bin\matterbridge.js"
schtasks /create /f /tn "Matterbridge" /sc onlogon /delay 0000:30 /tr "`"$NodeExe`" `"$MatterbridgeJs`" --nosudo"
This will start Matterbridge 30 seconds after the current user logs in.
This setup starts Matterbridge once at logon. If Matterbridge exits, it stays stopped until the next logon or until you start it again manually.
You can configure and adapt the task on the Task Scheduler.
schtasks /run /tn "Matterbridge"
Stop Matterbridge from the frontend.
To force stop use
schtasks /end /tn "Matterbridge"
Stop Matterbridge from the frontend.
schtasks /end /tn "Matterbridge"
schtasks /run /tn "Matterbridge"
schtasks /query /tn "Matterbridge" /v /fo list
schtasks /query /tn "Matterbridge" /v /fo list | findstr /I "TaskName Status Last Run Time Last Result"
schtasks /change /tn "Matterbridge" /enable
schtasks /change /tn "Matterbridge" /disable
Run PowerShell as Administrator
schtasks /delete /tn "Matterbridge" /f