IT/Software/Octoprint: Difference between revisions

From msgwiki
< IT‎ | Software
Jump to navigation Jump to search
Access restrictions were established for this page. If you see this message, you have no access to this page.
(initial version)
 
(updated repo links)
 
(12 intermediate revisions by the same user not shown)
Line 1: Line 1:
# Octoprint
= Octoprint =
 
An application to control (usb) 3d-printers over the network.
An application to control (usb) 3d-printers over the network.


- send .stl over the network (no sd cards needed)
* send .stl over the network (no sd cards needed)
- setup and control the print
* setup and control the print
- monitor the progress of ongoing prints (optionally, webcams can be added to see the visual state)
* monitor the progress of ongoing prints (optionally, webcams can be added to see the visual state)
 
## Multi printer support
 
- Octoprint only supports one printer per instance
- in order to support multiple printers, we can deploy multiple docker containers
- the different printers can then be assigned to their respective instance
- this example sets up 2 instances for 2 priners, modify it to your needs
 
## Requirements


- Debian/Ubuntu based host (RPi, Laptop, ...)
=== Multi 3D printer support ===
- one USB port per 3d printer
* Octoprint only supports one printer per instance
- Recommended: network connectivity to host (if not, only local control possible)
* in order to support multiple printers, we can deploy multiple docker containers
- Optionally: one webcam per 3d-printer (needs additional USB ports)
* the different printers can then be assigned to their respective instance
- Recommended: ssh enabled on host (needed for ansible deployment)
* this example sets up 2 instances for 2 priners, modify it to your needs
- Docker installed [manual install](https://docs.docker.com/engine/install/ubuntu/) / (ansible playbook)
- Optionally: Portainer installed [manual install](https://docs.portainer.io/start/install-ce/server/docker/linux) / (ansible playbook)


## Deploy Octoprint with 2 printers
== Requirements ==
'''Hardware'''
* Debian/Ubuntu based host (RPi, Laptop, ...)
* one USB port per 3d printer
* Recommended: network connectivity to host (if not, only control over localhost is possible)
* Optionally: one webcam per 3d-printer (needs additional USB ports)
'''Software'''
* Recommended: ssh enabled on host (required for ansible deployment >> <code>sudo apt install openssh-server -y</code>)
* Docker installed https://docs.docker.com/engine/install/ubuntu/ / https://github.com/stefannyffenegger/automation/blob/main/ansible/pb_prompt_install-docker.yml
* Recommended: Portainer installed https://docs.portainer.io/start/install-ce/server/docker/linux / https://github.com/stefannyffenegger/automation/blob/main/ansible/pb_prompt_install-portainer.yml


- Reference: https://github.com/OctoPrint/octoprint-docker
== Deploy Octoprint with 2 printers ==


### Deploy with Ansible
* Reference: https://github.com/OctoPrint/octoprint-docker


- local install of ansible required (ansible)
=== General ===
- copy this Ansible Playbook to your local device (pb_docker-octoprint.yml)
-


### Manual deployment
* modify the docker-compose.yml according to your printer and webcam devices (e.g. /dev/ttyACM0 /dev/video0)
* make sure each instance uses it's own port (default port 81 and 82)


- modify the docker-compose.yml according to your printers and webcams
=== Manual deployment with Portainer ===
- make sure each instance uses it's own port
- deploy the compose file on the hosts Portainer


Without Portainer:
* deploy the compose file on the hosts Portainer as a stack
* access and configure at [http://localhost:81 http://<HOST_IP>:81/] [http://localhost:82 http://<HOST_IP>:82]


- copy the compose file to /srv/docker/octoprint/docker-compose.yml on the host
=== Plain Docker Compose without Portainer ===
- `cd /srv/docker/octoprint`
- start the containers with `sudo docker compose up -d`
- check if containers are running `sudo docker ps`
- check for any errors with `sudo docker compose logs -f`


```
* copy the compose file to /srv/docker/octoprint/docker-compose.yml on the host
version: '3.9'
* <code>cd /srv/docker/octoprint</code>
* start the containers with <code>sudo docker compose up -d</code>
* check if containers are running <code>sudo docker ps</code>
* check for any errors with <code>sudo docker compose logs -f</code>
* access and configure at [http://localhost:81 http://<HOST_IP>:81/] [http://localhost:82 http://<HOST_IP>:82]


services:
=== Compose file ===
  octoprint-1:
    image: octoprint/octoprint
    restart: unless-stopped
    ports:
      - 81:80
    # devices:
    # use `python -m serial.tools.miniterm` to see what the name is of the printer, this requires pyserial
    #  - /dev/ttyACM0:/dev/ttyACM0
    #  - /dev/video0:/dev/video0
    volumes:
    - octoprint-1:/octoprint
    # uncomment the lines below to ensure camera streaming is enabled when
    # you add a video device
    #environment:
    #  - ENABLE_MJPG_STREAMER=true


  octoprint-2:
* https://github.com/stefannyffenegger/automation/tree/main/docker/octoprint
    image: octoprint/octoprint
    restart: unless-stopped
    ports:
      - 82:80
    # devices:
    # use `python -m serial.tools.miniterm` to see what the name is of the printer, this requires pyserial
    #  - /dev/ttyACM1:/dev/ttyACM0
    #  - /dev/video1:/dev/video0
    volumes:
    - octoprint-2:/octoprint
    # uncomment the lines below to ensure camera streaming is enabled when
    # you add a video device
    #environment:
    #  - ENABLE_MJPG_STREAMER=true


volumes:
</code>
  octoprint-1:
  octoprint-2:
```

Latest revision as of 18:54, 10 May 2024

Octoprint

An application to control (usb) 3d-printers over the network.

  • send .stl over the network (no sd cards needed)
  • setup and control the print
  • monitor the progress of ongoing prints (optionally, webcams can be added to see the visual state)

Multi 3D printer support

  • Octoprint only supports one printer per instance
  • in order to support multiple printers, we can deploy multiple docker containers
  • the different printers can then be assigned to their respective instance
  • this example sets up 2 instances for 2 priners, modify it to your needs

Requirements

Hardware

  • Debian/Ubuntu based host (RPi, Laptop, ...)
  • one USB port per 3d printer
  • Recommended: network connectivity to host (if not, only control over localhost is possible)
  • Optionally: one webcam per 3d-printer (needs additional USB ports)

Software

Deploy Octoprint with 2 printers

General

  • modify the docker-compose.yml according to your printer and webcam devices (e.g. /dev/ttyACM0 /dev/video0)
  • make sure each instance uses it's own port (default port 81 and 82)

Manual deployment with Portainer

Plain Docker Compose without Portainer

  • copy the compose file to /srv/docker/octoprint/docker-compose.yml on the host
  • cd /srv/docker/octoprint
  • start the containers with sudo docker compose up -d
  • check if containers are running sudo docker ps
  • check for any errors with sudo docker compose logs -f
  • access and configure at http://<HOST_IP>:81/ http://<HOST_IP>:82

Compose file