build betaflight and run configurators locally
updated version
I made a fully automated docker stack that builds Betaflight firmware, compiles and runs the configurators locally.
the stack repository on Github
video on Youtube:
the following is outdated
here I use Ubuntu as the docker host, the rest is done on Windows11 VM (needs git for windows installed). All of this is better to be done in docker containers
Betaflight Configurator
build and run Betaflight Configurator locally (Windows).:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
git clone https://github.com/betaflight/betaflight-configurator.git
cd betaflight-configurator
git checkout 2025.12-maintenance
git pull
git tag -l
git checkout tags/2025.12.0-RC2
cat .nvmrc
nvm ls
nvm install 20.10.0
nvm use 20.10.0
npm install yarn -g
yarn install
yarn build
yarn preview
Blackbox log viewer
locally (Windows):
1
2
3
4
5
6
7
8
9
git clone https://github.com/betaflight/blackbox-log-viewer.git
cd blackbox-log-viewer
git checkout master
nvm install 20.19.0
nvm use 20.19.0
npm install yarn -g
yarn install
yarn build
yarn preview
Betaflight firmware
it is possible to build the firmware locally, without giving the information to the betaflight build server. I’m doing it in Ubuntu VM, but it can also be done the same way on a baremetal Windows with docker:
1
mkdir ~/betaflight-docker
create the build environment with docker:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
tee ~/betaflight-docker/Dockerfile << 'EOF'
FROM ubuntu:24.04
ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=Asia/Shanghai
RUN apt -y update
RUN apt -y full-upgrade
RUN apt -y install build-essential git curl clang-18 python3 python-is-python3
RUN mkdir -p /opt
RUN mkdir -p /opt/betaflight
WORKDIR /opt/betaflight
ENV ARM_SDK_DIR="/usr/"
EOF
build the firmware:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
cd ~
git clone https://github.com/betaflight/betaflight.git
cd betaflight
docker build ~/betaflight-docker
docker run --rm -it -v `pwd`:/opt/betaflight $(docker build -q ~/betaflight-docker) /bin/bash
chmod +rw -R ../betaflight && chown -R `whoami` ../betaflight
#git branch -a
#git checkout 2025.12-maintenance
git tag -l | grep 2025
git checkout tags/2025.12.0-RC2
git pull
rm -rf ./obj
make clean
make configs
make arm_sdk_install
make JHEF435 EXTRA_FLAGS=" -D'RELEASE_NAME=2025.12.0-RC2' -DCLOUD_BUILD -DUSE_ACRO_TRAINER -DUSE_CAMERA_CONTROL -DUSE_DSHOT -DUSE_GPS -DUSE_GPS_PLUS_CODES -DUSE_LED_STRIP -DUSE_OSD -DUSE_OSD_SD -DUSE_PINIO -DUSE_SERIALRX -DUSE_SERIALRX_CRSF -DUSE_TELEMETRY -DUSE_TELEMETRY_CRSF -DUSE_VTX" -j
then copy the ~/betaflight/obj/xxx.hex on the host to somewhere else
ESC configurator
the ESC configurator can also be built locally the same way as Betaflight Configurator (Windows):
1
2
3
4
5
6
7
8
9
10
11
git clone https://github.com/stylesuxx/esc-configurator.git
cd esc-configurator
git checkout develop
type .nvmrc
nvm install 18.16.0
nvm use 18.16.0
npm install yarn -g
yarn install
yarn build
yarn start
Bluejay firmware
I couldn’t come up with a one-click solutuon for building Bluejay firmware locally as it is using Keil A51 assembler toolchain that requires registration. the other way is to download prebuilt hex files from their github (Ubuntu):
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
mkdir -p ~/bluejay
tee ~/bluejay/bluejaydownloader.sh << 'EOF'
#!/bin/bash
if [ "$#" -ne 2 ]; then
echo "Usage: $0 <TARGET> <PWM>"
echo "Example: $0 G-H-30 48"
exit 1
fi
TARGET="$1"
PWM="$2"
URL="https://github.com/bird-sanctuary/bluejay/releases/download/v0.21.1-RC1/$(echo "$TARGET" | tr '-' '_')_${PWM}_v0.21.1-RC1.hex"
curl -L -O "$URL"
EOF
1
2
3
chmod u+x ~/bluejay/bluejaydownloader.sh
cd ~/bluejay
./bluejaydownloader.sh G-H-30 48
ExpressLRS firmware
ExpressLRS firmware is pulled from github and compiled locally by ELRS configurator, which is downloaded as a binary, and can also be built locally. on windows: didn’t make it to work yet
1
2
3
4
5
6
7
8
9
10
11
12
13
git clone https://github.com/ExpressLRS/ExpressLRS-Configurator.git
cd ExpressLRS-Configurator
git checkout tags/v1.7.11
nvm install 22.9.0
nvm use 22.9.0
npm install -g npm@11.7.0
npm install yarn -g
npm install
yarn install --frozen-lockfile
chown root:root node_modules/electron/dist/chrome-sandbox
chmod 4755 node_modules/electron/dist/chrome-sandbox
yarn start
ELRS firmware repo can be cloned locally, but the configurator will still download paltformio and other dependencies from internet the first time:
1
git clone https://github.com/ExpressLRS/ExpressLRS.git
select local in the configurator settings, and point to the src directory in local firmware repo path.
references
- https://www.betaflight.com/docs/development/building/Building-in-Ubuntu
- https://github.com/betaflight/docker-betaflight-build/blob/master/Dockerfile
- https://www.betaflight.com/docs/development#development