Skip to content

My personal setup for a cloud server with AI/ML services ranging from n8n, through MLFlow and Ollama, to the user interface to interact with my LLMs, open-webui

License

Notifications You must be signed in to change notification settings

jomasego/ai-stack

Repository files navigation

🚀 AI Stack: n8n, MLflow & Open WebUI

A complete, self-hosted AI infrastructure stack featuring workflow automation, experiment tracking, and a ChatGPT-like interface.

License: MIT Docker PRs Welcome

🌟 Features

  • n8n: Powerful workflow automation with 200+ integrations
  • MLflow: End-to-end machine learning lifecycle management
  • Open WebUI: Beautiful, responsive web interface for LLMs
  • Ollama: Local LLM runner supporting multiple models
  • Nginx: Secure reverse proxy with Let's Encrypt SSL
  • Docker Compose: Easy deployment and scaling

📋 Prerequisites

  • Docker and Docker Compose installed
  • Minimum 8GB RAM (16GB+ recommended for LLMs)
  • Linux-based system (Ubuntu 20.04+ recommended)
  • Domain name (or subdomains) pointing to your server

🛠️ Project Structure

ai-stack/
├── docker-compose.yml         # Main Docker Compose configuration
├── docker-compose.override.yml # Development overrides
├── docker-compose.prod.yml    # Production overrides
├── nginx/                     # Nginx configurations
│   ├── nginx.conf             # Main Nginx config
│   └── conf.d/                # Server blocks
│       ├── default.conf       # Default catch-all
│       ├── n8n.conf           # n8n proxy config
│       ├── mlflow.conf        # MLflow proxy config
│       └── openwebui.conf     # Open WebUI proxy config
├── n8n/                       # n8n data
│   └── data/                  # Workflows and credentials
├── mlflow/                    # MLflow data
│   └── artifacts/             # Model artifacts
├── openwebui/                 # Open WebUI data
│   └── data/                  # Chat history and models
├── certs/                     # SSL certificates
├── .env.example               # Example environment variables
├── setup.sh                   # Setup script
├── LICENSE                    # MIT License
└── README.md                  # This file

🚀 Quick Start

  1. Clone the repository:

    git clone https://github.com/jomasego/ai-stack.git
    cd ai-stack
  2. Copy the example environment file:

    cp .env.example .env
  3. Edit the .env file with your configuration:

    nano .env
    • Set your domain (e.g., DOMAIN=example.com)
    • Set your email for Let's Encrypt
    • Update passwords and secrets
  4. Run the setup script:

    chmod +x setup.sh
    ./setup.sh

    This will:

    • Install Docker and Docker Compose if needed
    • Set up SSL certificates
    • Configure Nginx
    • Start all services
  5. Access the services:

🔧 Configuration

Environment Variables

Edit the .env file to configure the stack:

# Domain configuration
DOMAIN=yourdomain.com

# n8n
N8N_HOST=n8n.yourdomain.com
N8N_USER_EMAIL=admin@yourdomain.com
N8N_USER_PASSWORD=your-secure-password

# Open WebUI
WEBUI_SECRET_KEY=your-secure-secret-key

# Let's Encrypt
EMAIL=your-email@example.com
STAGING=0 # Set to 1 for testing

Ports

By default, the following ports are used:

  • 80/443: Nginx (HTTP/HTTPS)
  • 5678: n8n (internal)
  • 5000: MLflow (internal)
  • 8080: Open WebUI (internal)
  • 11434: Ollama (internal)

🐳 Docker Commands

Start services:

docker-compose up -d

Stop services:

docker-compose down

View logs:

# All services
docker-compose logs -f

# Specific service
docker-compose logs -f n8n

Update services:

docker-compose pull
docker-compose up -d --force-recreate

🔒 Security

  1. Change all default passwords in the .env file
  2. Use strong passwords for all services
  3. Enable authentication for all services
  4. Keep Docker and images updated
  5. Back up your data regularly

🤝 Contributing

Contributions are welcome! Please read our Contributing Guide for details on how to contribute.

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🙏 Acknowledgments

About

My personal setup for a cloud server with AI/ML services ranging from n8n, through MLFlow and Ollama, to the user interface to interact with my LLMs, open-webui

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages