There are essentially three ways to build your NodeMCU firmware: cloud build service, Docker image, dedicated Linux environment (possibly VM).


Cloud Build Service

NodeMCU "application developers" just need a ready-made firmware. There's a cloud build service with a nice UI and configuration options for them.

Docker Image

Occasional NodeMCU firmware hackers don't need full control over the complete tool chain. They might not want to setup a Linux VM with the build environment. Docker to the rescue. Give Docker NodeMCU build a try.

Linux Build Environment

NodeMCU firmware developers commit or contribute to the project on GitHub and might want to build their own full fledged build environment with the complete tool chain. There is a post in the Wiki that describes this.

Build Options

The following sections explain some of the options you have if you want to build your own NodeMCU firmware.

Select Modules

Disable modules you won't be using to reduce firmware size and free up some RAM. The ESP8266 is quite limited in available RAM and running out of memory can cause a system panic. The default configuration is designed to run on all ESP modules including the 512 KB modules like ESP-01 and only includes general purpose interface modules which require at most two GPIO pins.

Edit app/include/user_modules.h and comment-out the #define statement for modules you don't need. Example:

// #define LUA_USE_MODULES_U8G

TLS/SSL Support

To enable TLS support edit app/include/user_config.h and uncomment the following flag:


The complete configuration is stored in app/include/user_mbedtls.h. This is the file to edit if you build your own firmware and want to change mbed TLS behavior. See the tls documentation for details.


To enable runtime debug messages to serial console edit app/include/user_config.h


Set UART Bit Rate

The initial baud rate at boot time is 115200bps. You can change this by editing BIT_RATE_DEFAULT in app/include/user_config.h:


Note that, by default, the firmware runs an auto-baudrate detection algorithm so that typing a few characters at boot time will cause the firmware to lock onto that baud rate (between 1200 and 230400).

Integer build

By default a build will be generated supporting floating-point variables. To reduce memory size an integer build can be created. You can change this either by uncommenting LUA_NUMBER_INTEGRAL in app/include/user_config.h:


OR by overriding this with the make command as it's done during the CI build:


Tag Your Build

Identify your firmware builds by editing app/include/user_version.h

#define NODE_VERSION    "NodeMCU 2.1.0+myname"
#ifndef BUILD_DATE
#define BUILD_DATE      "YYYYMMDD"

u8g Module Configuration

Display drivers and embedded fonts are compiled into the firmware image based on the settings in app/include/u8g_config.h. See the u8g documentation for details.

ucg Module Configuration

Display drivers and embedded fonts are compiled into the firmware image based on the settings in app/include/ucg_config.h. See the ucg documentation for details.