Clone
This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
Despliegue con NPM
Guía para desplegar BookStack con Nginx Proxy Manager.
Requisitos
- NPM desplegado y accesible
- Red Docker
proxycreada - DNS apuntando al servidor
Pasos de Despliegue
1. Desplegar BookStack
En Portainer, crea el stack sin archivo override (solo docker-compose.yml):
Variables de entorno:
APP_KEY=base64:tu_clave_generada
DB_PASSWORD=password_generado
DOMAIN_HOST=bookstack.tudominio.com
ℹ️ Nota:
DOMAIN_HOSTes necesaria para queAPP_URLfuncione correctamente (redireccionamientos, CSS, enlaces)
2. Configurar Proxy Host en NPM
- Accede a NPM (ej:
https://npm.tudominio.com) - Ve a Hosts → Proxy Hosts → Add Proxy Host
Pestaña Details
- Domain Names:
bookstack.tudominio.com - Scheme:
http - Forward Hostname / IP:
bookstack - Forward Port:
80 - ✅ Cache Assets: Activado
- ✅ Block Common Exploits: Activado
- ✅ Websockets Support: Activado
Pestaña SSL
- SSL Certificate:
Request a new SSL Certificate - Email: tu@email.com
- ✅ Force SSL: Activado
- ✅ HTTP/2 Support: Activado
- ✅ HSTS Enabled: Activado (opcional)
- Save
3. Verificar
- Accede a
https://bookstack.tudominio.com - Verifica el certificado SSL (candado verde)
- Login con
admin@admin.com/password - Cambia la contraseña inmediatamente
Comparativa Traefik vs NPM
| Aspecto | Traefik | NPM |
|---|---|---|
| Configuración | Labels en compose | UI web |
| SSL | Automático | Manual por dominio |
| Dificultad | Media | Fácil |
| Renovación SSL | Automática | Automática |
| Multi-dominio | Excelente | Bueno |
| Recomendado para | Múltiples servicios | Pocos servicios |
Troubleshooting
Error 502 Bad Gateway
Verificar:
# BookStack corriendo
docker ps | grep bookstack
# BookStack en red proxy
docker inspect bookstack | grep -A 5 Networks
Certificado SSL falla
Soluciones:
- Verificar DNS apunta correctamente
- Intentar con DNS Challenge si puertos 80/443 bloqueados
- Regenerar certificado en NPM UI
Próximos Pasos
- Configuración Inicial - Configurar BookStack
- Personalización - LDAP, temas
- Backup - Automatiza backups