DEV Community

Mohammed Nasser
Mohammed Nasser

Posted on

Set Up DeepSeek on Huawei Cloud with Docker and Open WebUI

Step 1: Log in to Huawei Cloud Console

  1. Log in to your Huawei Cloud account.
  2. In the Services List, search for VPC and select the VPC Service.

Image description

Image description

Step 2: Create a VPC

  1. On the VPC console page, click Create.
  2. Fill in the VPC Name and Subnet Name.
  3. Click Create Now to create the VPC.

Image description

Step 3: Create an ECS Instance

  1. Return to the Huawei Cloud console and search for ECS.
  2. Click Buy ECS.
  3. Choose the specifications for your instance and click Submit.

Image description

Image description

Image description

Image description

Image description

Image description

Step 4: Create a Security Group

  1. Click Create Security Group.
  2. Add inbound rules for ports: o 22 for SSH o 80 for HTTP o 8080 for alternative HTTP o (You can modify these rules later if needed).

Image description

Image description

Image description

Step 5: Create a Key Pair

  1. Click Create Key Pair to generate a key pair for connecting to your ECS instance.

Image description

Image description

Image description

Step 6: Retrieve the ECS Public IP and Connect via CLI

  1. Go to the ECS Console and locate your instance.
  2. Copy the Public IP address of your ECS instance.
  3. Use a CLI tool like MobaXterm, PuTTY, or any SSH client to connect to your ECS instance: o Open your SSH client. o Enter the Public IP of your ECS instance. o Use the Key Pair you created earlier for authentication. o Log in as the default user root . Image description Image description

Image description

Step 7: Install Docker on the ECS Instance

Run the following commands in your ECS instance:

for pkg in docker.io docker-doc docker-compose docker-compose-v2 podman-docker containerd runc; do sudo apt-get remove $pkg; done
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
echo \
  "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
  $(. /etc/os-release && echo "${UBUNTU_CODENAME:-$VERSION_CODENAME}") stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
Enter fullscreen mode Exit fullscreen mode

Image description

Image description

Image description

Step 8: Pull and Run Ollama Image

  1. Pull the Ollama Docker image:
docker pull ollama/ollama
Enter fullscreen mode Exit fullscreen mode

Image description

Run the Ollama container:

docker run -d -v ollama:/root/.ollama -p 11434:11434 --name ollama ollama/ollama
Enter fullscreen mode Exit fullscreen mode

Image description

Choose the DeepSeek Module:
Visit the Ollama Library and search for the DeepSeek model.
Select the model you want to use (e.g., deepseek-r1:7b).

Image description

Run the Ollama container:

docker run -d -v ollama:/root/.ollama -p 11434:11434 --name ollama ollama/ollama
Enter fullscreen mode Exit fullscreen mode

Image description

Image description

Chat with DeepSeek. Type /bye to exit.

Image description

Step 9: Set Up Open WebUI

  1. Run the Open WebUI container:
docker run -d -p 3000:8080 --add-host=host.docker.internal:host-gateway –v open-webui:/app/backend/data --name open-webui --restart always ghcr.io/open-webui/open-webui:main
Enter fullscreen mode Exit fullscreen mode

Image description

Image description

Go to the ECS page and modify the security group to add inbound rules for ports 11434 and 3000.

Image description

Image description

Image description

Image description

Step 10: Access Open WebUI

  1. Copy the Public IP of your ECS instance.
  2. Open a browser and navigate to http://:3000.
  3. Click Get Started, then create an account with your name, email, and password.

Image description

Image description

Step 11: Start Chatting

You can now chat with DeepSeek using the Open WebUI interface.

Image description

Image description

Top comments (0)