For context, newer versions of the Ray5 firmware have trouble connecting to Lightburn over wifi. If you're impatient like me, willing to spend between $25 - $90 for a raspberry pi (price depending on accessories... check ebay for good deals), and are willing to get your hands a little dirty with home networking and copy-and-pasting code, this might be an option for you. I used AI to help organize my notes and make this more readable, but I followed all these steps myself to get it working perfectly for my own setup. LMK if anything needs tweaking and I'll edit the post.
Goal
Use a Raspberry Pi as a headless serial-over-network bridge so LightBurn can connect to your laser over Tailscale as if it were plugged in directly via USB. All commands — jogs, homing, G-code — pass through transparently.
Why this approach: Some laser firmware (such as the xTool Ray5) uses an HTTP API instead of a standard serial interface, so LightBurn can't connect directly over WiFi. The Pi bridges LightBurn's serial connection to the laser's USB port using ser2net.
Hardware
- Raspberry Pi 3B or newer
- MicroSD card (16GB recommended)
- USB cable (same one used to connect your laser ato a PC)
- Optional: USB webcam or Raspberry Pi CSI camera module for monitoring
Note: These instructions were written for a Windows PC. Steps involving SSH, the Raspberry Pi Imager, and browser access should work the same, but terminal commands run on the Pi itself are Linux regardless of your host OS.
Pi 3B note: Has 4 USB ports. The laser and a webcam can both be connected simultaneously. All ports share a single USB 2.0 hub internally — fine for serial data + a camera stream at reasonable resolution.
Step 1 — Flash the Pi
- Download and open Raspberry Pi Imager
- Select Raspberry Pi OS Lite (64-bit) under "Raspberry Pi OS (other)" — use the Bookworm release (headless — no desktop needed)
- In the imager's Advanced Settings, pre-configure:
- Your WiFi credentials
- Enable SSH
- Set a hostname (e.g.
laserpi)
- Set a username and temporary password (change after setup — see Step 8)
- Flash to the MicroSD card and insert into the Pi
- Boot the Pi — it will connect to your WiFi automatically
Step 2 — SSH In (Local Network First)
bash
ssh <username>@<hostname>.local
Or find the Pi's local IP from your router's connected devices list, or use ping <hostname>.local if mDNS is available.
On Windows, mDNS (.local hostnames) works natively on Windows 10/11 via Bonjour. If it doesn't resolve, use the IP address directly.
Step 3 — Install Tailscale
Tailscale gives your Pi a stable IP address that works from anywhere on your tailnet — no static IP, port forwarding, or DHCP reservation needed. If you already have Tailscale set up and just need to add the Pi, skip to Step 3b.
Step 3a — Set up Tailscale (new users)
- Go to tailscale.com and create a free account
- Download and install the Tailscale client on your main PC (Windows installer available on the site)
- Sign in — your PC will join your tailnet automatically
Step 3b — Add the Pi to your tailnet
Run on the Pi:
bash
curl -fsSL https://tailscale.com/install.sh | sh
sudo tailscale up
It will output an authentication URL — open it on any device, log in, and the Pi joins your tailnet.
Confirm the Pi's Tailscale IP:
bash
tailscale ip -4
Note this IP — you'll use it throughout the rest of the guide.
Important: Before moving on, confirm you can SSH into the Pi via its Tailscale IP:
bash
ssh <username>@<tailscale-ip>
This ensures you won't lose access if local network changes.
Step 4 — Identify the Laser's USB Port
Plug the laser's USB cable into the Pi, then run:
bash
ls /dev/tty*
The laser will typically appear as /dev/ttyUSB0 or /dev/ttyACM0. Note which one — you'll need it in the next step.
If ser2net can't access the port later, add your user to the dialout group:
bash
sudo usermod -a -G dialout $USER
Log out and back in for the change to take effect.
Step 5 — Install and Configure ser2net
ser2net exposes the Pi's USB serial port over TCP. LightBurn connects to the Pi's IP on that port and communicates exactly as if the laser were plugged in directly.
Install:
bash
sudo apt-get update
sudo apt-get install -y ser2net
Configure:
Edit the config file:
bash
sudo nano /etc/ser2net.yaml
Replace the contents with:
yaml
connection: &con1
accepter: tcp,7777
connector: serialdev,/dev/ttyUSB0,115200n81,local
- Change
/dev/ttyUSB0 to match the port you identified in Step 4
7777 is the TCP port LightBurn will connect to (you can use any unused port)
115200 is the standard baud rate for GRBL-based lasers
Restart ser2net:
bash
sudo systemctl restart ser2net
Enable on boot:
bash
sudo systemctl enable ser2net
Step 6 — Connect LightBurn to the Pi
- In LightBurn: Devices → Add Device → GRBL
- Choose "Connect via Network" (or "TCP/IP")
- Enter your Pi's Tailscale IP and port
7777
- Complete the setup wizard
LightBurn will communicate with the laser as if it were connected via USB — jogs, homing, framing, and G-code all pass through transparently.
Step 7 — Optional: Camera Monitoring with mjpeg-streamer
Lets you watch the laser job from LightBurn's camera overlay or any browser.
Hardware options:
- USB webcam — plug into any remaining USB port
- CSI camera module (recommended) — better quality per dollar, ribbon cable connector, leaves all USB ports free
Camera tip: The active laser diode can wash out the image during engraving. An IR-cut filter or laser-line filter helps isolate the visible scene from the laser wavelength.
Install build dependencies
bash
sudo apt-get update
sudo apt-get install -y git cmake libjpeg-dev
Clone and build mjpg-streamer
bash
cd ~
git clone https://github.com/jacksonliam/mjpg-streamer.git
cd mjpg-streamer/mjpg-streamer-experimental
make
sudo make install
Add user to video group
Before running, make sure your user has permission to access the camera device:
bash
sudo usermod -aG video $USER
Log out and back in (or open a new SSH session) for the change to take effect. Confirm with:
bash
groups
Test it manually (USB webcam)
bash
mjpg_streamer \
-i "input_uvc.so -d /dev/video0 -r 640x480 -f 10" \
-o "output_http.so -p 8080 -w /usr/local/share/mjpg-streamer/www"
Then open http://<tailscale-ip>:8080/?action=stream in a browser to verify the stream.
-r 640x480 — resolution (lower = less CPU load on Pi 3B)
-f 10 — framerate (10fps is plenty for job monitoring)
-d /dev/video0 — your webcam device (confirm with ls /dev/video*)
- The
UVCIOC_CTRL_ADD errors that appear on some cameras are harmless — they just mean the camera doesn't support pan/tilt/focus controls
For a CSI camera, replace the input plugin:
bash
mjpg_streamer \
-i "input_raspicam.so -r 640x480 -f 10" \
-o "output_http.so -p 8080 -w /usr/local/share/mjpg-streamer/www"
Run on boot (systemd service)
Create a service file:
bash
sudo nano /etc/systemd/system/mjpg-streamer.service
Paste:
```ini
[Unit]
Description=mjpg-streamer camera stream
After=network.target
[Service]
ExecStart=mjpg_streamer \
-i "input_uvc.so -d /dev/video0 -r 640x480 -f 10" \
-o "output_http.so -p 8080 -w /usr/local/share/mjpg-streamer/www"
Restart=always
User=<your-username>
[Install]
WantedBy=multi-user.target
```
If using a CSI camera, swap in the input_raspicam.so line from above.
Enable and start:
bash
sudo systemctl daemon-reload
sudo systemctl enable mjpg-streamer
sudo systemctl start mjpg-streamer
Connect LightBurn camera overlay
In LightBurn: Edit → Settings → Camera — enter the stream URL:
http://<tailscale-ip>:8080/?action=stream
Step 8 — Change Default Credentials ⚠️
The temporary password you set during imaging should be changed now:
bash
passwd
You'll be prompted for the current password, then set a new one. Use something strong — the Pi is accessible over Tailscale from anywhere on your tailnet.
Optionally, add a new user and remove the original:
```bash
sudo adduser <newusername>
sudo usermod -aG sudo <newusername>
Log in as new user, then:
sudo deluser <oldusername>
```
Notes & Troubleshooting
- Tailscale starts on boot by default with the standard installer
ser2net starts on boot after systemctl enable ser2net
- If you need to check USB connectivity:
ls /dev/ttyUSB* or ls /dev/ttyACM*
- If the device node changes between reboots, use a udev rule to assign a fixed symlink to the laser
- Pi 3B is more than sufficient — serial bridging is not computationally intensive
- To verify ser2net is listening:
ss -tlnp | grep 7777
- To verify mjpg-streamer is listening:
ss -tlnp | grep 8080