/OctoFarm

OctoFarm is an web server and client combination 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.

Primary LanguageJavaScriptGNU Affero General Public License v3.0AGPL-3.0

Docker Pulls GitHub release (latest by date) GitHub stars GitHub forks

GitHub license GitHub Workflow Status GitHub issues Maintenance Download Dockerhub

OctoFarm Latest Release

Logo

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.

OctoFarm Dashboard

Prerequisites

In order to have OctoFarm running using a local installation of NodeJS and MongoDB as database, please be aware of the following minimum version requirements:

OS / Platform for OctoFarm

Confirmed working on:

  • Linux (Ubuntu, Debian)
  • RaspberryPi (Rasbian, Raspberry Pi Lite OS)
  • Windows 10

Should also work on but not tested:

  • MacOS
  • Anything else NodeJS 14+ will run on.

Note: Raspberry Pi's Raspbian is 32 bits. In that case choose to upgrade to 64-bits Raspberry Pi Lite OS or find yourself a 32 bits MongoDB installation. Alternatively you can choose to run MongoDB on another machine.

Important note OctoPrint 1.4.1+

Avoid using a Global API Key!
Generate an Application or User API Key!

OctoPrint WebSocket connection will fail when providing the Global API Key and OctoFarm will therefore not accept this type of OctoPrint key. You must generate an Application Key or User API key from your OctoPrint account. Your logged in user requires the groups Admin and Operator (or simply all permissions), or we cannot guarantee a 100% succesful OctoFarm experience.

Preparing OctoPrint User API Key / Application Key

Follow all these steps on the specific OctoPrint website:

  • User Name -> User Settings
  • Copy the User API Key (or alternatively Application Key in System Settings, but never the Global API Key!)
  • Enable the Allow Cross Origin Resource Sharing (CORS) setting
  • Restart OctoPrint
  • Repeat for all OctoPrints that will be added to the Farm

Getting Started

Please choose the direct NodeJS installation or the Docker image.

  1. Installing OctoFarm - read the following: OctoFarm.net installation instructions
  2. Docker image(s) docker or docker-compose usage instructions
  3. Installation for Development (Node 14+, Nodemon)

Installation - for Development only!

This is for devs or testers only! It is not practical to use nodemon for normal usage as nodemon does not add a service like pm2 (option 1) or docker (option 1 and 2). Please, if you are a normal user, check out OctoFarm.net installation instructions instead!

So nice that you want to test or develop OctoFarm!

  1. Clone the OctoFarm
git clone https://github.com/NotExpectedYet/OctoFarm.git
  1. Install NPM packages
npm install
  1. Create an .env file with the MONGO variable:
MONGO=mongodb://127.0.0.1:27017/octofarm

3a. Custom MongoDB parameters, like from a docker-compose.yml file. In that case, see docker or docker-compose usage instructions but we do expect you to be able to adapt what is needed.

# Docker alternative
MONGO=mongodb://mongo_compose_service_name_here:compose_exposed_port_here/octofarm

3b. OR if you have a password or other different parameters (credentials, host, port or authSource):

MONGO=mongodb://USERNAME:PASSWORD@HOST:PORT/octofarm?authSource=admin
  1. Install nodemon
npm install --save-dev nodemon
  1. 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.

Contributing

The awesome project OctoFarm needs extra contributors to move even faster! If you feel like you have what it takes, and want to join the fun please head over to discord with the following link: Discord and speak to us in Developer Discussions. Thanks!

Work on version 1.1.x

Version 1.1.x is our current OctoFarm release on the development branch. This has the following specs:

  • NodeJS 14+ (version 12 was dropped to support better syntax like the optional chaining operator ?)
  • ExpressJS with ejs and ejs-express-layouts
  • Mongoose and MongoDB

We are working hard to prepare version 1.1.x for the upgrade to a newer Typescripty OctoFarm in version 2.0! Continue reading for that version below.

Work on version 2.0

Version 2.0 is underway on the alpha-2x branch. This will have the following specs:

  • Node 14+ support
  • NestJS backend with Typescript
  • TypeORM database Object-Relational Mapper with Typescript
  • SQLite (instead of MongoDB)
  • (Optional) VueJS client is introduced

License

Distributed under GNU Affero General Public License v3.0. See LICENSE for more information.

Contact

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.
  • All Patreon Supporters and random donations! - Big massive thanks for these, they keep me full of steak!
  • 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.
  • JetBrains IDE - Thanks to JebBrains for allowing a free license to use with developing my application. Their IDE is top notch!