Panel Alexamigo
← Memory

vps-ovh.md

# VPS OVH

## Conexion
- **Proveedor**: OVH
- **Hostname**: `vps-16ecaaa2-vps-ovh-net`
- **IP**: `57.131.46.102`
- **Usuario SSH**: `ubuntu`
- **Auth**: clave SSH ed25519 local (`~/.ssh/id_ed25519`)
- **Comando**: `ssh ubuntu@57.131.46.102`
- **Panel OVH**: https://www.ovh.com/manager/
- **Fix SSH key permisos (Windows)**: `icacls "C:\Users\alexa\.ssh\id_ed25519" /inheritance:r /grant:r "alexa:R"`

## Specs
- **RAM**: 11GB
- **Disco**: 96GB (SSD)
- **OS**: Ubuntu (systemd)

## Servicios activos
| Servicio | Puerto | systemd | Descripcion |
|----------|--------|---------|-------------|
| Nginx | 80, 443 | `nginx` | Reverse proxy SSL |
| Hub BeePeek | 3000 | `hub-beepeek.service` | hub.beepeek.com — React+Express+Python |
| CRM BeePeek | 5007 | `crm-beepeek.service` | suite.beepeek.com — Flask CRM |
| Decisiona React | 5000 | `decisiona.service` | plus.decisiona.es — React+Express |
| Prospector | 3005 | `prospector.service` | prospector.beepeek.com — Lead gen |
| AuditoriaSEO | 5001 | `auditoria-seo.service` | auditoriaseogratis.es — Python/Flask |
| File Browser | 8090 | `filebrowser.service` | files.beepeek.com — Explorador web |
| Uvicorn (sf-api) | 8080 | - | Screaming Frog API Server |
| MariaDB 11.4.7 | 3306 | - | Base de datos (Plus Decisiona PHP) |
| Sentinel | 5005 | `sentinel.service` | BEE Sentinel — Brand reputation monitor (FastAPI+transformers) |
| Syncthing | 22000, 8384 | - | Sincronizacion archivos |
| SSH | 22 | - | Acceso remoto |

## Proyectos desplegados

### Decisiona React (ACTIVO - plus.decisiona.es)
- **URL**: https://plus.decisiona.es/
- **Ruta VPS**: `/home/ubuntu/proyectos/decisiona-react/`
- **Systemd**: `decisiona.service` (auto-restart, starts on boot)
- **Source local**: `C:\Users\alexa\Desktop\PROYECTOS\Proyecto Decisiona`
- **Stack**: React + Vite + Express + TypeScript
- **Supabase**: ref `peqiavkmvhmljvpynmdd` (org: ieodecisionaint-stack)
- **Nginx**: reverse proxy en puerto 5000, SSL via Let's Encrypt
- **Logs**: `journalctl -u decisiona -f`
- **Crons internos** (node-cron en scheduler.ts):
  - 00:00 UTC: Ingesta diaria (ValueSERP) + trending analysis
  - 01:00 UTC: Limpieza retencion (>30 dias)
  - 01:30 UTC: Iran scenario analysis + timeline
  - 02:00 UTC: Evaluacion predicciones pasadas
  - 08:00/14:00/20:00 UTC: Iran headlines (SERP + traduccion)
  - Martes 08:00 UTC: Cronica WordPress
  - Jueves 08:00 UTC: Informe WordPress
  - Viernes 18:00 UTC: Resumen semanal WordPress
  - Cada 5min: Military aircraft tracking

### AuditoriaSEO (ACTIVO - auditoriaseogratis.es)
- **URL**: https://www.auditoriaseogratis.es/
- **Ruta VPS**: `/home/ubuntu/proyectos/auditoria-seo/`
- **Systemd**: `auditoria-seo.service` (auto-restart, starts on boot)
- **Source local**: `C:\Users\alexa\Desktop\PROYECTOS\BEE - SEO Audit\Auditoria-sEO\SEO_Audit`
- **Stack**: Python 3.13 + Flask + Gunicorn + React (pre-built dist)
- **Puerto**: 5001 (127.0.0.1)
- **Nginx**: reverse proxy, SSL pendiente (DNS aun en Railway/GoDaddy)
- **SF integration**: localhost:8080 (sf-api en mismo VPS)
- **APIs**: SEMrush, PageSpeed, ZeroGPT, Gemini, Brevo, Supabase CRM
- **Logs**: `journalctl -u auditoria-seo -f`
- **Health**: `curl http://127.0.0.1:5001/api/health`
- **DNS**: GoDaddy (ns61/ns62.domaincontrol.com). Cambiar A records a 57.131.46.102
- **Post-DNS**: `sudo certbot --nginx -d auditoriaseogratis.es -d www.auditoriaseogratis.es`

### Hub BeePeek (ACTIVO - hub.beepeek.com)
- **URL**: https://hub.beepeek.com/
- **Ruta VPS**: `/home/ubuntu/proyectos-cloud/hub-beepeek/apps/hub`
- **Systemd**: `hub-beepeek.service` (auto-restart)
- **Puerto**: 3000 (Nginx reverse proxy, SSL Let's Encrypt)
- **Stack**: React + Vite + Tailwind + Express (server/) + Python (python/)
- **Source local**: `C:\Users\alexa\Desktop\PROYECTOS\SUITE Completa\apps\hub`
- **Sync**: NO es git repo. Editar directo en VPS o copiar archivos manualmente
- **Build**: `cd /home/ubuntu/proyectos-cloud/hub-beepeek/apps/hub && npx vite build`
- **Restart**: `sudo systemctl restart hub-beepeek`
- **Logs**: `journalctl -u hub-beepeek -f`
- **NOTA**: Railway ya NO se usa para deploy. Todo en VPS.

### CRM BeePeek (ACTIVO - suite.beepeek.com)
- **URL**: https://suite.beepeek.com/
- **Ruta VPS**: `/home/ubuntu/proyectos-cloud/crm-beepeek`
- **Systemd**: `crm-beepeek.service` (auto-restart)
- **Puerto**: 5007 (Python/Flask)
- **Stack**: Python + Flask
- **Logs**: `journalctl -u crm-beepeek -f`

### File Browser (ACTIVO - files.beepeek.com)
- **URL**: https://files.beepeek.com/ (pendiente DNS en GoDaddy: A record `files` → `57.131.46.102`)
- **Systemd**: `filebrowser.service`
- **Puerto**: 8090 (127.0.0.1)
- **Credenciales**: user `alex` / pass `BlueSEO2026vps!x`
- **Root**: `/home/ubuntu` (ve todo el VPS)
- **DB**: `/home/ubuntu/.filebrowser/filebrowser.db`
- **SSL**: Pendiente — ejecutar `sudo certbot --nginx -d files.beepeek.com` tras crear DNS

### Plus Decisiona PHP (BACKUP)
- **Ruta**: `/home/ubuntu/proyectos/plus-decisiona-php-backup/`
- **Estado**: Respaldado, NO activo. Era la version PHP+MySQL original.

## Claude Code
- **Version**: 2.1.87
- **Auth**: OAuth (marketing@blueseo.es), plan Max
- **Credentials**: `/home/ubuntu/.claude/.credentials.json`
- **Token refresh cron**: `0 6,18 * * *` (cada 12h para que no expire el access token de ~24h)

## Crons (crontab usuario ubuntu)
```
0 6,18 * * *  /usr/bin/claude -p "ok" --max-turns 1 > /dev/null 2>&1  (token refresh)
```
Nota: Los crons PHP antiguos de plus-decisiona se eliminaron. La app React usa node-cron interno.

## Estado (30/03/2026)
- Servidor funcionando correctamente
- Decisiona React desplegado y operativo
- Ingesta completada: 57 noticias guardadas en Supabase
- Supabase conectado (ref: peqiavkmvhmljvpynmdd)
- Pending: funcion `get_retention_stats` falta en Supabase (error no critico)