In collaboration with Bitcoin Design.
Images of the WebUI can be found at raspiblitz-web-progress
Built with React & Tailwind CSS.
If you want to bring the Raspiblitz WebUI to other languages, please help us translate it via Weblate :)
Big thanks to our translators, which you can find in this README.
- Node.js
- asdf is supported but not required.
- Nix with Flakes enabled (optional, for devenv.sh or NixOS builds)
npm updateThis project supports devenv.sh, a developer environment tool built on Nix.
- Install devenv.sh by following the instructions at https://devenv.sh/getting-started/
- Run
devenv shellto enter the development environment - Devenv will install the npm dependencies automatically when entering the shell. To change this behaviour, change
javascript.npm.install.enable = true;tofalseand runnpm installafter entering the shell.
- Consistent development environment across all contributors
- Automatically installs the correct version of Node.js and other dependencies
- Includes development tools like TypeScript, Oxlint, Oxfmt, and Nix utilities
- Works on any platform that supports Nix (Linux, macOS, WSL)
npm install
cd backend-mock
npm install
cd ..
npm run dev:localThe npm run dev:local command starts the frontend and the backend mock server.
The backend mock server restarts automatically when you change a file in the backend-mock folder.
npm install
npm run startFor the backend, there currently exist three options:
- Use an existing RaspiBlitz
- Easy to setup, but needs a RaspiBlitz
- Using the provided Mock backend
- Easy to setup, but limited data
- Using blitz_api with Polar
- Some changes needed for local development
- Possibly more data (depending on your ln setup :) )
Open another terminal
cd backend-mock
npm install
npm run startThen go to http://localhost:3000 and use the password password.
Production builds omit source maps by default. To include source maps for
investigating a diagnostic report, run BUILD_SOURCEMAP=true npm run build.
Keep the generated maps with the matching build; deploying them also makes
the original source code available to browsers. Diagnostic reports still
include JavaScript and component stacks without source maps.
npm test
Install both sets of locked dependencies with npm ci and
npm ci --prefix backend-mock, then install Chromium with
npx playwright install chromium.
Run the mock's WebSocket protocol tests with npm run test:mock.
These also exercise app installation, failure, retry, and uninstall over HTTP and
WebSocket. The mock emits app_manage_message events for the requested app and
retains installed state for reconnect warmup. Set MOCK_APP_FAILURE_ONCE=mempool
to make its first operation fail with a structured error; later attempts succeed.
The Playwright mock config enables this scenario for the installation browser test.
Run browser tests headless with npm run test:e2e. Playwright starts a dedicated
mock API on port 8100 and Vite on port 3100, including a test that uses native
WebSockets to verify dashboard snapshots and wallet state updates. These tests
always use the mock, regardless of BACKEND_SERVER, and refuse to reuse servers
already occupying their ports. Normal development servers on ports 3000 and 8000
can keep running.
CI runs lint, types, unit tests, mock tests, and builds on Node.js 22 and 24. A separate Node.js 24 job runs Chromium E2E tests and retains the HTML report for seven days.
Run test with UI:
npx playwright test --ui
This guide uses Polar for easier development, but you can also use a real lightning node.
- Download Polar and run it.
- Create at least one bitcoin and one lightning node.
- Clone the blitz_api and install the dependencies.
- In addition, you will need redis installed for
blitz_apito work.
- In addition, you will need redis installed for
- Create a
.envfile (see .env_sample in blitz_api) and copy the bitcoin and ln info into it.- Important: When definining
shell_script_pathyou need to define a directory where a folder calledconfig.scriptsand a file calledblitz.debug.shreside in. Otherwiseblitz_apimay not work (used on the RaspiBlitz for logging)
- Important: When definining
- Use a Blitz API version that provides the authenticated
/wsendpoint. - Set
BACKEND_SERVERto the API base URL. For a directly running API, for example:
BACKEND_SERVER=http://localhost:8000 npm run startThe frontend always requests /api; Vite replaces this prefix with the path in
BACKEND_SERVER. The default is http://localhost:8000/api for the mock backend.
This setting applies to development only; production uses /api on the current origin.
Install dependencies with npm ci, then point the development proxy to the node's
API base URL, including /api when connecting through nginx:
BACKEND_SERVER=https://raspiblitz.local/api npm run startFor a directly reachable API without nginx, use its base URL without /api, for
example BACKEND_SERVER=http://raspiblitz.local:11111.
The optional live test verifies login, initial snapshots, dashboard rendering, session restoration after reload, reconnection, and logout after the real API rejects an invalid token. It does not change node settings or initiate wallet operations. The regular E2E suite always excludes it; the separate live command requires both environment variables below. Live tests disable traces, screenshots, and video to avoid retaining credentials.
Playwright starts its own frontend on port 3100 with the selected backend and refuses to reuse an existing server on that port. In Bash, read the password without putting it in shell history:
export BACKEND_SERVER=https://raspiblitz.local/api
read -r -s -p 'Password A: ' BLITZ_API_PASSWORD
export BLITZ_API_PASSWORD
npm run test:e2e:live
unset BLITZ_API_PASSWORDThe reverse proxy must forward WebSocket upgrades for /api/ws. A login can succeed
while WebSocket requests return HTTP 404 if nginx strips the upgrade headers. Add
these directives to the existing /api/ location in the deployment's nginx config:
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";Keep the existing API upstream and timeouts. Validate the config with nginx -t
before reloading nginx. See nginx WebSocket proxying.
- RaspiBlitz Icon from RaspiBlitz
- Other icons from Hero Icons & BitcoinDesign Icons
- CSS Loading Spinner from loading.io
- ButtonSpinner from SpinKit
- BTC RPC Logo from Bitcoin Explorer
- BTCPay Logo from btcpayserver
- RTL Logo from RTL
- Specter Logo from specter-desktop
- Mempool.space Logo from mempool
- LNbits Logo from lnbits-legend
- LND Logo from LightningLabs
- Core Lightning Logo from Blockstream
- Alby Logo from Alby media repo
- License unclear
