Laserweb server installation problems GNU/Linux Debian 12, other better solution?


Good day,
i hope you can help me with my problem for a suitable solution. I have knowledge about Debian systems and also with Docker but nodejs or npm I have hardly ever used before, also I have only little knowledge of the control of the laser.

I have an old laptop with which I want to control my laser but primarily only as a server. I would use the appimage, but the UI consumes too much performance because the laptop is very weak.


I have tried to install the server via the documentation on the website [1], but there is the problem that I can not get nodejs v12 because it always installs v18 despite setting the correct repo. I still tried with version v18 however there are a lot of errors when running the sudo npm install serialport --unsafe-perm --build-from-source under point “Download and install LaserWeb server” which I suspect is a problem with the nodejs version.

I also tried to work my way through the “newer and more detailed installation instructions” [2] but it relies on the RPI OS repo where nodejs v12 seems to be easily installable.

Later I noticed that there are approaches for a Docker image on the github page [3], however, there is always only written from the development or testing and i am not sure if i can use it.

I hope someone who knows more about this can tell me what I can best do to get the server running. If I missed something simple like an appimage only for the server I am sorry I searched a lot but found nothing suitable.

Thanks a lot in advance

System description

  • diode laser, Ortur Lasermaster 2 Pro S2

  • GNU/Linux Debian 12

  • Serial


[1] Install: Raspberry Pi (+ other Linux) - LaserWeb / CNCWeb
[2] LaserWeb development install on Raspian Bullseye and Buster. · GitHub
[3] i can only put 2 links in the post but the Dockerfiles are immediately visible on the github page

Sorry you were having issues, those instructions are a bit old, and totally RPi oriented. It used to be that node12 was the default, and still may be under older debian versions.

However, the default node version on recent raspbian versions is now node 16, and you can ignore the node12 stuff. lw.comm-server installs and runs fine on Node 16, and 18.

Here is a log from my laptop (fedora):

[owen@sam lw.comm-server]$ uname -a
Linux 6.3.11-200.fc38.x86_64 #1 SMP PREEMPT_DYNAMIC Sun Jul  2 13:17:31 UTC 2023 x86_64 GNU/Linux

[owen@sam lw.comm-server]$ node -v

[owen@sam lw.comm-server]$ npm -v

[owen@sam lw.comm-server]$ npm install
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See for details.
npm WARN deprecated request@2.88.2: request has been deprecated, see
⸨##################⸩ ⠹ reify:@types/node: timing reifyNode:node_modules/ajv Completed in 698ms

added 164 packages, and audited 165 packages in 23s

23 packages are looking for funding
  run `npm fund` for details

9 vulnerabilities (5 moderate, 1 high, 3 critical)

To address issues that do not require attention, run:
  npm audit fix

Some issues need review, and may require choosing
a different dependency.

Run `npm audit` for details.

[owen@sam lw.comm-server]$ node server.js 
        ---- LaserWeb Comm Server 4.1.000 ----        
  Use to connect to this server.
* Updates: 
  Remember to check the commit log on
  regularly, to know about updates and fixes, and then when ready
  update accordingly by running git pull
* Support: 
  If you need help / support, come over to
Server binding to all local IP addresses on port: 8000

After which I can connect locally or remotely.

It may help to remove (entirely) the folder that npm install creates called node_modules, this is where the compiled modules are installed, and it can get in a twist when mixing/matching node versions and npm installs… Deleting it and re-running npm install will rebuild the modules from scratch.

Note that I do not install serialport separately, that is only needed with older node versions on the Pi.

1 Like

Thanks for the reply,
i have been trying all along to get it to work with node v12 somehow but have now tried again with node v18 and noticed my accidental error which I missed entirely in the error messages.

i forgot to install build-essential and make, and when I had them installed on a test system in a VM with node v18 in my first attempt, i was confused by the dependency errors.

i have summarized everything again how i got it to work:

as root:
curl -sL | bash -

apt update

apt install libusb-1.0-0-dev libudev-dev nodejs git make build-essentials

as the user:
cd dir/for/laserweb/

git clone

cd lw.comm-server/

npm install

Depending on the user rights i had to add the user to the dialout group so that the server has access to the ports:
as root:
usermod -a -G dialout username

Then I could start the server in the folder lw.comm-server/ with node server

however I still have a question, but it can also be that I have misunderstood somthing. If I access the server from another PC through the web browser, e.g.,, I cannot see the machine or any port but I can see it on the local laptop where the server is running on.


Is there a setting that allows me to still see it there, or is that an error? Because if I understood the graphic of the Communication structure [1] correctly, I should be able to control the server and the CNC machine from anywhere in the local network.



ah sorry i made a mistake, it didn’t connect to the correct server under Comms and i thought it was automatically connecting to the correct server and not trying the localhost.

In any case, thank you very much for your previous answer, I had earlier given up trying to do it through node v18 but now everything works.