🚀 Install DeepSeek with OpenWebUI & Ollama Using Docker Compose

A streamlined guide to setting up DeepSeek with OpenWebUI and Ollama using Docker Compose.
This setup is ideal for local or server-based AI model management and interaction.


✅ Prerequisites

Make sure the following are installed:

📌 Optional:


1️⃣ Create Environment File

In the project directory, create a .env file:

# OpenWebUI settings
OPENWEBUI_PORT=8080 
OLLAMA_BASE_URL=http://ollama:11434

# Ollama settings
OLLAMA_PORT=11434
OLLAMA_VOLUME=/root/.ollama
WEBUI_VOLUME=/app/backend/data

2️⃣ Create Docker Compose File

Create docker-compose.yml in the same directory:

version: '3.8'

services:
  openwebui:
    image: ghcr.io/open-webui/open-webui:main
    container_name: openwebui
    hostname: openwebui
    restart: unless-stopped
    ports:
      - "${OPENWEBUI_PORT}:8080"
    environment:
      OLLAMA_BASE_URLS: ${OLLAMA_BASE_URL}
    extra_hosts:
      - "host.docker.internal:host-gateway"
    volumes:
      - open-webui-local:${WEBUI_VOLUME}
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:${OPENWEBUI_PORT}"]
      interval: 10s
      retries: 5
      start_period: 15s

  ollama:
    image: ollama/ollama:latest
    container_name: ollama
    hostname: ollama
    restart: unless-stopped
    ports:
      - "${OLLAMA_PORT}:11434"
    volumes:
      - ollama-local:${OLLAMA_VOLUME}

volumes:
  ollama-local:
  open-webui-local:

3️⃣ Start Services

Run:

docker-compose up -d

This will:

  • Pull required images
  • Create containers
  • Run them in the background

4️⃣ Verify Services

Check running containers:

docker ps

View logs:

docker logs openwebui
docker logs ollama

5️⃣ Access OpenWebUI

Open your browser:

http://localhost:8080

(Change 8080 if you modified OPENWEBUI_PORT in .env.)


🔄 Service Management

Restart:

docker-compose restart

Stop:

docker-compose down

Update:

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

🎯 Conclusion

You have successfully set up DeepSeek with OpenWebUI and Ollama via Docker Compose.
Your AI tools are now ready to use — fast, modular, and easy to manage.

🚀 Explore more guides on our blog 👉 blog.1it.pro
📧 Contact us: admin@1it.pro for expert IT guidance.
🌐 Explore more: Visit 1it.pro for top-tier IT solutions.

UA EN RU

Зв'язатися з нами

Telegram Email