
In this tutorial, you will set up a production-ready Node.js environment on a single Debian 10 server. This means that the applications will restart on reboot or failure and are safe for use in a production environment. Though you can run Node.js applications at the command line, this tutorial will focus on running them as a service. The platform runs on Linux, macOS, FreeBSD, and Windows.
Avoid nvm or n - these are great tools for developers, but require additional configuration when running Homebridge as a service user.įailing to adhere to these guidelines will likely result in you having multiple copies of Node.js installed which will cause many strange problems (if you have done this, see how to fix it on Linux and macOS).Node.js is an open-source JavaScript runtime environment for building server-side and networking applications. Do not update Node.js using instructions you found on some random site on the internet. It is important to update Node.js using the same method you originally used to install it, or using hb-service update-node. Users running the "Alpine Linux" variant cannot use hb-service update-node. While not recommended, if you are using the "Ubuntu" or "Debian" variant of the image, you can also update inside the container using hb-service update-node and then restarting manually. Users running in Docker should update Node.js by pulling down the latest version of the Homebridge Docker Image.
Windows 10 users can view update instructions here.
Sudo hb-service update-node 16.18.0 Windows 10 macOS and Linuxįor Linux and macOS users, we have created a tool to help you update Node.js in a safe way using hb-service (even if you aren't using hb-service to manage the process): If you have followed one of the Homebridge Install Guides, you can refer back to the guide for your platform to see how to update Node.js.
If you are running Node.js v16.x there is no urgent need to update, as we will still be supporting this version until September 2023, however you can still do so if you like. If you are running Node.js v12.x or v14.x now is a good time to update. Updating Node.js is not a risk-free exercise, so it is recommended users only do so when required.
Homebridge does not support odd-numbered releases of Node.js, such as 13.x, 15.x, 17.x. At the time of writing, this means we will support: Homebridge (and verified plugins) support all current Active and Maintenance LTS releases of Node.js. From time to time you will need to update the Node.js runtime to enable support for new features. Homebridge requires Node.js installed on your system to run.