Build a Full-Stack Printing Management System With Raspberry Pi

by Orange Digital Center in Workshop > 3D Printing

492 Views, 4 Favorites, 0 Comments

Build a Full-Stack Printing Management System With Raspberry Pi

0ab1017c-b8ad-4b85-82f2-c7be9580f065.jpg
WhatsApp Image 2025-06-24 at 11.52.02.jpeg

Welcome to our project! At the Orange Digital Center Rabat , Morocco FabLab, we embarked on an exciting

journey to create a full-stack printing management system. This project integrates 2D and 3D printing capabilities using Raspberry Pi and modern web technologies. Whether you're a maker, developer, or tech enthusiast, this guide will walk you through the process of building a similar system.

Our team of full-stack developers: Alae-Eddine Sahbou, Ali Belahmidi, Mehdi Boudar, and Mosaab Lachhab, worked under the guidance of our supervisor Meryem Eddib to bring this project to life.

Together, we combined our skills in hardware, software, and system integration to create a scalable and efficient solution .


What You'll Learn


By following this guide, you'll learn how to:

  1. Set up a Raspberry Pi for embedded system operations
  2. Install and configure OctoPrint for 3D printing management
  3. Use CUPS for 2D printing services
  4. Build a unified API layer with Node.js
  5. Optimize and monitor your system for continuous operation


Project Overview


Our project consists of three main components:

1 . Raspberry Pi Setup: Core embedded system configuration and OS installation

2 . OctoPrint Integration: 3D printing management via API

3 . CUPS Integration: 2D printing services via API

Supplies

Rpf-raspberry-pi-4-model-b.png
unnamed.png

To get started, you'll need:

Raspberry Pi 4 Model B (4GB+ RAM recommended)

MicroSD Card (32GB minimum, Class 10)

Power Supply (5V 3A offi cial adapter)

Ethernet cable or WiFi connectivity

Heat sinks and cooling fan for continuous operation

Install Raspberry Pi OS Using Raspberry Pi Imager

imager.png

1. Download Raspberry Pi Imager:

  1. Visit Raspberry Pi Software and download the Imager for Windows.
  2. Install the application and launch it.


2 . Flash the OS:

  1. Insert your MicroSD card into your computer.
  2. Open Raspberry Pi Imager and click CHOOSE OS.
  3. Select Raspberry Pi OS Lite (64-bit) for a headless setup.
  4. Click CHOOSE STORAGE and select your MicroSD card.
  5. Click the gear icon ( ) to confi gure advanced options:
  6. Enable SSH and set a username/password.
  7. Confi gure WiFi by entering your SSID and password.
  8. Set the locale to Morocco (MA) for timezone and keyboard layout.
  9. Click WRITE and wait for the process to complete.


3 . Insert the SD Card:

  1. Once the flashing process is complete, eject the SD card and insert it into your Raspberry Pi.

First Boot and SSH Access

1 . Power on your Raspberry Pi and wait for it to boot (2-3 minutes).

2 . Find your Raspberry Pi on the network:

  1. Open Command Prompt or PowerShell on Windows.
  2. Use ping fablab-pi.local (if mDNS is enabled) or check your router's connected

devices.

3 . SSH into the Raspberry Pi:

  1. Open a terminal or use PuTTY.
  2. Run: ssh pi@fablab-pi.local or ssh pi@<IP_ADDRESS> .
  3. Enter the password you set during the flashing process

Configure the System

Run the following command to launch the Raspberry Pi confi guration tool:

sudo raspi-config

Make the following changes:

1 . Change the default password.

2 . Enable SSH (if not already enabled).

3 . Expand the fi lesystem.

4 . Set the timezone and keyboard layout.

Update the system:

sudo apt update && sudo apt upgrade -y

Install OctoPrint (for 3D Printing)

Octoprint-logo..png
Octoprint-user-interface-8052286393a7c6d399eaa8c4f02c43ad.png

1. Create a dedicated user for OctoPrint:

sudo useradd -m octoprint
sudo usermod -a -G tty,dialout octoprint

2 . Install Python dependencies:

sudo apt install -y python3-pip python3-venv git

3 . Switch to the OctoPrint user and set up a virtual environment:

sudo su - octoprint
python3 -m venv OctoPrint
source OctoPrint/bin/activate
pip install octoprint
exit

Configure OctoPrint As a Service

1. Create a systemd service fi le:

sudo nano /etc/systemd/system/octoprint.service

Add the following content:

[Unit]
Description=OctoPrint Service
After=network-online.target

[Service]
User=octoprint
ExecStart=/home/octoprint/OctoPrint/bin/octoprint serve
Restart=always

[Install]
WantedBy=multi-user.target

2 . Enable and start the service:

sudo systemctl enable octoprint
sudo systemctl start octoprint

Install and Configure CUPS (For 2D Printing)

1. Install CUPS:

sudo apt install -y cups

2 . Add the pi user to the lpadmin group:

sudo usermod -a -G lpadmin pi

3 . Confi gure CUPS to allow remote access:

sudo nano /etc/cups/cupsd.conf

Modify the following lines:

Listen 0.0.0.0:631
<Location />
Allow all
</Location>

4 . Restart CUPS:

sudo systemctl restart cups

Set Up the Node.js Environment

1. Install Node.js:

curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
sudo apt install -y nodejs

2 . Create a project directory:

mkdir ~/fablab-api && cd ~/fablab-api
npm init -y
npm install express cors multer dotenv

Create the API Server

1. Create a fi le named server.js :

nano server.js

2 . Add the following content:

const express = require('express');
const app = express();
const PORT = process.env.PORT || 3000;

app.get('/', (req, res) => {
res.send('FabLab API is running!');
});
app.listen(PORT, () => {
console.log(`Server is running on port ${PORT}`);
});

3 . Start the server:

node server.js

Monitoring and Optimization

System Monitoring Script

Create a script to monitor system health:
nano ~/monitor.sh

Add the following content:

#!/bin/bash
echo "=== System Status ==="
echo "CPU Temperature: $(vcgencmd measure_temp)"
echo "Memory Usage:"
free -h
echo "Disk Usage:"
df -h

Make it executable:

chmod +x ~/monitor.sh

Conclusion

WhatsApp Image 2025-06-24 at 11.44.28 (2).jpeg

This project demonstrates how to integrate 2D and 3D printing into a unified system using Raspberry Pi and modern web technologies.

Final Presentation

3D Printing mangement system

In this final step, we complete the installation of the 3D printing management system using the Raspberry Pi. After configuring network settings, installing control software such as OctoPrint, and connecting the 3D printer, we test the system's functionality. The video presents a live demonstration: sending an STL file, remotely starting the print job, and monitoring the printing parameters in real time via the web interface.

This module wraps up our project by showing how to automate, monitor, and efficiently manage a 3D printer remotely using a Raspberry Pi.

https://www.youtube.com/shorts/pxAUkUmW6ig