Overview
Enferno provides multiple deployment options to suit different needs. You can either use the automated Enferno CLI tool for quick Ubuntu server deployments, or follow the traditional deployment process for other environments.Automated Deployment (Recommended)
The Enferno CLI tool automates the entire deployment process on Ubuntu servers with a single command.Features
- Automated server provisioning with Python 3.13+ support
- Nginx configuration with SSL certificates
- PostgreSQL/SQLite database setup
- Systemd services configuration
- User management and security setup
Quick Start
- Install the CLI tool:
- Run the interactive setup:
Traditional Deployment
If you prefer manual deployment or need to deploy to a different environment, follow these steps:Prerequisites
- Python 3.11+
- Nginx
- uv (fast Python package installer)
- PostgreSQL (SQLite works by default)
- Redis (for background tasks with Celery)
Server Setup
Application Setup
Database Configuration
SQLite (Default)
Works out of the box - database created automatically ininstance/.
PostgreSQL
Nginx Configuration
Create a new Nginx configuration:SSL Configuration
- Install Certbot:
- Obtain SSL certificate:
Systemd Service
Create a service file/etc/systemd/system/enferno.service:
Celery Worker Service (Optional)
Only needed if using background tasks. First install:uv sync --extra full
Create /etc/systemd/system/enferno-celery.service:
Production Checklist
- Set
FLASK_DEBUG=0in.env - Use a secure
SECRET_KEY - Configure proper logging
- Set up monitoring (e.g., Sentry)
- Configure backup strategy
- Set up firewall rules
- Enable rate limiting
- Configure CORS settings
- Set secure cookie flags
- Enable HTTPS redirection
Troubleshooting
Common Issues
-
Static files not found (404)
- Check Nginx static file path configuration
- Verify file permissions
- Run
flask staticto collect static files
-
Database connection errors
- Verify database credentials in
.env - Check database service status
- Ensure proper permissions
- Verify database credentials in
-
Application not starting
- Check systemd service logs:
sudo journalctl -u enferno - Verify environment variables
- Check application logs
- Check systemd service logs:
-
Redis connection issues (if using Celery)
- Verify Redis is running:
sudo systemctl status redis - Check REDIS_URL in .env
- Verify Redis is running: