use-apify.com
Ollama: guides & tutorials
Ollama runs open models locally with an OpenAI-compatible API—classify or redact scraped text before cloud spend, then store outputs with Apify datasets.
12 articlesPage 1 of 2
View all tags
Ollama runs open models locally behind an OpenAI-compatible API, letting you classify or redact scraped text before spending on cloud calls. These guides cover setting up Ollama and pointing data pipelines at it.
Local inference keeps sensitive data on your own hardware and cuts per-token cost at volume. Apify datasets feed Ollama for batch processing, and outputs store right back. Below you will find setup and integration tutorials.

TL;DR
- One
docker-compose.yml: Ollama + LiteLLM + Open WebUI + Authentik + PostgreSQL + Redis + Caddy
- Team logs in via SSO (Authentik OIDC); per-team budgets enforced by LiteLLM
- Runs Llama 3 70B at 40–60 tokens/sec on a Liquid Web L40S GPU server (48 GB VRAM)
- ChatGPT Team (10 users): $250/mo — this stack on L40S: ~$1,040/mo 24/7 or ~$360/mo at 8 hr/day · 5 days/wk
Every prompt your team sends to ChatGPT Team or Copilot for Microsoft 365 leaves your network and is processed on OpenAI's or Microsoft's servers. For most teams that's an acceptable trade-off. For teams handling legal documents, source code, financial data, or customer PII, it is not. This guide deploys a private ChatGPT equivalent — Llama 3 70B running on your own GPU hardware, with a ChatGPT-quality web interface, your company's SSO, and per-team usage budgets — entirely inside your infrastructure.

TL;DR
- One
docker-compose.yml: Dify (API + worker + web + sandbox) + Qdrant + Ollama + PostgreSQL + Redis + Caddy
- Measured idle RAM: ~7.4 GB (Llama 3 8B loaded, CPU inference); minimum server: 16 GB VPS
- Replaces: OpenAI Assistants API ($0.03/1k tokens) + Pinecone Starter ($70/mo) with a fully local, zero-egress alternative
- Your documents never leave the server — not during upload, not during embedding, not during inference
Retrieval-Augmented Generation (RAG) lets you ask questions against a private document corpus and get answers grounded in the actual content. The dominant hosted pattern — OpenAI Assistants + Pinecone — works, but every document chunk and every query travels to OpenAI's servers. For legal contracts, internal knowledge bases, or any non-public data, that is a compliance liability.
This guide deploys a fully self-hosted RAG stack: Dify as the orchestration and document management layer, Qdrant as the vector database, and Ollama serving both the embedding model and the chat LLM — all on a single Liquid Web VPS.

Cloud API costs scale linearly with usage. Self-hosting Ollama + n8n + Coolify on a $20/month VPS removes per-token fees for local Ollama inference — you still pay for the VPS, bandwidth, and your time; throughput is limited by CPU/RAM. When workflows call Apify, email, or other SaaS APIs, data transits those providers — not only your server.
This guide covers the complete setup from bare VPS to production-ready AI pipeline, with official documentation links for every step.
TL;DR:
| Component | Role | Official docs |
|---|
| Coolify | Infrastructure manager (replaces Heroku/Vercel for self-hosting) | coolify.io/docs |
| Ollama | Local LLM inference (Llama 3.1, Mistral, DeepSeek) | ollama.com |
| n8n | Workflow orchestration (visual automation) | docs.n8n.io |
| Qdrant | Vector database for AI memory/RAG (Retrieval-Augmented Generation) | qdrant.tech/documentation |
| PostgreSQL | Structured data storage | postgresql.org |
Prerequisites:
- A VPS with 4+ CPU cores, 8+ GB RAM, 80+ GB SSD ($16–$25/month range). Minimum 8 GB RAM required for running Llama 3.1 8B comfortably alongside n8n.
- A domain name pointed to the VPS IP
- Basic terminal/SSH knowledge
- 30–60 minutes of setup time

The n8n + Dify + Ollama stack is a common 2026 self-hosted pattern for teams that want open-source control over automation, LLM apps, and where models run: n8n runs event-driven workflows across SaaS and APIs; Dify ships LLM apps, agents, and knowledge bases; Ollama exposes a local OpenAI-compatible inference API on your hardware. None fully replaces the others, but teams often blur which layer owns which job.
This article maps each tool’s role, where capabilities overlap, how they compose into one architecture versus compete for the same budget and headcount, and a practical deployment roadmap you can adapt from a laptop toward production.
For how agent runtimes, MCP, and infra headlines affect wiring choices like these, see Top 10 AI and tech stories this week (March 17–24, 2026).

OpenClaw is a multi-platform AI assistant — web UI, API, Telegram, Discord, Slack, and more — all fronting a single LLM backend. Connect it to Ollama and your local model becomes usable everywhere: from your phone via Telegram, from code via API, from the web dashboard. No data leaves your machine. This guide covers setup, config, use cases, and connecting multiple backends (Ollama + Anthropic + OpenAI) on a Liquid Web VPS.