Build an infrastructure stack for AI agents ranging from n8n automation and remote MCP servers to RAG systems and Ollama-based local models. Plan Linux or Windows, CPU or GPU, vector storage, persistent data and secure external access around the actual workload.
AI Agent Hosting is server infrastructure designed to keep the model, tools, data sources, memory, automation and API components of an AI agent running continuously. The goal is not merely to launch an LLM, but to operate services such as n8n, MCP, Ollama, PostgreSQL, Redis or Qdrant in a secure, observable and scalable architecture.
A production AI agent is rarely a single application. The agent layer receives requests and coordinates decisions, an LLM performs inference, tools or MCP servers connect to external systems, databases keep session and job state, a vector database can support RAG, and a proxy layer exposes only the required endpoints.
Server sizing should therefore be based on the whole chain rather than a model name alone. A cloud LLM can be combined with local n8n, PostgreSQL and Qdrant, while another project may run Ollama or vLLM on the same or a dedicated GPU node.
Agent infrastructure is useful for much more than chatbots. It can run automations that take actions through tools, RAG systems that answer from company data, CRM and ERP integrations, email or ticket processing agents, reporting services and custom API assistants.
The right architecture depends on the workload. A lightweight webhook agent can run on a small VPS, while local LLM inference, high concurrency or media generation can require more memory or a dedicated GPU.
Connect tickets, CRM, knowledge bases and support workflows in one agent stack.
Run webhooks, schedules, APIs, databases and LLM steps on self-hosted n8n.
Index documents in a vector database and answer from authorized internal data.
Expose tools and data sources to AI clients through a standardized integration layer.
Build your own agent backend for mobile apps, SaaS products or internal systems.
Run models with Ollama or other inference engines on suitable hardware.
The agent orchestration layer itself usually does not require a GPU. n8n, MCP servers, PostgreSQL, Redis and API services can run on CPU. GPU demand typically appears when local LLM inference, embeddings, image generation or other compute-heavy models run on the same infrastructure.
Memory requirements depend on workflow concurrency, database cache, vector indexes, model size and container count. The matrix below describes starting classes rather than fixed requirements; production sizing should be validated with the real workload.
No. If the agent uses an external LLM such as OpenAI, Gemini, Claude or another hosted API, the server mainly handles orchestration, databases and integrations. In that scenario, CPU, RAM and NVMe capacity are usually more important than a GPU.
The picture changes when the model runs locally. Ollama and similar engines can run on CPU, but larger models and lower-latency goals make GPU acceleration increasingly important. VRAM, model format, context length and concurrency should be calculated together.
Lower entry cost and fast deployment
More room for vector databases and multi-service stacks
Run the model on infrastructure you control
For Docker, reverse proxies, PostgreSQL, Redis, Qdrant, Python and Node.js-heavy stacks, Linux distributions such as Ubuntu usually provide a straightforward production environment. Containerized services and automation tools fit naturally into this model.
Windows Server can be a good choice when the workflow depends on RDP, Windows-only business software or existing Windows services. Components such as n8n and Ollama can also run on Windows; the decision should follow the surrounding ecosystem and operations model.
MCP provides a standardized way for AI applications to connect to tools and data sources. A remote MCP server can run as an independent service on the internet or a private network, allowing an agent to discover and call a controlled set of tools.
The 2026-07-28 MCP specification emphasizes a stateless protocol core designed to make reliable and horizontally scalable deployments easier. Production hosting still requires explicit authentication, authorization, TLS, logging and carefully scoped tool permissions.
The commands below are basic operational checks for a Linux agent server. They do not force a specific product stack. In production, pin image versions, manage secrets outside source code and define backups for persistent volumes.
n8n, PostgreSQL, Redis, Qdrant and custom MCP services can run in one Compose project or separate stacks. Expose only the required web entry points and keep databases and vector services on private container networks whenever possible.
sudo apt update && sudo apt upgrade -y
docker --version && docker compose version
docker compose ps
docker stats --no-stream
ss -lntp
AI agents can have broader privileges than a conventional web application: they may read files, call APIs, create records or perform actions in third-party systems. Secrets, tool permissions and network access should therefore be treated as direct security boundaries.
Ollama's local API does not require separate authentication for local access by default. Avoid exposing such internal services directly to the public internet; use private binds, reverse proxies, VPNs or access-control layers. Vector data services such as Qdrant should also use API keys, TLS and network restrictions where appropriate.
A successful first response does not mean the agent stack is production-ready. Container restart policies, health checks, disk growth, CPU/RAM trends, model latency, workflow error rates and database backups need ongoing monitoring.
As traffic grows, components can scale independently. Agent API instances can scale horizontally while PostgreSQL moves to a separate server, Qdrant receives more memory and storage, or local inference moves to a dedicated GPU node. This separation can reduce both cost and failure impact.
To avoid oversized hardware, evaluate the model, agent framework, data layer and expected traffic together. If a local model will run on the server, the exact model name and quantization format directly affect capacity planning.
Sharing the information below helps determine whether the right starting point is a VPS, VDS or dedicated GPU server.
It can physically run on a VPS, VDS or GPU server. The difference is that the agent, LLM, MCP, databases, queues, vector storage, security and 24/7 operational requirements are planned as one system.
Not when the model runs through an external LLM API in many cases. Local LLMs, media generation and heavy embedding workloads may require GPU acceleration.
Yes. n8n provides self-hosting documentation and an AI Starter Kit that demonstrates a Docker-based local AI stack.
Yes, when resource and security requirements allow it. Separate containers and private networks provide clearer isolation in production.
Prefer a reverse proxy, authentication layer, VPN or private network instead of exposing internal inference services directly.
Qdrant is a vector database for similarity and semantic search. In RAG architectures it can retrieve document chunks related to an embedding query.
Yes. n8n, Node.js, Python and Ollama can run on Windows. Linux is often simpler for Docker-centric production stacks.
There is no single value. Lightweight API agents may start with 4–8 GB, while n8n, PostgreSQL, Redis, Qdrant and local models can require substantially more.
Self-hosted workflow, database and RAG data can remain on your infrastructure. Data sent to external LLM APIs is processed under the policy of that provider.
Share the workload, model, integrations and expected traffic and the CPU/RAM/GPU, operating system and service layout can be planned accordingly.
Share the model, n8n/MCP/RAG components and expected traffic. We can help select a suitable VPS, VDS or GPU server without buying unnecessary resources.
Updated · 18.08.2026