DEV Community

kun'kun cai
kun'kun cai

Posted on

How to Deploy a Production AI Agent Stack in Under 10 Minutes (2026 Guide)

Stop Configuring. Start Deploying.

You've seen the tutorials. Install this, configure that, debug this dependency conflict, wrestle with Docker networking, give up and go back to paying $50/month for a managed platform.

Not anymore.

This guide walks you through deploying a complete, production-ready AI agent stack in under 10 minutes. No Kubernetes. No YAML hell. No "it works on my machine."

What You'll Deploy

By the end of this guide, you'll have:

  • ✅ AI agent runtime with tool execution
  • ✅ State database (persistent agent memory)
  • ✅ Monitoring dashboard
  • ✅ Automatic SSL/HTTPS
  • ✅ Auto-updates
  • ✅ Full logging and observability

Total cost: $29 one-time + $5-20/month for hosting.

Prerequisites

You need exactly two things:

  1. A VPS — Any provider works. Recommendations:

    • Hetzner CX22: 2 vCPU, 4GB RAM, ~$5/month
    • DigitalOcean Basic Droplet: 1 vCPU, 1GB RAM, $6/month
    • IONOS VPS: 1 vCPU, 1GB RAM, ~$4/month
  2. An LLM API key — Pick one:

    • OpenRouter (multi-model): $5 minimum
    • OpenAI: Pay-as-you-go
    • Ollama (local, free): Runs on the VPS itself

Step 1: Get the Deploy Package

Grab the one-click deploy package:

👉 Get AI Agent One-Click Deploy → $29

After purchase, you'll receive a download link with everything bundled.

Step 2: Upload to Your VPS

# SSH into your VPS
ssh root@your-vps-ip

# Upload the deploy package
scp ai-agent-deploy.tar.gz root@your-vps-ip:/opt/

# Extract
cd /opt && tar xzf ai-agent-deploy.tar.gz
Enter fullscreen mode Exit fullscreen mode

Step 3: Configure Environment

cd ai-agent-deploy

# Copy the example env file
cp .env.example .env

# Edit with your settings
nano .env
Enter fullscreen mode Exit fullscreen mode

Minimum configuration:

# LLM Configuration (pick one)
OPENROUTER_API_KEY=sk-or-...
# OR for local models:
# OLLAMA_HOST=http://localhost:11434
# OLLAMA_MODEL=llama3

# Domain (optional - works with IP too)
DOMAIN=agents.yourdomain.com

# Admin password
ADMIN_PASSWORD=your-secure-password
Enter fullscreen mode Exit fullscreen mode

Step 4: Deploy

# One command. That's it.
./deploy.sh
Enter fullscreen mode Exit fullscreen mode

The deploy script handles:

  1. Docker installation (if not present)
  2. Container orchestration via Docker Compose
  3. Reverse proxy with automatic SSL (Let's Encrypt)
  4. Database initialization with migrations
  5. Monitoring setup with health checks
  6. Firewall configuration (only ports 80/443 open)

Output looks like:

[✓] Docker installed
[✓] Containers started
[✓] SSL certificate obtained
[✓] Database initialized
[✓] Monitoring active
[✓] Health check passed

🎉 AI Agent stack is LIVE at https://agents.yourdomain.com
Enter fullscreen mode Exit fullscreen mode

Step 5: Create Your First Agent

Open https://your-vps-ip (or your domain) in a browser.

# Example: A customer support agent
name: support-agent
model: openrouter/anthropic/claude-3.5-sonnet
tools:
  - database_query
  - email_sender
  - knowledge_base_search
system_prompt: |
  You are a helpful customer support agent.
  Always check the knowledge base before answering.
  Escalate to humans for billing disputes.
Enter fullscreen mode Exit fullscreen mode

Hit "Deploy" — your agent is live.

Architecture Overview

┌──────────────────────────────────────────┐
│              Nginx Reverse Proxy         │
│              (auto-SSL via Let's Encrypt)│
├──────────────────────────────────────────┤
│  Agent Runtime  │  State DB  │  Monitor  │
│  (Node.js)      │  (SQLite)  │  (Grafana)│
├──────────────────────────────────────────┤
│              Docker Compose              │
├──────────────────────────────────────────┤
│              Your VPS                    │
│              ($5-20/month)               │
└──────────────────────────────────────────┘
Enter fullscreen mode Exit fullscreen mode

Common Configurations

Using Local Models (Zero API Cost)

OLLAMA_HOST=http://ollama:11434
OLLAMA_MODEL=llama3:8b
Enter fullscreen mode Exit fullscreen mode

The deploy script automatically installs Ollama and pulls the model.

Adding Custom Tools

# Drop a Python script in the tools directory
cat > tools/my_tool.py << 'EOF'
def run(params):
    """Connect to your database, call APIs, etc."""
    result = do_something(params)
    return {"status": "success", "data": result}
EOF

# Restart to pick up new tools
docker compose restart agent-runtime
Enter fullscreen mode Exit fullscreen mode

Scaling Up

For higher traffic, bump your VPS specs:

# Upgrade Hetzner CX22 → CX32 (4 vCPU, 8GB RAM)
# Then:
docker compose down
docker compose up -d --scale agent-runtime=3
Enter fullscreen mode Exit fullscreen mode

Monitoring & Updates

The deploy includes a Grafana dashboard at https://your-ip:3000:

  • Agent execution count and latency
  • Error rates and failure reasons
  • LLM API usage and costs
  • System resource utilization

Auto-updates run weekly via cron. To update manually:

cd /opt/ai-agent-deploy
./update.sh
Enter fullscreen mode Exit fullscreen mode

Troubleshooting

Port 80/443 blocked?

# Check firewall
ufw status
# Open ports if needed
ufw allow 80/tcp && ufw allow 443/tcp
Enter fullscreen mode Exit fullscreen mode

Out of memory?

# Add swap
fallocate -l 2G /swapfile
chmod 600 /swapfile && mkswap /swapfile && swapon /swapfile
Enter fullscreen mode Exit fullscreen mode

SSL not working?

# Ensure DNS points to your VPS
dig +short yourdomain.com
# Should return your VPS IP
Enter fullscreen mode Exit fullscreen mode

The Bottom Line

Deploying AI agents doesn't require a DevOps team, a Kubernetes cluster, or a $500/month platform subscription. With the right tooling, you can go from zero to production in minutes.

👉 Get the One-Click Deploy Package → $29

Your agents. Your infrastructure. Your rules.


Questions about the deployment? Drop them in the comments — happy to help troubleshoot.

Top comments (0)