Self-Host an AI Customer Support Chatbot in Real Time with Typebot and Ollama on VPS 3
A detailed guide to deploying a real-time AI customer support chatbot using Typebot and Ollama on a VPS 3, ensuring high performance, data privacy, and full system control.
Image credit: geralt · Pixabay Content License
Self-Host an AI Customer Support Chatbot in Real Time
In today's digital landscape, businesses increasingly rely on automated, instant customer support solutions. Self-hosting an AI chatbot on a VPS 3 offers full control over data, improved performance, and reduced operational costs. This guide walks you through deploying a real-time AI customer support chatbot using Typebot combined with Ollama on a VPS 3, ensuring high security, scalability, and flexibility.
Prerequisites Before Deployment
To successfully deploy the system, you need:
- A VPS 3 instance with at least 8GB RAM and 2 CPU cores (recommended 16GB RAM for high load)
- Linux operating system (Ubuntu 22.04 or Debian 11)
- Root SSH access
- Docker and Docker Compose installed
- A domain name or public IP (optional)
Deploy Typebot and Ollama on VPS 3
We’ll use Docker to deploy both Typebot and Ollama in isolated, manageable environments.
1. Install Ollama
First, install Ollama to run internal AI models like Llama 3, Mistral, etc.
curl -fsSL https://ollama.com/install.sh | sh
After installation, start the service:
ollama serve
Download the required AI model:
ollama pull llama3
2. Deploy Typebot
We’ll use Docker Compose to launch Typebot with a backend connected to Ollama.
Create a docker-compose.yml file:
version: '3.8'
services:
typebot:
image: typebot/typebot:latest
ports:
- "3000:3000"
environment:
- TYPEBOT_DB_URL=postgresql://user:password@db:5432/typebot
- TYPEBOT_API_URL=http://localhost:3000
- TYPEBOT_OLLAMA_URL=http://ollama:11434
depends_on:
- db
- ollama
volumes:
- ./data:/app/data
ollama:
image: ollama/ollama:latest
ports:
- "11434:11434"
volumes:
- ollama_data:/root/.ollama
db:
image: postgres:14
environment:
- POSTGRES_DB=typebot
- POSTGRES_USER=user
- POSTGRES_PASSWORD=password
volumes:
- postgres_data:/var/lib/postgresql/data
volumes:
ollama_data:
postgres_data:
Run the deployment:
docker-compose up -d
Connect Typebot with Ollama
In Typebot, configure a webhook or API call to Ollama to process customer questions using the AI model.
Insert this code into the question processing step:
curl -X POST http://ollama:11434/api/generate \
-H "Content-Type: application/json" \
-d '{
"model": "llama3",
"prompt": "Question: {{question}}. Answer concisely.",
"stream": false
}'
Note: Replace http://ollama:11434 if using a custom IP or domain.
Authentication and Testing
Access http:// to open the Typebot interface.
Perform these steps to verify:
- Log in to Typebot (create a new account if needed)
- Create a simple chatbot with a sample question
- Insert a webhook or API call to Ollama
- Send a test question and check the response
Troubleshooting
- Cannot connect to Ollama: Verify Ollama is running with
ollama serveand port 11434 is open. - Docker errors: Use
docker-compose logs typebotto check error logs. - No AI response: Confirm the model is downloaded using
ollama list.
Reference Resources
- High-RAM Cloud VPS for Self-Hosted LLMs & API Gateways
- Auto-Running AI Agent for Comprehensive VPS Management and Monitoring via Telegram
- Deploy DefGuard on Cloud Server: Comprehensive WireGuard VPN Solution with 2FA and YubiKey
Assumptions: The user has basic knowledge of Docker, VPS, and networking. This guide does not cover DNS setup, SSL, or firewall configuration. Deployment steps may vary depending on Ollama and Typebot versions.
High-RAM Cloud VPS Plans Optimized for AI, Databases & Cache
Enterprise RAID 10 NVMe SSDs, CMC & FPT District 9 uplinks with Anycast Anti-DDoS and 99.99% SLA.
VPS-4E
10% VAT included
- CPU: 4 vCPU
- RAM: 8 GB
- SSD: 50 GB NVMe
