Skip to Content

Self-hosting

Operate the Docker stack, maintain persistent data, and configure private Alexa voice playback.

Public origin

Follow Installation for the initial Compose deployment. Caddy handles HTTPS and routes traffic to private services. Keep the backend, browser controller, and outbound gateway on their private networks. Echo must be able to reach the public HTTPS origin for playback.

Upgrade the backend

For a backend-only update, after checking out the desired source revision:

docker compose up -d --build --no-deps ytmusic
docker compose logs --tail=100 ytmusic

Check /health/ready on the public origin before testing playback. Run one authoritative backend process so device leases and playback commands are coordinated.

Preserve persistent state

Back up the database and persistent authentication state before upgrading. The stack stores account metadata in ytmusic_data, Amazon sessions in ytmusic_alexa_cookies, and the sign-in browser profile in ytmusic_chromium_profile. Use docker compose stop for a temporary shutdown that preserves the stack's volumes.

Set up the private Alexa skill

Use the Amazon account linked in your Music Box user panel for your Echo and Alexa Developer Console. Have the Music Box administrator enable Alexa access and issue a per-account token. Deploy the private skill package with the relevant locale model and Audio Player enabled.

Skill settingValue
MUSICBOX_SERVER_URLYour public Music Box HTTPS origin
MUSICBOX_EMAILThe Music Box account email
MUSICBOX_ALEXA_TOKENThe per-account Alexa token

Try “Alexa, ask music box to play” followed by a song name after the skill is enabled.

On this page