Add LXC 110 MoltBot documentation and infrastructure setup

- Create proxmox/lxc110-moltbot/ with complete README documentation
- MoltBot AI chatbot with Telegram and WhatsApp channels
- Claude Opus 4.5 model integration via Anthropic API
- Security: dedicated moltbot user, UFW firewall, fail2ban, Tailscale SSH
- Gateway on port 18789 (loopback), token+password auth
- Update proxmox/README.md with LXC 110 quick start and navigation
- Update CLAUDE.md network layout with MoltBot entry

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Marius
2026-01-29 14:46:21 +02:00
parent f50bfcf8d8
commit 3402d7fffa
3 changed files with 375 additions and 1 deletions

View File

@@ -18,6 +18,7 @@ proxmox/ # Main infrastructure documentation
├── cluster/ # Proxmox cluster, UPS, storage management
├── lxc104-flowise/ # AI Chatbot (Flowise on port 3000)
├── lxc108-oracle/ # Oracle XE 21c/18c Database (port 1521/1522)
├── lxc110-moltbot/ # MoltBot AI Telegram Bot
├── lxc171-claude-agent/ # Claude Code development environment
├── vm109-windows-dr/ # Windows Disaster Recovery VM
└── vm201-windows/ # Windows 11 (IIS reverse proxy)
@@ -86,6 +87,7 @@ proxmox/vm109-windows-dr/scripts/oracle-backup-monitor-proxmox.sh
| Flowise | 10.0.20.161 | 3000 | Chatbot UI |
| Gitea | 10.0.20.165 | 3000 | Git server |
| Claude Agent | 10.0.20.171 | 22 | Development (also via Tailscale: 100.95.55.51) |
| MoltBot | 10.0.20.173 | 22 | AI Telegram Bot (also via Tailscale: 100.120.119.70) |
| Primary Oracle | 10.0.20.36 | 1521 | Windows production |
| DR Oracle | 10.0.20.37 | 1521 | Disaster recovery |

View File

@@ -56,6 +56,10 @@ proxmox/
│ ├── check-ssl-certificates.ps1
│ └── monitor-ssl-certificates.sh
├── lxc110-moltbot/ # LXC 110 - MoltBot (AI Telegram Bot)
│ ├── README.md # Configurare, securitate, comenzi
│ └── docs/
└── lxc171-claude-agent/ # LXC 171 - Claude Agent (Development)
├── README.md # Configurare, conectare, workflow
└── scripts/
@@ -146,6 +150,35 @@ sqlplus sys/romfastsoft@10.0.20.121:1521/roa as sysdba
---
### LXC 110 - MoltBot (AI Chatbot)
**Director:** `lxc110-moltbot/`
**IP:** 10.0.20.173 (intern) | 100.120.119.70 (Tailscale) | **Host:** pveelite
**Canale:** Telegram + WhatsApp | **Model:** Claude Opus 4.5
| Fișier | Descriere |
|--------|-----------|
| `README.md` | Configurare completă, securitate, comenzi MoltBot |
**Quick Start:**
```bash
# Terminal UI (direct)
ssh -t moltbot@10.0.20.173 "clawdbot tui"
# Status
ssh moltbot@10.0.20.173 "clawdbot status"
# Web Dashboard (via SSH tunnel)
ssh -L 18789:127.0.0.1:18789 -N moltbot@10.0.20.173 &
# apoi http://localhost:18789
# Restart gateway
ssh moltbot@10.0.20.173 "clawdbot gateway restart"
```
**Componente:** Ubuntu 24.04, MoltBot v2026.1.24-3, Node.js v22, Bun, Tailscale SSH
---
### LXC 171 - Claude Agent (Development Environment)
**Director:** `lxc171-claude-agent/`
**IP:** 10.0.20.171 (intern) | 100.95.55.51 (Tailscale) | **Host:** pveelite
@@ -242,6 +275,7 @@ echo | openssl s_client -connect roa.romfast.ro:443 -servername roa.romfast.ro 2
| **104** | **flowise** | **10.0.20.161** | **Flowise AI (Chatbot Maria)** | **`lxc104-flowise/`** |
| 106 | gitea | 10.0.20.165 | Git Server | `cluster/README.md` |
| **108** | **central-oracle** | **10.0.20.121** | **Oracle XE 21c** | **`lxc108-oracle/`** |
| **110** | **moltbot** | **10.0.20.173** | **MoltBot AI (Telegram+WhatsApp)** | **`lxc110-moltbot/`** |
| **171** | **claude-agent** | **10.0.20.171** | **Claude Code Dev Environment** | **`lxc171-claude-agent/`** |
### Virtual Machines
@@ -285,6 +319,12 @@ echo | openssl s_client -connect roa.romfast.ro:443 -servername roa.romfast.ro 2
- **Rezolv probleme VM locked** → `vm201-windows/docs/vm201-troubleshooting-backup-nfs.md`
- **Informații generale** → `vm201-windows/README.md`
### MoltBot AI (LXC 110)
- **Configurare și comenzi** → `lxc110-moltbot/README.md`
- **Terminal UI** → `ssh -t moltbot@10.0.20.173 "clawdbot tui"`
- **Troubleshooting** → `lxc110-moltbot/README.md` → "Troubleshooting"
- **Canale:** Telegram + WhatsApp | **Model:** Claude Opus 4.5
### Claude Agent (LXC 171)
- **Configurare și conectare** → `lxc171-claude-agent/README.md`
- **Workflow dezvoltare** → `lxc171-claude-agent/README.md` → "Workflow Complet"
@@ -321,6 +361,6 @@ echo | openssl s_client -connect roa.romfast.ro:443 -servername roa.romfast.ro 2
---
**Ultima actualizare:** 2026-01-27
**Ultima actualizare:** 2026-01-29
**Autor:** Marius Mutu
**Proiect:** ROMFASTSQL - Infrastructure Documentation

View File

@@ -0,0 +1,332 @@
# LXC 110 - MoltBot (AI Chatbot)
**Director:** `proxmox/lxc110-moltbot/`
**VMID:** 110
**IP:** 10.0.20.173 (intern) | 100.120.119.70 (Tailscale)
**Host Proxmox:** pveelite (10.0.20.202)
**Rol:** Bot AI pentru Telegram și WhatsApp cu Claude Opus 4.5
---
## Informații Container
| Parametru | Valoare |
|-----------|---------|
| VMID | 110 |
| Hostname | moltbot |
| IP intern | 10.0.20.173 |
| IP Tailscale | 100.120.119.70 |
| Host Proxmox | pveelite (10.0.20.202) |
| User serviciu | `moltbot` |
| Parola user | `Moltbot2026!` |
| Storage | local-zfs (8GB) |
| RAM | 2GB |
| CPU | 2 cores |
| OS | Ubuntu 24.04 LTS |
## Componente Instalate
- Ubuntu 24.04 LTS
- MoltBot v2026.1.24-3
- Node.js v22.22.0 (user-space)
- Bun v1.3.7
- Tailscale (pentru SSH, fără funnel)
- UFW Firewall
- Fail2ban
## Canale Configurate
| Canal | Status | Detalii |
|-------|--------|---------|
| **Telegram** | ✅ ON | Bot token configurat |
| **WhatsApp** | ✅ ON | Linked la +40723197939 |
## Model AI
- **Provider:** Anthropic
- **Model:** claude-opus-4-5
- **Context:** 200k tokens
## Securitate
| Măsură | Status |
|--------|--------|
| User dedicat (non-root) | `moltbot` |
| SSH key-only auth | Activat |
| UFW Firewall | Activat |
| Fail2ban SSH | Activat |
| Tailscale SSH | Activat |
| Sudo limitat | Doar `systemctl` |
| Linger enabled | Da (serviciu persistent) |
### Reguli Firewall UFW
```
22/tcp ALLOW IN Anywhere
18789 ALLOW IN 10.0.20.0/24 (MoltBot Dashboard)
Anywhere ALLOW IN 10.0.20.0/24 (rețea locală)
Anywhere ALLOW IN 100.64.0.0/10 (Tailscale)
```
### Configurare Sudo
User `moltbot` are sudo passwordless doar pentru:
- `systemctl status *`
- `systemctl start *`
- `systemctl stop *`
- `systemctl restart *`
## Conectare
### SSH (rețea internă)
```bash
ssh moltbot@10.0.20.173
```
### SSH (Tailscale - de oriunde)
```bash
ssh moltbot@100.120.119.70
```
### Acces root (pentru administrare)
```bash
ssh root@10.0.20.173
```
## MoltBot - Comenzi
### Terminal UI (TUI)
```bash
# Conectare și TUI într-o singură comandă
ssh -t moltbot@10.0.20.173 "clawdbot tui"
# Sau conectare separată
ssh moltbot@10.0.20.173
clawdbot tui
```
### Web Dashboard (via SSH Tunnel)
```bash
# Pe calculatorul local, deschide tunnel
ssh -L 18789:127.0.0.1:18789 -N moltbot@10.0.20.173 &
# Apoi accesează în browser
# http://localhost:18789
```
### Comenzi utile
```bash
# Status complet
clawdbot status
# Status detaliat
clawdbot status --deep
# Verificare versiune
clawdbot --version
# Restart gateway
clawdbot gateway restart
# Vezi loguri live
clawdbot logs --follow
# Verificare canale
clawdbot status --deep
# Gestionare dispozitive (pairing)
clawdbot devices list
clawdbot devices approve <request-id>
```
## Configurare Gateway
| Parametru | Valoare |
|-----------|---------|
| Port | 18789 |
| Bind | loopback (doar local) |
| Auth | token + password |
| Tailscale mode | off |
### Fișiere configurare
| Fișier | Descriere |
|--------|-----------|
| `~/.clawdbot/clawdbot.json` | Configurare principală |
| `~/.clawdbot/logs/gateway.log` | Loguri gateway |
| `~/.clawdbot/agents/main/sessions/` | Sesiuni agent |
| `~/.clawdbot/credentials/` | Credențiale (chmod 700) |
## Structura Directoare
```
/home/moltbot/
├── .ssh/
│ └── authorized_keys # Chei SSH pentru acces
├── .bun/ # Bun runtime
├── .local/
│ └── share/moltbot/
│ └── node/ # Node.js user-space
├── .clawdbot/
│ ├── clawdbot.json # Config MoltBot
│ ├── credentials/ # Credențiale (chmod 700)
│ ├── agents/
│ │ └── main/
│ │ └── sessions/ # Sesiuni chat
│ └── logs/
│ └── gateway.log # Loguri
├── clawd/ # Workspace pentru agent
└── .bashrc # PATH pentru node/bun
```
## Servicii Systemd
### Gateway Service
```bash
# Status
systemctl --user status clawdbot-gateway
# Restart
systemctl --user restart clawdbot-gateway
# Logs
journalctl --user -u clawdbot-gateway -f
```
## Administrare via Proxmox
### De pe pvemini (sau alt nod cluster)
```bash
# Status container
ssh root@10.0.20.202 "pct status 110"
# Exec comandă
ssh root@10.0.20.202 "pct exec 110 -- <comandă>"
# Stop/Start
ssh root@10.0.20.202 "pct stop 110"
ssh root@10.0.20.202 "pct start 110"
# Console
ssh root@10.0.20.202 "pct enter 110"
```
## Troubleshooting
### MoltBot gateway nu pornește
```bash
# Verifică logs
clawdbot logs --follow
# Verifică status
clawdbot status
# Restart
clawdbot gateway restart
# Rulare manuală pentru debug
/usr/bin/node /usr/lib/node_modules/clawdbot/dist/entry.js gateway --port 18789
```
### Gateway unreachable
```bash
# Verifică dacă portul e ocupat
ss -tlnp | grep 18789
# Verifică serviciul systemd
systemctl --user status clawdbot-gateway
# Restart complet
systemctl --user restart clawdbot-gateway
```
### Eroare "gateway not connected" în TUI
```bash
# Gateway-ul probabil s-a oprit, restartează-l
clawdbot gateway restart
```
### Telegram/WhatsApp nu răspunde
```bash
# Verifică starea canalelor
clawdbot status --deep
# Pentru Telegram, verifică token-ul
grep botToken ~/.clawdbot/clawdbot.json
# Pentru WhatsApp, verifică link-ul
clawdbot status | grep WhatsApp
```
### Probleme de permisiuni
```bash
# Setează permisiunile corecte
chmod 700 ~/.clawdbot
chmod 700 ~/.clawdbot/credentials
chmod 600 ~/.clawdbot/clawdbot.json
```
### Tailscale nu funcționează
```bash
sudo systemctl status tailscaled
sudo tailscale status
tailscale ip
```
## Backup
### Backup configurare MoltBot
```bash
# De pe mașina locală
scp -r moltbot@10.0.20.173:~/.clawdbot ./backup-moltbot-$(date +%Y%m%d)/
```
### Backup complet LXC (via Proxmox)
```bash
ssh root@10.0.20.202 "vzdump 110 --storage local --compress zstd"
```
## Provider AI - Anthropic
MoltBot folosește Anthropic Claude prin API key configurat în:
- Config: `~/.clawdbot/clawdbot.json``auth.profiles.anthropic:default`
- Credențiale: `~/.clawdbot/credentials/`
### Monitorizare costuri
- Dashboard Anthropic: https://console.anthropic.com/settings/usage
- Sesiune curentă: ~132k/200k tokens (66%)
## Reconfigurare (dacă e necesar)
### Rulare wizard onboarding
```bash
clawdbot onboard
```
### Resetare completă
```bash
# Oprește gateway
clawdbot gateway stop
# Backup config vechi
mv ~/.clawdbot ~/.clawdbot.backup
# Rulează onboarding fresh
clawdbot onboard
```
---
## Legături Utile
- **Proxmox Index:** `../README.md`
- **Documentație MoltBot:** https://docs.molt.bot
- **MoltBot oficial:** https://molt.bot
- **Ghid deployment:** https://merox.dev/blog/moltbot-proxmox-deployment/
---
**Data setup:** 2026-01-29
**Ultima actualizare:** 2026-01-29
**Autor:** Claude Code