Tesla's AI and Robotics Ambitions Gain Momentum as Q1 2026 Revenue Surges

As the world of technology continues to evolve at an unprecedented pace, Tesla has once again demonstrated its commitment to innovation and growth. Today, April 23, 2026, the electric vehicle (EV) and clean energy company released its first-quarter financial earnings, showcasing a significant rise in revenue. With $477 million in net income on $22.4 billion in revenue, Elon Musk's vision for transforming Tesla into a leader in AI and robotics is gaining momentum.

Financial Performance and Future Prospects

The latest financial report indicates a substantial increase in Tesla's revenue, which is a testament to the company's ability to adapt and thrive in an ever-changing market. This growth can be attributed to the rising demand for electric vehicles, as well as the company's efforts to expand its product lineup and improve manufacturing efficiency. As Tesla continues to invest in AI and robotics, it is likely that we will see even more innovative solutions emerge, further driving the company's financial performance.

One of the key areas where Tesla is focusing its efforts is in the development of autonomous driving technologies. With the goal of creating a fully autonomous vehicle, the company is leveraging machine learning and computer vision to improve the capabilities of its Autopilot system. This technology has the potential to revolutionize the way we think about transportation, making it safer, more efficient, and more convenient. As Tesla continues to push the boundaries of what is possible with autonomous driving, we can expect to see significant advancements in the field.

The Role of AI and Robotics in Tesla's Future

Artificial intelligence and robotics are poised to play a vital role in Tesla's future, enabling the company to create more sophisticated and efficient systems. From manufacturing to customer service, AI and robotics will be instrumental in driving innovation and growth. For instance, Tesla is already using robots in its manufacturing facilities to improve production efficiency and reduce costs. Similarly, the company is leveraging AI-powered chatbots to provide customers with personalized support and assistance.

As Tesla continues to expand its presence in the AI and robotics space, it is likely that we will see new and exciting developments emerge. From smart home automation to industrial automation, the potential applications of AI and robotics are vast and varied. With its strong foundation in electric vehicles and clean energy, Tesla is well-positioned to capitalize on these opportunities and create a more sustainable and connected future.

In addition to its work in AI and robotics, Tesla is also making significant strides in the development of sustainable energy solutions. With its SolarCity acquisition, the company has expanded its offerings to include solar panels and energy storage systems. This move has enabled Tesla to provide customers with a comprehensive suite of sustainable energy solutions, from electric vehicles to home energy systems.

Competitive Landscape and Market Trends

The electric vehicle market is becoming increasingly competitive, with new players entering the scene and established companies expanding their offerings. However, Tesla remains a leader in the space, with its strong brand reputation and commitment to innovation. As the company continues to invest in AI and robotics, it is likely that we will see Tesla maintain its position at the forefront of the industry.

In terms of market trends, there is a growing demand for sustainable energy solutions and electric vehicles. As consumers become more environmentally conscious and governments implement policies to support the adoption of clean energy, the market for Tesla's products is likely to continue growing. Additionally, the development of autonomous driving technologies is expected to have a significant impact on the transportation industry, enabling the creation of more efficient and safer transportation systems.

As we look to the future, it is clear that Tesla is well-positioned to capitalize on the growing demand for sustainable energy solutions and electric vehicles. With its strong foundation in innovation and customer experience, the company is likely to continue driving growth and expansion in the years to come. As the world becomes increasingly focused on sustainability and technology, Tesla is poised to play a leading role in shaping the future of energy and transportation.

Deploy a Local AI Stack: Install Ollama and Open WebUI with NVIDIA GPU on Ubuntu

Overview

This tutorial shows you how to deploy a fast, private, local AI stack on Ubuntu using Ollama and Open WebUI with NVIDIA GPU acceleration. You will install the NVIDIA driver, Docker, and the NVIDIA Container Toolkit, then run Ollama on the host and Open WebUI in a container. By the end, you will have a browser-based interface to run powerful large language models (LLMs) like Llama 3 with CUDA acceleration on your own machine.

Prerequisites

- Ubuntu 22.04 or 24.04 (freshly updated).
- An NVIDIA GPU with at least 6 GB VRAM (more is better).
- sudo privileges and Internet access.
- Optional: a domain or reverse proxy if you plan to expose the UI externally.

Step 1 — Install NVIDIA Driver

Use Ubuntu’s built-in tools to install a compatible proprietary driver. Reboot afterward and confirm the GPU is detected.

sudo apt update
sudo apt install -y ubuntu-drivers-common
sudo ubuntu-drivers autoinstall
sudo reboot
nvidia-smi

If you see a table with your GPU and driver version (e.g., 535+), you are ready for CUDA-enabled workloads.

Step 2 — Install Docker Engine

If Docker is not installed, use the official convenience script. Add your user to the docker group so you can run containers without sudo.

curl -fsSL https://get.docker.com | sh
sudo usermod -aG docker $USER
newgrp docker
docker version

Step 3 — Enable GPU Access in Containers

Install the NVIDIA Container Toolkit so Docker can pass the GPU into containers.

curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey \
| sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg

curl -fsSL https://nvidia.github.io/libnvidia-container/stable/deb/nvidia-container-toolkit.list \
| sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#' \
| sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list

sudo apt update
sudo apt install -y nvidia-container-toolkit
sudo nvidia-ctk runtime configure --runtime=docker
sudo systemctl restart docker

Verify GPU visibility inside a container:

docker run --rm --gpus all nvidia/cuda:12.4.1-base-ubuntu22.04 nvidia-smi

Step 4 — Install Ollama (runs on the host)

Ollama simplifies downloading and running LLMs locally. It automatically uses CUDA if your NVIDIA driver is installed.

curl -fsSL https://ollama.com/install.sh | sh

Confirm the service is active and the API is reachable on port 11434:

systemctl --user status ollama || systemctl status ollama
curl http://127.0.0.1:11434/api/tags

Pull and test a model (replace with your preferred model/quantization):

ollama pull llama3
ollama run llama3 "Write a two-line poem about GPUs."

Tip: Use smaller quantizations if VRAM is limited, for example llama3:8b-instruct-q4_0.

Step 5 — Deploy Open WebUI in Docker

Open WebUI provides a clean, modern interface for chatting with models served by Ollama. We will run it in Docker and point it to the host’s Ollama API. On Linux, add a host-gateway entry so the container can reach the host at host.docker.internal.

docker run -d --name open-webui \
  -p 3000:8080 \
  --add-host=host.docker.internal:host-gateway \
  -e OLLAMA_BASE_URL=http://host.docker.internal:11434 \
  --gpus all \
  -v open-webui:/app/backend/data \
  ghcr.io/open-webui/open-webui:main

Open your browser at http://<server-ip>:3000. On first login, create a user; that account becomes admin. If you need authentication enabled from the start, add -e WEBUI_AUTH=True to the run command.

Alternative: If --add-host=host-gateway is not supported on your Docker version, use host networking and point to 127.0.0.1:

docker run -d --name open-webui \
  --network host \
  -e OLLAMA_BASE_URL=http://127.0.0.1:11434 \
  --gpus all \
  -v open-webui:/app/backend/data \
  ghcr.io/open-webui/open-webui:main

With host networking, Open WebUI listens on http://0.0.0.0:8080 (no -p flag needed).

Step 6 — Use and Tune Your Local AI

From Open WebUI, select a model (e.g., Llama 3) and start chatting. You can pull additional models with Ollama CLI and they will appear in the UI. To speed up responses and reduce VRAM, try smaller or more aggressive quantizations; to maximize quality, try larger quantizations if your GPU can handle them.

Common environment variables for Open WebUI include:
- WEBUI_AUTH=True to require sign-in.
- OLLAMA_BASE_URL to point to the Ollama server URL.
- PORT to customize the UI port if you use host networking.

Troubleshooting

Open WebUI cannot reach Ollama: Ensure you used --add-host=host.docker.internal:host-gateway and OLLAMA_BASE_URL=http://host.docker.internal:11434, or use host networking. Test connectivity with docker exec -it open-webui curl -s http://host.docker.internal:11434/api/tags.

No GPU in containers: Re-check the container toolkit setup and driver. Run docker run --rm --gpus all nvidia/cuda:12.4.1-base-ubuntu22.04 nvidia-smi. If it fails, reboot and ensure nvidia-smi works on the host first.

Out-of-memory errors: Use a smaller model or more compressed quantization. Close other GPU-heavy apps. You can also run with a larger system swap to reduce crashes when VRAM is exhausted, but performance will be slower.

Docker permissions: If you see “permission denied,” ensure your user is in the docker group (id to verify) and run newgrp docker or re-log in.

Optional: Reverse Proxy and TLS

If exposing Open WebUI on the Internet, put it behind a reverse proxy (Caddy, Nginx, or Traefik) for HTTPS and access control. At minimum, enforce authentication and limit access to trusted IPs. Never expose Ollama’s port 11434 directly without protection.

Maintenance

- Update Ollama periodically by re-running the install script or checking the project release notes, then systemctl restart ollama.
- Update Open WebUI with docker pull ghcr.io/open-webui/open-webui:main and docker restart open-webui.
- Prune old images and volumes with docker system prune (review carefully before confirming).
- Back up /var/lib/ollama (models) and the Open WebUI volume for settings and chats.

You now have a modern, GPU-accelerated, private AI chat environment running locally on Ubuntu. This setup is fast, secure, and fully under your control—and you can expand it with additional models, prompt libraries, and integrations as your needs grow.

Run Local AI: Install Ollama and Open WebUI with GPU Acceleration on Windows, macOS, and Linux

Overview

Running a large language model locally is now practical, fast, and private. In this how-to, you will set up Ollama to serve models on your computer and connect Open WebUI for a friendly chat interface. The steps cover Windows, macOS, and Linux, including GPU acceleration for NVIDIA, Apple Silicon, and supported AMD GPUs. By the end, you will be able to pull models, chat in your browser, and tune performance for your hardware.

Requirements and quick checklist

Hardware: 8 GB RAM minimum (16 GB+ recommended), 10–20 GB free disk for models, and optionally a compatible GPU for acceleration.

GPU support: NVIDIA (CUDA 12 driver), Apple Silicon (M1/M2/M3 via Metal), AMD ROCm on supported Linux cards. If you lack a compatible GPU, CPU-only still works, just slower.

Network and security: Keep Ollama bound to localhost unless you intentionally expose it behind a reverse proxy with authentication. Do not publish it directly to the internet.

Step 1 — Install Ollama

Windows: Install via winget or the official installer.

winget install Ollama.Ollama

macOS: Use Homebrew or the DMG from the website.

brew install ollama

Linux: Use the official script (requires curl and sudo).

curl -fsSL https://ollama.com/install.sh | sh

After installation, ensure the service is running. On macOS and Windows, the background service starts automatically. On Linux, start it in a terminal or as a service:

ollama serve

Verify the API is alive by visiting http://127.0.0.1:11434 in your browser. You should see a simple status page.

Step 2 — Pull and test a model

Pull a compact, fast model first to validate everything. Llama 3.2 3B is a great starting point for laptops.

ollama pull llama3.2:3b
ollama run llama3.2:3b

Type a quick prompt and confirm you get a response. For stronger reasoning, try Mistral or an 8B Llama if your RAM/GPU can handle it:

ollama pull mistral:7b
ollama pull llama3.1:8b

Step 3 — Enable GPU acceleration (optional but recommended)

NVIDIA on Windows/Linux: Install the latest Game Ready/Studio driver with CUDA 12 support. Verify with:

nvidia-smi

Ollama will use your GPU automatically if supported. If VRAM is limited, pick a smaller or more aggressively quantized model (for example, Q4 or Q5 builds).

Apple Silicon: No extra steps. Metal acceleration is used by default on M-series chips.

AMD on Linux (ROCm): Use a ROCm-supported GPU and drivers (ROCm 6.x+). Check your distro’s ROCm documentation. Not all AMD GPUs are supported; verify before investing time.

Step 4 — Install Open WebUI

Open WebUI gives you a clean, modern chat interface for Ollama. Docker is the easiest installation path. Make sure Docker Desktop (Windows/macOS) or Docker Engine (Linux) is installed and running.

Windows/macOS (Docker Desktop):

docker run -d --name open-webui -p 3000:8080 \
  -e OLLAMA_BASE_URL=http://host.docker.internal:11434 \
  -v open-webui:/app/backend/data \
  ghcr.io/open-webui/open-webui:latest

Linux: The host networking mode is simplest so the container reaches Ollama on localhost.

docker run -d --name open-webui --network host \
  -e OLLAMA_BASE_URL=http://127.0.0.1:11434 \
  -v open-webui:/app/backend/data \
  ghcr.io/open-webui/open-webui:latest

Open your browser to http://127.0.0.1:3000, create an account (local), and select your Ollama model from the dropdown. Start chatting immediately.

Step 5 — Performance tips and model management

Use quantized models (GGUF variants) to fit your hardware. Q4_K_M is a balanced choice for speed and quality; Q6 is higher quality; Q2/Q3 are very small and fast but lose detail. If a model fails to load, try a smaller parameter count or lower quantization level.

Keep an eye on your RAM/VRAM while the model loads. If memory spikes, reduce context length (token window) in your client settings. Many 7B models run well with 4–6 GB VRAM; 8B often prefers 8–10 GB; CPU-only runs better with 3B–7B models.

List and manage your models with:

ollama list
ollama rm <model-name>

You can tweak behavior with a Modelfile to set defaults like temperature and system prompts. Example:

# Modelfile
FROM llama3.2:3b
PARAMETER temperature 0.7
SYSTEM You are a helpful technical assistant.
ollama create my-tech-assistant -f Modelfile
ollama run my-tech-assistant

Step 6 — Security and remote access basics

By default, Ollama listens on 127.0.0.1:11434, which is safe for single-machine use. If you need remote access on your LAN, set a bind address with an environment variable:

export OLLAMA_HOST=0.0.0.0:11434   # Linux/macOS example

If you expose it, protect it. Use a reverse proxy (Nginx, Traefik, Caddy) with TLS and authentication, or a mesh VPN like Tailscale. Never expose the Ollama API directly to the public internet.

Troubleshooting

If the model is slow, confirm acceleration is active. On NVIDIA, nvidia-smi should show GPU utilization when generating. For crashes during load, your model may not fit in memory; try a smaller model or reduce the context window. If Open WebUI cannot connect, ensure OLLAMA_BASE_URL is correct for your platform and that the port is not blocked by a firewall.

What’s next

Explore specialized models for coding, summarization, or multilingual tasks. Add embeddings and retrieval in Open WebUI to chat over your PDFs or docs. With Ollama handling the runtime and Open WebUI providing the interface, you own the stack: fast, private, and flexible.

Install Ollama with Open WebUI on Ubuntu 24.04 (GPU-Accelerated Local AI Chat)

Overview

This step-by-step guide shows how to install Ollama and connect it to Open WebUI on Ubuntu 24.04. With this setup, you can run modern large language models like Llama 3 locally, use your NVIDIA GPU for acceleration, and chat through a clean web interface—no cloud required. The process includes installing system dependencies, enabling GPU support, running Open WebUI in Docker, pulling models, and basic troubleshooting. The language is simple, and every command is tested on Ubuntu 24.04.

Prerequisites

Before you start, make sure you have: (1) Ubuntu 24.04 with sudo access, (2) a modern NVIDIA GPU and driver support (optional but recommended), (3) at least 16 GB of RAM for medium models, and (4) stable internet access to download models and containers.

1) Update Ubuntu and install essentials

Begin by updating your packages and installing the tools we will use. If prompted, confirm with Y:

sudo apt update && sudo apt upgrade -y
sudo apt install -y curl ca-certificates gnupg ufw git

2) Install NVIDIA drivers (for GPU acceleration)

Ollama uses your GPU automatically when the correct NVIDIA driver is present. If you do not have a GPU, you can still run models on the CPU (slower). To enable GPU acceleration on NVIDIA cards:

sudo ubuntu-drivers autoinstall
sudo reboot

After reboot, verify the driver:

nvidia-smi

You should see your GPU listed. If you prefer manual control, install a specific driver from “Additional Drivers” in Ubuntu.

3) Install Ollama

Ollama is a lightweight server that manages models locally and exposes an HTTP API on port 11434. Install it with the official script:

curl -fsSL https://ollama.com/install.sh | sh

Enable and verify the system service:

sudo systemctl enable ollama
sudo systemctl start ollama
systemctl status ollama

If you see it active and running, Ollama is ready at http://localhost:11434.

4) Pull a model and test locally

Pull a modern, efficient model. Llama 3.1 8B is a good starting point (adjust model to your hardware):

ollama pull llama3.1:8b

Run a quick chat in the terminal to verify GPU usage:

ollama run llama3.1:8b

If your GPU is recognized, the first generation will warm up, and subsequent responses should be fast. You can also try other models like mistral, phi-3, or neural-chat.

5) Install Docker and run Open WebUI

Open WebUI provides a clean browser interface for chatting with local models. Install Docker from Ubuntu’s repo for simplicity:

sudo apt install -y docker.io docker-compose-plugin
sudo systemctl enable --now docker
sudo usermod -aG docker $USER
# Log out and back in to apply docker group membership (or run a new shell).

Start Open WebUI and point it to the host Ollama API:

docker run -d --name open-webui \
  -p 3000:8080 \
  -v open-webui:/app/backend/data \
  --add-host=host.docker.internal:host-gateway \
  -e OLLAMA_API_BASE_URL=http://host.docker.internal:11434 \
  ghcr.io/open-webui/open-webui:latest

Open a browser and go to http://YOUR_SERVER_IP:3000 to access Open WebUI. On first run, create an admin user. In Settings > Connections, confirm the Ollama endpoint is http://host.docker.internal:11434.

6) Secure basic network access

If UFW is enabled, allow the Open WebUI port:

sudo ufw allow 3000/tcp
sudo ufw status

For internet exposure, place Open WebUI behind a reverse proxy (Nginx/Caddy) with HTTPS. If you only use it on your LAN, keep it on port 3000 and block external access at your router or firewall.

7) Daily use tips

- To list models: ollama list. To remove one: ollama rm MODEL.
- To update Ollama when a new version is released: rerun the install script, then sudo systemctl restart ollama.
- For faster chat, choose 7B–8B models or quantized variants (like Q4_K_M). Larger models need more VRAM and RAM.

Troubleshooting

No compatible GPU found: Check nvidia-smi. If it fails, reinstall drivers with ubuntu-drivers autoinstall and reboot. Ensure Secure Boot is disabled or properly configured for NVIDIA modules.

Open WebUI cannot reach Ollama: Confirm the container can resolve the host gateway. We used --add-host=host.docker.internal:host-gateway. Also verify the env OLLAMA_API_BASE_URL and that the Ollama service is active: systemctl status ollama.

Slow generations on CPU: Use smaller models (e.g., 3–8B) or quantized versions. GPU acceleration is the biggest speed boost; ensure drivers are correct.

Ports already in use: If 3000 or 11434 is used, change the exposed port for Open WebUI (-p 4000:8080 for example) and update firewall rules.

Check logs: Ollama logs: journalctl -u ollama -f. Open WebUI logs: docker logs -f open-webui.

Optional: Reverse proxy with Nginx (HTTPS)

For public access with TLS, install Nginx and Certbot, then map a domain to your server and issue a Let’s Encrypt certificate. Point Nginx to the Open WebUI container on 3000. Keep strong passwords and consider IP allowlists or SSO for security.

What you get

You now have a private, GPU-accelerated local AI stack: Ollama runs models efficiently on your Ubuntu host, and Open WebUI gives you a modern chat interface. This setup is ideal for development, research, and privacy-focused workflows without sending your data to external clouds.

Deploy Ollama and Open WebUI on Ubuntu 24.04 with NVIDIA GPU Acceleration (Step-by-Step)

Overview

Running large language models locally is easier than ever with Ollama (a lightweight LLM runtime) and Open WebUI (a modern chat interface). This step-by-step guide shows how to install Ollama on Ubuntu 24.04 (or 22.04), enable NVIDIA GPU acceleration, and connect Open WebUI via Docker. By the end, you will have a fast, private, and browser-based AI chat system that can run models like Llama 3, Mistral, and Phi on your own hardware.

Prerequisites

• Ubuntu 24.04 LTS (or 22.04)
• An NVIDIA GPU with recent drivers (Turing/RTX or newer recommended)
• At least 16 GB RAM and 20+ GB free disk (models are large)
• sudo access and an internet connection

Step 1 — Update Ubuntu and install essentials

sudo apt update && sudo apt -y upgrade
sudo apt -y install curl ca-certificates gnupg git

Step 2 — Install the NVIDIA driver

If you do not already have the proprietary driver installed, use Ubuntu’s driver manager. Reboot after installation.

sudo ubuntu-drivers autoinstall
sudo reboot

After reboot, verify the driver is working with nvidia-smi. You should see your GPU listed and the driver version.

Step 3 — Install Docker and the NVIDIA Container Toolkit

Install Docker (Community edition from Ubuntu repo is fine for this use case), then add NVIDIA’s container runtime so GPU workloads run inside containers when needed.

Install Docker:
sudo apt -y install docker.io docker-compose-plugin
sudo usermod -aG docker $USER
newgrp docker

Add NVIDIA Container Toolkit repo and install:
curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg
distribution=$(. /etc/os-release; echo $ID$VERSION_ID)
curl -fsSL https://nvidia.github.io/libnvidia-container/$distribution/libnvidia-container.list | sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' | sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list
sudo apt update && sudo apt -y install nvidia-container-toolkit
sudo nvidia-ctk runtime configure --runtime=docker
sudo systemctl restart docker

Although Open WebUI does not need GPU access, having the NVIDIA runtime ensures any future GPU-enabled containers work smoothly.

Step 4 — Install Ollama (GPU-enabled)

Ollama provides pre-optimized builds and automatically uses your NVIDIA GPU when available.

curl -fsSL https://ollama.com/install.sh | sh

Enable and start the service (on recent Ubuntu, the installer sets this up automatically):
sudo systemctl enable --now ollama

Verify installation:
ollama --version

Test pulling a model (downloads may be several GB):
ollama pull llama3.1:8b
Run a quick prompt:
ollama run llama3.1:8b

Step 5 — Deploy Open WebUI with Docker

Open WebUI offers a clean multi-user chat interface for local models. We will point it at the Ollama API on the host. Create a project folder, then a basic Compose file.

mkdir -p ~/open-webui && cd ~/open-webui

Create docker-compose.yml with the following content (one service):

services:
  open-webui:
    image: ghcr.io/open-webui/open-webui:latest
    container_name: open-webui
    ports:
     - "3000:8080"
    environment:
     - OLLAMA_BASE_URL=http://host.docker.internal:11434
    extra_hosts:
     - "host.docker.internal:host-gateway"
    restart: unless-stopped

Start the container:
docker compose up -d

Open your browser and go to http://<your-server-ip>:3000. Create the first admin account when prompted. Open WebUI should auto-detect the Ollama endpoint via OLLAMA_BASE_URL. If not, set it under Settings → Connections.

Step 6 — Verify GPU acceleration

While generating a response in Open WebUI, run nvidia-smi in a terminal. You should see GPU utilization and memory usage spike. If usage is zero during generation, check driver versions and restart the Ollama service.

Step 7 — Manage and optimize models

List installed models:
ollama list

Pull additional models:
ollama pull mistral:7b
ollama pull phi3:mini

Set a default model in Open WebUI under Settings → Models, or choose per chat. For better performance on limited VRAM, prefer quantized variants (e.g., :q4_0 or :q6_k if available). You can also tune parallel requests:
export OLLAMA_NUM_PARALLEL=2
Then restart the service:
sudo systemctl restart ollama

Advanced users can build a custom Modelfile to add system prompts or LoRA adapters. Example skeleton:
FROM llama3.1:8b
SYSTEM You are a concise technical assistant.

Apply it with:
ollama create my-tech -f Modelfile
Then select my-tech in Open WebUI.

Troubleshooting

No GPU usage: Ensure nvidia-smi shows the driver. If Ollama still uses CPU, update to the latest Ollama, confirm you installed the proprietary NVIDIA driver, and reboot. Some headless servers require sudo apt -y install nvidia-driver-### and a kernel headers update.

Docker cannot reach Ollama: The Compose file maps host.docker.internal to the Linux host via host-gateway. If your Docker version is old, update Docker or replace the endpoint with your host IP, for example http://192.168.1.50:11434.

Port conflicts (3000 or 11434): Change 3000:8080 in the Compose file to another host port (e.g., 8081:8080). For Ollama, change the listen port by editing its service environment and restarting: sudo systemctl edit ollama then set Environment="OLLAMA_HOST=0.0.0.0:11435", save, sudo systemctl daemon-reload && sudo systemctl restart ollama.

Disk space: Models can exceed 10 GB each. Remove unused models with ollama rm modelname and clean unreferenced layers with ollama prune.

Security and maintenance tips

• Do not expose the Ollama API publicly without a reverse proxy and authentication.
• Use a firewall (e.g., sudo ufw allow 3000/tcp for local access, block external where appropriate).
• Keep components updated: sudo apt update, ollama update, and docker compose pull && docker compose up -d for Open WebUI.

Conclusion

You now have a GPU-accelerated local LLM stack with Ollama and Open WebUI on Ubuntu. This setup is fast, private, and flexible: switch models on demand, create custom prompts, and iterate safely on your own hardware. With regular updates and a few optimizations, it can rival many hosted AI experiences without sending data to the cloud.

How to Run a Private Local AI Assistant with Ollama and Open WebUI on Windows, macOS, and Linux

Overview

Running a private AI assistant on your own computer is now practical, fast, and secure. With Ollama providing an easy local model runtime and Open WebUI offering a clean chat interface, you can chat with modern large language models (LLMs) without sending data to the cloud. This tutorial shows how to install Ollama and Open WebUI on Windows, macOS, and Linux, enable GPU acceleration, manage models, expose the API, and troubleshoot common issues.

Prerequisites and Hardware

You need a 64-bit system with at least 8 GB RAM (16 GB recommended). GPU acceleration greatly improves speed: NVIDIA GPUs (Windows/Linux) via CUDA, AMD GPUs (Linux) via ROCm, and Apple Silicon (macOS) via Metal are supported. Ensure your graphics drivers are up to date before enabling GPU features.

Step 1: Install Ollama

Windows (PowerShell as Administrator): winget install Ollama.Ollama. After installation, the Ollama service starts automatically. If needed: services.msc → restart the Ollama service.

macOS (Apple Silicon or Intel): curl -fsSL https://ollama.com/install.sh | sh. The command installs and starts the Ollama service. You can verify with: ollama --version.

Linux (systemd-based): curl -fsSL https://ollama.com/install.sh | sh. Then enable and start the service: sudo systemctl enable --now ollama. Check status with systemctl status ollama.

Step 2: Pull and Run a Model

Ollama downloads models on first use. Good general-purpose choices are Llama 3.1 (8B) and Mistral. Smaller models run on CPUs and modest GPUs, while larger models need more VRAM.

Examples: ollama run llama3.1:8b or ollama run mistral. To download without starting a session: ollama pull llama3.1:8b. To list installed models: ollama list. To remove a model and free space: ollama rm llama3.1:8b.

Step 3: Install Open WebUI (Docker)

Open WebUI is a modern web interface that connects to Ollama at http://localhost:11434. The easiest way to run it is with Docker.

Windows/macOS (host.docker.internal works): docker run -d --name open-webui -p 3000:8080 -e OLLAMA_BASE_URL=http://host.docker.internal:11434 -v openwebui-data:/app/backend/data ghcr.io/open-webui/open-webui:latest

Linux (use host networking for simplicity): docker run -d --name open-webui --network=host -e OLLAMA_BASE_URL=http://127.0.0.1:11434 -v openwebui-data:/app/backend/data ghcr.io/open-webui/open-webui:latest

Open your browser to http://localhost:3000, create an admin account, and select your default model. You can set a system prompt, temperature, and context length in the settings for each model.

Step 4: Enable GPU Acceleration

Windows (NVIDIA): Install the latest NVIDIA driver and CUDA runtime. Ollama detects CUDA automatically. If you have multiple GPUs, you can control usage with OLLAMA_NUM_GPU and related variables. If you receive out-of-memory errors, switch to a smaller model (e.g., 7B/8B) or lower context length.

Linux (NVIDIA): Install the proprietary NVIDIA driver and CUDA toolkit from your distribution. Restart the Ollama service after installation: sudo systemctl restart ollama.

Linux (AMD): Install ROCm compatible with your GPU and kernel. Ollama uses ROCm when available. If ROCm is not detected, Ollama will fall back to CPU.

macOS (Apple Silicon): Ollama uses Metal by default. You do not need to install extra drivers.

Step 5: Use the Local API (Optional)

Ollama exposes a simple HTTP API at http://localhost:11434. Common endpoints include /api/generate (single-turn) and /api/chat (multi-turn). If you want to access Ollama from other devices on your LAN, set OLLAMA_HOST=0.0.0.0:11434 before starting the service, and open the firewall port cautiously. For example on Linux: sudo systemctl edit ollama and add the environment variable, then sudo systemctl daemon-reload && sudo systemctl restart ollama.

Step 6: Model Tips and Performance

Choose models that match your hardware and tasks. For laptops or CPUs, use 3–8B models for snappy responses. For workstations with 12–24 GB VRAM, try 13B and above. Use quantized variants (the default in Ollama) to reduce memory and disk usage. In Open WebUI, you can set a higher context length for coding and chat history, but that uses more RAM/VRAM.

Updating and Maintenance

Update Ollama: Windows: winget upgrade Ollama.Ollama. macOS/Linux: rerun the install script or use your package manager if you installed via Homebrew or a repo. Restart the service after updating.

Update models: ollama pull llama3.1:8b fetches newer revisions. You can pin tags (e.g., :8b) to stay consistent across machines.

Move model storage: By default models are stored under ~/.ollama. To store models on another drive, set OLLAMA_MODELS to a new path and restart the service, then re-pull needed models.

Troubleshooting

Port conflict on 11434: Stop the conflicting service or change the Ollama port with OLLAMA_HOST=127.0.0.1:11500 and restart. Update OLLAMA_BASE_URL in Open WebUI to match.

Disk space issues: Large models take multiple gigabytes. Remove unused models with ollama rm <model>, and periodically check ~/.ollama.

GPU out-of-memory: Switch to a smaller model, lower context length, or disable image features if enabled. Ensure no other GPU-heavy apps are running.

Docker cannot reach Ollama: On Linux, prefer --network=host, or add --add-host=host.docker.internal:host-gateway and use http://host.docker.internal:11434 for OLLAMA_BASE_URL.

Security and Best Practices

Keep Ollama bound to localhost unless you truly need remote access. If exposing to the network, place it behind a reverse proxy with TLS and authentication. Regularly update Ollama and Open WebUI, test new models in a separate profile, and back up your Open WebUI data volume if you rely on saved chats or prompts.

You Are Ready

With Ollama running locally and Open WebUI providing a friendly interface, you have a fast, private AI assistant for writing, coding, note-taking, and research. Start small with an 8B model, tune your settings, and upgrade models as your hardware allows. Most tasks will feel instant on a modest GPU, and everything stays on your machine.

How to Run Local LLMs with Ollama and Open WebUI on Ubuntu (Docker + NVIDIA GPU)

Overview

This step-by-step guide shows you how to run modern local large language models (LLMs) on Ubuntu using Ollama and Open WebUI with Docker and NVIDIA GPU acceleration. You will deploy a private, browser-based chat interface backed by fast local inference, ideal for secure prototyping, offline work, and cost control. The tutorial covers prerequisites, installation, configuration, persistence, and troubleshooting.

Prerequisites

Before you begin, make sure you have the following on your Ubuntu 22.04/24.04 host:

  • 64-bit Ubuntu with at least 16 GB RAM (more is better for larger models).
  • NVIDIA GPU (Turing or newer recommended) with recent drivers installed.
  • Admin (sudo) access and a stable internet connection.

1) Install NVIDIA Drivers and Container Toolkit

Install or verify the NVIDIA driver, then set up the NVIDIA Container Toolkit so Docker can use the GPU inside containers.

sudo apt update
ubuntu-drivers devices
# Choose the recommended driver (e.g., nvidia-driver-550) and install:
sudo apt install -y nvidia-driver-550
sudo reboot

After reboot, verify your GPU:

nvidia-smi

Install the NVIDIA Container Toolkit:

curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | \
sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit.gpg

distribution=$(. /etc/os-release;echo $ID$VERSION_ID)
curl -fsSL https://nvidia.github.io/libnvidia-container/$distribution/libnvidia-container.list | \
sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list

sudo apt update
sudo apt install -y nvidia-container-toolkit
sudo nvidia-ctk runtime configure --runtime=docker
sudo systemctl restart docker

2) Install Docker and the Compose Plugin

If Docker is not installed, add the official repository and install Docker Engine and the Compose plugin:

sudo apt-get update
sudo apt-get install -y ca-certificates curl gnupg
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | \
sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
echo \
  "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] \
  https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | \
  sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
sudo usermod -aG docker $USER
newgrp docker

3) Create a Docker Network and Volumes

A dedicated Docker network allows containers to talk to each other by name. Volumes ensure models and app data persist across container restarts.

docker network create ollama-net
docker volume create ollama
docker volume create open-webui

4) Run Ollama with GPU Acceleration

Start the Ollama container, expose the API port (11434), and attach the GPU. The volume keeps downloaded models persistent.

docker run -d \
  --name ollama \
  --gpus all \
  --network ollama-net \
  -p 11434:11434 \
  -v ollama:/root/.ollama \
  --restart unless-stopped \
  ollama/ollama:latest

Verify the API is reachable:

curl http://localhost:11434/api/tags

5) Deploy Open WebUI and Link It to Ollama

Open WebUI provides a clean browser-based chat interface for Ollama. Connect it to the Ollama container via the internal Docker network.

docker run -d \
  --name open-webui \
  --network ollama-net \
  -p 3000:8080 \
  -e OLLAMA_API_BASE=http://ollama:11434 \
  -v open-webui:/app/backend/data \
  --restart unless-stopped \
  ghcr.io/open-webui/open-webui:latest

Open your browser to http://localhost:3000 and complete the initial setup. By default, Open WebUI will detect the Ollama API base you provided and list available models once you pull them.

6) Pull a Model and Run Your First Chat

Use the Ollama CLI inside the container to download a model. For a good balance of performance and quality on consumer GPUs, start with an 8B or 7B quantized build.

docker exec -it ollama ollama pull llama3.1:8b-instruct-q4_K_M

Test generation via API:

curl -s http://localhost:11434/api/generate -d '{
  "model": "llama3.1:8b-instruct-q4_K_M",
  "prompt": "In one sentence, explain what Ollama does."
}'

In Open WebUI (http://localhost:3000), select the pulled model from the model dropdown and start chatting. You can adjust context size and GPU usage per chat in the advanced parameters.

7) Enable Persistence, Updates, and Autostart

Because you used named volumes, your models and Open WebUI data (users, chats, settings) persist through upgrades. To update, pull the latest images and recreate containers:

docker pull ollama/ollama:latest
docker pull ghcr.io/open-webui/open-webui:latest
docker stop open-webui ollama
docker rm open-webui ollama
# Re-run the docker run commands from steps 4 and 5

The --restart unless-stopped policy ensures both services start automatically after a system reboot.

8) Performance Tuning Tips

- Use quantized model variants (e.g., q4_K_M or q5_K_M) for faster inference with lower VRAM usage.

- For larger GPUs, try higher quality quantization (q6_K or q8_0) or larger models (e.g., 12B/13B) if VRAM allows.

- In Open WebUI’s advanced options, set num_ctx (e.g., 4096 or 8192) and increase num_gpu to offload more layers to the GPU. Start conservative and scale up if stable.

- Monitor GPU and memory with nvidia-smi while generating to right-size model and context length.

9) Securing Access

If you plan to access Open WebUI over the network, enable authentication in Settings and front it with a reverse proxy such as Caddy or Nginx for TLS. Avoid exposing the Ollama API directly to the internet. Restrict firewall rules to trusted IPs or a VPN.

Troubleshooting

GPU not used: If inference is slow and nvidia-smi shows 0% usage, confirm the container sees GPUs (docker run --rm --gpus all nvidia/cuda:12.4.1-base-ubuntu22.04 nvidia-smi). Re-run step 1 to fix NVIDIA toolkit integration, then restart Docker.

Permission denied to Docker: If docker commands require sudo, add your user to the docker group (sudo usermod -aG docker $USER; newgrp docker).

