VPS vs shared hosting for AI agents: what beginners should pick
You have built an AI agent, a Telegram bot or an automation, and now it needs a home on the internet. Hosting offers look similar at first glance, but they are built for very different jobs. Picking the wrong one is the most common reason a beginner's agent "works on my laptop" and nowhere else.
The short answer
- A website or a blog (WordPress, a landing page): shared hosting is fine.
- Something that must run all the time (an AI agent, a bot, n8n, a scraper, a background worker): pick a VPS, or a managed platform if you never want to touch a server.
The rest of this article explains why.
What shared hosting is built for
Shared hosting puts many customers on one server and gives each of them a folder and a control panel. It is designed around one pattern: a visitor opens a page, the server runs a short script (usually PHP), returns the page and forgets about it.
That pattern does not fit AI agents well. Typical limits you will run into:
- No long-running processes. Scripts are stopped after a short time. A bot that must stay connected to Telegram or wait for events gets killed.
- No root access. You usually cannot install system packages, run Docker, or choose your Python or Node.js version freely.
- Restricted background jobs. Cron jobs, if available, are often limited in frequency and duration.
- Limited outgoing connections and ports. Websockets, custom ports and some APIs may be blocked.
- Shared resources. Your agent competes with other customers' sites for CPU and memory.
The exact rules differ between hosts, so read your host's documentation, but the direction is the same everywhere.
What a VPS gives you
A VPS (virtual private server) is your own virtual machine with its own operating system. You get:
- Root access. Install anything: Python, Node.js, Docker, databases, headless browsers.
- Processes that run around the clock. Your agent keeps running when you close your laptop, and
systemdor Docker restarts it after crashes and reboots. - Dedicated resources. The CPU, memory and disk of your plan are yours to use.
- Your own network ports. Webhooks, websockets, APIs and dashboards all work.
What a VPS asks from you
A VPS is more freedom, and also more responsibility. Be honest with yourself about these:
- You maintain it. Security updates, firewall, SSH keys and backups are your job.
- You need basic command-line skills. Connecting over SSH, editing a file, reading logs.
- Mistakes are yours too. If you delete the wrong folder, there is no support team that restores it unless you set up backups or snapshots.
None of this is hard to learn, and step-by-step guides cover most of it. But if you do not want to learn it at all, a managed platform (often called PaaS) might suit you better.
A third option: managed platforms
Managed platforms run your code from a Git repository or a container image and handle the server for you. They are convenient, but check:
- whether the service sleeps when idle on cheaper plans (bad for bots that must answer instantly);
- how pricing grows with memory, running time and traffic;
- whether you can run the extras your agent needs, such as a database, a headless browser or a vector store.
How to decide
Answer these questions:
- Does it need to run all the time, or only when a page is opened? All the time means VPS or a managed platform.
- Do you need to install system software or Docker? Yes means VPS.
- Are you willing to learn the basics of SSH and Linux? Yes means VPS; no means a managed platform.
- Is it just a website? Shared hosting is enough.
What to check before buying a VPS
- Memory. AI agents that only call external model APIs are usually light. Running models locally, headless browsers or several services at once needs much more. Check the requirements of each tool you plan to install.
- Disk. Logs, databases, Docker images and backups add up over time. Leave room.
- Snapshots and backups. Find out whether they are included or cost extra.
- Operating system. Ubuntu LTS is the most common choice, and most guides assume it.
- Terms. Check refund rules and what happens if a payment fails.
Getting started
If you chose a VPS, the next steps are the same for almost any agent: secure SSH access, install your runtime or Docker, store secrets in an environment file, and run your agent as a service that restarts itself. Our guides on running a Telegram or AI bot 24/7 and self-hosting n8n walk through exactly that.