Infrastructure

Self-Hosted AI Infrastructure

Production-grade infrastructure running the agent fleet and automation workflows. No managed services where self-hosted gives control.

Cloud

VPS Stack

Single VPS running containerised services for workflow automation, data, and voice.

Service Architecture

Internet / SIP Trunk
Nginx Reverse Proxy

SSL termination · Rate limiting · Route to services

n8n
Workflows
:5678
Baserow
Database
:80/3000
Dograh
Voice GW
:8080
PostgreSQL
Data Store
:5432
Redis
Cache/Queue
:6379
Docker Engine · Docker Compose · Watchtower (auto-updates)
VPS: 8 vCPU · 32 GB RAM · 500 GB NVMe · 1 Gbps · Linux

n8n

Workflow automation engine. 200+ active workflows: voice receptionist, YouTube publishing, data sync, monitoring alerts, webhook handlers.

  • · Self-hosted (not n8n.cloud)
  • · PostgreSQL backend
  • · Custom nodes for Dograh, Baserow
  • · Queue mode for scaling
  • · Webhook endpoints for all integrations

Baserow

Airtable alternative. Primary database for leads, content calendar, video metadata, agent logs, CRM data.

  • · PostgreSQL backend
  • · API-first (REST + WebSocket)
  • · Row-level permissions
  • · Self-hosted, no row limits
  • · Plugin system for custom fields

Dograh

Voice gateway. SIP trunk → STT → LLM → TTS → SIP. Handles inbound/outbound calls, call recording, transcription.

  • · SIP/RTP media handling
  • · Pluggable STT/TTS (Whisper, Piper, Fish)
  • · n8n webhook integration
  • · Call recording + transcription
  • · Multi-tenant ready

PostgreSQL

Primary data store for n8n, Baserow, custom tables. Logical replication for backups.

  • · Version 16
  • · Point-in-time recovery
  • · Logical replication to backup
  • · Connection pooling (PgBouncer)
  • · Automated vacuum/analyze
Local

Local Agent Fleet

Two machines running complementary workloads: interactive orchestration + background compute.

Main Machine (Interactive)

  • Hermes (Primary)
    150+ skills, interactive coding, research, video composition
    Orchestrator
  • VS Code + Cline/Codex/Claude Code
    IDE-integrated agents for code generation, review, debugging
    IDE Agents
  • RTX 5070 Ti 12GB
    Local inference: llama.cpp, ComfyUI, Whisper, Piper TTS
    GPU Compute
  • 32 GB RAM
    Multi-agent context, browser automation, local model hosting
    Memory
  • Lenovo Legion i5 Pro
    Linux daily driver, Windows dual-boot for testing
    OS

Secondary Machine (Batch)

  • Hermes (Secondary)
    Long-running: video rendering, bulk research, model training, batch generation
    Background Orchestrator
  • Agent Zero
    Autonomous coding agent for greenfield projects, TDD, PR creation
    Coding Agent
  • OpenClaw
    Browser automation: complex scraping, authenticated sessions, form filling
    Browser Agent
  • SerxCGN
    Large-scale search & reconnaissance, competitor monitoring
    Recon Agent
  • ComfyUI (Persistent)
    Always-running for batch image/video generation queues
    Media Generation
Networking & Security

Access, Security & Observability

How the infrastructure is accessed, secured, and monitored.

Access

  • Tailscale mesh VPN (all machines)
  • SSH key-only, root login disabled
  • n8n/Baserow/Dograh behind Nginx + Basic Auth
  • No public ports except 80/443 (Nginx)
  • DNS: Cloudflare proxy (DDoS, WAF)

Security

  • Fail2ban on SSH + Nginx
  • CrowdSec for collaborative IPS
  • Automatic security updates (unattended-upgrades)
  • Secrets in Docker secrets / 1Password CLI
  • Regular Trivy scans on images

Observability

  • Grafana + Prometheus (VPS + local)
  • Uptime Kuma for service health
  • n8n execution metrics → Grafana
  • Log aggregation: Loki + Promtail
  • Alerting: Telegram + Email via Alertmanager
Resilience

Backup & Disaster Recovery

Data protection strategy for the self-hosted stack.

Backup Strategy

  • PostgreSQL: Daily pg_dump → S3 (versioned), weekly base backup + WAL archiving
  • Baserow media: Rsync to backup VPS daily
  • n8n workflows: Git-backed (workflows as code), daily export
  • Dograh config: Git-backed, versioned
  • Local models: Hugging Face cache synced to NAS
  • GBrain: SQLite + embeddings → S3 daily

Recovery Procedures

  • VPS failure: Terraform reprovisions in < 15 min. Docker Compose pulls images. Restore PG from S3.
  • Local GPU failure: Workloads shift to VPS (CPU inference) or cloud burst. Secondary machine takes queue.
  • Data corruption: Point-in-time recovery from WAL. RPO < 5 min, RTO < 30 min.
  • Credential rotation: 1Password CLI scripts rotate all secrets quarterly.
Want this architecture?

I design and deploy self-hosted AI infrastructure

VPS provisioning, Docker orchestration, service integration, monitoring, backup — tailored to your workload and compliance requirements.

Discuss Infrastructure