- Go 59.5%
- HTML 26.2%
- TypeScript 10.3%
- Dockerfile 2.3%
- CSS 1.7%
| locales | ||
| static | ||
| templates | ||
| .dockerignore | ||
| .env.example | ||
| .gitattributes | ||
| .gitignore | ||
| auth.go | ||
| config.go | ||
| database.go | ||
| docker-compose.yml | ||
| Dockerfile | ||
| go.mod | ||
| go.sum | ||
| handlers_admin.go | ||
| handlers_auth.go | ||
| handlers_print.go | ||
| i18n.go | ||
| LICENSE | ||
| main.go | ||
| models.go | ||
| README.md | ||
| screenshot-mobile-1.jpg | ||
| screenshot-mobile-2.jpg | ||
| screenshot-mobile-3.jpg | ||
| user.service.ts | ||
🖨️ Self-Hosted Printing Server
A lightweight, self-hosted printing server with multi-user support, built with Go + HTMX. Designed to be simple to deploy, configure, and use.
✨ Features
- Multi-user support — registration with admin approval workflow
- Print options — copies, duplex, color mode, orientation
- Print history — track all printed documents
- Admin panel — approve/reject users, promote/demote admins
- Multi-language UI — English, French, German, Finnish
- Runtime configuration — change settings via environment variables, no rebuilds needed
- Tiny footprint — ~20MB Docker image
- CUPS integration — leverages the proven CUPS printing system
- Secure — JWT auth with secure cookies, HTTPS-ready
🖼️ Screenshots
Print page with the upload button and options:

The admin panel at the bottom of the print page when logged in as admin:

🚀 Quick Start
# Clone the repo
git clone https://forgejo.hel.alfredolin.eu/WebPrint.git
cd WebPrint
# Build and run
docker compose up -d --build
# Access the UI
# http://localhost:3001
# Default login: admin / (set ADMIN_PWD in docker-compose.yml)
⚙️ Configuration
All configuration is done via environment variables in docker-compose.yml:
| Variable | Default | Description |
|---|---|---|
PORT |
3001 |
Server listening port |
JWT_SECRET |
change-me-please |
Secret for JWT token signing |
ADMIN_USER |
admin |
Default admin username |
ADMIN_PWD |
admin |
Default admin password |
PRINTER_NAME |
Brother |
CUPS printer queue name |
DEBUG_ERRORS |
false |
Show verbose error messages |
No rebuild needed — change any variable and just restart the container.
🖨️ Printer Setup
Make sure your printer is configured in CUPS. You can use the CUPS web interface at http://localhost:631 or the command line:
docker compose exec cups lpadmin -p MyPrinter -E -v ipp://192.168.1.100:631/ipp/print -m everywhere
Then set PRINTER_NAME=MyPrinter in your docker-compose.yml.
📄 Supported File Types
PDF, PNG, JPEG, TIFF, BMP, TXT
🌐 Languages
English, Français, Deutsch, Suomi
Add a new language by creating locales/xx.json and adding the code to the supported list in i18n.go.
🙏 Credits
- Akronae/self-hosted-printing-server — Original project inspiration
- CUPS — The standards-based, open-source printing system
- Pico.css — Minimal CSS framework
- HTMX — High-power HTML interactivity
- Lumo — Proton's AI
📝 License
This project is licensed under the GNU Affero General Public License v3.0 (AGPLv3). See LICENSE file for details.
