Skip to main content

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. 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

  1. Install the CLI tool:
  1. Run the interactive setup:
The tool will guide you through the configuration process, prompting for necessary information like server hostname, credentials, and deployment options.

Traditional Deployment

If you prefer manual deployment or need to deploy to a different environment, follow these steps:

Prerequisites

  1. Python 3.11+
  2. Nginx
  3. uv (fast Python package installer)
Optional:
  • 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 in instance/.

PostgreSQL

Nginx Configuration

Create a new Nginx configuration:

SSL Configuration

  1. Install Certbot:
  1. Obtain SSL certificate:

Systemd Service

Create a service file /etc/systemd/system/enferno.service:
Enable and start the 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=0 in .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

  1. Static files not found (404)
    • Check Nginx static file path configuration
    • Verify file permissions
    • Run flask static to collect static files
  2. Database connection errors
    • Verify database credentials in .env
    • Check database service status
    • Ensure proper permissions
  3. Application not starting
    • Check systemd service logs: sudo journalctl -u enferno
    • Verify environment variables
    • Check application logs
  4. Redis connection issues (if using Celery)
    • Verify Redis is running: sudo systemctl status redis
    • Check REDIS_URL in .env
For more deployment options, visit the Enferno CLI documentation.