docs: Update server setup for manga.cbcren.online

📚 Updated documentation for new subdomain setup:
- Changed from gitea.cbcren.online:3001 to manga.cbcren.online
- Added HTTPS/SSL information (Let's Encrypt)
- Updated Caddy proxy configuration details
- Removed port 3001 from public access (internal only)
- Updated iOS app configuration examples
- Updated test commands for HTTPS
- Added DNS section
- Updated security section with SSL info

🤖 Generated with Claude Code (https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2026-02-04 16:55:53 +01:00
parent abef30252c
commit c7845e118c

View File

@@ -2,9 +2,10 @@
## 📋 Información del Servidor ## 📋 Información del Servidor
**URL:** http://gitea.cbcren.online:3001 **URL:** https://manga.cbcren.online
**Puerto:** 3001 **Subdominio:** manga.cbcren.online (dedicado, sin interferencias)
**Protocolo:** HTTP **Protocolo:** HTTPS (SSL automático por Let's Encrypt)
**Puerto backend:** 3001 (interno, vía Docker proxy)
**Estado:** ✅ Activo y corriendo **Estado:** ✅ Activo y corriendo
## 🚀 Servicios Configurados ## 🚀 Servicios Configurados
@@ -16,12 +17,20 @@
- **Auto-reinicio:** ✅ Sí (systemd) - **Auto-reinicio:** ✅ Sí (systemd)
- **Acceso externo:** ✅ Sí (firewall ufw) - **Acceso externo:** ✅ Sí (firewall ufw)
### 2. Firewall (UFW) ### 2. Proxy Reverse (Caddy en Docker)
- **Puerto 3001:** Abierto para TCP - **Contenedor:** gitea-proxy
- **Comando:** `sudo ufw allow 3001/tcp` - **Imagen:** caddy:2
- **Estado:** ✅ Activo - **Rol:** Proxy HTTPS con certificado SSL automático
- **Backend interno:** 172.17.0.1:3001 (Docker bridge gateway)
- **SSL:** Let's Encrypt automático
- **No interfiere con:** Gitea, Nextcloud, DNS, Finanzas
### 3. Storage ### 3. DNS
- **Registro A:** manga.cbcren.online → 194.163.191.200
- **Propietario:** Usuario
- **Propósito:** Subdominio dedicado exclusivo para MangaReader
### 4. Storage
- **Directorio:** `/home/ren/ios/MangaReader/storage/` - **Directorio:** `/home/ren/ios/MangaReader/storage/`
- **Estructura:** - **Estructura:**
``` ```
@@ -87,41 +96,47 @@ sudo journalctl -u mangareader-backend.service -n 50
### APIConfig.swift ### APIConfig.swift
```swift ```swift
static let serverURL = "http://gitea.cbcren.online" static let serverURL = "https://manga.cbcren.online"
static let port: Int = 3001 static let port: Int? = nil // Usa puerto estándar HTTPS (443)
``` ```
### URL Base Completa ### URL Base Completa
``` ```
http://gitea.cbcren.online:3001 https://manga.cbcren.online
``` ```
## 🧪 Tests ## 🧪 Tests
### Health Check ### Health Check
```bash ```bash
curl http://gitea.cbcren.online:3001/api/health curl https://manga.cbcren.online/api/health
``` ```
### Storage Stats ### Storage Stats
```bash ```bash
curl http://gitea.cbcren.online:3001/api/storage/stats curl https://manga.cbcren.online/api/storage/stats
``` ```
### Test Local ### Test Local (directo al backend)
```bash ```bash
curl http://localhost:3001/api/health curl http://localhost:3001/api/health
``` ```
## 🔒 Seguridad ## 🔒 Seguridad
### SSL/TLS
- **Certificado:** Let's Encrypt (automático via Caddy)
- **Renovación:** Automática
- **Protocolo:** HTTPS/TLS 1.2+
- **Proxy:** Caddy maneja SSL termination
### Firewall ### Firewall
- Puerto 3001 abierto para acceso externo - Puerto 3001 abierto solo para acceso local (Docker)
- No se requiere autenticación (por ahora) - No requiere puerto abierto al público (Caddy maneja el proxy)
### Recomendaciones Futuras ### Recomendaciones Futuras
1. Implementar autenticación JWT 1. ✅ SSL/HTTPS (implementado con Let's Encrypt)
2. Usar HTTPS con certificado SSL 2. Implementar autenticación JWT
3. Rate limiting 3. Rate limiting
4. Validación de input 4. Validación de input
5. Sanitización de rutas de archivos 5. Sanitización de rutas de archivos
@@ -183,20 +198,23 @@ sudo kill -9 <PID>
1. **Auto-inicio:** El servicio se inicia automáticamente al reiniciar el servidor 1. **Auto-inicio:** El servicio se inicia automáticamente al reiniciar el servidor
2. **Auto-reinicio:** Si el servicio falla, se reinicia automáticamente después de 10 segundos 2. **Auto-reinicio:** Si el servicio falla, se reinicia automáticamente después de 10 segundos
3. **No interfiere con Gitea:** Usa puerto diferente (3001 vs 3000) 3. **Subdominio dedicado:** manga.cbcren.online no interfiere con Gitea ni otros servicios
4. **No interfiere con otros servicios:** Puerto independiente y firewall específico 4. **HTTPS automático:** Caddy obtiene y renueva certificados SSL automáticamente
5. **Almacenamiento:** Usa /home/ren/ios/MangaReader/storage/ con espacio disponible (200GB) 5. **Sin puertos públicos:** El puerto 3001 es interno, solo se expone vía proxy HTTPS
6. **Almacenamiento:** Usa /home/ren/ios/MangaReader/storage/ con espacio disponible (200GB)
## 🎯 Próximos Pasos ## 🎯 Próximos Pasos
1. ✅ Backend configurado y corriendo 1. ✅ Backend configurado y corriendo
2. ✅ Firewall configurado 2. ✅ Subdominio dedicado configurado
3. ✅ Servicio systemd activo 3. ✅ SSL/HTTPS automático
4. ⏭️ Clonar repo en Mac 4. ✅ Servicio systemd activo
5. ⏭️ Compilar app iOS 5. ✅ Proxy Caddy configurado
6. ⏭️ Instalar en iPad/iPhone via Sideloadly/3uTools 6. ⏭️ Clonar repo en Mac
7. ⏭️ Probar descarga de capítulos 7. ⏭️ Compilar app iOS
8. ⏭️ Verificar lectura offline 8. ⏭️ Instalar en iPad/iPhone via Sideloadly/3uTools
9. ⏭️ Probar descarga de capítulos
10. ⏭️ Verificar lectura offline
## 📞 Soporte ## 📞 Soporte
@@ -207,6 +225,6 @@ Si tienes problemas:
4. Verificar conectividad: `curl http://localhost:3001/api/health` 4. Verificar conectividad: `curl http://localhost:3001/api/health`
--- ---
**Última actualización:** 2026-02-04 **Última actualización:** 2026-02-04 16:42 CET
**Versión:** 1.0.0 **Versión:** 2.0.0
**Estado:** ✅ Producción **Estado:** ✅ Producción (manga.cbcren.online con HTTPS)