AI & LLM Tools

Private LLM Interface: Setup, Costs & When to Self-Host

J
James Eriksson
··14 min read
Build a private LLM interface with Open WebUI and Ollama. Compare self-hosted ($2,600) vs managed Opsily ($1,800) over 3 years. Get step-by-step setup.
TL;DR
  • Open WebUI (153K GitHub stars) connects to Ollama to run private language models with zero API calls or cloud dependency
  • Self-hosting costs $2,600-4,400 over 3 years; managed hosting (Opsily) runs $1,800-4,800 over 3 years plus zero DevOps overhead
  • Use private LLMs for regulated data, high-volume queries (200+/day), and offline operation; stick with ChatGPT API for sporadic use and non-sensitive data
  • Hybrid is common: private LLM for internal RAG and sensitive analysis, ChatGPT API for customer-facing features

A private LLM interface gives you control over your AI infrastructure while keeping all data on your servers. Open WebUI is the fastest way to get started, connecting to Ollama or other inference engines. This guide walks you through setup, costs, and when to self-host versus use a managed service like Opsily.

Why Run a Private LLM Interface?

Most businesses default to ChatGPT or Claude via API. Those are simple. But they come with tradeoffs.

Every query goes to a third-party server. Your prompts, documents, and customer data leave your infrastructure. If you process sensitive information, handle regulated data, or just don't want to pay per-token forever, a private interface changes the math.

A private LLM stays on your hardware. Your data never touches OpenAI, Anthropic, or any cloud provider's servers. You choose which model runs. You control the costs. You avoid vendor lock-in.

This matters for:

  • Regulated industries (healthcare, finance, legal): compliance officers want data on your servers, not someone else's.
  • High-volume workloads: API pricing scales fast. Beyond a few thousand tokens daily, self-hosting becomes cheaper.
  • Custom data: if you're running RAG (retrieval-augmented generation) on proprietary documents, keeping embeddings local is essential.
  • Offline operation: no internet? No problem. A local LLM works without connectivity.
  • Avoiding dependency: don't want your business logic tied to a vendor's API changes, rate limits, or pricing increases.

The downside: you trade convenience for responsibility. Running your own infrastructure means managing updates, scaling hardware, and ensuring uptime.

What is a Private LLM Interface?

A private LLM interface is two things working together: a model inference engine and a web UI.

The inference engine (like Ollama) handles the AI work. It loads a language model (Llama, Mistral, DeepSeek, etc.) and processes your text. The web UI (like Open WebUI) gives you a chat interface to talk to that engine. For a detailed comparison of Open WebUI against other interfaces like AnythingLLM and LibreChat, see our guide to the best open-source LLM interfaces.

Open WebUI has 153,100 GitHub stars, 22,400 forks, and 18,717 commits. It's actively developed and integrates with multiple inference engines. It supports document upload, conversation history, custom models, and team collaboration. Most importantly, it runs anywhere: your laptop, a Linux server, a container in your data center, or a managed cloud instance.

The core stack:

  • Inference engine: Ollama (easiest), vLLM, LocalAI, or Text Generation WebUI.
  • Web UI: Open WebUI, LibreChat, or AnythingLLM.
  • Models: Open-source weights from Hugging Face. Llama 3.1 (70B), Mistral 7B, DeepSeek, Phi—all free to run locally.
  • Hardware: a GPU helps. CPU-only is possible but slow. An RTX 4060 ($200-300) handles 7B models fine. Larger models (70B) need more VRAM.

You decide what infrastructure this lives on: your laptop for testing, a home server, a dedicated GPU box in a data center, or a rented instance from a cloud provider.

Setting Up Open WebUI + Ollama: A Step-by-Step Guide

This is the fastest path to a working private LLM. Expect 15-30 minutes if you have Docker. If you don't have Docker, expect 45 minutes for installation plus setup.

Prerequisites

You'll need:

  • A machine with 8 GB RAM minimum (16 GB recommended)
  • A GPU is optional but strongly recommended (any NVIDIA GPU with 4 GB VRAM works for 7B models)
  • Docker installed (or the ability to install it)
  • About 30 minutes of time

Step 1: Install Ollama

Go to ollama.ai and download Ollama for your OS (Mac, Linux, or Windows). The installation is straightforward—click through the installer and let it finish.

Open a terminal. Run:

ollama run llama3.1

