ma2tic

11 February 2026 · Matthieu MALVACHE · 5 min

Self-Hosting AI: A Practical Guide

Running AI models on your own infrastructure sounds complicated. It isn't anymore. The tools available today make it accessible: whether you care about privacy, want to control costs, or just want off external APIs, self-hosting deserves a real look.

Here are the practical options, the tools that matter, and whether it makes sense for your case.

Why self-host AI?

When data never leaves

A model running on your infrastructure, with your data, isn't a promise in a terms of service. It's physics. Data that never leaves your servers can't be accessed by anyone. It can't be used to train another model. It can't be subpoenaed from a third party.

Not a policy. Physics.

Cost economics

The math often favors self-hosting at scale.

Cloud API costs (example):

  • 0.002 €/1K tokens (typical pricing)
  • 100M tokens/month = 200 €/month
  • 2,400 €/year, every year, potentially rising

Self-hosted costs:

  • One-time hardware: 2,000-5,000 €
  • Electricity: about 50-100 €/month
  • Year 1: 2,600-6,200 €
  • Year 2 and beyond: 600-1,200 €/year

Break-even often lands within months for moderate to high usage.

Control and customization

What you get with self-hosting:

  • Full control over model versions
  • Fine-tuning for your specific needs
  • No rate limits, no usage restrictions
  • Independence from vendor price hikes or service shutdowns

The tools that matter

Three tools have become the go-to for self-hosting AI models.

Ollama

A command-line tool, lightweight and fast. One-command install, built-in API, excellent model management. The natural pick for anyone who wants to automate or integrate AI into their applications.

ollama pull llama3.2
ollama run llama3.2 "Explain quantum computing"

Runs on Linux, Mac, and Windows. No GUI: you need to be comfortable with a terminal.

LM Studio

A desktop app with a polished interface. You browse the catalog, click to download, start chatting. Cross-platform, with hardware optimization suggestions and a local API.

Great for experimenting without touching a terminal. Less suited to automation or server deployment.

Jan AI

An open-source AI assistant that runs entirely offline. Auditable code, customizable extensions. The alternative for anyone who wants a ChatGPT-like experience without any data leaving their machine.

Younger ecosystem than the other two: model selection and community are still growing.

Hardware requirements

A computer with 8 GB of RAM and a modern multi-core CPU is enough to experiment with small models (7B parameters). For practical use, aim for 16-32 GB of RAM, a 100 GB+ SSD, and if possible an NVIDIA GPU with 8 GB+ VRAM. In production, with multiple users and large models (70B+), you need 64 GB+ of RAM and a serious GPU (RTX 4090 or A100).

A GPU isn't mandatory. Modern CPUs handle small models fine. But a GPU speeds up inference 3-10x and unlocks larger models. Mac M-series chips are an excellent middle ground thanks to unified memory.

What does it cost?

Budget self-hosting

  • Used workstation: 500 €
  • RAM upgrade to 32 GB: 100 €
  • 1 TB SSD: 100 €
  • Total: 700 €
  • Electricity: about 10 €/month
  • Capability: good performance for small/medium models

Mid-range setup

  • Modern workstation/server: 1,500 €
  • 64 GB RAM: included or +200 €
  • RTX 4070 GPU: 600 €
  • Total: 2,300 €
  • Electricity: about 30 €/month
  • Capability: excellent for most use cases, handles large models

High-end production

  • Server-grade hardware: 3,000 €
  • 128 GB RAM: included
  • RTX 4090 or A100: 1,500-5,000 €
  • Total: 4,500-8,000 €
  • Electricity: about 50 €/month
  • Capability: production-ready, multiple concurrent users, largest models

Cloud API comparison

For 50M tokens/month (moderate business usage):

  • Cloud API: 100 €/month = 1,200 €/year ongoing
  • Budget self-host: 820 € year 1, 120 €/year after
  • Mid-range self-host: 2,660 € year 1, 360 €/year after
  • Break-even: 8-22 months depending on setup

When is it worth it?

Self-hosting makes sense with high volume (thousands of calls per day), privacy requirements (regulated industries, sensitive data), fine-tuning needs, or long-term usage where hardware beats ongoing API fees.

Cloud APIs stay relevant for occasional use, experimentation phases, burst workloads, or when you need the latest models before they're available for self-hosting.

Where to start?

Experiment first

Install Ollama or LM Studio on your computer, try a small model (7B parameters). Test your actual use case, measure resource consumption. Your current machine is enough for this step.

Evaluate honestly

Track your real usage for a few days. Calculate the cost comparison against cloud APIs. Do privacy benefits actually matter for your case? Can your team handle the maintenance?

Choose your path

Three options.

Stay on cloud. The use case doesn't justify self-hosting. No shame in that, it's the right tool for the right job.

Go partial. Self-host the sensitive or high-volume tasks. Keep cloud for experiments and cutting-edge models.

Go all in. Invest in proper hardware and migrate gradually.

Whatever you choose, plan time for tuning performance, documenting the setup, and setting up monitoring.

What to keep in mind

Self-hosted doesn't mean secure. Keep software updated, use strong access controls, encrypt data at rest, never expose your API without authentication. "Local" isn't synonymous with "secure."

On the practical side: start with smaller models than you think you need. A 7B model handles plenty of tasks. Factor electricity into the math, a GPU running 24/7 shows up on the bill. And plan time for updates. Models, tools, security patches need regular attention.

Ready to plug in?

Fine, I'll do it myself

If data privacy is your main driver, my article on data sovereignty goes deeper. And to understand why I favor these tools: why I choose open source AI.