Skip to content

Documentar el despliegue que existe de verdad - #39

Merged
Isma-L154 merged 1 commit into
mainfrom
doc-readme-migracion-issue-23
Sep 12, 2026
Merged

Isma-L154 merged 1 commit into
mainfrom
doc-readme-migracion-issue-23

Conversation

@Isma-L154

Copy link
Copy Markdown
Owner

Cierra #23.

Solo documentación, cero cambios de código. Los docs seguían describiendo un
despliegue en AWS EC2 que se reemplazó hace tres semanas, y parte de lo que le
decían al lector estaba activamente mal — sobre todo la ceremonia de rotar
cookies, que ya no forma parte de operar este bot.

deploy/README.md

Ahora arranca con el despliegue real: una máquina Linux propia en una conexión
residencial. El motivo va explícito, porque no es el evidente: la mudanza no
fue por coste. Desde una IP de datacenter YouTube exigía un archivo de cookies
exportado de una cuenta logueada, y esas cookies caducaban cada pocas semanas con
un bot muerto al final. Desde IP residencial las mismas peticiones funcionan sin
ninguna, y el TTFB midió 4,3 s contra 9,1 s.

El camino en la nube se conserva, no se borra: launch_ec2.sh sigue
funcionando, la EC2 está detenida y no terminada, y quien lea esto puede no tener
una máquina de sobra. Baja al final, con la advertencia de la IP de datacenter.

La sección de YouTube era la más engañosa

Atribuía a las cookies el mérito de superar el bot-check, cuando lo que
realmente lo arregló fue la cadena de player clients (#25). Ahora dice lo que
se midió:

cliente resultado
web_embedded funciona, ~3,2 s
mweb funciona pero lento, ~9,3 s
default, web, android_vr, tv, ios, android_music todos bot-checked

Las cookies pasan a documentarse como soportadas e innecesarias, no como
mantenimiento rutinario. Y se aclara que una IP residencial reduce el
bot-checking pero no lo elimina — los docs ya no insinúan lo contrario.

Dos notas operativas nuevas

Ambas aprendidas a golpes esta semana:

README.md

La descripción de los tests también había derivado: no mencionaba el buffer de
read-ahead, el !help generado, el cliente de Genius ni el comportamiento de
arranque y apagado, y no avisaba de que algunos tests renderizan audio con
FFmpeg real
y se saltan si no está instalado.

La sección de despliegue deja de decir "Deploy to AWS (~$6/mo)" y explica en dos
frases dónde corre de verdad y por qué.

Verificación

Cada afirmación se comprobó contra el código en vez de arrastrarse:

  • la cadena de player clients contra services/media.py
  • MemoryMax=768M y Persistent=true contra deploy/install-units.sh
  • qué instala setup.sh (ffmpeg, python3-venv, git, unzip, curl, Deno)
  • que no sobrevive ninguna referencia a Spotify en .env.example, los README
    ni los scripts

No se incluye ningún dato del host — ni nombres de máquina, ni usuarios, ni
direcciones. Es un repositorio público y el despliegue está en la red doméstica de
alguien.

Los 343 tests siguen pasando; no se tocó código.

The docs still described an AWS EC2 deployment that was replaced three weeks ago,
and some of what they told the reader to do was actively wrong — most of all the
cookie-rotation ritual, which is no longer part of running this bot at all.

`deploy/README.md` now leads with the real deployment: a self-hosted Linux box on
a residential connection. The reason is spelled out, because it is not the
obvious one — the move was not about cost. From a datacenter IP YouTube demanded
a cookies file exported from a logged-in account, and those cookies expired every
few weeks with a dead bot at the end of it. From a residential IP the same
requests work with none, and time-to-first-byte measured 4.3s against 9.1s.

The cloud path is kept rather than deleted: `launch_ec2.sh` still works, the EC2
is stopped rather than terminated, and someone reading this may not have a spare
machine. It moves to the bottom with the datacenter-IP caveat attached.

The YouTube section was the most misleading part. It credited cookies with
defeating the bot check, when what actually fixed it was the player-client chain
(#25) — `web_embedded` works and most clients yt-dlp offers are bot-checked, with
the measured numbers to say so. Cookies are now documented as supported and
unnecessary rather than as routine maintenance. A residential IP reduces the
bot-checking; it does not remove it, and the docs no longer imply it does.

Two operational notes are new, both learned the hard way this week: that daily
unattended-upgrades restart the service and can do it while glibc — the DNS
resolver — is mid-replacement, and that `TimeoutStopSec` has to stay above the
voice connect timeout because discord.py reuses that value as the deadline for
Discord to confirm a departure.

The top-level README's test description had also drifted: it listed neither the
read-ahead buffer, the generated help, the Genius client, nor the startup and
shutdown behaviour, and it did not mention that some tests render audio through
real FFmpeg and skip without it.

Every claim was checked against the code rather than carried over: the player
client chain, the memory cap, `Persistent=true` on the timer, what `setup.sh`
installs, and that no Spotify references survive anywhere.

No host details are included — no hostnames, users or addresses. This is a public
repository and the deployment is somebody's home network.

Closes #23
@Isma-L154
Isma-L154 merged commit 2eb8cb4 into main Sep 12, 2026
3 checks passed
@Isma-L154
Isma-L154 deleted the doc-readme-migracion-issue-23 branch September 12, 2026 06:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant