This is a web service to print labels on Brother QL label printers.
You need Python 3 for this software to work.
This is a fork of tbnobody/brother_ql_web with additional features (see below).
The web interface is responsive. There's also a screenshot showing how it looks on a smartphone
- Print text as QR Code
- Add text to QR Code
- Change size of QR Code
- Upload files to print
- .pdf, .png and .jpg files
- automatically convertion to black/white image
- Change print color for black/white/red labels
- Print lables multiple times
- Cut every label
- Cut only after the last label
- Migrated GUI to Bootstrap 4
- Make preview for round labels.. round
- CORS support — allows printing from another website (e.g. snake-label); includes OPTIONS preflight handling
- Configurable label margins — set top/bottom/left/right margins individually via
instance/application.py - Grayscale / black-and-white mode — toggle how uploaded images are converted before printing
- Automatic red-label detection — the color chooser is hidden for printers that don't support red labels
- Gunicorn entry point — production WSGI server support via
gunicorn_entrypoint.py - Docker image — see the Docker section below
- Modular Blueprint architecture — label designer, main route, and error handling separated into Flask Blueprints
- Pillow 10 support — updated image processing pipeline
This installation manual requires only a default installation of Debian 10 (Buster). Install prerequisites:
apt install fontconfig python3-venv python3-pip git poppler-utils
Get the code:
cd /opt
git clone https://github.com/tbnobody/brother_ql_web.git
Build the venv and install the requirements:
cd /opt/brother_ql_web
python3 -m venv .venv
source /opt/brother_ql_web/.venv/bin/activate
pip install -r requirements.txt
Create a directory called 'instance', a file called 'application.py' and adjust the values to match your needs.
mkdir /opt/brother_ql_web/instance
touch /opt/brother_ql_web/instance/application.py
E.g. """ User specific application settings """ import logging PRINTER_MODEL = 'QL-820NWB' PRINTER_PRINTER = 'tcp://192.168.1.33:9100'
To start the server, run ./run.py.
Copy service file, reload system, enable and start the service
cp /opt/brother_ql_web/systemd/brother_ql_web.service /etc/systemd/system
systemctl daemon-reload
systemctl enable brother_ql_web
systemctl start brother_ql_web
A pre-built image is available on the GitHub Container Registry:
docker run -d \
-p 8013:8013 \
-v /path/to/your/instance:/app/instance \
ghcr.io/socram70/brother_ql_web:latest
Create an instance/application.py file to configure your printer (see Configuration file).
For USB printers, also pass the device through:
docker run -d \
-p 8013:8013 \
--device /dev/usb/lp0 \
-v /path/to/your/instance:/app/instance \
ghcr.io/socram70/brother_ql_web:latest
Once it's running, access the web interface by opening the page with your browser.
If you run it on your local machine, go to http://localhost:8013.
You will then be forwarded by default to the interactive web gui located at /labeldesigner.
All in all, the web server offers:
- a Web GUI allowing you to print your labels at
/labeldesigner, - an API at
/api/print/text?text=Your_Text&font_size=100&font_family=Minion%20Pro%20(%20Semibold%20)to print a label containing 'Your Text' with the specified font properties.
This software is published under the terms of the GPLv3, see the LICENSE file in the repository.
Parts of this package are redistributed software products from 3rd parties. They are subject to different licenses:
- Bootstrap, MIT License
- Font Awesome, CC BY 4.0 License
- jQuery, MIT License
