Setting up OctoPrint on TrueNAS 12 server inside iocage Jails

Thanks for your help, almost got it sorted.

Octoprint is now installed and running, it's just not connecting to the printer.
I'm stuck on the line "added chown oprint /dev/cuaU0 to /etc/rc.local" - could you explain a bit more about what to do here please?

So close to getting it sorted and sorry for all of the silly questions, I really appreciate your help!

Nah those questions aren't silly - how are you supposed to learn new things if you don't ask :slight_smile:

Well to be honest that part is a bit hacky.
On linux I would just add the user to the group that has access to serial devices (like your printer) and that's it.
I'm not really familiar with the groups on bsd so instead of putting the user in a group I just allowed him to access this usb device.

So what you do is type nano /etc/rc.local as root which opens a text editor.
Paste the chown <username> <usbdevice> line in it - in my case it was chown oprint /dev/cuaU0.
Exit the text editor with CTRL + X and confirm the question with Y.

That's all

Continuing the discussion from Setting up OctoPrint on TrueNAS 12 server inside iocage Jails:

Hi, when I go to my Octoprint ip, it brings me to the truenas login page.

Can you help me?

Thanks!

You probably forgot to add the port at the end of the address, normally it is 5000, so if your jail IP is 192.168.0.7, then you need to put 192.168.0.7:5000 in your browser's address bar. Let us know if it worked for you.

Thank you for the answer. No it doesn't work. If I put 192.168.2.8:5000 in the address bar of my browser it gives me Unable to connect. If I put only 192.168.2.8 it brings me to the truenas login page.
Sorry for my English I'm french.

Thank.

Then your Octoprint server is probably not running, if you followed the guide correctly and without any problems, then you can try restarting the jail in which OctoPrint is installed and trying to start it with the command ./OctoPrint/bin/octoprint serve --iknowwhatimdoing
Good luck!

Yes, it works now. That was my problem, thanks

Hi, I can manually start the server with the command, but if I close the octoprint shell, the server goes offline. Is there a way to keep the server online?

Thank

Yes there is, you can use screen or termux, but there is a section on the guide specific about running octoprint as a service inside the jail, using rc.d, go back to it and check it out.

Is it possible to use a usb camera? If so, do you have a procedure?
Thank

I just registered here to say thank you! It works like charm on Truenas Core 13 :tada:

No issues at all with basic functionality, apart from some plugins that refuse to install.

Great job with the guide.

Brg. //Erik

What plugins are you having problems with? What python version is your octoprint instance running? maybe your plugin problems are related to that, i have played around installing a lot of plugins on OctoPrint instances on TrueNAS without any issues.

Yes it is possible, i don't have a guide for it, but you would need to try and install mjpg-streamer or another software like that. Check the instructions regarding mjpg-streamer at: Setting up OctoPrint on a Raspberry Pi running Raspberry Pi OS (Debian)

Thank you so much for the guide! All the steps worked flawlessly and I have full access to my printer via the Truenas Core jail.

I do have a question if someone can help - how exactly do we pass the webcam to Octoprint? I've been trying to figure out the URL portion...

hello! thank you for the suggestion :smiley:

I am trying to set this up but I dont see my camera as a device within the Ubuntu VM. (I'm a complete noob at this btw). How did you get your cameras to show up?

You’ve got to pass the usb through to the VM within TrueNas. Once you do this, just use LSUSB (in lowercase) within Ubuntu VM and you’ll see the webcams.

How can I find how to pass the USBs on my TrueNas Mobo? I only see passthrough options for the NIC, Disk ROM, PCI and a hard disk. Any help would be appreciated I've been trying to do it this way or trying to use webcamsd within a jail.

Watch this.

Thank you @Victor76!!! I managed to combine this video guide with some input from these resources below. I basically have the webcam enabled inside the VM that autostarts when the VM starts up. I avoided using AgentDVR by using MJPG Streamer.

Hi, thanks for the guide! I have been having problems trying to install Octolapse, somehow it is the only plugin that refuses to install. Have you managed to install it?