Multiple Octopi instances with multiple Raspberry Pi's on 1 network

What is the problem?
Can I run 2 Pi's with 2 different octopi instances on 1 network? Specifically I do not want to run 2 printers from the same Pi.

** What did you already try to solve it?**
I have 1 instance of octopi already running on 1 Pi connected ethernet to a private network and USB to a Lulzbot TAZ6

** Additional information about your setup**
My question is pretty simple but I have not been able to find a similar case in the forums. I have 1 Raspberry Pi running the most recent version of octopi running fine and would like to add a 2nd printer but do not want it to be run from the same Raspberry. Most threads I have found are trying to run more than 1 printer from the same Pi. My reason for multiple Pi's is the printers are not co-located but are on the same network.

I am pretty confident this will work and I know how to look up IP addresses and have found my current instance of octopi on my switch (everything is hard wired). One of my questions is how the link "octopi-local/" will work with multiple instances of octopi on the network. I know I could call each instance by its IP but that is not as desirable since the IPs are not static and it appears the static IP setup is no longer around (or I do not know where it is).

I will add some background info that may not be needed but helps explain my setup. I am at a University that takes cyber security way too seriously. There is no way that any of my printers (currently about 20) will ever have a direct connection to the internet. There is also no open WiFi. Please just trust me when I say that connecting printers directly to the internet or even to a computer directly connected to the internet is not possible. So my solution is I have a private network setup with all of my printers (including now octopi for a Lulzbot TAZ6) on it. Then I have a powerful PC running Windows Server 2012 R2 that sits on this private network as well as my instituition's network which has internet access. This PC servers as a lab engine and allows users to remotely login to the server and then access the private network since the server sits on both networks (yes, my institution is ok with this or maybe they don't understand it, but they approved it in either case). Sounds complicated I know, but it actually works beautifully as all work funnels through a single PC, the server monitors both networks, and the printers are safe on the private side from peering IT eyes. I have run this with over 20 users simultaneously and have approximately 20 printers on the private side both with no problems.

Last point, I am not an LINUX expert so keeping it simple is appreciated. I was able to follow the directions for settings up octopi fine the first time and I am pretty experienced in Windows and general networking items.

Thanks in advance for help and thanks for octopi, it was a great solution to my USB printer problem.

1 Like

Yes, they each have their own IP address on your network, so you just point your web browser at whichever address you want to use

1 Like

No problem at all. I already did it before.

Personally, I wouldn't use IP addresses.

I would issue a hostname for each like: huey.local, dewie.local, louie.local. Or use a Star Wars—based theme.

You can adjust the hostname by remoting into the Raspberry and running sudo raspi-config and look under the network option. After the reboot, it should now use its new name.

My printer's named charming-pascal.local, for what it's worth.

3 Likes

Thanks to all and in particular thanks to OutsourcedGuru. This was the exact solution I was looking for. I prefer not to have enter IP addresses for each and really like the idea of adjusting the host names. I already have a theme for my printer names and this would allow me to continue that theme for USB based printers that I change to ethernet using octopi.

Very helpful!

I do want to mention that this would only work on a LOCAL network, not over the internet, without some serious configuration and port management.

2 years on and I just stumbled across this. I'm in exactly the same position as the OP.

It seems to me that, having one Octoprint server up and running (well), the easiest and quickest way to create one or more further servers would be to make copies of the the SD-card from the first, then fire up each server in turn (alone) and then edit the network option as described by OutsourcedGuru above.

Would that work? (Apologies to all if this is obvious to everyone else).

It would, but all of the new servers would share the same SSH Host Key File, the same OctoPrint cookie key and the same password hash salt. Doing that in your own private network where only people you trust have access to is kinda meh but ok. Doing that on anything that gets shared with others or gets accessed remotely (which is its own can of worms anyhow) is a big big no no.

Thanks for that, foosel. I (sort of) understand the concern but yes, it is on my own private network that no one but I has access to. The meh I can live with :blush:

For SSH, you can regenerate the keys on each after cloning, see https://www.raspberrypi.org/forums/viewtopic.php?t=164733 (which also has instructions for VNC).

I think changing each password changes the salt.

@foosel would have to comment on how to regenerate the OctoPrint cookie key. Would / should setting the first run variable do that?

Take a look at https://www.pibakery.org/index.html which may help automate the process.

You'd need to remove cookie key and salt from config.yaml, and then basically reset the instance since you'd need to recreate the users.

Does this still work with the current Octoprint setup? I took a quick look at the network files (from Windows/Notepad++) and couldn't see anything there)

Not sure what you mean by "... at the network files" here. If we're talking about issuing a unique hostname, bring up one OctoPi-imaged Pi, remote into it with PuTTY in your case to octopi.local or the IP address. Then run sudo raspi-config and change the hostname under network settings, as I recall. Reboot it and verify that you can get to it.

As an almost 80-year old Windows user I was trying to avoid the "remote into it" (where it seems to me I had the most trouble when I set up the original a couple of years ago) and had hoped I could do it through the text files on the card.

Apparently not so I shall have to brave the vagaries of Putty, sudo etc after all - or just use the IP addresses.
Thanks for taking the time.

Some of my earliest programming involved flipping eight switches and then pushing the submit button to push the command into an 8086 processor. The first teletypewriters I learned on had swastikas stamped into some of their parts. The first database I designed was on 3x5 cards with holes punched at the top for 1's and a slit cut above this for 0's with a pencil used to make binary queries.

1 Like

Ah yes, the follow-on to the 4004/8008/8080 and all things Altair (I had one of those) and cassette storage, ASR-33's and paper-tape and finally (crude) video monitors .....and the forerunner to the 8088 and IBM-PC

But I got older .....

I did try this using PuTTY. I can connect OK but can't get past the password dialogue. I feel sure I hadn't changed it from the default (pi / raspberry) - it's not running a nuclear sub after all. If I had changed it I'm 99.9% sure of what I would have changed it to. If I'd used anything else (inconceivable to me) I'd have noted it in my password book.

Like I said, I always have problems when I try to remote into things (my ignorance, I freely admit).

Not to worry, I can manage using the IPs, it's not a serious issue. And thanks for your help.

If you changed the password locally on the Raspberry Pi with a physically-attached keyboard then it's possible that at this time it was using the default keyboard setting/locale for the UK. This tends to screw things up for me if, for example, I try to type a double-quote character ". The UK keyboard will print something else.

If you can't remote into the Pi then you might try putting a keyboard/monitor on it and try that way.