← Back to Home

Self-Hosted Deployment

Run FastoLead on your own infrastructure with full data control

Why Self-Host? 100% Private

1. Requirements

Component Minimum Recommended
CPU 2 cores 4+ cores
RAM 4 GB 8+ GB (16 GB for local AI)
Disk 10 GB 50+ GB (for AI models)
OS Linux (Ubuntu 20.04+, Debian 11+, CentOS 8+)

2. Installation

Download Package

Available Packages
Loading available packages...

Install on Ubuntu/Debian

# Install downloaded package
sudo dpkg -i fastolead_amd64.deb

# Start service
sudo systemctl enable fastolead
sudo systemctl start fastolead

Install on CentOS/RHEL/Fedora

# Install downloaded package
sudo rpm -i fastolead_amd64.rpm

# Start service
sudo systemctl enable fastolead
sudo systemctl start fastolead

3. Configuration

Edit /etc/fastolead/fastolead.conf:

settings:
  # Server binding
  host: 0.0.0.0:3000

  # Database location
  database: /var/lib/fastolead/fastolead.db

  # Security keys (GENERATE YOUR OWN!)
  # Run: openssl rand -hex 32
  admin_key: "YOUR_GENERATED_ADMIN_KEY"
  jwt_secret: "YOUR_GENERATED_JWT_SECRET"

  # OAuth credentials for lead sources
  oauth:
    hubspot:
      client_id: YOUR_HUBSPOT_CLIENT_ID
      client_secret: YOUR_HUBSPOT_CLIENT_SECRET
      redirect_uri: https://yourdomain.com/auth/hubspot/callback
    gmail:
      client_id: YOUR_GOOGLE_CLIENT_ID
      client_secret: YOUR_GOOGLE_CLIENT_SECRET
      redirect_uri: https://yourdomain.com/api/gmail/callback
    googleforms:
      client_id: YOUR_GOOGLE_CLIENT_ID
      client_secret: YOUR_GOOGLE_CLIENT_SECRET
      redirect_uri: https://yourdomain.com/api/googleforms/callback
Important: Generate Secure Keys

Never use default or example keys in production. Generate your own:

openssl rand -hex 32

4. AI Provider Setup

Option 1: Ollama (Local AI) Free Private

Best for: Maximum privacy, no external API calls

# Install Ollama
curl -fsSL https://ollama.ai/install.sh | sh

# Pull a model (llama3.1:8b recommended for sales tasks)
ollama pull llama3.1:8b

# Start Ollama service
ollama serve

No config needed - users can configure Ollama URL in Settings UI.

Option 2: Groq Free Tier Cloud

Best for: Fast inference, easy setup

  1. Get API key at console.groq.com
  2. Users enter their API key in Settings UI
Option 3: Claude Paid Cloud

Best for: Highest accuracy, complex analysis

  1. Get API key at console.anthropic.com
  2. Users enter their API key in Settings UI

5. Custom AI Training

Train your own AI Sales Manager using your company's data:

Training Workflow Self-Hosted
  1. Collect samples - Save good AI analyses from the app (100+ recommended)
  2. Export JSONL - Download training data from Settings → Training
  3. Fine-tune - Train on your GPU or cloud service
  4. Deploy to Ollama - Load your custom model
  5. Configure - Point FastoLead to your trained model
Fine-Tuning with Unsloth (Recommended)
# Install unsloth (fastest LoRA training)
pip install unsloth

# Example training script
from unsloth import FastLanguageModel

model, tokenizer = FastLanguageModel.from_pretrained(
    model_name="unsloth/Qwen2.5-7B",  # Good for RU+EN
    max_seq_length=4096,
    load_in_4bit=True,  # For 16GB VRAM (T4, RTX 3090)
)

# Fine-tune with your JSONL
trainer = SFTTrainer(
    model=model,
    train_dataset=load_dataset("json", data_files="training_data.jsonl"),
    max_seq_length=4096,
)
trainer.train()

# Export for Ollama (GGUF format)
model.save_pretrained_gguf("my-sales-ai", tokenizer)
Deploy to Ollama
# Create Modelfile
cat > Modelfile << 'EOF'
FROM ./my-sales-ai.gguf
SYSTEM "You are an AI sales assistant trained on company data."
PARAMETER temperature 0.7
PARAMETER num_ctx 4096
EOF

# Import into Ollama
ollama create my-company-sales -f Modelfile

# Test it
ollama run my-company-sales "Analyze this lead: John, CEO at TechCorp"

Then configure in FastoLead Settings → AI → Ollama Model: my-company-sales

Recommended Base Models
Model Size VRAM Best For
Qwen 2.5 7B 7B 16 GB Multilingual (RU, EN, CN)
Llama 3.1 8B 8B 16 GB English, best quality
Mistral 7B 7B 16 GB Efficient, fast inference
Phi-3 Mini 3.8B 8 GB Low resources, quick
Cloud Training Options Pay-per-use
Service GPU ~Cost (100 samples)
RunPod T4 / A10 ~$0.20
Lambda Labs A10 / A100 ~$0.60
Vast.ai Various ~$0.10
Google Colab Pro T4 / A100 $10/month (unlimited)

6. Search Provider (Optional)

For lead research (Find Info) feature:

SearXNG (Self-Hosted Search) Free Private
# Using Docker
docker run -d -p 8080:8080 searxng/searxng

Configure in Settings UI: http://localhost:8080

7. HTTPS Setup

For production, enable HTTPS in config:

settings:
  https:
    key: /etc/letsencrypt/live/yourdomain.com/privkey.pem
    cert: /etc/letsencrypt/live/yourdomain.com/fullchain.pem

Or use a reverse proxy (nginx, caddy) in front of FastoLead.

8. Service Management

The package automatically installs a systemd service. Common commands:

# Start/stop/restart
sudo systemctl start fastolead
sudo systemctl stop fastolead
sudo systemctl restart fastolead

# Check status
sudo systemctl status fastolead

# View logs
journalctl -u fastolead -f

# Enable on boot
sudo systemctl enable fastolead

9. Verify Installation

# Check if running
curl http://localhost:3000/api/version

# Open in browser
http://your-server-ip:3000

Architecture Overview


┌─────────────────────────────────────────────────────────┐
│                    Your Server                          │
│                                                         │
│  ┌─────────────┐    ┌─────────────┐    ┌────────────┐   │
│  │  FastoLead  │──▶│   SQLite    │    │   Ollama   │   │
│  │   :3000     │    │  Database   │    │  (Local)   │   │
│  └─────────────┘    └─────────────┘    └────────────┘   │
│         │                                    │          │
│         │              ┌─────────────────────┘          │
│         │              │                                │
│         ▼              ▼                                │
│  ┌─────────────────────────────────────────────────┐    │
│  │              AI Analysis (Private)              │    │
│  └─────────────────────────────────────────────────┘    │
│                                                         │
└─────────────────────────────────────────────────────────┘
          │
          │ HTTPS (encrypted)
          ▼
┌─────────────────────────────────────────────────────────┐
│                  External APIs (Optional)               │
│                                                         │
│    HubSpot    Jivo    Gmail    Google Forms             │
│                                                         │
│    (Only to fetch YOUR leads from YOUR accounts)        │
└─────────────────────────────────────────────────────────┘
    
Need Help?

support@fastogt.com - Technical support and enterprise inquiries