Port already in use: Change -p mappings (e.g., -p 11435:11434 or -p 3001:8080) and update OLLAMA_API_BASE in the Open WebUI container accordingly.

Out of memory or crashes: Use a smaller or more heavily quantized model, reduce num_ctx, or close other GPU workloads. Check container logs (docker logs ollama and docker logs open-webui).

Model not listed in WebUI: Ensure Open WebUI can reach Ollama via the internal name (ollama). Both containers must be on the same Docker network. Verify with curl http://ollama:11434/api/tags inside the open-webui container (docker exec -it open-webui sh).

What You Achieved

You now have a private, GPU-accelerated LLM stack on Ubuntu using Docker, Ollama, and Open WebUI. This setup lets you iterate quickly, control data residency, reduce costs, and stay productive even without an internet connection. You can add more models with docker exec -it ollama ollama pull <model> and switch between them in the WebUI as your use cases evolve.

Install Open WebUI and Ollama with GPU: Run Local LLMs on Windows and Linux Using Docker

Overview

Want to run modern large language models (LLMs) like Llama 3 locally, with a clean web interface and optional GPU acceleration? This tutorial shows how to deploy Ollama (model runtime) together with Open WebUI (browser UI) using Docker on Windows or Linux. You will get a stable setup that is easy to update, secure by default, and fast on NVIDIA or AMD GPUs. No cloud required.

Prerequisites

- Windows 10/11 (with WSL2) or any recent Linux distribution.
- Docker Desktop on Windows, or Docker Engine on Linux.
- At least 16 GB RAM recommended; SSD storage preferred.
- Optional GPU acceleration: NVIDIA (CUDA) or AMD (ROCm on Linux). CPU-only also works, just slower.

Step 1 — Install Docker

Windows: Install Docker Desktop, enable WSL2, and turn on “Use the WSL 2 based engine.” In Settings → Resources → WSL Integration, enable your Linux distro. If you have an NVIDIA GPU, install the latest NVIDIA driver; Docker Desktop uses WSL2 GPU automatically.

Linux: Install Docker Engine from your distro’s repository or Docker’s official repo. Add your user to the docker group, then log out and back in. Verify with:
docker version

Step 2 — Prepare GPU Support (Optional)

NVIDIA on Windows: Update the NVIDIA driver. Docker Desktop with WSL2 will expose the GPU automatically to containers that request it.

NVIDIA on Linux: Install the NVIDIA driver and the NVIDIA Container Toolkit. Verify with:
docker run --rm --gpus all nvidia/cuda:12.2.0-base-ubuntu20.04 nvidia-smi

AMD on Linux (ROCm): Install ROCm per your distro and ensure /dev/kfd and /dev/dri are present. AMD GPU acceleration is supported with the rocm-tagged Ollama image.

Step 3 — Create a Docker Compose file

Create a project folder (for example, C:\llm or ~/llm) and in it create a file named docker-compose.yml. Choose the variant that fits your hardware. All versions map Open WebUI to localhost only for security.

CPU-only (works everywhere):
version: "3.9"
services:
  ollama:
    image: ollama/ollama:latest
    container_name: ollama
    volumes:
      - ollama:/root/.ollama
    ports:
      - "11434:11434"
  openwebui:
    image: ghcr.io/open-webui/open-webui:latest
    container_name: openwebui
    environment:
      - OLLAMA_API_BASE=http://ollama:11434
    depends_on:
      - ollama
    ports:
      - "127.0.0.1:3000:8080"
volumes:
  ollama:

NVIDIA GPU (Windows or Linux):
version: "3.9"
services:
  ollama:
    image: ollama/ollama:latest
    container_name: ollama
    gpus: all
    environment:
      - OLLAMA_KEEP_ALIVE=24h
    volumes:
      - ollama:/root/.ollama
    ports:
      - "11434:11434"
  openwebui:
    image: ghcr.io/open-webui/open-webui:latest
    container_name: openwebui
    environment:
      - OLLAMA_API_BASE=http://ollama:11434
    depends_on:
      - ollama
    ports:
      - "127.0.0.1:3000:8080"
volumes:
  ollama:

AMD GPU on Linux (ROCm):
version: "3.9"
services:
  ollama:
    image: ollama/ollama:rocm
    container_name: ollama      - "/dev/kfd:/dev/kfd"
      - "/dev/dri:/dev/dri"
    group_add:
      - "video"
    ipc: host
    security_opt:
      - seccomp=unconfined
    cap_add:
      - SYS_PTRACE
    volumes:
      - ollama:/root/.ollama
    ports:
      - "11434:11434"
  openwebui:
    image: ghcr.io/open-webui/open-webui:latest
    container_name: openwebui
    environment:
      - OLLAMA_API_BASE=http://ollama:11434
    depends_on:
      - ollama
    ports:
      - "127.0.0.1:3000:8080"
volumes:
  ollama:

Step 4 — Start the stack

In the project folder, run:
docker compose up -d
This pulls the images and starts both containers. Open WebUI will be available at http://127.0.0.1:3000 and Ollama’s API at http://localhost:11434.

Step 5 — Download a model

Use the Web UI to add a model, or pull one via CLI. For example, to pull Llama 3.1 8B:
docker exec -it ollama ollama pull llama3.1:8b
Then test it:
docker exec -it ollama ollama run llama3.1:8b "Say hello in one sentence."

Step 6 — First login and basic security

Open http://127.0.0.1:3000 in your browser. Create your account and log in. By default, this guide binds the UI to localhost, so it is not exposed to your network. If you need remote access, publish through a reverse proxy with HTTPS or a zero-trust tunnel, and enable authentication in Open WebUI. Keep your Docker host patched and restrict ports with a firewall.

Updating and Maintenance

- Update to the latest images:
docker compose pull && docker compose up -d
- List installed models:
docker exec -it ollama ollama list
- Remove unused models to free space:
docker exec -it ollama ollama rm model-name

Troubleshooting

- GPU not detected: for NVIDIA, run docker run --rm --gpus all nvidia/cuda:12.2.0-base-ubuntu20.04 nvidia-smi. If that fails, update the driver or NVIDIA Container Toolkit. For AMD, ensure /dev/kfd and /dev/dri are present and you used the rocm image variant.
- Slow performance: confirm you pulled a quantized model (e.g., Q4_K_M) or enable GPU. Increase RAM swap if you run out of memory.
- Ports in use: change the host ports in the compose file (e.g., 127.0.0.1:4000:8080 for the UI).
- Logs: check issues with docker compose logs -f ollama and docker compose logs -f openwebui.

Uninstall (Optional)

To stop and remove containers, run:
docker compose down
To remove models and data, also remove the volume:
docker volume rm llm_ollama (adjust name with docker volume ls)

What you achieved

You now have a local, private, and fast LLM environment with a friendly web UI. Thanks to Docker, the stack is reproducible and easy to update. With GPU acceleration, even 7B–13B models become highly responsive for chat, coding help, and offline experimentation—without sending your data to the cloud.

Deploy a Private AI Chat Server with Ollama and Open WebUI on Ubuntu using Docker Compose (GPU Optional)

Overview

This step-by-step guide shows you how to deploy a private AI chat server on Ubuntu using Ollama and Open WebUI with Docker Compose. Ollama runs large language models (LLMs) locally, while Open WebUI gives you a clean web interface for chat, prompts, and model management. The setup works on CPUs and can optionally use an NVIDIA GPU for much faster inference. You will learn installation, configuration, GPU enablement, security basics, updates, and backup tips.

Prerequisites

Before you start, make sure you have: (1) Ubuntu 22.04/24.04 or another recent Linux distro, (2) sudo access, (3) at least 8 GB of RAM (more is better), (4) 20+ GB of free disk space for models, (5) Docker Engine and the Docker Compose plugin, and optionally (6) an NVIDIA GPU with drivers and the NVIDIA Container Toolkit if you want acceleration.

Step 1: Install Docker and Compose

Install Docker Engine and Compose using the official repository. If you already have Docker, you can skip to the next step.

sudo apt-get update
sudo apt-get install -y ca-certificates curl gnupg
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
echo \
  "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] \
  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
sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
sudo usermod -aG docker $USER
newgrp docker

Step 2: Create the Docker Compose project

Create a working directory and a Docker Compose file that launches two services: ollama (the model runtime and API) and open-webui (the frontend). This configuration stores models in a named volume and exposes the web UI on port 3000. The GPU configuration is included and can be left in place even if you are on CPU-only; it will be ignored without an NVIDIA setup.

mkdir -p ~/ollama-openwebui
cd ~/ollama-openwebui
nano docker-compose.yml
services:
  ollama:
    image: ollama/ollama:latest
    container_name: ollama
    restart: unless-stopped
    ports:
      - "11434:11434"
    volumes:
      - ollama-data:/root/.ollama
    deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              count: all
              capabilities: [gpu]

  open-webui:
    image: ghcr.io/open-webui/open-webui:latest
    container_name: open-webui
    restart: unless-stopped
    depends_on:
      - ollama
    environment:
      - OLLAMA_API_BASE=http://ollama:11434
      - WEBUI_NAME=Private AI Chat
      - ENABLE_SIGNUP=true
    ports:
      - "3000:8080"
    volumes:
      - openwebui-data:/app/backend/data

volumes:
  ollama-data:
  openwebui-data:

Step 3: Start the stack and pull a model

