## Prerequisites
- Windows 10/11 with WSL2 support
- At least 8GB RAM (16GB+ recommended)
- 20GB+ free disk space
- Internet connection
## Step 1: Install WSL (Windows Subsystem for Linux)
Open Terminal as Administrator and run:
wsl --install **What this does:**
- Installs Windows Subsystem for Linux
- Installs Ubuntu by default
- Sets up WSL2
**After installation:**
- Restart your computer when prompted
- On first launch, create a username and password for Ubuntu
## Step 2: Update Ubuntu System
Open Ubuntu terminal and run:
sudo apt update
sudo apt upgrade -y**What this does:**
- Updates package lists
- Upgrades all installed packages to latest versions
- `-y` flag automatically confirms all prompts
**Expected time:** 2-5 minutes depending on updates available
## Step 3: Install Ollama
Run the Ollama installation script:
curl -fsSL https://ollama.com/install.sh | sh**What this does:**
- Downloads and installs Ollama
- Sets up the Ollama service
- Ollama is a tool for running large language models locally
**Verify installation:**
ollama --version
## Step 4: Download AI Model (Llama 3.1)
Pull the Llama 3.1 model:
ollama pull llama3.1**What this does:**
- Downloads the Llama 3.1 language model
- Stores it locally for offline use
**Note:** This is a large download (4-8GB depending on model size). It may take 10-30 minutes.
**Test the model:**
ollama run llama3.1Type a message to chat with the AI. Press `Ctrl+D` or type `/bye` to exit.
## Step 5: Install Docker
### 5.1 Add Docker's Official GPG Key
sudo apt-get update
sudo apt-get install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc**What this does:**
- Installs prerequisites for secure package downloads
- Downloads Docker's security key
- Sets up secure keyring directory
### 5.2 Add Docker Repository
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update**What this does:**
- Adds Docker's official repository to your system
- Updates package lists with Docker packages
### 5.3 Install Docker
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin**What this does:**
- Installs Docker Engine
- Installs Docker CLI (command-line interface)
- Installs containerd (container runtime)
- Installs Docker Buildx and Compose plugins
**Verify installation:**
sudo docker --version
sudo docker run hello-world## Step 7: Install Open WebUI
Run the Open WebUI container:
sudo docker run -d \
--network host \
-v open-webui:/app/backend/data \
-e OLLAMA_BASE_URL=http://127.0.0.1:11434 \
--name open-webui \
--restart always \
ghcr.io/open-webui/open-webui:main**Expected time:** 1-3 minutes for first-time download
## Step 8: Access Open WebUI
1. Open your web browser
2. Navigate to: `http://localhost:8080`
3. Create an account (first user becomes admin)
4. Start chatting with your local AI!
## Useful Commands
### Check if containers are running:
docker ps### Start Open WebUI:
docker start open-webui### Remove Open WebUI container:
docker rm -f open-webui### List downloaded Ollama models:
ollama list### Remove an Ollama model:
ollama rm llama3.1### Download other models:
ollama pull mistral
ollama pull codellama
ollama pull phi3System Requirements Summary
Minimum: 8GB RAM, 20GB storage
Recommended: 16GB+ RAM, 50GB+ storage
For larger models: 32GB+ RAM recommended
What You've Achieved
✅ WSL2 Linux environment on Windows
✅ Ollama for running AI models locally
✅ Llama 3.1 AI model downloaded
✅ Docker for containerization
✅ Open WebUI - ChatGPT-like interface
✅ Fully local AI system (no internet needed after setup)
Your AI runs entirely on your machine - private, secure, and offline-capable!
.png)
