Just a word of warning, if you’re using yarn to install from source, make sure you have the actually yarn package manager installed, not another program. See the warning here.
The PKG version will only run on amd64 platforms. If that’s your platform, than it’s much easier to use that than building from source. If you’re on an arm platform, it’s recommended to use Docker, otherwise you will have to build from source, which means installing all of the required build dependencies as well (g++, python, etc).
it does not runs on ubuntu 18.04, by trying, i get:
pkg/prelude/bootstrap.js:1697
throw error;
^
Error: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28’ not found (required by /tmp/7d1250c91f3ad911ea616a8053cbb5ddbd230baa12d642277907cf905e8c0071/bindings.node)
at tryImporting (pkg/prelude/bootstrap.js:2028:37)
tried the snap version, but cannot access from other machine (the server is headless and no graphical anything), and cannot adjust the app.js file to replace 0.0.0.0 to any other address.
The PKG version is built with whatever Github thinks “ubuntu-latest” is (probably 20.04). That error means the libc libraries in your Ubuntu 18.04 are too old, the PKG version is built using newer libc libraries. In that case you will have to build from source.
tried the snap version, but cannot access from other machine (the server is headless and no graphical anything), and cannot adjust the app.js file to replace 0.0.0.0 to any other address.
I don’t know much about the snap version, but you can set some options via the snap command. You would never edit the snap application files. Probably a minimal config would be:
snap set zwavejs2mqtt server.host=0.0.0.0
And then you can change the rest of the settings in the app.