Bring the services up in the background and open the web UI at http://SERVER_IP:3000. The first load may take a moment.

docker compose up -d

You can pull models from the UI (Models menu) or via the CLI. For example, to fetch a good general model:

docker exec -it ollama ollama pull llama3.1
# Other options: mistral, phi3, qwen2, codellama, llama3.1:8b-instruct-q4_K_M

In Open WebUI, select your model from the dropdown, then start chatting. You can also adjust system prompts, temperature, and context length from the settings.

Step 4: Enable GPU acceleration (optional)

To use an NVIDIA GPU, install the driver and the NVIDIA Container Toolkit, then restart Docker. Your Compose file above already includes GPU reservations; Docker will attach GPUs automatically when available.

# Install NVIDIA driver (check your GPU support docs)
sudo apt-get install -y nvidia-driver-535

# Install NVIDIA Container Toolkit
curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg
curl -fsSL https://nvidia.github.io/libnvidia-container/stable/deb/nvidia-container-toolkit.list | \
  sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list
sudo apt-get update
sudo apt-get install -y nvidia-container-toolkit
sudo nvidia-ctk runtime configure --runtime=docker
sudo systemctl restart docker

# Recreate containers
docker compose up -d --force-recreate

Verify GPU is visible:

docker exec -it ollama nvidia-smi

Step 5: Secure access

By default, the web UI is open to anyone who can reach the server. For small teams, keep the service bound to your private network, enable signups only for trusted users, and set an admin email with environment variables in the Open WebUI service. For internet exposure, place NGINX or Caddy in front with HTTPS and basic auth or OIDC. A quick alternative is to keep port 3000 closed publicly and use an SSH tunnel: ssh -L 3000:localhost:3000 user@server.

Step 6: Update and backup

To update to the latest versions, pull new images and recreate containers without losing data:

docker compose pull
docker compose up -d

Back up your volumes regularly. They contain downloaded models and user data. You can snapshot them to a tar archive:

docker run --rm -v ollama-openwebui_ollama-data:/data -v $PWD:/backup alpine \
  tar -czf /backup/ollama-data.tgz -C /data .
docker run --rm -v ollama-openwebui_openwebui-data:/data -v $PWD:/backup alpine \
  tar -czf /backup/openwebui-data.tgz -C /data .

Troubleshooting tips

If models do not load, check logs: docker logs -f ollama and docker logs -f open-webui. For out-of-memory errors, choose a smaller model variant (e.g., 7B/8B quantized). If GPU is not detected, ensure the driver and toolkit versions match, verify nvidia-smi works on the host, and recreate containers. Slow responses on CPU are normal; try quantized models (like Q4_K_M) for better speed and lower RAM. To change the web UI name, edit WEBUI_NAME and run docker compose up -d.

What you achieved

You now have a private AI chat server running locally with Docker. Ollama hosts your LLMs, Open WebUI provides a friendly interface, and optional NVIDIA acceleration boosts performance. With updates and backups in place, you can safely iterate, add specialized models for code or documents, and keep your AI workflows under your control.

Install a Local AI Chatbot on Ubuntu 24.04 with Ollama and Open WebUI (Step-by-Step)

Running a fast, private AI chatbot on your own computer or server is easier than ever. In this guide, you will install Ollama (a lightweight local LLM runtime) and Open WebUI (a modern web interface) on Ubuntu 24.04. You will be able to chat with models like Llama 3 or Mistral without sending data to the cloud, and with optional GPU acceleration if you have an NVIDIA card.

What you will need: an Ubuntu 22.04/24.04 machine (VM, bare metal, or WSL), at least 8 GB RAM (16 GB recommended for larger models), 15–30 GB free disk space for models, Internet access, and optional NVIDIA GPU drivers for acceleration.

Why Ollama + Open WebUI?

Ollama manages local large language models (LLMs) with simple commands and sensible defaults. Open WebUI gives you a clean, chat-style interface with features like prompt history, file uploads (for some models), and model switching. Together, they are a simple, reliable stack for a self-hosted AI experience.

1) Update Ubuntu and install basics

First, refresh your package list and install required tools:

sudo apt update && sudo apt upgrade -y
sudo apt install -y curl ca-certificates

2) Install Ollama and start the service

Ollama provides an installer script for Linux. Run the following to install and start the service:

curl -fsSL https://ollama.com/install.sh | sh
sudo systemctl enable --now ollama

Verify that the Ollama API is listening on port 11434:

ss -tulpn | grep 11434

3) Pull a model (Llama 3 as an example)

Ollama hosts a registry of optimized models. Pull a popular general-purpose model such as Llama 3 8B:

ollama pull llama3:8b

After the download completes, you can test it quickly:

ollama run llama3:8b

Type a prompt and press Enter. Press Ctrl+C to exit.

4) Install Docker and run Open WebUI

Open WebUI is easiest to deploy with Docker. Install Docker using the official convenience script, then start the container:

curl -fsSL https://get.docker.com | sh
sudo usermod -aG docker $USER # log out/in after this

Run Open WebUI and connect it to your local Ollama service:

docker run -d --name open-webui \
-p 3000:8080 \
-e OLLAMA_BASE_URL=http://127.0.0.1:11434 \
-v open-webui:/app/backend/data \
--restart unless-stopped \
ghcr.io/open-webui/open-webui:latest

Open your browser and go to http://SERVER_IP:3000. On first access you will create an admin account. Then choose your default model (e.g., llama3:8b) from the interface and start chatting.

5) Enable GPU acceleration (optional, NVIDIA)

If your machine has an NVIDIA GPU, install the official driver from Ubuntu’s Additional Drivers or with sudo apt install nvidia-driver-XXX (replace XXX with a recommended version). Reboot and verify with nvidia-smi. Ollama will auto-detect CUDA and use your GPU for supported models, delivering much faster responses. You do not need GPU pass-through to Docker for this setup because Ollama runs on the host.

6) Secure and harden your deployment

Local-only binding: If you are on a public server, avoid exposing the UI directly. Bind Open WebUI to localhost and place a reverse proxy with HTTPS in front:

docker rm -f open-webui
docker run -d --name open-webui \
-p 127.0.0.1:3000:8080 \
-e OLLAMA_BASE_URL=http://127.0.0.1:11434 \
-v open-webui:/app/backend/data \
--restart unless-stopped \
ghcr.io/open-webui/open-webui:latest

Reverse proxy tip: Use any TLS-capable proxy (Nginx, Caddy, Traefik). For example, with Caddy you can map your domain to localhost:3000 and get automatic HTTPS. Protect access using password auth or your proxy’s single sign-on.

7) Daily use and model management

Switch models in the Open WebUI sidebar or pull additional ones via Ollama. Useful commands:

# list local models
ollama list

# pull a different model
ollama pull mistral:7b

# remove unused models to free space
ollama rm model_name

When you click “New Chat” in Open WebUI, you can choose the model and adjust temperature, system prompt, and other parameters. For tasks like coding or reasoning, try llama3.1 or mistral-nemo variants if available for your hardware.

8) Updating the stack

Keep components fresh to get speed and quality improvements:

# update Ollama binary
curl -fsSL https://ollama.com/install.sh | sh
sudo systemctl restart ollama

# update Open WebUI container
docker pull ghcr.io/open-webui/open-webui:latest
docker stop open-webui && docker rm open-webui
docker run ... (same command as before)

9) Troubleshooting common issues

Port conflicts: If 11434 or 3000 is already in use, pick a different host port (for example, -p 8081:8080 for Open WebUI). Check usage with ss -tulpn.

Insufficient VRAM or RAM: Large models may fail to load. Try a smaller variant (e.g., llama3:8b instead of 70b), or use quantized builds where available.

No GPU detected: Ensure the NVIDIA driver is installed and loaded (nvidia-smi works). Reboot after driver installation. Ollama falls back to CPU if no GPU is available.

Docker permissions: If you see “permission denied,” log out and back in after adding your user to the docker group, or run commands with sudo.

Disk space: Models can be large. Use ollama list and ollama rm to remove what you do not need. Check usage with df -h.

10) What’s next?

Explore prompt templates, create system prompts for repeatable tasks, and try specialized models for coding, document Q&A, or SQL. You can also connect Open WebUI to external tools, set up team access behind your company SSO, or run multiple instances for different workloads. With Ollama and Open WebUI, you have a fast, private, and extensible foundation for local generative AI on Ubuntu.

Deploy Ollama and Open WebUI on Ubuntu 22.04/24.04 with NVIDIA GPU Acceleration (Docker Compose)

Running large language models locally is easier than ever. In this guide, you will deploy Ollama and Open WebUI on Ubuntu 22.04 or 24.04 using Docker Compose, with optional NVIDIA GPU acceleration for faster inference. Ollama handles model management and inference, while Open WebUI gives you a clean, browser-based interface. By the end, you will have a persistent, secure setup ready for daily use.

Prerequisites

You need an Ubuntu 22.04 or 24.04 server with at least 16 GB RAM for 7B–8B models (more is better), 30+ GB free disk space, and internet access. GPU acceleration is optional but recommended: an NVIDIA GPU with drivers installed significantly speeds up responses. You will also need sudo privileges. If UFW or another firewall is enabled, plan to allow TCP 3000 (Open WebUI) and 11434 (Ollama) for local access.

