Skip to content
Black FridayCode BLACK150: 150% on your first deposit of $100 or more, up to $500 bonus. New accounts, until 1 Dec, 00:00 UTC.Get the code
LiteKeep
Sign inDeploy a server

Guide, 2026

Self-hosted AI agents. Pick the right one, then give it a server that never sleeps.

“Best self-hosted AI agent” lists rarely say which licence lets you sell it, which ones are archived, or what the project itself says about memory. Here’s each of those, from the projects’ own docs.

  • 11 min read
  • 5 chapters
  • Updated

Self-hosted agents, and the server each needs

  • OpenClawChat apps, MIT2 GB
  • n8nWorkflows, own-use licenceLite 2
  • DifyVisual apps, stated minimum4 GiB

RAM as each project states it, where it states one.

Run your agent on a Lite 2

$4

  • OpenClaw
  • Hermes Agent
  • n8n
  • Dify
  • Langflow
  • CrewAI

2 vCPU, 2 GB, 40 GB NVMe. Billed by the hour, paid in crypto.

The short answer

Pick by what you want the agent to do. An assistant you message from Telegram or WhatsApp: OpenClaw or Hermes Agent. Automations across your apps: n8n. Chatbots and document search built visually: Dify or Langflow. Agents in your own Python code: CrewAI or LangGraph.

Most of them run on a 2 GB server when the model is a hosted API; Dify asks for 4 GiB. Running the model on the same server is what needs real memory: 16 GB for an 8B model on CPU.

A self-hosted agent is software on your own server that takes a goal, calls a model, and uses tools: your inbox, your files, an API, a browser. It runs while you sleep, and your data and keys stay on a machine you control.

The choice that matters most isn’t the framework. It’s where the model runs, because that decides the size of the server and the size of the bill.

In this guide you’ll learn

  • A picker that names the platform and the server
  • Ten platforms compared on licence, memory and login
  • Sizing: hosted model or local model
  • Security before you open it to the internet
  • Running 24/7, and knowing when it stops

Chapter 1

Which agent should you self-host?

Say what you want it to do, where the model runs, and whether you’ll sell it to others. That last one rules some platforms out by licence.

What you want

Your pick

OpenClaw on a Lite 2

An always-on assistant you talk to in Telegram, WhatsApp, Discord and other chat apps. Licence: MIT. Also look at Hermes Agent.

Deploy a Lite 2

Chapter 2

Ten self-hosted agent platforms, compared

Every figure below is what the project itself publishes. Where it publishes nothing, the table says so instead of guessing.

Self-hosted agent platforms, from each project's own docs, November 2026
PlatformBest forLicenceMemory it statesLogin out of the box
OpenClawAn assistant in your chat appsMIT1 GB minimum, 2 GB+ recommendedGateway listens on the server only
Hermes AgentAn assistant in your chat appsMITNone statedChat users denied until allowlisted
n8nWorkflow automation with an AI Agent nodeSustainable Use LicenseNone statedOwner account on first visit
DifyChatbots, agents and document searchDify Open Source License2 cores, 4 GiBAdmin set up at /install
LangflowVisual flows served as an APIMIT2 GB minimum, 4 GB recommendedRequired in official Docker images
CrewAITeams of agents in PythonMITNone statedNo interface: a library
LangGraphStateful agents in PythonMITNone statedNo interface: a library
Microsoft Agent FrameworkAgents in Python or .NETMITNone statedNo interface: a library
Open WebUIA private ChatGPT for you or a teamOpen WebUI LicenseNone statedFirst account becomes admin
AnythingLLMPrivate chat with documents and agentsMIT2 GB and 2 cores with AVX2, recommendedMulti-user mode optional

The licences, in plain words. MIT lets you do almost anything, including selling a service built on it. n8n’s licence covers your own internal business, not selling n8n itself as a service. Dify’s bars a multi-tenant service and removing its logo without permission. Open WebUI’s keeps its branding once you pass 50 users.

Chapter 3

What server does an AI agent need?

An agent calling a hosted model is light: the server holds the agent, its memory and its tools, and the thinking happens at the model provider. An agent with its own model on the same server is heavy.

Sizing an agent server
SetupWhat uses the memoryStart on
One agent, hosted modelThe agent and its toolsLite 2: 2 vCPU, 2 GB, $4 a month
Several agents, a database, or Dify and LangflowSeveral services side by sideLite 6: 6 GB, $8 a month
A local model for the agentThe model, loaded in RAMLite 16: 16 GB, $20 a month

With a hosted model, the model bill is separate and usually the bigger number: you pay the provider per token. Our agent cost calculator prices both. With a local model there’s no token bill, but answers on CPU are slower; see private AI server for what fits.

Chapter 4

Secure it before you open it

Several of these platforms make the first person who opens them the admin. On a fresh public server, that should be you, and quickly.

  1. Claim the admin account firstHow to check: Open WebUI makes the first account the administrator, n8n creates its owner on first visit, and Dify sets its admin at /install. Do it the moment the app is up.
  2. Keep dashboards off the open internetHow to check: Bind them to 127.0.0.1 and reach them over an SSH tunnel, or put HTTPS and a login in front. OpenClaw keeps its gateway on the server by default; run openclaw security audit after changes.
  3. Allowlist who can talk to itHow to check: A chat agent answers anyone who finds it unless you limit it. Hermes Agent, for one, denies every chat user until you allowlist them.
  4. Keep keys out of the codeHow to check: API keys go in an environment file only the agent’s user can read (chmod 600), never in a repository.
  5. Treat incoming messages as untrustedHow to check: Anyone who can message the agent can try to steer it. Give it only the tools it needs, and no production passwords.
  6. Separate what must not mixHow to check: One OpenClaw gateway runs several agents; its docs suggest separate servers only when agents must be strictly isolated.

The server underneath needs the basics too: a firewall and fail2ban, and key-only SSH.

Chapter 5

Run your agent 24/7

“Always on” means it comes back after a crash or a reboot, and you find out when it doesn’t.

  1. Restart on failureHow to check: Docker apps: restart: unless-stopped in the compose file. Native installs: a systemd service with Restart=always. OpenClaw sets this up with openclaw onboard --install-daemon.
  2. Pin versionsHow to check: Use a version tag, not latest, so an update never changes your agent overnight. Update on purpose, after reading the release notes.
  3. A heartbeat from outsideHow to check: A free uptime monitor that checks a URL or receives a ping every few minutes tells you when the agent stops, before your users do.
  4. Back up its memoryHow to check: The agent’s data folder holds its history, settings and often an encryption key. Back it up with the database.

Now it’s your move

Pick the agent by the job, check its licence if you’ll sell it, and size the server by where the model runs. Then claim the admin account before anyone else does.

Start on a Lite 2, or go straight to OpenClaw or n8n in one click. Coding agents? See Claude Code on a VPS. Giving agents your own tools? Host an MCP server.