Current Feature Requests
Please visit to log a request.
Version 1.1.4
OctoFarm
OctoFarm is an easy to setup and install web server and client for unifying multiple instances of Octoprint. You can manage and monitor as many instances as you want from a single interface giving you full control over your 3D printer farm.
Explore the docs »
OctoFarm Bug
·
Request Feature
Table of Contents
About The Project
OctoFarm was built to fill a need that anyone with multiple 3D printers with Octoprint will have run into. How do I manage multiple printers from one place? That's where OctoFarm steps in, add your OctoPrint instances to the system and it will scan and keep you up to date on the status of your printers.
Getting Started
To get a local copy up and running follow these simple steps.
Platform
Confirmed working on: Linux (Ubuntu, Debian), RaspberryPi (Rasbian), Windows 10. Should also work on but not tested: MacOS, anything else nodejs will run on.
Note: Raspberry Pi's Raspbian OS doesn't officially support running MongoDB yet (MongoDB requires a 64bit kernel, whereas Raspbian's is 32bit), so in that case, you'll need an external database running on some other machine or VM.
Prerequisites
On your OctoPrint instance
- Settings -> API
- Copy the API Key someplace easy to get to
- Enabled the "Allow Cross Origin Resource Sharing (CORS)
- Restart OctoPrint
- Repeat for all OctoPrints that will be added to the Farm
Installation Docker
TinkerDad's Version (MongoDB Included)
Instructions can be found: TheTinkerDad/OctoFarm
- Massive thanks to TheTinkerDad for making this, he's also better at keeping up with his documentation. Be sure to send him some love on his Youtube Channel
OctoFarm Official (MongoDB Not Included)
BIG thanks to knoker for the help with this!
docker run -d --name octofarm -e "MONGO=mongodb://172.17.0.2/octofarm" -p4000:4000 octofarm/octofarm -v '<your persistent folder>/OctoFarm/config/':'/app/serverConfig/':'rw' -v '<your persistent folder>/OctoFarm/logs/':'/app/logs/':'rw'
Environment Variables
- MONGO = contains mongodb connection string
Ports
- 4000
Paths
- <your persistent folder>/OctoFarm/config/':'/app/serverConfig/
- <your persistent folder>/OctoFarm/logs/':'/app/logs/
Generic Docker-Compose Installation (Includes a MongoDB Server)
version: "3"
services:
mongo:
image: mongo
restart: always
volumes:
- <your persistent folder>/MongoDB:/data/db
octofarm:
container_name: octofarm
image: octofarm/octofarm
restart: always
ports:
- 4000:4000
environment:
- MONGO=mongodb://mongo/octofarm
volumes:
- <your persistent folder>/OctoFarm/config:/app/serverConfig
- <your persistent folder>/OctoFarm/logs:/app/logs
Windows Specific Docker-Compose Installation (Includes a MongoDB Server)
- NOTE: Docker Dashboard -> Settings -> Resources -> File Sharing -> check the C drive (or wherever you want persistent storage to be)
version: "3.1"
services:
mongo:
image: mongo
restart: always
octofarm:
image: octofarm/octofarm
restart: always
ports:
- 4000:4000
environment:
- MONGO=mongodb://mongo/octofarm
volumes:
- /c/ProgramData/OctoFarm/serverConfig:/app/serverConfig
- /c/ProgramData/OctoFarm/logs:/app/logs
Installation Production
- Debian/Linux Specific
- Install the Pre-requisites
curl -sL https://deb.nodesource.com/setup_13.x | sudo -E bash -
sudo apt-get install -y nodejs
sudo apt install mongodb
sudo apt install git
- Alternative
curl -sL https://deb.nodesource.com/setup_13.x | sudo -E bash -
sudo apt-get install -y nodejs
wget https://repo.mongodb.org/apt/ubuntu/dists/bionic/mongodb-org/4.2/multiverse/binary-amd64/mongodb-org-server_4.2.5_amd64.deb
sudo dpkg -i mongodb-org-server_4.2.5_amd64.deb
sudo apt install git
- Clone the OctoFarm and cd into it's directory.
git clone https://github.com/NotExpectedYet/OctoFarm.git
cd OctoFarm
- Install NPM packages
npm install
- Edit the /config/db.js file with your database and grab your hosts IP.
nano config/db.js
Change 192.168.1.5 to the mongodb server's IP Address (127.0.0.1 if you installed on the same machine, the actual IP Address otherwise), Save the File
hostname -I (Take note of the IP Address returned here)
- Start the system
npm start
If the last message you see is '> node app.js > production.log 2> productionError.log' You did it correctly!
- Load up a browser and add your printers.
Open a browser and go to http://<IP from hostname -I>:4000
Register a New User ## Password must be six characters
Login as that new User
Click the Setup Printers button
Enter Your First Printers information
- IP
- Port (Typically 80)
- Camera URL (Typically IP:8081/webcam/?action=stream if using a USB camera or Pi Camera )
- APIKey (Gathered during the PreRequisites)
- Click Add Printer
- Repeat for all your OctoPrint Instances
- Click Save
- The production version will run without interaction, but currently there are no way to persist other than something like screen on linux, or using a service you create yourself. The logs will be outputted to /logs folder for error and standard operations. Check the error log if your server unexpectedly halts.
Installation Development
- Clone the OctoFarm
git clone https://github.com/NotExpectedYet/OctoFarm.git
- Install NPM packages
npm install
- Edit the /config/db.js file with your database.
module.exports = {
MongoURI: "mongodb://192.168.1.5:27017/octofarm"
};
//Example Local URL: "mongodb://192.168.1.5:27017/octofarm"
//Example Remote URL: "mongodb+srv://s1mpleman:<YOUR PASSWORD>@cluster0-lgugu.mongodb.net/test?retryWrites=true&w=majority"
- Install nodemon
npm install --save-dev nodemon
- Start the system
npm run dev
- The developer version uses nodemon for live server reloading on changes. It will output all the logs to the console.
- The developer version will skip some basic sanity checks, if your pages don't load right after server boot then it's because those sanity checks haven't finished.
Packaged Versions
These are planned but not available yet...
Roadmap
See the open issues for a list of known issues.
Contributing
I am currently not accepting any contribution to the code. I started this project to teach myself nodejs and Javascript better. With my current plans I will have exhausted most learning opportunities by Version 1.2 and will be happy to take pull requests from people then. Thanks for understanding.
License
Distributed under GNU Affero General Public License v3.0. See LICENSE
for more information.
Contact
-
Email: Email NotExpectedYet
-
Project Link: https://github.com/NotExpectedYet/OctoFarm
-
Discord: Discord
Acknowledgements
- Gina Häußge - Without OctoPrint none of this would be possible. Massive thanks to the work of Gina and everyone who helps out with that.
- Derek from 3D Printed Debris - Massive big thanks to Derek who has donated a lot of time and money to the project. I don't think I'd have continued at the rate I did without his bug reports and support.
- All Patreon Supporters and random donations! - Big massive thanks for these, they keep me full of steak!
- The users calonmer, Insertion and noxin from my discord server! Seriously no end to my thanks for these 3.