Architecture
System Architecture Diagram (January 2026)
┌────────────────────────────────────────────────────────────────────────────────────────┐
│ KAVI INFRASTRUCTURE │
│ (Managed by Terraform + Ansible) │
│ │
│ ┌────────────────────────┐ ┌──────────────────────────┐ ┌──────────────────────────┐│
│ │ KIMSUFI (CANADA) │ │ BRUNO (PRODUCTION) │ │ DEVELOPMENT VPS ││
│ │ Eva - 144.217.76.53 │ │ 188.34.198.57 │ │ 46.224.125.1 ││
│ │ (Legacy - Manual) │ │ (Terraform + Ansible) │ │ (Manual) ││
│ │ │ │ │ │ ││
│ │ ┌─────────┐ │ │ ┌──────────────────┐ │ │ ┌─────────────────┐ ││
│ │ │ Caddy │ │ │ │ Docker Host │ │ │ │ Docker Host │ ││
│ │ │ :80/443 │ │ │ │ CPX32 │ │ │ │ CX32 │ ││
│ │ └────┬────┘ │ │ │ 4vCPU/8GB │ │ │ │ 4vCPU/8GB │ ││
│ │ │ │ │ │ │ │ │ │ │ ││
│ │ ┌────┴─────────────┐ │ │ │ ┌────────────┐ │ │ │ │ ┌────────────┐ │ ││
│ │ │ Plex :32400 │ │ │ │ │ Traefik │ │ │ │ │ │ Open WebUI │ │ ││
│ │ │ Radarr :7878 │ │ │ │ │ v3.6+ │ │ │ │ │ │ :3000 │ │ ││
│ │ │ Sonarr :8989 │ │ │ │ └────────────┘ │ │ │ │ └────────────┘ │ ││
│ │ │ Overseerr :5055 │ │ │ │ ┌────────────┐ │ │ │ │ ┌────────────┐ │ ││
│ │ │ Immich :2283 │ │ │ │ │ Infisical │ │ │ │ │ │ Ollama │ │ ││
│ │ │ qBittorrent │ │ │ │ │ :8080 │ │ │ │ │ │ LLM Runtime│ │ ││
│ │ │ (VPN) │ │ │ │ └────────────┘ │ │ │ │ └────────────┘ │ ││
│ │ └──────────────────┘ │ │ │ ┌────────────┐ │ │ │ ││
│ │ │ │ │ │ PostgreSQL │ │ │ └──────────────────────────┘│
│ └────────────────────────┘ │ │ │ + Redis │ │ │ │
│ │ │ └────────────┘ │ │ │
│ │ │ ┌────────────┐ │ │ │
│ │ │ │ Kuanary │ │ │ │
│ │ │ │ + imgproxy │ │ │ │
│ │ │ └────────────┘ │ │ │
│ │ │ ┌────────────┐ │ │ │
│ │ │ │ Forgejo │ │ │ │
│ │ │ │ (Git) │ │ │ │
│ │ │ └────────────┘ │ │ │
│ │ │ ┌────────────┐ │ │ │
│ │ │ │ Obsidian │ │ │ │
│ │ │ │ + Docs │ │ │ │
│ │ │ └────────────┘ │ │ │
│ │ └──────┬───────────┘ │ │
│ │ │ │ │
│ ┌────────────────────────────────────┼────────────────────────────────────────────┐ │
│ │ CLOUDFLARE DNS (Proxied) │ │
│ │ secrets.kua.cl, media.kua.cl, cdn.kua.cl, notes.kua.cl, docs.kua.cl │ │
│ │ → 188.34.198.57 (Bruno) │ │
│ │ git.kua.cl → 188.34.198.57 (DNS Only) │ │
│ └────────────────────────────────────┬────────────────────────────────────────────┘ │
│ │ │
│ ┌───────────────────────────────────┴─────────────────────────────────────────────┐ │
│ │ STORAGE INFRASTRUCTURE │ │
│ │ │ │
│ │ ┌───────────────────┐ ┌──────────────────┐ │ │
│ │ │ Hetzner Storage │ │ Hetzner Object │ │ │
│ │ │ Box (5TB SFTP) │ │ Storage (S3) │ │ │
│ │ │ │ │ │ │ │
│ │ │ - Obsidian vaults │ │ - Kuanary images │ │ │
│ │ │ - Database dumps │ │ - CDN assets │ │ │
│ │ │ - Git repos │ │ │ │ │
│ │ └───────────────────┘ └──────────────────┘ │ │
│ └──────────────────────────────────────────────────────────────────────────────────┘ │
└────────────────────────────────────────────────────────────────────────────────────────┘
Server Inventory
| Server |
IP |
Type |
Role |
Managed By |
| Bruno |
188.34.198.57 |
CPX32 |
Production |
Terraform + Ansible |
| development-vps |
46.224.125.1 |
CX32 |
Development |
Manual |
| Eva (Kimsufi) |
144.217.76.53 |
Dedi |
Media |
Manual |
Data Flow
Secret Management Flow
Local CLI/App → secrets.kua.cl → Infisical → Encrypted Secret Retrieval
↓
PostgreSQL (encrypted at rest)
Image Upload Flow (Kuanary)
Upload Request → media.kua.cl → Kuanary → S3 Object Storage
↓
Image Stored in S3
↓
Image Request → cdn.kua.cl → imgproxy → S3 → Transformed Image
Git Flow
git push → git.kua.cl:2222 → Forgejo → /mnt/storagebox/git/
↓
Repository stored
Local Machine → ./bin/deploy-infra.sh → Infisical (get secrets)
↓
Terraform apply
↓
Hetzner Cloud API
↓
VPS Created
↓
Ansible bootstrap
↓
Services deployed
Technology Stack
Bruno (Production)
| Component |
Technology |
Version |
| OS |
Ubuntu |
24.04 LTS |
| Container |
Docker + Compose |
29.x |
| Reverse Proxy |
Traefik |
v3.6+ |
| Secrets |
Infisical |
Latest |
| Database |
PostgreSQL |
16-alpine |
| Cache |
Redis |
alpine |
| Media API |
Kuanary |
Custom |
| Image Processing |
imgproxy |
Latest |
| Git |
Forgejo |
1.21 |
| Notes |
Obsidian |
Latest |
| Docs |
MkDocs |
Custom |
Development VPS
| Component |
Technology |
| OS |
Ubuntu 24.04 LTS |
| AI Chat |
Open WebUI |
| LLM Runtime |
Ollama |
| Component |
Technology |
| Media Server |
Plex |
| Movies |
Radarr |
| TV Shows |
Sonarr |
| Photos |
Immich |
| Requests |
Overseerr |
| Downloads |
qBittorrent (VPN) |
Infrastructure as Code
main.tf - Server definitions
variables.tf - Variable declarations
outputs.tf - Output values
Ansible (~/coder-core/ansible/)
playbooks/site.yml - Full server setup
playbooks/deploy-services.yml - Deploy Docker stack
roles/docker/ - Docker installation
roles/storage/ - Storage Box + S3 mounts
Docker Compose (~/coder-core/services/production/)
docker-compose.yml - All production services
.env - Secrets (generated from Infisical)
Domain Routing
| Domain |
Server |
Service |
Cloudflare |
| secrets.kua.cl |
Bruno |
Infisical |
Proxied |
| git.kua.cl |
Bruno |
Forgejo |
DNS Only |
| media.kua.cl |
Bruno |
Kuanary |
Proxied |
| cdn.kua.cl |
Bruno |
imgproxy |
Proxied |
| notes.kua.cl |
Bruno |
Obsidian |
Proxied |
| docs.kua.cl |
Bruno |
MkDocs |
Proxied |
| photos.kua.cl |
Kimsufi |
Immich |
Proxied |
| plex.kua.cl |
Kimsufi |
Plex |
Proxied |
Recovery Architecture
Critical Services (< 15 min recovery)
- Infisical - All secrets depend on this
- Traefik - All HTTPS access depends on this
- PostgreSQL - All data depends on this
Priority Order for Recovery
- Traefik (networking)
- PostgreSQL + Redis (data layer)
- Infisical (secrets)
- Forgejo (git)
- Kuanary + imgproxy (media)
- Obsidian + Docs (productivity)
Backup Locations
| Data |
Primary |
Backup |
| Secrets |
Infisical DB |
ENCRYPTION_KEY in 4 locations |
| Git repos |
Storage Box |
Local clones |
| Notes |
Storage Box |
Obsidian Sync |
| Databases |
PostgreSQL |
Daily dumps to Storage Box |
Last updated: January 2026 - Bruno is the primary production server