The first time, Ollama downloads the model. For Llama 3.1 7B, expect a 4.7 GB download. Depending on your internet speed, this takes 2-10 minutes. Once it finishes, you'll see a prompt. Type a message. The model responds. Press Ctrl+D to exit.

Ollama now runs in the background on localhost:11434. You've just set up an inference server that works offline. All your queries stay on your machine.

Step 2: Start Open WebUI

In a new terminal, run:

docker run -d -p 8080:8080 --name open-webui ghcr.io/open-webui/open-webui:latest

This pulls the latest Open WebUI image and starts it as a background container. The -p 8080:8080 flag maps port 8080 on your machine to port 8080 in the container. Wait 30 seconds for the container to initialize.

Step 3: Connect the Two

Open your browser to localhost:8080. You'll see a sign-up page. Create an account with any email address (this is local, not cloud-based). Confirm your email.

Once logged in, click the gear icon (settings) in the top right. Navigate to "Admin" and then "Connections" (or "Models" depending on your version). Add a new connection:

  • Name: Ollama
  • Base URL: Use the appropriate address for your operating system:

For Mac or Windows (Docker Desktop):

http://host.docker.internal:11434

For Linux:

http://localhost:11434

Open WebUI now discovers all models running on Ollama. You should see Llama 3.1 listed. Click it, type a message, and watch it respond. You're now using a fully private LLM interface.

Step 4 (Optional): Swap or Add Models

Want to try a different model? In your Ollama terminal, run:

ollama run mistral

Ollama pulls Mistral 7B (4.1 GB, 2-3 minutes). Open WebUI automatically detects it. No restart needed. You can now chat with either Llama or Mistral from the same interface.

Other popular open-source models to try:

  • ollama run deepseek-coder for code-focused tasks
  • ollama run neural-chat for fast responses
  • ollama run openhermes-2.5 for reasoning tasks

All are free. All run offline.

Step 5 (Optional): Enable RAG (Document Upload)

Open WebUI has a "Documents" tab. Click it and upload a PDF or text file. Open WebUI creates vector embeddings of your document and stores them locally in a SQLite database (or PostgreSQL if you prefer). For more on using RAG with Open WebUI, see the RAG guide. When you chat, you can reference your documents:

"Based on my employee handbook PDF, how do I request time off?"

Open WebUI retrieves relevant sections and includes them in the context sent to the LLM. Your proprietary documents never leave your machine.

Step 6: Share Across Your Network (Optional)

Deployed on a server in your office? Replace localhost with your server's IP address. Your team members can access Open WebUI at the server IP on port 8080. For a complete walkthrough on setting up Open WebUI in your own hardware environment, see the self-hosted setup guide. Each person signs up with their own account. Open WebUI logs every conversation.

Troubleshooting

"Connection refused" error: Ollama isn't running. Go back to your Ollama terminal and re-run ollama run llama3.1.

"Slow responses" (15+ seconds): You're running on CPU. Invest in a GPU or use a smaller model (ollama run phi-2 is tiny and fast).

"Out of memory" error: Your model is too large for your GPU or RAM. Try a smaller variant: ollama run llama2-7b instead of ollama run llama2-70b.

Deployment Options and Real Costs

The location you run Open WebUI determines your cost, reliability, and operational headache. Let's break down the options.

Option 1: Your Laptop (Testing Only)

Setup: Install Ollama and Open WebUI via Docker Desktop. Hardware: Your existing MacBook or Windows machine. Cost: $0 (electricity is negligible). Setup time: 15 minutes. Best for: Experimenting, small proof-of-concepts, or understanding how private LLMs work. Tradeoff: Slow for big models. Not accessible remotely without a VPN. If you close your laptop, the service stops. Not reliable for production. Annual cost over 3 years: $0

Option 2: Home Server or Synology NAS

Setup: Buy a used GPU server or add a GPU to a NAS. Run Ollama + Open WebUI in Docker. Hardware: Used RTX 4060 or 4070 ($300-600). Server case, power supply, cooler ($300). Or a Synology NAS with GPU support (~$400-800). Cost: $50-150/year electricity. Assume 200W constant draw: 200W * 8,760 hours * $0.12/kWh = ~$210/year. Over 3 years, ~$630. Setup time: 2-4 hours (installing OS, NVIDIA drivers, Docker, configuring networking). Best for: Small teams (3-10 people), privacy-sensitive work, predictable workloads. Tradeoff: Uptime depends on your home network. No built-in redundancy. If the server fails, it's down until you fix it. Scaling means buying another server. Annual cost over 3 years: $2,000 (hardware) + $630 (electricity) = $2,630

