Active Personal Project

Local Generative
AI

Full deployment of an Artificial Intelligence ecosystem on Linux and Docker. No dependency on external services, no data sent to the cloud. 100% private, 100% yours.

100% Local & private
Multi User on local network
RAG File reading
0€ AI subscriptions

Introduction & Purpose

Today, data sovereignty and privacy have become fundamental pillars of technological development. This project was born from the need to deploy a high-performance AI ecosystem that operates 100% locally, eliminating cloud service dependency and guaranteeing information security.

The deployment covers the complete configuration process on Linux, using Ollama as the LLM inference engine, Docker + Open WebUI for the multi-user interface, and ComfyUI + Flux.1 for advanced image generation. The goal is to demonstrate that with consumer hardware, professional AI workflows are achievable with minimal latency and total control.

No data leaves the local network. Models run entirely on the local GPU, without external APIs or paid subscriptions.

Ollama Open WebUI Docker ComfyUI Flux.1 GGUF Mistral / Llama

System Requirements

Hardware

GPU VRAM is the critical factor. With 16GB, models like Mistral 12B or Flux.1 can be fully loaded into GPU memory, yielding inference speeds far superior to using system RAM.

ComponentSpecificationRole
CPUIntel i5-13600KFAuxiliary compute and Docker
RAM2 × 8GB Kingston Fury 3200MHzSystem and containers
GPUNVIDIA RTX 4060 Ti 16GB VRAMAI inference (CUDA)
Storage1TB NVMe M.2 KingstonModels and containers
Operating SystemUbuntu / Debian (recommended)Main host
Software Dependencies

Docker

For isolating the user interface (Open WebUI) in containers.

Python 3.10+

Required for ComfyUI virtual environments and PyTorch dependencies.

NVIDIA Drivers + CUDA

Updated drivers with CUDA support for GPU acceleration during inference.

Ollama — Inference Engine

Ollama acts as the backend "brain" responsible for running LLM models locally. It installs as a system service and automatically detects the available NVIDIA GPU.

Installation
# Official automatic installation
curl -fsSL https://ollama.com/install.sh | sh

# Verify the service is active
# Navigate to: http://localhost:11434
# Should display: "Ollama is running"

The installer downloads binaries, creates the ollama system user, configures a systemd service with auto-start, and detects NVIDIA graphics hardware.

Downloading LLM Models
# Download model (browse at https://ollama.com/library)
ollama pull mistral-nemo # 7.1 GB — 12B parameters
ollama pull llama3.1 # 4.7 GB — 8B parameters

# List installed models
ollama list

Make sure you have enough VRAM before downloading large models. Mistral 12B requires ~8GB VRAM at Q4 quantization.

Exposing Ollama to the Local Network

By default, Ollama only listens on 127.0.0.1. To allow the Open WebUI container or other network devices to connect, you need to change the bind address:

# Edit the systemd service configuration
sudo systemctl edit ollama.service

# Add under the [Service] section:
Environment="OLLAMA_HOST=0.0.0.0"

# Apply changes
sudo systemctl daemon-reload
sudo systemctl restart ollama

Docker + Open WebUI

Open WebUI is the web interface that connects to the Ollama backend. It deploys as an isolated Docker container with persistent data and starts automatically on system reboot.

Docker Installation
# Install Docker from official Ubuntu repositories
sudo apt update && sudo apt install docker.io -y

# Add user to docker group (avoids using sudo constantly)
sudo usermod -aG docker $USER
newgrp docker
Deploying Open WebUI
docker run -d \
  --network host \ # Shares network with the PC (needed to reach Ollama)
  -v open-webui:/app/backend/data \ # Persistent data
  --name open-webui \
  --restart always \ # Auto-starts on reboot
  ghcr.io/open-webui/open-webui:main

The interface is available at http://localhost:8080. On first access, a local admin account is created — no data is sent to external servers.

Active — Port 8080
Connection Configuration

In the Admin Panel → Settings → Connections, configure the Ollama URL:

# If using --network host:
http://127.0.0.1:11434

# If using standard Docker network:
http://host.docker.internal:11434

Open WebUI supports multiple user accounts. Each user can have independent conversations, their own files (RAG), and custom configurations.

Image Generation

ComfyUI is used for image generation — a highly modular node-based interface — together with the Flux.1 model in its quantized (GGUF) version to optimize VRAM usage.

ComfyUI — Installation
# Install dependencies
sudo apt install git python3-venv python3-pip -y

# Clone and set up environment
mkdir -p ~/IA && cd ~/IA
git clone https://github.com/comfyanonymous/ComfyUI.git
cd ComfyUI

# Create virtual environment and install PyTorch with CUDA support
python3 -m venv venv && source venv/bin/activate
pip install torch torchvision torchaudio \
  --extra-index-url https://download.pytorch.org/whl/cu121
pip install -r requirements.txt

# Start ComfyUI (access at http://127.0.0.1:8188)
python main.py
Flux.1 GGUF — Image Model

The original Flux.1 Dev model is too large for many configurations. The quantized Q4_K_S version (6.81 GB) is used from HuggingFace, reducing VRAM consumption without noticeable quality loss.

# Install GGUF support for ComfyUI
cd ~/IA/ComfyUI/custom_nodes
git clone https://github.com/city96/ComfyUI-GGUF.git
cd ..
pip install -r custom_nodes/ComfyUI-GGUF/requirements.txt

# Move the model to its folder
mv flux1-dev-Q4_K_S.gguf models/unet/

# Download and place additional components:
# - t5xxl_fp8_e4m3fn.safetensors → models/clip/
# - clip_l.safetensors → models/clip/
# - ae.safetensors (VAE) → models/vae/

Generation time varies by resolution and sampling steps. On an RTX 4060 Ti 16GB, a 1024×1024 image takes approximately 60 seconds.

Final Integration

With all components installed, the AI ecosystem is fully operational on the local network. Any device connected to the same network (including mobile) can access the chat and image generation interface.

Multimodal Chat

Open WebUI at http://[LOCAL-IP]:8080 — Select Mistral, Llama or another installed model. Upload PDF documents or images to activate RAG capabilities.

Image Generation

ComfyUI at http://[LOCAL-IP]:8188 — Configure the workflow with Flux.1 GGUF, CLIP/T5 and VAE. Write prompts in English for best results.

Mobile Access

Connect your phone to the same WiFi and access via the server IP. Create a user account in Open WebUI to have your own independent conversation history.

The system is 100% locally operational. No API keys, no recurring costs, no data sent to third parties. Privacy is the primary feature, not an afterthought.