How to deploy an AI server on your Debian/Ubuntu server
Running AI locally keeps your data private and your queries off the grid — and it's easier to set up than you think.
Mar 10th, 2026 11:00am by
Featured image by ghariza mahavira for Unsplash+.
What you’ll need
The only things you’ll need for this are a running instance of either Debian or Ubuntu Server and a user with sudo privileges.Adding your Debian user to sudo
By default, your standard user isn’t a member of the sudo group on Debian. To successfully use Docker (for deploying the WebUI), you must make this change. To add your user to the Docker group on Debian, first change to the root user with:
sudo su-
usernmod -aG docker USER
exit
Installing Ollama
Next, we’re going to install Ollama, which can be done with the command:
curl -fsSL https://ollama.com/install.sh | sh
ollama pull llama3.2
ollama run llama3.2
/bye
Configure Ollama
Next, we need to configure Ollama to accept remote connections. We’ll do this via systemd. Open the Systemd Ollama init file with:
sudo nano /etc/systemd/system/ollama.service
Environment="OLLAMA_HOST=0.0.0.0:11434"
sudo systemctl daemon-reload
sudo systemctl restart ollama
Deploying WebUI with Docker
Next, we’ll deploy WebUI, so you can interact with your LLMs via a web browser. To do that, we’re going to make use of WebUI. Before we can do that, we have to install Docker. Here are the steps for installing Docker CE: Add the necessary GPG key with the following commands:- 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 git -y
docker ps -a
docker run -d -p 3000:8080 -v open-webui:/app/backend/data --name open-webui ghcr.io/open-webui/open-webui:main
docker ps -a
Accessing WebUI
To access the WebUI instance of Docker, open a web browser and point it to http://SERVER:3000 (where SERVER is the IP address of the hosting server). You should be presented with the WebUI main page (Figure 1).
Figure 1: You’re ready to start using WebUI.
Click the right-pointing arrow at the bottom center and, in the resulting page (Figure 2), enter the required information to create an admin account.
Figure 2: Just a bit of info, and you’re ready to query.
You will then be presented with the query page. On that page, you’ll find that the LLM you pulled with Ollama isn’t available. Because of that, click the model drop-down in the upper left corner and then you’ll need to disable the OpenAI instance and then change the local address to http://SERVER:11434 (where SERVER is the IP address of your server).
You can now go to the New Chat tab and run your first query.
Congratulations, you now have a local AI instance that is accessible from any machine on your home lab LAN.
YOUTUBE.COM/THENEWSTACK
Tech moves fast, don't miss an episode. Subscribe to our YouTube
channel to stream all our podcasts, interviews, demos, and more.