CNCing from Web Interface - Octoprint or CNCjs?

Does anyone have experience using their CNC from a web interface? Ideally I’d like to hook a raspberry pi up to my CNC in order to control it remotely in the same way that I do with my 3d printer using Octoprint.

CNCjs recently released a feature to support the Marlin firmware:

Anyone have experience with either of these options? Would I basically plug my minirambo/rambo/ramps into the raspberry pi and control it from either CNCjs or Octoprint?

I’ve used both. Octoprint with Marlin and CNC.js with grbl.

CNC.js is great. I love it. I’m not sure if any of the features are missing for Marlin, but it’s much more focused on CNC. It has work offsets, understands the gcode is for cutting, not just travel moves. It has a great visualization. Yeah, try it out, let us know how you like it. It was really the reason I switched to grbl, so maybe it’s time for me to switch back.


Are there any howto guides available on connecting a MiniRambo to the RaspberryPi? Or could you point me in the general direction of how to make that all happen?

For example, what plugs into what? Do I need to do anything special to get the MiniRambo to be recognized by the Pi after plugging it in and installing CNCjs?

IDK. It’s pretty trivial though.

You’ll follow the guides here to set up the machine and mini-Rambo. Then your mini Rambo can control the machine.

Connecting to the pi is just though the USB. There aren’t any drivers. It will show up as /dev/ttyUSB0 or /dev/ttyACM0 or something like that. In the main interface for CNC.js, you’ll be able to pick an available serial port and click connect.

The raspberry pi needs to have CNC.js installed. I use a board from prontoneer that has grbl installed, do I used his preconfigured pi image:
The only terrible with using this image is that it might not have the Marlin update on the CNC.js version.

The realm of setting up a clean pi image and installing the CNC.js software is simple, but very very open ended. I don’t know if there’s a single guide that would run you though step by step. The closest would probably be something about setting up a pi and then a guide from CNC.js for installing that software. If you get into trouble, Google is your friend and there are a few Linux nerds here, like myself.

I, personally, (and if this makes no sense, then just ignore it) would start with a pi at my desk, with a monitor and keyboard. I’d install an image, boot it up, expand the filesystem, and set up sshd, then disconnect it from the monitor and connect to it via ssh to set the rest up. I don’t have a monitor on mine ever, I just connect through the web interface and ssh to do updates. I also installed avahi and gave it a hostname to find on the network easier.

1 Like

I’m comfortable with setting up the pi and the installation guides for both OctoPrint and CNCjs are well detailed. I was more concerned with needing to do anything to hook the MiniRambo into the pi. If it’s just USB A-to-B, then I should be set.

I’ll probably create a step-by-step guide for using the MPCNC with CNCjs, if successful.


Please do I have a Raspberry Pi and I’d love to try that out without putting in all the hard work of figuring it out

Good. Those kind of questions can really mean a lot of different things to different people, depending on your experience.

The connection is just USB A -> B. It worked with my mini-Rambo and the octopi I had configured. If you hit any snags, let me know. I plan on doing that in my copious free time (ok, so probably not until late next year). I’m really curious to see how the Marlin version works.

Actually, I have a pi attached to my ZXY, which is running octoprint and a mini rambo. Maybe I should just install cnc.js:marlin there…

Definitely would love to see a write up of this after you get it figured out…I would really like to do it as I’m sure many other people would too.

I intend to install a RAMBO on my first build, and have 2 Pi’s waiting for projects. I also would love to see this done!

Here is the howto guide for setting up a wireless web interface using an RaspberryPi and CNCjs:

I’m definitely looking for any and all feedback on it! If time allows and you like this first draft, I’ll do one for OctoPrint as well.



I will be packing the next round of hardware for a few days, I hope I get a chance to try this out soon. If you don’t mind I would love to link this on the how-to page?

(I really need to add some pics on that page, I’ll put it on the to-do list)

1 Like


That looks great. You’ve done a good job of balancing the detail with the simple.

The one thing I’d do is make a spot where folks can got for troubleshooting. Probably just make a new post and link to that.

Did you have any trouble with cron finding the cnc in the path or anything like that?

Wow, awesome job on the write up...clear straight forward information. Thanks a lot!

The one thing I’d do is make a spot where folks can got for troubleshooting. Probably just make a new post and link to that. Did you have any trouble with cron finding the cnc in the path or anything like that?
Great idea! I didn't have any issues with the pathing. I'll probably add a section for troubleshooting network connectivity, the connection between the Pi & and the board, and provide a link to the CNCjs troubleshooting.

I’m looking forward to doing a similar guide with OctoPrint. I’ve been using it for my 3d printer and love it.

If you want to carve out a forum section here feel free. If you would like another category pretty sure I can make that happen as well. Guides like that can help a ton of people. I get so used to hunting around the web for info it is cool to see it all in one place.

It works !!

Got hold of an old Raspberry Pi lying spare - Model B V2 with 8Gb micro SD card and USB wifi adapter.

Followed the instructions detailed by Daniel and all installed correctly with no issues. Added USB camera as well and this installed with no issues - able to view the MPCNC over my home network.

This is a great addition to the MPCNC and many thanks to all on this post for their input, great instructions from Daniel.



Glad to hear it adding it to the how-to page now before I forget again.

I followed the steps and was able to get it working with one caveat. I was not able to get the script to boot on load. Not sure if it was because I installed node with nvm rather than node. When I passed the –unsafe-perm to the node command when installing, I think it changed the permissions. I needed to give it an absolute path to the boot script rather than the generic cnc node module. I fixed this by finding out the path of node and where the cnc script was installed by running the following:

pi@CNC:~ $ which node
pi@CNC:~ $ which cnc

Which I then combined the two paths that I got by adding the following at the bottom of the crontab file by running sudo crontab -e

@reboot /home/pi/.nvm/versions/node/v8.10.0/bin/node /usr/local/bin/cnc

Do you think it would be helpful to post a disk image for others to download and clone?

That being said, I have both Octoprint and CNCjs running on pi’s. Octoprint did not see my Mini-Rambo board so I gave CNCjs a try. It seems like a much more intuitive UI as well as being in a familiar language.

Thanks for the How-to! Looking forward to finishing the MPCNC build and milling some things.

Noob question:

I already installed Octoprint, and it works fine as a 3D printer controller. But I wish I could also use this CNCjs thing for whenever I’m using the machine as a CNC.

Is it possible to use both? If yes, any idea how?

It is surely a pretty stupid question, but I’m a total moron when it comes to using linux.