Self-Hosted Autonomous AI Agent (n8n + Ollama 3.2 3B)
Private, zero-token-fee AI agent worker that processes data 24/7
Deploy a completely self-contained AI agent on your private VPS. Incoming webhooks, RSS feeds, and customer emails are routed by n8n to a local Ollama instance running the quantized Llama 3.2 3B model. Because inference runs on the VPS CPU, you can process millions of tokens monthly without OpenAI or Anthropic API bills.
Entry-tier cloud VPS with 8 GB RAM and 75 GB NVMe for self-hosted Docker and background microservices.
🔬 Production Memory Tuning & NVMe Swap PolicyPhysical RAM SafeView kernel details
Sizing Benchmarks & Quotas
Included Stack Components
n8n Docker (Self-Hosted)
Self-hosted fair-code automation engine running in Docker with unlimited workflow runs, webhooks, and custom JS nodes.
PostgreSQL + Redis
PostgreSQL relational database with pgvector paired with in-memory Redis for session locks, caching, and BullMQ queues.
Ollama Llama 3.2 3B Q4
Compact 3-Billion parameter quantized multilingual LLM (Q4_K_M) for edge summarization, JSON schema extraction, and agent routing.
Production Architecture & Implementation Notes
Proprietary emails, documents, and database records remain on your self-hosted server without routing through external multi-tenant cloud APIs.
Llama 3.2 3B runs continuously on dedicated CPU cores, delivering predictable local inferences without token-metered surprise bills.
Redis manages async agent queues. High bursts of incoming webhooks are throttled safely so the Ollama engine never runs out of system memory.
Steady-state runtime consumes ~5.0 GB total (4.25 GB applications + 0.75 GB Ubuntu OS baseline). At 8k context, KV cache expands memory to ~5.95 GB total. Contabo Cloud VPS 10 (8GB RAM at $5.50/mo) provides safe physical headroom.
Matching Fixed-Price VPS Cloud Tiers
Filtered by safe minimum requirements: 4.88GB RAM (includes +750MB Ubuntu OS baseline).
Cloud VPS 10
Entry-tier cloud VPS with 8 GB RAM and 75 GB NVMe for self-hosted Docker and background microservices.
Cloud VPS 20
12 GB RAM configuration capable of running multiple container services and larger database buffers simultaneously.
High Frequency 8GB
High single-core CPU clock speed ideal for CPU-intensive compilation and execution.
Managed Container Alternative (Zero-DevOps)
Railway — Hobby Container
Developer-first managed PaaS with Git-to-deploy, ephemeral environments, zero server maintenance, and pay-for-what-you-use pricing.
Explore Other Cost Blueprints
Pre-configured developer stacks with modeled memory sizing and checked cloud pricing.
Self-Hosted Voice Stack vs. ElevenLabs API Cost Breakdown for AI Apps
A comprehensive developer cost comparison evaluating ElevenLabs Creator ($22/mo for 121k chars) against self-hosted open-source TTS running on a $5.50–$20 VPS.
AI SaaS Production MVP (Next.js + Postgres + ElevenLabs)
Production-ready boilerplate architecture for commercial web apps featuring Next.js App Router, PostgreSQL, and ElevenLabs Starter API.
Local Llama 3.1 8B Retrieval-Augmented Generation (RAG) Server
Heavyweight self-hosted document knowledge base and semantic search API powered by Ollama Llama 3.1 8B Q4, PostgreSQL with pgvector, and n8n.