Montscan
šØļø Automated scanner document processor with AI-powered naming and WebDav integration. Receives scans via FTP, extracts text using Vision AI, generates intelligent filenames with Ollama AI, and uploads to your cloud storage.
Install / Use
/learn @SystemVll/MontscanREADME
<div align="center"> <img width="256" height="256" alt="image" src="https://github.com/user-attachments/assets/ced68675-3338-4e7e-b9a0-5a9fc887aeac" /> </div> <div align="center"> <p><b>Montscan</b>: Automated scanner document processor with Vision AI, AI naming, and Webdav upload!</p> </div> <p align="center"> ā If you find <b>Montscan</b> useful, please consider giving it a star it really helps the project grow! </p>[!NOTE] Montscan is not fully production-ready and is currently in active development but is fairly usable.</br> It achieve 97.5% success rate on a small test set of 1000 documents.
⨠Features
- š” FTP Server - Receives documents from network scanners
- šļø Vision AI Processing - Analyzes scanned documents using Ollama vision models
- š¤ AI-Powered Naming - Generates descriptive filenames in French using Ollama
- āļø WebDAV Integration - Automatically uploads processed documents via WebDAV (supports Nextcloud, ownCloud, and other WebDAV servers)
- šØ Colorful CLI - Beautiful startup banner with configuration overview
- š³ Docker Support - Easy deployment with Docker Compose
š Table of Contents
š§ Prerequisites
- Go 1.24+
- Poppler (pdftoppm) or ImageMagick - For PDF to image conversion
- Ollama - Installation guide with a vision model (e.g.,
llava,llama3.2-vision) - WebDAV server (optional) - For cloud storage integration (supports Nextcloud, ownCloud, and other WebDAV-compatible servers)
š¦ Installation
Local Installation
-
Clone the repository
git clone https://github.com/SystemVll/Montscan.git cd Montscan -
Build the application
go build -o montscan . -
Install Poppler or ImageMagick
- Windows: Download from GitHub Releases
- Linux:
sudo apt-get install poppler-utils - macOS:
brew install poppler
-
Set up Ollama with a vision model
# Install Ollama from https://ollama.ai/ ollama pull llava # or any other vision-capable model
āļø Configuration Options
| Variable | Description | Default |
|----------|-------------|--------------------------|
| FTP_HOST | FTP server host address | 0.0.0.0 |
| FTP_PORT | FTP server port | 21 |
| FTP_USERNAME | FTP authentication username | scanner |
| FTP_PASSWORD | FTP authentication password | scanner123 |
| FTP_UPLOAD_DIR | Local directory for uploaded files | ./scans |
| WEBDAV_URL | WebDAV server URL | - |
| WEBDAV_USERNAME | WebDAV username | - |
| WEBDAV_PASSWORD | WebDAV password | - |
| WEBDAV_INSECURE | Skip TLS verification for WebDAV (true/false) | false |
| WEBDAV_UPLOAD_PATH | Upload path on WebDAV server | /Documents/Scanned |
| OLLAMA_HOST | Ollama service URL | http://localhost:11434 |
| OLLAMA_MODEL | Ollama vision model to use | llava |
| LANGUAGE | Language for AI-generated filenames | english |
š Usage
Running Locally
# Set environment variables (optional, defaults are provided)
export FTP_USERNAME=your-username
export FTP_PASSWORD=your-password
export WEBDAV_URL=https://your-webdav-server.com
export WEBDAV_USERNAME=your-webdav-user
export WEBDAV_PASSWORD=your-webdav-password
# Run the application
./montscan
You should see a colorful startup banner:
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā šØļø MONTSCAN - Scanner Document Processing System š ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
š” FTP Server Configuration:
āā Host: 0.0.0.0
āā Port: 21
āā Username: your-username
āā Upload Directory: /path/to/scans
āļø WebDAV Integration:
āā URL: https://your-webdav-server.com
š¤ AI Processing (Ollama):
āā Host: http://localhost:11434
āā Model: llava
š PDF Processing:
āā Tool: pdftoppm
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā
All systems initialized - Ready to process documents!
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
š Server is now running! Press Ctrl+C to stop.
Using with a Network Scanner
- Configure your network scanner to send scans via FTP
- Set the FTP server address to your Montscan instance
- Use the credentials from your environment variables
- Scan a document - it will be automatically processed!
š³ Docker Deployment
Using Docker Compose
-
Update environment variables in
docker-compose.yml -
Build and start the container
docker-compose up -d -
View logs
docker-compose logs -f -
Stop the container
docker-compose down
Using Docker directly
# Build the image
docker build -t montscan .
# Run the container
docker run -d \
-p 21:21 \
-p 21000-21010:21000-21010 \
-v ./scans:/app/scans \
-e FTP_USERNAME=scanner \
-e FTP_PASSWORD=scanner123 \
-e WEBDAV_URL=https://your-webdav-server.com \
-e WEBDAV_USERNAME=your-webdav-user \
-e WEBDAV_PASSWORD=your-webdav-password \
-e OLLAMA_HOST=http://host.docker.internal:11434 \
--name montscan \
montscan
š Troubleshooting
Common Issues
FTP Connection Refused
- Solution: Check that the FTP port (default 21) is not blocked by firewall
- On Windows, you may need to allow the application through the firewall
AI Naming Fails
- Solution: Verify Ollama is running and a vision model is downloaded
- Test with:
ollama listand ensure you have a vision-capable model (e.g.,llava,llama3.2-vision)
WebDAV Upload Fails
- Solution: Check WebDAV credentials and URL
- Ensure the upload path exists on your WebDAV server
- For Nextcloud: Verify WebDAV is enabled on your Nextcloud instance
- For other WebDAV servers: Ensure the URL points directly to the WebDAV endpoint
Poppler/ImageMagick Not Found
- Solution: Install Poppler or ImageMagick and ensure it's in your system PATH
- Windows: Add Poppler's
binfolder to PATH environment variable
š License
This project is licensed under the MIT License - see the LICENSE file for details.
š Acknowledgments
- goftp/server - Go FTP server library
- Ollama - Local AI vision model runner
- Nextcloud - Self-hosted cloud storage
- gowebdav - WebDAV client for Go
- fatih/color - Colorful terminal output
š§ Contact
For questions or support, please open an issue on GitHub.
<div align="center"> <strong>Made with ā¤ļø for automated document management</strong> </div>
