What changes with AI
- Model responses can take many seconds; Discord interactions must be acknowledged within 3 seconds and WhatsApp/Telegram webhooks should return quickly. Acknowledge first, then reply from a background task.
- API keys are your largest risk: keep them in host variables and set spend limits with the model provider.
- Defend against prompt injection when the bot can call tools. Guide.
Hosting fit
Railway is convenient for a bot plus a worker and a managed database; a Vultr VPS fits if you also run a vector database or local models on a larger plan. Serverless with a 10 ms CPU limit suits only thin proxies.
| Host | Entry price | Billing model | Server admin effort |
|---|---|---|---|
| Railway | Hobby $5/mo incl. $5 of usage; Free plan $1/mo of usage | Usage (RAM, CPU, egress) | Low |
| Vultr | $5/mo (1 GB); $3.50/mo (0.5 GB) | Fixed monthly | High |
| Fly.io | $2.19 per 30 days (256 MB) | Per machine time | Medium |
Prices verified on 2026-10-19 on the providers' official pricing pages. They change: check before you buy. Model API costs are separate and usually larger than hosting: estimate them with the LLM token estimator.
Related guides and tools
- Railway vs Vultr for bots
- PaaS vs VPS for bots
- Bot security guide
- AI APIs for chatbots
- Deploying a WhatsApp bot
Frequently asked questions
Do I need a GPU?
Not if you call a hosted model API. Only self-hosted models need GPU or large RAM.
How do I avoid webhook timeouts?
Return 200 immediately and process the model call in a queue or background task, then send the reply via the platform API.
Which AI API should I use?
See our comparison of AI APIs for chatbots.