Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running more printers on the same Pi #5

Open
guysoft opened this issue Aug 5, 2013 · 10 comments
Open

Running more printers on the same Pi #5

guysoft opened this issue Aug 5, 2013 · 10 comments

Comments

@guysoft
Copy link
Owner

guysoft commented Aug 5, 2013

OctoPi can support multiple instances of OctoPrint. There should be a simple way to create new instances.

Currently the workaround is to simply put another instance of OctoPrint on startup using this command:

~/oprint/bin/python ~/OctoPrint/run --daemon start --port 5001 --pid /tmp/octoprint2 --basedir ~/.octoprint2

There is also a talk about this in OctoPrint: OctoPrint/OctoPrint#113 (comment)

@humford
Copy link

humford commented Jan 14, 2016

I know this thread is over two years old now but I'm thinking about doing just this and have a question. If you create a second OctoPrint Instance how do you connect to it? Do you jsut go to http://octopi.local:5001 to access the second instance?

@guysoft
Copy link
Owner Author

guysoft commented Jan 14, 2016

@LieutenantHawkeye Yes, that should do it.
But I am not sure the "restart OctoPrint" in the system menu would work, because all that is set up to work on the main instance,

@humford
Copy link

humford commented Jan 14, 2016

@guysoft BTW do you just type that command into the terminal for the pi? Sorry I'm a newb at this kind of thing

@guysoft
Copy link
Owner Author

guysoft commented Jan 14, 2016 via email

@TGC-TECH
Copy link

TGC-TECH commented Jul 6, 2017

know this is old but how would I make this command start at boot, right now I just replaced the restart octoprint command in octoprint settings with the one here so I can start it quickly without SSH but I would like some recomendation on how to go about enabling this command to autoluach at boot. Thanks!

@davr
Copy link

davr commented Jul 7, 2017 via email

@guysoft
Copy link
Owner Author

guysoft commented Jul 7, 2017

You need to create a systemd service.

/etc/systemd/system/rc-local.service

[Unit]
Description=/etc/rc.local Compatibility

[Service]
Type=oneshot
ExecStart=/etc/rc.local
TimeoutSec=0
StandardInput=tty
RemainAfterExit=yes

[Install]
WantedBy=multi-user.target

Read about it here:
https://wiki.archlinux.org/index.php/Systemd/Services#rc.local

@enriqueiglesias
Copy link

General advice for running commands on boot in linux is add the commands to /etc/rc.local but no guarantee this is the best option for whatever you are trying to do here and for more queries you can visit HP Printer Support and you can get the help from expert's.

@guysoft
Copy link
Owner Author

guysoft commented Jul 2, 2019

They new RaspberryPi 4 might actually revive this talk.

@SilverWingedHawk
Copy link

SilverWingedHawk commented Aug 6, 2021

Is this issue still relevant ? Because you could leverage systemd template units (ie octoprint@.service, with the port as the instace "name", and a corresponding script to prepare for another configuration directory).
I'd be willing to work on a PR to get it done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants