Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Hosting, DNS, and MDA Integration

General Bots integrates with hosting providers, DNS services, and Mail Delivery Agents (MDA) for complete platform deployment.


Overview

A complete General Bots deployment typically includes:

ComponentPurposeProviders Supported
HostingRun BotServerAny VPS, LXC, bare metal
DNSDomain managementNamecheap, Cloudflare, Route53
MDAEmail deliveryStalwart, Postfix, external SMTP
AI/LLMLanguage modelsOpenAI, Anthropic, local models

Namecheap Integration

General Bots can automatically manage DNS records via the Namecheap API.

Configuration

Add to your bot’s config.csv:

name,value
namecheap-api-user,your-username
namecheap-api-key,stored-in-vault
namecheap-username,your-username
namecheap-client-ip,your-server-ip

Note: API key is stored in Vault, not in config.csv. Only reference it by name.

Automatic DNS Setup

When deploying a new bot instance, General Bots can:

  1. Create A record pointing to your server
  2. Create MX records for email
  3. Create TXT records for SPF/DKIM/DMARC
  4. Create CNAME for www subdomain

BASIC Keywords for DNS

' Create DNS record
DNS SET "bot.example.com", "A", server_ip

' Create MX record for email
DNS SET "example.com", "MX", "mail.example.com", 10

' Create SPF record
DNS SET "example.com", "TXT", "v=spf1 mx a ip4:" + server_ip + " -all"

' List current records
records = DNS LIST "example.com"

Supported DNS Providers

ProviderAPI SupportAuto-SSL
Namecheap✅ Full✅ Let’s Encrypt
Cloudflare✅ Full✅ Native
Route53✅ Full✅ ACM
DigitalOcean✅ Full✅ Let’s Encrypt
ManualVia configManual

Hosting Options

VPS Providers

General Bots runs on any Linux VPS:

ProviderMinimum SpecRecommended
DigitalOcean2GB RAM, 1 vCPU4GB RAM, 2 vCPU
Linode2GB RAM, 1 vCPU4GB RAM, 2 vCPU
Vultr2GB RAM, 1 vCPU4GB RAM, 2 vCPU
Hetzner2GB RAM, 2 vCPU4GB RAM, 2 vCPU
AWS EC2t3.smallt3.medium
GCPe2-smalle2-medium

LXC Container Deployment

Recommended for production isolation:

# Create container
lxc launch ubuntu:22.04 botserver

# Configure resources
lxc config set botserver limits.memory 4GB
lxc config set botserver limits.cpu 2

# Forward ports
lxc config device add botserver http proxy listen=tcp:0.0.0.0:80 connect=tcp:127.0.0.1:8080
lxc config device add botserver https proxy listen=tcp:0.0.0.0:443 connect=tcp:127.0.0.1:8443

# Set environment for Vault
lxc config set botserver environment.VAULT_ADDR="http://vault:8200"

# Deploy
lxc exec botserver -- ./botserver

Docker Deployment

version: '3.8'
services:
  botserver:
    image: generalbots/botserver:latest
    ports:
      - "8080:8080"
    environment:
      - VAULT_ADDR=http://vault:8200
    volumes:
      - ./bots:/app/bots
      - ./botserver-stack:/app/botserver-stack

MDA (Mail Delivery Agent) Integration

General Bots includes Stalwart mail server for complete email functionality.

Built-in Stalwart

Stalwart is automatically configured during bootstrap:

FeatureStatus
IMAP✅ Enabled
SMTP✅ Enabled
JMAP✅ Enabled
Spam filtering✅ SpamAssassin
Virus scanning✅ ClamAV
DKIM signing✅ Auto-configured

Email Configuration

In config.csv:

name,value
email-domain,example.com
email-dkim-selector,mail
email-spam-threshold,5.0
email-max-size-mb,25

DNS Records for Email

Required DNS records (auto-created with Namecheap integration):

RecordTypeValue
mail.example.comAYour server IP
example.comMXmail.example.com (priority 10)
example.comTXTv=spf1 mx a -all
mail._domainkey.example.comTXTDKIM public key
_dmarc.example.comTXTv=DMARC1; p=quarantine

External SMTP

To use external email providers instead:

name,value
smtp-host,smtp.sendgrid.net
smtp-port,587
smtp-user,apikey
smtp-secure,tls

Credentials stored in Vault:

vault kv put secret/botserver/smtp password="your-api-key"

AI/LLM Integration

Supported Providers

ProviderModelsConfig Key
OpenAIGPT-5, o3llm-url=https://api.openai.com/v1
AnthropicClaude Sonnet 4.5, Opus 4.5llm-url=https://api.anthropic.com
GroqLlama 3.3, Mixtralllm-url=https://api.groq.com/openai/v1
DeepSeekDeepSeek-V3, R3llm-url=https://api.deepseek.com
LocalAny GGUFllm-url=http://localhost:8081

Local LLM Setup

Run local models with BotModels:

# Install BotModels
./botserver install llm

# Download a model
./botserver model download llama-3-8b

# Configure in config.csv
name,value
llm-url,http://localhost:8081
llm-model,llama-3-8b.gguf
llm-context-size,8192
llm-gpu-layers,35

AI Features

FeatureDescription
ConversationNatural language chat
RAGKnowledge base search
Tool CallingAutomatic BASIC tool invocation
EmbeddingsDocument vectorization
VisionImage analysis (multimodal models)
VoiceSpeech-to-text, text-to-speech

Complete Deployment Example

1. Provision Server

# On your VPS
wget https://github.com/GeneralBots/botserver/releases/latest/botserver
chmod +x botserver

2. Configure DNS (Namecheap)

' setup-dns.bas
domain = "mybot.example.com"
server_ip = "203.0.113.50"

DNS SET domain, "A", server_ip
DNS SET "mail." + domain, "A", server_ip
DNS SET domain, "MX", "mail." + domain, 10
DNS SET domain, "TXT", "v=spf1 mx a ip4:" + server_ip + " -all"

PRINT "DNS configured for " + domain

3. Start BotServer

./botserver

4. Configure SSL

# Auto-configured with Let's Encrypt
./botserver ssl enable mybot.example.com

5. Verify Email

' test-email.bas
SEND MAIL "test@gmail.com", "Test from General Bots", "Email is working!"
PRINT "Email sent successfully"

Troubleshooting

DNS Not Propagating

  1. Check Namecheap API credentials
  2. Verify client IP is whitelisted
  3. Wait up to 48 hours for propagation
  4. Use dig or nslookup to verify

Email Marked as Spam

  1. Verify SPF record is correct
  2. Check DKIM signature is valid
  3. Ensure DMARC policy is set
  4. Check IP reputation at mxtoolbox.com

SSL Certificate Errors

  1. Verify DNS A record points to server
  2. Check port 80 is accessible for ACME challenge
  3. Review Let’s Encrypt rate limits
  4. Check certificate expiry

LLM Connection Failed

  1. Verify llm-url in config.csv
  2. Check API key in Vault
  3. Test endpoint with curl
  4. Review BotServer logs

See Also