3.7 KiB
Runbook: Nextcloud en Coolify
Servicio verificado: hdcdpkm0jko3qqvn5683ercc
Dominio: https://nextcloudsuite.urieljareth.org
Estado de contenedores
.\scripts\Invoke-ProxmoxSsh.ps1 -Command "pct exec 102 -- docker ps -a --format 'table {{.Names}}\t{{.Status}}\t{{.Ports}}' | grep -Ei 'nextcloud|hdcdpkm0'"
Redeploy manual desde compose generado por Coolify
Si el endpoint API de Coolify no esta disponible o no hay token cargado:
.\scripts\Invoke-ProxmoxSsh.ps1 -Command "pct exec 102 -- sh -lc 'cd /data/coolify/services/hdcdpkm0jko3qqvn5683ercc && docker compose up -d'"
Fix HTTPS reverse proxy
No usar sed para editar config.php. Usar el script PHP del repo:
scp -o StrictHostKeyChecking=no -i "C:\Users\Uriel Jareth\.openclaw\workspace\proxmox_key_win" .\scripts\fix-nextcloud-config.php root@192.168.0.200:/tmp/fix-nextcloud-config.php
.\scripts\Invoke-ProxmoxSsh.ps1 -Command "pct push 102 /tmp/fix-nextcloud-config.php /tmp/fix-nextcloud-config.php"
.\scripts\Invoke-ProxmoxSsh.ps1 -Command "pct exec 102 -- docker cp /tmp/fix-nextcloud-config.php nextcloud-hdcdpkm0jko3qqvn5683ercc:/tmp/fix-nextcloud-config.php"
.\scripts\Invoke-ProxmoxSsh.ps1 -Command "pct exec 102 -- docker exec nextcloud-hdcdpkm0jko3qqvn5683ercc php /tmp/fix-nextcloud-config.php /config/www/nextcloud/config/config.php nextcloudsuite.urieljareth.org nextcloud-db"
.\scripts\Invoke-ProxmoxSsh.ps1 -Command "pct exec 102 -- docker exec nextcloud-hdcdpkm0jko3qqvn5683ercc sh -lc 'chown abc:users /config/www/nextcloud/config/config.php && chmod 640 /config/www/nextcloud/config/config.php'"
Debe quedar:
'overwriteprotocol' => 'https',
'overwritehost' => 'nextcloudsuite.urieljareth.org',
'overwrite.cli.url' => 'https://nextcloudsuite.urieljareth.org',
'dbhost' => 'nextcloud-db',
En el instalador web, el campo de host PostgreSQL debe ser nextcloud-db, no
localhost. localhost apunta al contenedor de Nextcloud, no al contenedor
PostgreSQL.
Pruebas
curl.exe -k -i -L --max-time 30 https://nextcloudsuite.urieljareth.org/status.php
curl.exe -k -sSI --max-time 30 https://nextcloudsuite.urieljareth.org/login
curl.exe -k -sSI --max-time 30 https://nextcloudsuite.urieljareth.org/remote.php/dav
Error permission denied for table oc_migrations
Si el instalador muestra:
SQLSTATE[42501]: Insufficient privilege: 7 ERROR: permission denied for table oc_migrations
primero verificar el estado real antes de resetear volumenes. En una instalacion parcial, el formulario puede fallar mientras la base queda creada.
Comprobaciones seguras:
curl.exe -k -sS --max-time 30 https://nextcloudsuite.urieljareth.org/status.php
.\scripts\Invoke-ProxmoxSsh.ps1 -Command "pct exec 102 -- docker exec nextcloud-hdcdpkm0jko3qqvn5683ercc sh -lc 'cd /app/www/public && s6-setuidgid abc php occ status'"
Verificar desde Nextcloud con el usuario real de config.php, sin imprimir la
password: conectar por PDO y ejecutar select count(*) from oc_migrations.
Si funciona, no reparar permisos: la instancia ya puede usar la tabla.
Estado verificado el 2026-05-31:
installed:truemaintenance:falseneedsDbUpgrade:falsedbhost:nextcloud-db- usuario activo de Nextcloud en PostgreSQL:
oc_admin oc_adminpuede leeroc_migrationsoc_users: 1 usuario
Resultado verificado tras recuperacion:
status.php:200 OKinstalled:truemaintenance:false- container Nextcloud:
running healthy - redirects HTTPS probados sin
Location: http://...
Pendiente tras reset de volumenes
Si el volumen de configuracion/base de datos fue eliminado, Nextcloud queda como instancia fresca. Hay que completar instalacion inicial antes de usar la app de escritorio.