Option 3: On-Premise Data Center

Setup: Lease space in a local data center. Install a dedicated GPU server. Set up networking and monitoring. Hardware: Enterprise-grade GPU server ($5,000-15,000). Or rent a single GPU server in your data center ($500-1,500/month). Cost: $500-2,000/month for colocation, power, and bandwidth. Plus 4-8 hours/month of IT time to manage updates, backups, and monitoring. Setup time: 1-2 days (procurement, transport, rack setup, networking). Best for: Larger teams (20-100 people), high-volume workloads, strict data residency (data must stay within your country). Tradeoff: You own the hardware and uptime. Scaling is expensive. Requires an IT team or contractor. Redundancy (backup server, failover) adds cost. Annual cost over 3 years: $36,000 (colocation) + $12,000 (admin time @ $50/hr) = $48,000

Option 4: Managed Cloud Instance (Opsily, AWS, DigitalOcean)

Setup: Click a button. Opsily deploys Open WebUI on its infrastructure in 2 minutes. Hardware: Rented GPU instance, automatically scaled. Cost: $150-400/month depending on model size (7B vs. 70B). Opsily offers EU data centers specifically. Setup time: 5 minutes. No Docker, no Linux, no credentials to manage. Best for: Growing teams (10-50 people), no DevOps bandwidth, GDPR/EU compliance requirements. Tradeoff: You pay whether you use it or not. Your infrastructure lives on a third-party server. No long-term hardware investment. Annual cost over 3 years: $1,800-4,800 ($150-400/month * 12 * 3 years)

Real-World Cost Comparison: Handling 500 Daily Queries

Assume you want to run a 13B model (Mistral 13B or Llama 2 13B) to handle 500 queries per day for a 10-person team.

Home Server (self-hosted): Initial: GPU ($500) + Server ($300) + Setup time ($1,500 at $50/hr) = $2,300. Annual: Electricity ($210) + Maintenance/updates ($500 for 5 hours) = $710. 3-year total: $2,300 + ($710 * 3) = $4,430

On-Premise (data center): Initial: Equipment ($8,000) + Colocation setup ($2,000) = $10,000. Annual: Colocation ($1,500) + Power ($300) + IT time ($2,000 for 40 hours) = $3,800. 3-year total: $10,000 + ($3,800 * 3) = $21,400

Managed Cloud (Opsily, mid-tier at $250/month): Annual: $250 * 12 = $3,000. 3-year total: $9,000. Zero IT time required.

ChatGPT API (high volume): 500 queries * 30 days * 1,000 tokens avg = 15M tokens/month. At $0.003/1K input tokens (GPT-3.5) = $45/month + output costs. 3-year total: ~$2,000. But you don't own the data. Every query leaves your infrastructure.

When each makes sense: Self-hosted home server if you have someone who enjoys Linux and Docker, or you're learning. On-premise if you handle regulated data (healthcare, finance), need 24/7 uptime, or want long-term cost savings at scale (100+ queries/day). Managed cloud if you need privacy without ops burden. You're willing to pay for convenience. API if your data is non-sensitive, usage is light, and you don't mind per-token costs.

Private vs. SaaS: When to Choose Each

You're making a fundamental choice: control versus convenience. Neither is universally better. The right choice depends on your constraints.

Choose Private (Self-Hosted or Managed) If:

Data sensitivity is high. HIPAA, PCI-DSS, GDPR, or other regulations require data to stay on your infrastructure. Financial records, medical data, customer PII—these don't belong on ChatGPT. A private LLM ensures compliance.

Usage is consistent and high. If your team queries the LLM 200+ times daily, API costs explode. ChatGPT API costs roughly $0.003 per 1,000 input tokens and $0.012 per 1,000 output tokens. A 500-word response at typical token rates costs $0.015-0.02. Scale that to 200 queries daily and you're at $90-120/month on API alone. A self-hosted 13B model costs $2,600 over 3 years. You break even in 3-4 months.

