An accounting office in Muscat wants to summarise client contracts and draft letters with an AI model, but it does not want those contracts uploaded to a foreign service that keeps them under its own terms, and it does not want a bill that grows with every page. The answer is to run the model on your own server. Two open-source tools make that practical: Ollama, which downloads models and runs them, and Open WebUI, a chat interface in the browser that looks and feels like the services you know. This guide explains why you would host your own AI, which models fit how much memory on a server with no graphics card, what quantisation means, how to install both tools and secure the web interface, and what speed to expect on a processor alone.
01Why run AI on your own server
Cloud AI services are convenient, but every prompt you send leaves your hands. Running a model yourself changes three things:
- Privacy: Prompts, uploaded files and answers stay on a server you control. Nothing is sent to a model provider, and nothing is used to train someone else’s model.
- Predictable cost: Cloud APIs charge per , so a busy month costs more. Your own server costs the same every month however much your team writes.
- No external limits: No message caps, no account bans and no change of terms overnight. You pick the model, the version and when to update.
The trade-off is honest: open models that fit on a modest server are smaller than the flagship cloud models, and a processor without a graphics card is slower. For summarising, drafting, translating, classifying text and answering questions about your own documents, a small model is often enough. For long, complex reasoning, the large cloud models remain ahead.
| Cloud AI service | Your own server | |
|---|---|---|
| Where your data goes | To the provider’s servers | Nowhere beyond your server |
| Cost | Per token or per seat, grows with use | A fixed monthly server price |
| Model size | The largest models | Small and medium open models |
| Speed on CPU | Fast | Steady but slower |
| Control | The provider’s terms | Yours: model, version, users |
02How Ollama and Open WebUI fit together
Ollama is the engine. It downloads open models from its library, loads them into memory and answers requests through an API on port 11434. It runs as a system service, chooses the right build for your processor, and uses a graphics card if one exists or falls back to the CPU if not.
Open WebUI is the front end. It talks to Ollama’s API and gives your team a chat page in the browser: conversation history, user accounts with roles, a model picker, and document upload, so you can ask questions about a PDF or a set of files. The two run side by side on the same server; Ollama never needs to be reachable from outside, only Open WebUI does, through a domain with HTTPS.
Two numbers come up everywhere in this guide. A token is a piece of a word: models read and write tokens, and speed is measured in tokens per second. The is how many tokens the model holds in mind at once: your question, the conversation so far and any document you attach. Ollama’s default context is 4,096 tokens, and a larger context costs more memory.
03Which model fits how much memory
On a server without a graphics card, the whole model sits in system RAM, so memory decides what you can run. A practical rule: a model needs about its download size in memory, plus 1 to 2 GB for the context, the system and Open WebUI. These are the default tags in Ollama’s library for three popular model families, with their download sizes:
| Model | Parameters | Download size | Server memory we suggest |
|---|---|---|---|
| gemma3:1b | 1 billion | 806 MB | 4 GB |
| llama3.2:3b | 3 billion | 2.0 GB | 8 GB |
| qwen3:4b | 4 billion | 2.5 GB | 8 GB |
| gemma3:4b | 4 billion | 3.4 GB | 8 GB |
| qwen3:8b | 8 billion | 5.2 GB | 12 GB |
| gemma3:12b | 12 billion | 8.2 GB | 16 GB |
| qwen3:14b | 14 billion | 9.3 GB | 16–24 GB |
The last column is our estimate with headroom, not a hard limit: an 8B model can load in 8 GB, but with Open WebUI and the system beside it the margin is thin, and a long document can push it over. Download size also matters for the disk: keep room for two or three models, as each one you pull stays on disk until you remove it.
For Arabic, test before you decide. Qwen3 is described as supporting more than 100 languages and dialects, and Gemma 3 more than 140. Llama 3.2 officially supports eight languages that do not include Arabic, though it was trained on more. Ask each candidate the same three questions from your real work, in Arabic, and keep the one whose answers you would actually send.
04Quantisation in plain words
A model is billions of numbers, called weights. Trained models store each weight in 16 bits. stores them in fewer bits, such as 8 or 4, so the file shrinks and the model needs less memory and runs faster, at the cost of a small loss of precision. Ollama’s library shows the effect clearly on Qwen3 8B:
| Tag | Bits per weight | Size |
|---|---|---|
| qwen3:8b-fp16 | 16 | 16 GB |
| qwen3:8b-q8_0 | 8 | 8.9 GB |
| qwen3:8b-q4_K_M | About 4 | 5.2 GB |
The plain tag qwen3:8b points to the same file as q4_K_M, so when you pull a model by name you usually get a 4-bit build. For chat, summaries and drafts, the quality loss at 4 bits is small, and as a general rule a larger model at 4 bits does better than a smaller one at 16 bits in the same memory. Below 4 bits, the loss becomes noticeable. Models come in the format, which carries the weights and their quantisation in one file, and Ollama handles it for you.
Quantisation also explains speed on a CPU. To write each token, the processor reads the whole model from memory, so memory bandwidth sets the pace: a file half the size is read about twice as fast. That is why 4-bit models are the right default on a server without a graphics card.
05Install Ollama
These steps work on Ubuntu 24.04, Debian 12 and AlmaLinux 9. Connect to the server over SSH as a user with sudo, then run Ollama’s official install script. It creates an ollama user and a system service, and the service starts on its own:
# Ubuntu and Debian: make sure curl is there (on AlmaLinux: sudo dnf install curl)sudo apt update && sudo apt install -y curlcurl -fsSL https://ollama.com/install.sh | sh# Check the service and the address it listens onsystemctl status ollamass -ltnp | grep 11434
The last command should show 127.0.0.1:11434: by default Ollama listens on the server itself only, and that is how it should stay. Its API asks for no password, so anyone who can reach port 11434 can use your models and your processor. Never change OLLAMA_HOST to 0.0.0.0 on a public server.
Now pull a model and try it in the terminal. The --verbose option prints the speed at the end of each answer:
ollama pull qwen3:4bollama run qwen3:4b --verbose# Type a question, read the "eval rate" line, then /bye to leave# Which models are loaded, and on what (100% CPU means system memory)ollama ps# The models on disk, and how to remove oneollama listollama rm gemma3:12b
Models are stored in /usr/share/ollama/.ollama/models. To change a setting, such as how long a model stays loaded, run sudo systemctl edit ollama and add Environment lines under [Service], then restart the service.
06Install Open WebUI
Open WebUI is easiest to run in Docker. Install Docker Engine from Docker’s own repository, not from snap; Docker says its quick convenience script is meant for test machines, not production:
# Ubuntu (on Debian, replace ubuntu with debian in both URLs)sudo apt install -y ca-certificates curlsudo install -m 0755 -d /etc/apt/keyringssudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.ascsudo chmod a+r /etc/apt/keyrings/docker.ascsudo tee /etc/apt/sources.list.d/docker.sources <<EOFTypes: debURIs: https://download.docker.com/linux/ubuntuSuites: $(. /etc/os-release && echo "${UBUNTU_CODENAME:-$VERSION_CODENAME}")Components: stableArchitectures: $(dpkg --print-architecture)Signed-By: /etc/apt/keyrings/docker.ascEOFsudo apt updatesudo apt install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin# AlmaLinux 9sudo dnf -y install dnf-plugins-coresudo dnf config-manager --add-repo https://download.docker.com/linux/rhel/docker-ce.reposudo dnf -y install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-pluginsudo systemctl enable --now docker
Since Ollama listens on 127.0.0.1 only, run Open WebUI on the host’s network so it can reach Ollama there, and tell Open WebUI to listen on 127.0.0.1 too, on port 3000. That way neither service is open to the internet, and only the web server you add in the next section is. Create a folder with two files:
# A long random key that signs logins; keep it, or everyone is logged out when the container is recreatedmkdir -p ~/open-webui && cd ~/open-webuiecho "WEBUI_SECRET_KEY=$(openssl rand -base64 32)" > .envchmod 600 .env# compose.yamlservices: open-webui: image: ghcr.io/open-webui/open-webui:main container_name: open-webui network_mode: host restart: always environment: HOST: 127.0.0.1 PORT: 3000 OLLAMA_BASE_URL: http://127.0.0.1:11434 WEBUI_SECRET_KEY: ${WEBUI_SECRET_KEY} volumes: - open-webui:/app/backend/datavolumes: open-webui:
Start it with sudo docker compose up -d, and follow its first start with sudo docker compose logs -f. Before the domain is ready, you can open it safely through an SSH tunnel from your computer: run ssh -L 3000:127.0.0.1:3000 followed by your user and server address, then open http://localhost:3000 in your browser.
07Secure the web interface
Open WebUI does not handle HTTPS itself, so put a web server in front of it as a . Point a subdomain at the server with an A record, such as chat.mahaseb-muscat.com, then install Nginx and Certbot and give Open WebUI its own site. The Upgrade lines matter: Open WebUI streams answers over WebSocket, and without them replies stall or never appear:
# Ubuntu and Debiansudo apt install -y nginx certbot python3-certbot-nginx# /etc/nginx/sites-available/open-webuiserver { listen 80; server_name chat.mahaseb-muscat.com; client_max_body_size 50M; location / { proxy_pass http://127.0.0.1:3000; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_buffering off; proxy_read_timeout 300s; }}sudo ln -s /etc/nginx/sites-available/open-webui /etc/nginx/sites-enabled/sudo nginx -t && sudo systemctl reload nginxsudo certbot --nginx -d chat.mahaseb-muscat.com
Certbot obtains a free certificate, adds the HTTPS part of the site and renews it on its own. Then close everything except SSH and the web:
sudo ufw allow OpenSSHsudo ufw allow "Nginx Full"sudo ufw enablesudo ufw status
Now that the site is on HTTPS, add these lines under environment in compose.yaml, then run sudo docker compose up -d again so the container is recreated with them:
WEBUI_SESSION_COOKIE_SECURE: "true" CORS_ALLOW_ORIGIN: https://chat.mahaseb-muscat.com
And a few rules inside the interface itself:
- Keep sign-ups closed: Sign-up closes on its own after the first account. If you open it for your team, new accounts wait as Pending until you approve them in the Admin Panel, so approve only people you know, then close it again.
- Give each person an account: Shared passwords hide who did what. With separate accounts you can remove one person without changing everyone’s login.
- Choose which models users see: From the admin settings, make only the models you have tested visible, so no one loads a model too large for the server’s memory.
- Update both tools: Re-run Ollama’s install script to update it, and run sudo docker compose pull then sudo docker compose up -d for Open WebUI. Your chats and accounts stay in the open-webui volume.
08Realistic speed on a processor
On a server without a graphics card, set your expectations by two numbers. The first is how fast the model writes, in tokens per second, which ollama run --verbose prints as eval rate. A 3–4B model at 4 bits on a few modern cores usually writes at about reading pace; an 8B model is noticeably slower; a 14B model works, but you will wait for long answers. The second is how fast it reads your prompt, shown as prompt eval rate: a long document attached to a question must be read in full before the first word of the answer appears.
Measure on your own server with your own prompts, as numbers vary with the model, the processor and the length of the context. And plan for these facts:
- The first message is slow: Ollama keeps a model in memory for 5 minutes after the last request, then unloads it. The next request waits while it loads again. For a team that works all day, set OLLAMA_KEEP_ALIVE to a longer period, such as 1h, in the service settings.
- One model at a time: Two models loaded together share the same memory and processor. On a small server, keep the team on one model.
- Users take turns: On a CPU, requests that arrive together wait for each other. A server like this suits a small team, not a public service with many visitors.
- Context costs memory and time: Raising the context window lets the model read longer documents, but takes more memory and slows the start of every answer. Raise it only when you need to.
The tasks that suit a server like this are the ones where a short wait is fine: summarising a contract, drafting a reply, translating a paragraph, sorting messages, answering questions from your own policies. If you need instant answers for many people at once, you need a graphics card or a much larger server.
- ProblemOpen WebUI opens but shows no models
- FixCheck that Ollama is running with systemctl status ollama, that you have pulled at least one model, and that OLLAMA_BASE_URL is http://127.0.0.1:11434 with network_mode: host.
- ProblemThe answer starts, then stops or never appears through the domain
- FixThe Nginx site lacks the Upgrade and Connection lines for WebSocket, or proxy_buffering is still on. Add them and reload Nginx.
- ProblemThe model stops suddenly, and dmesg shows Out of memory
- FixThe model plus its context does not fit in RAM. Use a smaller model or a lower quantisation, lower the context, or move to a server with more memory.
- ProblemEveryone is logged out after an update
- FixWEBUI_SECRET_KEY changed when the container was recreated. Keep it in the .env file and never regenerate it.
- ProblemThe first reply of the morning takes much longer than the rest
- FixThe model was unloaded after 5 minutes idle. Raise OLLAMA_KEEP_ALIVE in the Ollama service.
09Ollama and Open WebUI ready on CoreVPS
Everything above takes about an hour on a clean server. On CoreVPS you can skip it: Ollama + Open WebUI is one of nearly 100 ready apps you pick when you order. Choose your operating system, then open «Preinstalled software» on the order form; the list shows only the apps that support that system and fit the plan you chose. After the server is delivered, the install runs on its own, and you receive an email with the app’s address and the login details or the setup steps.
The order form starts this app at the VPS Max plan: 8 GB of memory, 4 vCPU on AMD EPYC processors and 75 GB of NVMe, at $17 a month. That is the right size for 3–4B models such as qwen3:4b and gemma3:4b, with room for Open WebUI and a small team. If you want 8B models with a comfortable margin, VPS Ultra adds 12 GB and 6 vCPU for $25 a month, and the CoreVPS builder goes up to 32 vCPU and 64 GB of memory if your models grow. The current plans run in our Germany data centre.
Once the email arrives, sign in and create the administrator account first, then follow the security section above: a domain with HTTPS, a firewall and closed sign-ups. And if you are unsure which plan suits your model or your team, ask our support team.