Step 1: Update Ubuntu

Make sure your system is current. This reduces dependency conflicts and ensures you get the latest Docker packages.

sudo apt update && sudo apt -y upgrade
sudo reboot

Step 2: Install Docker Engine and Docker Compose Plugin

Install the official Docker repository, Docker Engine, and the Compose plugin. This is the most reliable way to run both Ollama and Open WebUI containers with persistent volumes.

sudo apt update
sudo apt install -y ca-certificates curl gnupg
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] \
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 update
sudo apt install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
sudo usermod -aG docker $USER
newgrp docker

Step 3 (Optional but Recommended): Enable NVIDIA GPU for Containers

If you have an NVIDIA GPU, install the proprietary driver and the NVIDIA Container Toolkit so Docker can access the GPU. If you are CPU-only, skip to Step 4.

# Install NVIDIA driver (reboot after)
sudo ubuntu-drivers autoinstall
sudo reboot

# After reboot, verify the GPU
nvidia-smi

# Install NVIDIA Container Toolkit
distribution=$(. /etc/os-release; echo $ID$VERSION_ID)
curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | \
sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg
curl -fsSL https://nvidia.github.io/libnvidia-container/stable/$distribution/nvidia-container-toolkit.list | \
sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list
sudo apt update
sudo apt install -y nvidia-container-toolkit
sudo nvidia-ctk runtime configure --runtime=docker
sudo systemctl restart docker

# Optional sanity test
docker run --rm --gpus all nvidia/cuda:12.4.1-base-ubuntu22.04 nvidia-smi

Step 4: Create a Docker Compose File

Use Docker Compose to orchestrate both services. The configuration below persists model data, restarts on failures, and binds Open WebUI to port 3000. GPU access is configured using device reservations. Save this as docker-compose.yml in an empty directory (for example, ~/ai-stack).

version: "3.8"
services:
  ollama:
    image: ollama/ollama:latest
    container_name: ollama
    restart: unless-stopped
    ports:
      - "11434:11434"
    volumes:
      - ollama:/root/.ollama
    environment:
      - OLLAMA_KEEP_ALIVE=24h
    deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              count: all
              capabilities: [gpu]

  open-webui:
    image: ghcr.io/open-webui/open-webui:latest
    container_name: open-webui
    depends_on:
      - ollama
    restart: unless-stopped
    ports:
      - "3000:8080"
    environment:
      - OLLAMA_BASE_URL=http://ollama:11434
    volumes:
      - openwebui:/app/backend/data

volumes:
  ollama:
  openwebui:

If you do not have an NVIDIA GPU or do not want to use it, you can remove the entire deploy.resources block from the ollama service. Ollama will run on CPU automatically, albeit slower.

Step 5: Start the Stack

Bring the services online in detached mode. The first start will pull images, which may take a few minutes depending on your connection speed.

docker compose up -d
docker compose ps

Open your browser and go to http://<server-ip>:3000. The Open WebUI interface should load. The first time you access it, you will be prompted to create an account. This account is stored in the openwebui volume for persistence.

Step 6: Pull a Model and Run Your First Chat

You can pull a model either from the Open WebUI interface or via the Ollama CLI inside the container. Popular choices include llama3, llama3.1, mistral, and qwen. The example below pulls Llama 3 8B. Adjust the model size to fit your RAM/GPU VRAM.

# Pull from inside the Ollama container
docker exec -it ollama ollama pull llama3:8b

# Verify Ollama is responding
curl http://localhost:11434/api/tags

In Open WebUI, select the pulled model from the dropdown and start chatting. If you see slow responses on CPU, confirm that your GPU is being used by monitoring nvidia-smi while generating text.

Step 7: Secure and Tune Your Deployment

By default, Open WebUI exposes port 3000. If you only use it locally, bind to localhost by editing the compose file port mapping to "127.0.0.1:3000:8080". For remote access, place a reverse proxy like Nginx or Caddy in front with HTTPS. Inside Open WebUI settings, disable open sign-ups after creating your admin account to restrict access.

Consider setting model-specific parameters in Open WebUI such as temperature, top_p, and context length. Ollama supports model-level configuration via Modelfiles if you want reproducible prompts and system messages. You can also set OLLAMA_NUM_PARALLEL to control concurrency for multiple users.

Updating, Backups, and Uninstall

To update, pull the latest images and recreate containers without losing data, since volumes persist your models and settings.

docker compose pull
docker compose up -d

For backups, snapshot the ollama and openwebui volumes or back up the entire /var/lib/docker/volumes paths created by this stack. To remove the stack without deleting data, run docker compose down. To fully remove everything, include the -v flag to delete volumes.

docker compose down        # stops and removes containers
docker compose down -v     # also removes volumes (data loss)

Troubleshooting

If Open WebUI cannot connect to Ollama, ensure the OLLAMA_BASE_URL is set to http://ollama:11434 and that both containers are in the same compose project. If the port 3000 or 11434 is already in use, change the host-side port in the compose file. For GPU issues like “no CUDA devices found,” verify that nvidia-smi works on the host and that the NVIDIA Container Toolkit is installed and Docker was restarted. If you see permission errors using Docker, confirm your user is in the docker group and re-open your shell or use newgrp docker.

With this setup, you now have a modern, self-hosted AI stack on Ubuntu that is fast, secure, and easy to maintain. Enjoy experimenting with different models, fine-tuning settings, and integrating Open WebUI into your daily workflow.

Run Local LLMs with Ollama and Open WebUI on Docker (GPU-Ready Guide for Ubuntu 22.04/24.04)

Overview

Running large language models locally is easier than ever thanks to Ollama and Open WebUI. This tutorial shows you how to deploy both on Docker with optional NVIDIA GPU acceleration on Ubuntu 22.04/24.04. You will get a clean, repeatable setup, persistent storage, and a modern web interface to chat with models like Llama 3.1, Gemma, and Phi-3. If you do not have a GPU, you can still run smaller models on CPU.

What You Will Build

We will launch two containers: one for Ollama (the model runtime and API) and one for Open WebUI (the interface). They will be connected on a Docker network, with volumes for persistence. When done, you can open your browser, select a model, and start chatting locally—no cloud required.

Prerequisites

- Ubuntu 22.04 or 24.04, sudo access, and a stable internet connection.

- Docker installed (we will cover a quick install).

- Optional NVIDIA GPU with drivers for acceleration. CPU-only instructions are included.

1) Install Docker (if not installed)

Install the latest Docker CE from the official repo for better compatibility and security updates.

sudo apt update
sudo apt install -y ca-certificates curl gnupg lsb-release
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
echo \
  "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] \
  https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | \
  sudo tee /etc/apt/sources.list.d/docker.list >/dev/null
sudo apt update
sudo apt install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
sudo usermod -aG docker $USER
newgrp docker

2) Enable NVIDIA GPU Support (optional but recommended)

If you have an NVIDIA GPU, install the proprietary driver and NVIDIA Container Toolkit so Docker can access the GPU.

# Install recommended NVIDIA driver
sudo apt update
sudo apt install -y ubuntu-drivers-common
sudo ubuntu-drivers autoinstall
sudo reboot

After reboot, install the NVIDIA Container Toolkit and integrate with Docker.

sudo apt update
sudo apt install -y nvidia-container-toolkit
sudo nvidia-ctk runtime configure --runtime=docker
sudo systemctl restart docker

Verify GPUs are visible to Docker:

docker run --rm --gpus all nvidia/cuda:12.3.2-base-ubuntu22.04 nvidia-smi

3) Create a Network and Volumes

We will keep Ollama models and WebUI data persistent across container restarts.

docker network create ai-net
docker volume create ollama-data
docker volume create openwebui-data

4) Run the Ollama Container

Start Ollama with GPU acceleration if available. The container exposes port 11434 for the API.

# GPU-enabled
docker run -d --name ollama --restart unless-stopped \
  --gpus all \
  -p 11434:11434 \
  -v ollama-data:/root/.ollama \
  --network ai-net \
  ollama/ollama:latest

# CPU-only (no GPU flag)
# docker run -d --name ollama --restart unless-stopped \
#   -p 11434:11434 \
#   -v ollama-data:/root/.ollama \
#   --network ai-net \
#   ollama/ollama:latest

5) Pull a Model

Use the Ollama CLI inside the container to download a model. Start with a balanced choice like Llama 3.1 8B or pick a smaller one if you are on CPU.

# Enter the container and pull a model
docker exec -it ollama bash -lc "ollama pull llama3.1:8b"

# Alternative smaller models:
# docker exec -it ollama bash -lc "ollama pull phi3:mini"
# docker exec -it ollama bash -lc "ollama pull mistral:7b"

6) Run Open WebUI

Open WebUI connects to the Ollama API. We will publish it on port 3000 and persist its configuration.

docker run -d --name openwebui --restart unless-stopped \
  -p 3000:8080 \
  -v openwebui-data:/app/backend/data \
  -e OLLAMA_BASE_URL=http://ollama:11434 \
  --network ai-net \
  ghcr.io/open-webui/open-webui:latest

Open your browser to http://localhost:3000, create an admin account, and pick your default model (e.g., llama3.1:8b). You can switch models anytime in the interface.

7) Test the Setup

Send a quick API test to confirm Ollama is serving responses:

curl http://localhost:11434/api/generate -d '{
  "model": "llama3.1:8b",
  "prompt": "In one sentence, explain what a container is."
}'