Customization matters. You want to fine-tune a model on proprietary data (e.g., your industry's jargon). You want to integrate the LLM API directly into your internal tools. You want to control output format, temperature, or system prompts. A private LLM gives you this flexibility.

Predictable costs matter. You want a fixed monthly bill, not surprise overage charges when usage spikes. Self-hosted equals predictable cost.

You need offline capability. No internet? No problem. A private LLM works 100% offline.

Your team has DevOps skill. Someone on staff can manage Docker, GPU drivers, and troubleshoot infrastructure. If you do, self-hosting is cheaper and more flexible.

Choose SaaS (ChatGPT, Claude API, Gemini API) If:

Data is non-sensitive. Public documents, customer-facing features, marketing copy. No compliance risk, no trade secrets. The cloud is fine.

Usage is sporadic. A few hundred queries per month. Per-token pricing beats maintaining hardware.

You lack DevOps bandwidth. No one wants to manage Docker or debug GPU driver compatibility. Managed hosting adds cost but saves 10 hours per month.

You need the latest models. OpenAI releases GPT-5 before open-source alternatives exist. If you need bleeding-edge performance, the cloud is faster.

Time-to-market is critical. You're building a proof-of-concept and need results in days, not weeks. ChatGPT API is live in 30 minutes.

Your team is very small. Fewer than 10 people, limited IT bandwidth. A managed solution is worth the premium.

The Hybrid Approach (Most Common)

Smart teams use both. ChatGPT for customer-facing features, rapid prototyping, and tasks where you don't own the output. A private LLM for internal tools, document analysis, RAG on proprietary data, and anything regulated.

This gives you speed plus control where it matters most. You're not paying API costs for high-volume internal tasks. You're not managing infrastructure for throwaway features.

Example: A legal tech company uses ChatGPT for drafting suggestions (non-sensitive) and a private Llama model for analyzing contracts (sensitive, on-prem). Best of both.

Getting Started With a Managed Private LLM

If you like the idea of a private interface but don't want to manage hardware yourself, Opsily offers Open WebUI hosting on EU-based infrastructure with GDPR compliance built in.

No Docker, no Linux, no "why isn't my GPU recognized" at 2 AM.

Visit Opsily's private LLM hosting to see pricing and launch your instance. Opsily deploys Open WebUI in minutes. You pick a model, Opsily pulls it from Hugging Face, and your interface is live. Your data stays in EU data centers (Germany, Netherlands, or your choice). Updates happen automatically.

It's not the cheapest option. But it's the fastest, and it removes the operational risk.

Frequently Asked Questions

Is there a completely private LLM?

Yes. When you run Ollama + Open WebUI locally without cloud fallbacks, every query stays on your hardware. No telemetry, no API calls, no cloud sync. Complete privacy requires you to disable any auto-update features that phone home. Open WebUI supports this.

How much VRAM do I need to run a 70B model?

At least 48 GB. A 70B model needs roughly 1 byte per parameter, plus overhead. An RTX 6000 (48 GB) works. For practical use, aim for 80 GB to avoid swapping to CPU (which is slow).

Can I share a private LLM across a team?

Yes. Deploy on a shared server and point multiple clients to the same Open WebUI instance. Built-in user accounts let you track usage per person. For RAG, each user sees only their uploaded documents (if you enable document isolation).

What's the difference between private and self-hosted?

"Self-hosted" means you run the software on your own infrastructure. "Private" means data doesn't leave your control. A self-hosted Open WebUI in the cloud (AWS/Azure) is self-hosted but not fully private if you're concerned about the cloud provider's access. For maximum privacy, self-host on-premises.

Do I need a GPU?

No, but it helps a lot. A 7B model runs on CPU in 20-40 seconds per query. With a $100 used GPU, it's 2-3 seconds. For production, a GPU pays for itself quickly in reduced latency.

What license do I need to use Open WebUI commercially?

Open WebUI switched from MIT to a custom license in late 2025. For commercial use, you'll need a license agreement. Check the Open WebUI repo for current terms.

The Bottom Line

A private LLM interface puts AI on your terms. Open WebUI is the fastest way to build one. You can run it yourself on a laptop, home server, or data center machine, or use a managed service like Opsily and skip the ops burden.

The decision hinges on one question: what's your team's time worth? If you have someone who enjoys managing infrastructure, self-hosting saves money. If every hour counts, managed hosting buys you back 10 hours per month.

Skip the infrastructure. Deploy in minutes.
Opsily manages Open WebUI on EU servers so you get privacy without DevOps.
Launch Your Private LLM

Ready to self-host your own apps?

One server. Multiple apps. No per-app fees.

Get started →