No description
LICENSE | ||
paperless-install.sh | ||
README.md |
📄 Enhanced Paperless-ngx Installation Script
An automated installation and maintenance script for Paperless-ngx with Docker integration and CloudPanel compatibility. This script provides a robust, self-healing installation process with comprehensive error handling and health checks.
🌟 Features
- Automated Installation: One-command setup of Docker and Paperless-ngx
- Smart Health Monitoring: Continuous verification of service health
- Automatic Recovery: Built-in error detection and recovery procedures
- Backup System: Automatic backup of existing installations before modifications
- Secure Configuration: Properly isolated Redis and PostgreSQL containers
- Detailed Logging: Comprehensive logging for troubleshooting
- CloudPanel Integration: Ready for CloudPanel reverse proxy setup
📋 Prerequisites
- Ubuntu ONLY 24.04 server
- Root access or sudo privileges
- CloudPanel installed (for reverse proxy setup)
- Domain or subdomain pointed to your server
🚀 Quick Start
- Clone the Script:
wget https://git.hhf.technology/hhf/paperless_ngx_cloudpane/paperless-ngx-installer.git
- Make the script executable:
chmod +x paperless-install.sh
- Run the installation:
sudo ./paperless-install.sh
⚙️ Configuration
The script includes several configurable parameters at the top:
INSTALL_DIR="/docker/paperless-ngx" # Installation directory
COMPOSE_FILE="${INSTALL_DIR}/docker-compose.yml" # Docker compose file location
LOG_FILE="/var/log/paperless-install.log" # Log file location
Environment Variables
Key environment variables in docker-compose.yml:
PAPERLESS_TIME_ZONE: Europe/London
PAPERLESS_OCR_LANGUAGE: eng
PAPERLESS_URL: https://your-domain.com
🔧 CloudPanel Setup
After running the script, configure CloudPanel:
- Create new site in CloudPanel
- Select "Reverse Proxy" type
- Configure with:
- Domain: your-paperless-domain.com
- Reverse Proxy URL: http://localhost:8000
- Set up SSL certificate
📝 Logging
The script maintains detailed logs at /var/log/paperless-install.log
. View logs with:
tail -f /var/log/paperless-install.log
🛠️ Troubleshooting
Common Issues
- Container Start Failure
docker logs paperless-ngx-webserver-1
docker compose restart webserver
- Database Connection Issues
docker compose logs db
docker compose restart db
- Permission Problems
sudo chown -R 1000:1000 /docker/paperless-ngx/consume
sudo chown -R 1000:1000 /docker/paperless-ngx/export
🔄 Updates
Update Paperless-ngx:
cd /docker/paperless-ngx
docker compose pull
docker compose down
docker compose up -d
🔒 Security
The script implements several security measures:
- Isolated Docker networks for database and Redis
- Secure default configurations
- Automatic backup before modifications
- SSL/TLS support through CloudPanel
📚 Directory Structure
/docker/paperless-ngx/
├── docker-compose.yml
├── consume/
├── export/
├── data/
└── media/
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🙏 Acknowledgments
- Paperless-ngx Project
- CloudPanel Team
- Docker Team
📞 Support
- Create an issue on the forum
- Visit the Paperless-ngx Documentation
- Join the Paperless-ngx community on Discord
⚠️ Disclaimer
This script is provided as-is, without any warranties. Always backup your data before running installation scripts.