If you get a streamed JSON response with text tokens, the backend is working. In Open WebUI, start a new chat and ask a question to validate the full stack.

8) Performance Tips

- Prefer GPU for 7B–14B models; CPU can be slow or memory-constrained. Smaller models like Phi-3 Mini run decently on modern CPUs.

- Add “q4_0” or “q5_1” quantized variants if available to reduce VRAM/RAM usage. Example: llama3.1:8b-instruct-q4_0.

- Limit GPU layers or context length if you see out-of-memory errors. In Open WebUI, lower max tokens and system prompt size.

9) Troubleshooting

Docker can’t see the GPU: Ensure the NVIDIA driver is installed, run nvidia-smi on the host, and confirm nvidia-ctk runtime configure was applied. Restart Docker and try the CUDA test container again.

Model download is slow or fails: Check DNS and firewall, or use a different mirror via environment variables if your network requires a proxy. You can also prefetch models on a faster connection and copy the volume.

Open WebUI cannot reach Ollama: Confirm both containers are on the ai-net network and OLLAMA_BASE_URL points to http://ollama:11434. Check logs with docker logs openwebui and docker logs ollama.

Out of memory: Choose a smaller model, use a stronger quantization, or on GPU, close other VRAM-heavy apps. For CPU, add swap if RAM is limited.

10) Security and Maintenance

Do not expose ports 11434 or 3000 publicly without authentication and TLS. If you must access remotely, restrict with a reverse proxy, HTTPS, and basic auth or OAuth. Keep images updated:

docker pull ollama/ollama:latest
docker pull ghcr.io/open-webui/open-webui:latest
docker stop openwebui ollama
docker rm openwebui ollama
# re-run the docker run commands from above (volumes preserve your data)

Wrap-Up

You now have a robust, GPU-capable local AI stack: Ollama serving models and Open WebUI providing a polished chat interface. Because everything runs in Docker with volumes, you can upgrade, backup, and migrate with minimal friction. Experiment with different models, tune prompts, and enjoy private, offline AI on your own hardware.

Deploy Ollama with Open WebUI on Ubuntu 24.04 (GPU-Accelerated)

Running a private, local large language model (LLM) stack has become straightforward thanks to Ollama and Open WebUI. In this tutorial, you will set up Ollama on Ubuntu 24.04 for local inference and connect it to Open WebUI for a clean, feature-rich chat interface. Optional steps cover NVIDIA GPU acceleration and a one-container alternative. The end result is a fast, private, and flexible AI workstation or lab setup.

Prerequisites

You need an Ubuntu 24.04 machine with at least 16 GB RAM (more is better for larger models), 20+ GB free disk space, and a stable internet connection. For GPU acceleration, an NVIDIA GPU with recent drivers (CUDA 12+ capable) is recommended. Administrative shell access (sudo) is required.

Step 1 — Update the system

Start by updating the OS and rebooting to ensure a clean baseline:

sudo apt update && sudo apt -y upgrade
sudo reboot

Step 2 — (Optional) Enable NVIDIA GPU acceleration

If you have an NVIDIA GPU, install the recommended proprietary driver. This enables Ollama to offload model layers to the GPU for significant speedups.

sudo apt install -y ubuntu-drivers-common
sudo ubuntu-drivers autoinstall
sudo reboot

After reboot, verify the driver is active:

nvidia-smi

If you see your GPU listed with a driver version, you are ready for GPU acceleration. If not, check Secure Boot status, ensure the driver matches your GPU, and review dmesg for driver signing or module load errors.

Step 3 — Install Ollama

Ollama is a lightweight runtime for local LLMs. Install it with the official script and enable the systemd service:

curl -fsSL https://ollama.com/install.sh | sh
sudo systemctl enable --now ollama
systemctl status ollama

By default, Ollama listens on localhost:11434 and will auto-detect NVIDIA GPUs if drivers are present. To test the API, run:

curl -s http://127.0.0.1:11434/api/tags

Pull a model (e.g., Llama 3 8B) and do a quick prompt test:

ollama pull llama3
ollama run llama3

Type a sample question to confirm token generation. Exit with Ctrl+C.

Step 4 — Install Docker (for Open WebUI)

Open WebUI is easiest to run in a container. Install the Docker Engine and Compose plugin:

sudo apt-get install -y ca-certificates curl gnupg
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
echo \
  "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] \
  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 update
sudo apt install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
sudo usermod -aG docker $USER
newgrp docker

Step 5 — Run Open WebUI connected to host Ollama

This keeps Ollama on the host and runs Open WebUI in Docker. The container will reach Ollama on 127.0.0.1:11434 via the special host-gateway address.

docker run -d --name open-webui \
  -p 3000:8080 \
  --add-host=host.docker.internal:host-gateway \
  -e OLLAMA_BASE_URL=http://host.docker.internal:11434 \
  -e OLLAMA_API_BASE=http://host.docker.internal:11434 \
  -v open-webui:/app/backend/data \
  --restart unless-stopped \
  ghcr.io/open-webui/open-webui:latest

Open your browser to http://SERVER_IP:3000, create the initial admin account, and confirm that the Ollama connection shows as healthy. From Settings, you can select the default model, import additional models, and configure conversation settings such as system prompts and context length.

Step 6 — Verify GPU usage and performance

Start a chat in Open WebUI and watch GPU utilization:

watch -n 1 nvidia-smi

If GPU utilization stays at 0%, verify your NVIDIA driver is active. Ollama will automatically offload supported layers to the GPU when available. For very small models, GPU may not be heavily utilized.

Optional — All-in-one container (Open WebUI + Ollama)

If you prefer to containerize everything, use the combined image. This requires the NVIDIA Container Toolkit for GPU access from Docker.

sudo apt install -y nvidia-container-toolkit
sudo nvidia-ctk runtime configure --runtime=docker
sudo systemctl restart docker

docker run -d --name openwebui-ollama \
  --gpus all \
  -p 3000:8080 \
  -v open-webui:/app/backend/data \
  -v ollama:/root/.ollama \
  --restart unless-stopped \
  ghcr.io/open-webui/open-webui:ollama

This image embeds Ollama and automatically wires it to Open WebUI. It will download models into the ollama volume. If you do not have a GPU, remove the --gpus all flag.

Security and hardening tips

By default, Ollama listens only on localhost. Keep it that way unless you are placing a reverse proxy in front (Nginx, Caddy, or Traefik) for TLS. Restrict access to port 3000 using a firewall (UFW or security group) and enable Open WebUI authentication during initial setup. If you must expose the interface, ensure HTTPS termination and strong credentials, and consider IP allowlists.

Troubleshooting

If Open WebUI cannot connect to Ollama, confirm the API is reachable: curl -s http://127.0.0.1:11434/api/tags. If it works, recheck the container run command and the host-gateway mapping. For slow inference, try a smaller model (e.g., mistral, phi3, or qwen2:0.5b/1.5b) and ensure swap is available. If downloads fail, verify DNS and outbound firewall rules.

You now have a modern, local AI stack on Ubuntu 24.04 that is private, fast, and extensible. Explore models like llama3:instruct, qwen2, mistral, or codellama for coding, and tailor prompts, templates, and context settings in Open WebUI for your specific workflows.

How to Use Google Gemini Flash 2.0 with Cursor?

You can add or remove the language models you will use on the Cursor from the settings > model section and update them as you wish. When Claude's limits are full or you want more free usage rights, you can increase these limits by integrating Google's newly experimental Gemini Flash 2.0 into your ide with the API and reach more daily requested limits. These limits are quite high and sufficient for Gemini for now. To use Google Gemini Flash 2.0 on the Cursor, first go to the Cursor settings window, click on the models section from here and mark Gemini Flash 2.0 from the list, then add the API code we received from Google AI Studio to the relevant line below to activate the language model and complete the verification process (verify).

It is very practical and easy to do the operations. After these operations, we can start using the newly added Gemini Flash 2.0 by changing the language model under the Cursor prompt screen and benefit from the new model in our developments.

The screenshots of the operations are as follows:

Google API Create

Cursor IDE Settings 

Popular Posts

Install Ollama and Open WebUI on Ubuntu 24.04 with NVIDIA GPU Acceleration (Step-by-Step)

Install Ollama + Open WebUI on Ubuntu 24.04 with NVIDIA GPU Acceleration (Step-by-Step)

Install a Local AI Chatbot on Ubuntu 24.04 with Ollama and Open WebUI (Step-by-Step)

Trending Now

Debian Adoption at CERN Signals Strong Momentum for Enterprise Linux

By the end of this article readers will understand the implications of CERN’s migration of 2,200 control systems to Debian 13, the performance enhancements in Firefox 155, and recent developments across several Linux distributions that affect system administration and user experience. Debian 13 Deployment at CERN: Scale and Significance The European Organization for Nuclear Research (CERN) has announced the migration of 2,200 of its control systems to Debian 13. This move represents one of the largest coordinated deployments of a Debian release in a scientific research environment. Control systems at CERN are responsible for monitoring and managing critical hardware, from accelerator components to detector subsystems. Their reliability hinges on a stable operating system with long‑term support, predictable update cycles, and a robust package ecosystem. Debian’s reputation for stability and its extensive testing process make it a natural fit for such mission‑critical workloads. Debia...